Favorites support
[gonvert] / src / gonvert_glade.py
index 0fc56cd..e42b1e4 100755 (executable)
@@ -241,7 +241,8 @@ class Gonvert(object):
                ):
                        scrollingWidget = widgets.get_widget(scrollingWidgetName)
                        assert scrollingWidget is not None, scrollingWidgetName
-                       hildonize.hildonize_scrollwindow_with_viewport(scrollingWidget)
+                       scroller = hildonize.hildonize_scrollwindow(scrollingWidget)
+                       scroller.show_all()
 
                # Simplify the UI
                if hildonize.IS_HILDON_SUPPORTED or constants.FORCE_HILDON_LIKE:
@@ -285,8 +286,8 @@ class Gonvert(object):
                if not hildonize.IS_HILDON_SUPPORTED:
                        _moduleLogger.info("No hildonization support")
 
-               hildonize.set_application_title(
-                       self._mainWindow, "%s - Unit Conversion Utility" % constants.__pretty_app_name__
+               hildonize.set_application_name(
+                       "%s - Unit Conversion Utility" % constants.__pretty_app_name__
                )
                iconPath = pixmapspath + '/gonvert.png'
                if os.path.exists(iconPath):
@@ -672,12 +673,16 @@ class Gonvert(object):
                if event.keyval == gtk.keysyms.uparrow or event.keyval == gtk.keysyms.Up:
                        index, column = self._unitsView.get_cursor()
                        newIndex = max(index[0]-1, 0)
-                       self._unitsView.set_cursor((newIndex, ), column, True)
+                       path = (newIndex, )
+                       self._unitsView.set_cursor(path, column, True)
+                       self._unitsView.scroll_to_cell(path, column, False, 0, 0)
                        return True # override default behavior
                elif event.keyval == gtk.keysyms.downarrow or event.keyval == gtk.keysyms.Down:
                        index, column = self._unitsView.get_cursor()
                        newIndex = min(index[0]+1, len(self._unitModel)-1)
-                       self._unitsView.set_cursor((newIndex, ), column, True)
+                       path = (newIndex, )
+                       self._unitsView.set_cursor(path, column, True)
+                       self._unitsView.scroll_to_cell(path, column, False, 0, 0)
                        return True # override default behavior
 
        @gtk_toolbox.log_exception(_moduleLogger)