diff options
author | Matthias Clasen <mclasen@fedoraproject.org> | 2008-01-22 04:29:30 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@fedoraproject.org> | 2008-01-22 04:29:30 +0000 |
commit | bf71ec38907e622f669bf4bf0a116576297b8066 (patch) | |
tree | 87cba71e1e7e53b2413dc4a21c111c9f93c7b0cd | |
parent | 65bea230194ce2226fd3bf98b6eef3bc82c022a7 (diff) | |
download | gnome-applets-bf71ec38907e622f669bf4bf0a116576297b8066.tar.gz gnome-applets-bf71ec38907e622f669bf4bf0a116576297b8066.tar.xz gnome-applets-bf71ec38907e622f669bf4bf0a116576297b8066.zip |
Fix invest applet on vertical panelsgnome-applets-2_21_4-3_fc9
-rw-r--r-- | gnome-applets.spec | 9 | ||||
-rw-r--r-- | vertical-invest.patch | 73 |
2 files changed, 81 insertions, 1 deletions
diff --git a/gnome-applets.spec b/gnome-applets.spec index b681fea..1de7d0d 100644 --- a/gnome-applets.spec +++ b/gnome-applets.spec @@ -35,7 +35,7 @@ Summary: Small applications for the GNOME panel Name: gnome-applets Version: 2.21.4 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 License: GPLv2+ and GFDL+ Group: User Interface/Desktops @@ -74,6 +74,9 @@ Patch40: gnome-applets-null-battstat.patch # fixed in upstream svn Patch41: locations.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=382100 +Patch42: vertical-invest.patch + BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gtk2-devel >= %{gtk2_version} BuildRequires: libgnomeui-devel >= %{libgnomeui_version} @@ -164,6 +167,7 @@ small utilities for the GNOME panel. %patch39 -p1 -b .gweather-network %patch40 -p1 -b .battstat-null %patch41 -p1 -b .locations +%patch42 -p1 -b .vertical-invest cp gswitchit/gswitchit-applet.png gswitchit/gswitchit-properties-capplet.png @@ -335,6 +339,9 @@ fi %{_sysconfdir}/security/console.apps/* %changelog +* Mon Jan 21 2008 Matthias Clasen <mclasen@redhat.com> - 1:2.21.4-3 +- Fix the invest applet on vertical panels + * Sun Jan 20 2008 Matthias Clasen <mclasen@redhat.com> - 1:2.21.4-2 - Make the weather applet find locations.xml again diff --git a/vertical-invest.patch b/vertical-invest.patch new file mode 100644 index 0000000..5f11794 --- /dev/null +++ b/vertical-invest.patch @@ -0,0 +1,73 @@ +diff -up gnome-applets-2.21.4/invest-applet/invest/applet.py.vertical gnome-applets-2.21.4/invest-applet/invest/applet.py +--- gnome-applets-2.21.4/invest-applet/invest/applet.py.vertical 2008-01-21 23:24:51.000000000 -0500 ++++ gnome-applets-2.21.4/invest-applet/invest/applet.py 2008-01-21 23:24:55.000000000 -0500 +@@ -45,8 +45,15 @@ class InvestApplet: + + self.investwidget.connect('row-activated', lambda treeview, path, view_column: self.tb.set_active(False)) + get_quotes_updater().connect('quotes-updated', self._on_quotes_updated) +- +- box = gtk.HBox() ++ ++ applet.connect('change-orient', self._on_orient_changed) ++ ++ orient = applet.get_orient() ++ if orient == gnomeapplet.ORIENT_RIGHT or orient == gnomeapplet.ORIENT_LEFT: ++ box = gtk.VBox() ++ else: ++ box = gtk.HBox() ++ + box.add(self.tb) + box.add(self.investticker) + +@@ -68,6 +75,22 @@ class InvestApplet: + def on_refresh(self, component, verb): + get_quotes_updater().refresh() + ++ def _on_orient_changed(self, applet, orient): ++ if orient == gnomeapplet.ORIENT_RIGHT or orient == gnomeapplet.ORIENT_LEFT: ++ box = gtk.VBox() ++ else: ++ box = gtk.HBox() ++ ++ oldbox = self.investticker.parent ++ self.investticker.reparent(box) ++ self.tb = ToggleButton(applet, self.pw) ++ box.add(self.tb) ++ ++ box.show_all() ++ self.applet.remove(oldbox) ++ self.applet.add(box) ++ ++ + def _on_quotes_updated(self, updater): + pass + #invest.dbusnotification.notify( +@@ -93,10 +116,13 @@ class ToggleButton(gtk.ToggleButton): + except Exception, msg: + image.set_from_icon_name("stock_chart", gtk.ICON_SIZE_BUTTON) + +- hbox = gtk.HBox() +- hbox.pack_start(image) +- + orient = applet.get_orient() ++ if orient == gnomeapplet.ORIENT_RIGHT or orient == gnomeapplet.ORIENT_LEFT: ++ box = gtk.VBox() ++ else: ++ box = gtk.HBox() ++ ++ box.pack_start(image) + arrow_dir = gtk.ARROW_DOWN + if orient == gnomeapplet.ORIENT_RIGHT: + arrow_dir = gtk.ARROW_RIGHT +@@ -107,9 +133,9 @@ class ToggleButton(gtk.ToggleButton): + elif orient == gnomeapplet.ORIENT_UP: + arrow_dir = gtk.ARROW_UP + +- hbox.pack_start(gtk.Arrow(arrow_dir, gtk.SHADOW_NONE)) ++ box.pack_start(gtk.Arrow(arrow_dir, gtk.SHADOW_NONE)) + +- self.add(hbox) ++ self.add(box) + + def toggled(self, togglebutton): + if togglebutton.get_active(): |