Fixing minor bugs
authorEd Page <eopage@byu.net>
Sat, 3 Apr 2010 05:16:19 +0000 (00:16 -0500)
committerEd Page <eopage@byu.net>
Sat, 3 Apr 2010 05:16:19 +0000 (00:16 -0500)
src/hildonize.py
src/quicknote_gtk.py [changed mode: 0644->0755]

index 09ee705..77d585a 100755 (executable)
@@ -277,30 +277,16 @@ else:
        hildonize_text_entry = _null_hildonize_text_entry
 
 
-def _hildon_mark_window_rotatable(window):
-       # gtk documentation is unclear whether this does a "=" or a "|="
-       window.set_flags(hildon.HILDON_PORTRAIT_MODE_SUPPORT)
-
-
-def _null_mark_window_rotatable(window):
-       pass
-
-
-try:
-       hildon.HILDON_PORTRAIT_MODE_SUPPORT
-       mark_window_rotatable = _hildon_mark_window_rotatable
-except AttributeError:
-       mark_window_rotatable = _null_mark_window_rotatable
-
-
 def _hildon_window_to_portrait(window):
        # gtk documentation is unclear whether this does a "=" or a "|="
-       window.set_flags(hildon.HILDON_PORTRAIT_MODE_SUPPORT)
+       flags = hildon.PORTRAIT_MODE_SUPPORT | hildon.PORTRAIT_MODE_REQUEST
+       hildon.hildon_gtk_window_set_portrait_flags(window, flags)
 
 
 def _hildon_window_to_landscape(window):
        # gtk documentation is unclear whether this does a "=" or a "&= ~"
-       window.unset_flags(hildon.HILDON_PORTRAIT_MODE_REQUEST)
+       flags = hildon.PORTRAIT_MODE_SUPPORT
+       hildon.hildon_gtk_window_set_portrait_flags(window, flags)
 
 
 def _null_window_to_portrait(window):
@@ -312,8 +298,9 @@ def _null_window_to_landscape(window):
 
 
 try:
-       hildon.HILDON_PORTRAIT_MODE_SUPPORT
-       hildon.HILDON_PORTRAIT_MODE_REQUEST
+       hildon.PORTRAIT_MODE_SUPPORT
+       hildon.PORTRAIT_MODE_REQUEST
+       hildon.hildon_gtk_window_set_portrait_flags
 
        window_to_portrait = _hildon_window_to_portrait
        window_to_landscape = _hildon_window_to_landscape
old mode 100644 (file)
new mode 100755 (executable)
index 92482fa..7656808
@@ -240,12 +240,11 @@ class QuicknoteProgram(hildonize.get_app_class()):
                        self._wordWrapEnabled = config.getboolean(constants.__pretty_app_name__, "wordwrap")
                        self._window_in_fullscreen = config.getboolean(constants.__pretty_app_name__, "fullscreen")
                except ConfigParser.NoSectionError, e:
-                       warnings.warn(
+                       _moduleLogger.infp(
                                "Settings file %s is missing section %s" % (
                                        self._user_settings,
                                        e.section,
-                               ),
-                               stacklevel=2
+                               )
                        )
 
                self._notizen.set_wordwrap(self._wordWrapEnabled)
@@ -326,6 +325,7 @@ class QuicknoteProgram(hildonize.get_app_class()):
                                self._clipboard.set_text(str(log))
                        return True
 
+       @gtk_toolbox.log_exception(_moduleLogger)
        def _on_toggle_search(self, *args):
                self._toggle_search()