gnome-applets r10759 - in trunk/invest-applet: . invest
- From: callum svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-applets r10759 - in trunk/invest-applet: . invest
- Date: Sun, 16 Mar 2008 04:08:16 +0000 (GMT)
Author: callum
Date: Sun Mar 16 04:08:16 2008
New Revision: 10759
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=10759&view=rev
Log:
Make sure the invest applet always responds to right-clicks. Where-ever they may be.
Modified:
trunk/invest-applet/ChangeLog
trunk/invest-applet/invest/applet.py
trunk/invest-applet/invest/widgets.py
Modified: trunk/invest-applet/invest/applet.py
==============================================================================
--- trunk/invest-applet/invest/applet.py (original)
+++ trunk/invest-applet/invest/applet.py Sun Mar 16 04:08:16 2008
@@ -76,13 +76,14 @@
# _("Financial Report"),
# _("Quotes updated"),
# 3000)
-
+
class ToggleButton(gtk.ToggleButton):
def __init__(self, applet, pw):
gtk.ToggleButton.__init__(self)
self.pw = pw
self.connect("toggled", self.toggled)
+ self.connect("button-press-event", self.on_button_press)
self.set_relief(gtk.RELIEF_NONE)
@@ -119,6 +120,10 @@
else:
self.pw.hide()
+ def on_button_press(self, togglebutton, event):
+ if event.button != 1:
+ togglebutton.stop_emission("button-press-event")
+
gobject.type_register(ToggleButton)
class ProgramWindow(gtk.Window):
Modified: trunk/invest-applet/invest/widgets.py
==============================================================================
--- trunk/invest-applet/invest/widgets.py (original)
+++ trunk/invest-applet/invest/widgets.py Sun Mar 16 04:08:16 2008
@@ -125,7 +125,7 @@
def on_size_allocate(self, widget, allocation):
if self.previous_allocation == (allocation.width, allocation.height):
return
-
+
self.pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, allocation.height, allocation.height)
self.set_color("grey")
self.previous_allocation = (allocation.width, allocation.height)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]