I don't know the side effects of making it return 0, so after a bit of
poking in the code I realized it's crashing inside the set_properties
method, which is failing and not setting a proper exception.
set_property, on the other hand, that does the same but one property at
a time, works fine. What I did was to replace one call of set_properties
for three calls of set_property, like this:

--- tweakview.py        2012-10-29 15:06:50.000000000 -0200
+++ /home/ursula/tweakview.py   2013-02-19 18:36:47.952766792 -0300
@@ -174,19 +174,19 @@
     def _search_cancel(self):
         self._search_cancel_cb()
         self._entry.set_text("")
-        
+
     def _on_changed(self, entry):
         if not self._entry.get_text():
-            self._entry.set_properties(
-                    secondary_icon_name="edit-find" + EntryManager.SYMBOLIC,
-                    secondary_icon_activatable=False,
-                    secondary_icon_sensitive=False)
+            self._entry.set_property("secondary_icon_name",
+                                     "edit-find" + EntryManager.SYMBOLIC)
+            self._entry.set_property("secondary_icon_activatable", False)
+            self._entry.set_property("secondary_icon_sensitive", False)
         else:
-            self._entry.set_properties(
-                    secondary_icon_name="edit-clear" + EntryManager.SYMBOLIC,
-                    secondary_icon_activatable=True,
-                    secondary_icon_sensitive=True)
-    
+            self._entry.set_property("secondary_icon_name",
+                                     "edit-clear" + EntryManager.SYMBOLIC)
+            self._entry.set_property("secondary_icon_activatable", True)
+            self._entry.set_property("secondary_icon_sensitive", True)
+
     def _on_key_press(self, entry, event):
         if event.keyval == Gdk.KEY_Return:
             self._search()


Of course it needs a better investigation for a proper fix, preferentially by 
someone that understands the inner workings of GObject, but it kinda works with 
this workaround.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1123372

Title:
  gnome-tweak-tool crashed with SystemError in _on_changed(): error
  return without exception set

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-tweak-tool/+bug/1123372/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to