Merge lp:~rodrigo-moya/ubuntu/natty/gnome-applets/no-more-deprecated into lp:~ubuntu-desktop/gnome-applets/ubuntu
- Natty (11.04)
- no-more-deprecated
- Merge into ubuntu
Proposed by
Rodrigo Moya
Status: | Merged |
---|---|
Merged at revision: | 57 |
Proposed branch: | lp:~rodrigo-moya/ubuntu/natty/gnome-applets/no-more-deprecated |
Merge into: | lp:~ubuntu-desktop/gnome-applets/ubuntu |
Diff against target: |
1259 lines (+953/-140) 8 files modified
debian/changelog (+15/-0) debian/control (+6/-10) debian/control.in (+6/-10) debian/patches/01_no_more_deprecated.patch (+915/-0) debian/patches/81_silent_applet_cleaning (+5/-8) debian/patches/86_deprecate_battstatus.patch (+2/-63) debian/patches/87_deprecate_modemlights.patch (+2/-48) debian/patches/series (+2/-1) |
To merge this branch: | bzr merge lp:~rodrigo-moya/ubuntu/natty/gnome-applets/no-more-deprecated |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sebastien Bacher | Needs Fixing | ||
Review via email: mp+41494@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 59. By Rodrigo Moya
-
Some more invest applet fixes
- 60. By Rodrigo Moya
-
Add bug numbers
- 61. By Rodrigo Moya
-
New upstream release
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2010-11-25 23:24:33 +0000 | |||
3 | +++ debian/changelog 2010-11-29 16:14:03 +0000 | |||
4 | @@ -1,3 +1,18 @@ | |||
5 | 1 | gnome-applets (2.32.1.1-0ubuntu2) UNRELEASED; urgency=low | ||
6 | 2 | |||
7 | 3 | * debian/control*: | ||
8 | 4 | - Don't build-depend on deprecated python-gnome bindings | ||
9 | 5 | - Depend on introspection packages | ||
10 | 6 | * debian/patches/01_no_more_deprecated.patch: | ||
11 | 7 | - Add patch to migrate null_applet to libpanel-applet-3 (LP: #673109) | ||
12 | 8 | and invest applet to use GObject introspection (LP: #673110) | ||
13 | 9 | * debian/patches/81_silent_applet_cleaning: | ||
14 | 10 | * debian/patches/86_deprecate_battstatus.patch: | ||
15 | 11 | * debian/patches/87_deprecate_modemlights.patch: | ||
16 | 12 | - Rebased patches | ||
17 | 13 | |||
18 | 14 | -- Rodrigo Moya <rodrigo.moya@canonical.com> Fri, 26 Nov 2010 19:10:27 +0100 | ||
19 | 15 | |||
20 | 1 | gnome-applets (2.32.1.1-0ubuntu1) natty; urgency=low | 16 | gnome-applets (2.32.1.1-0ubuntu1) natty; urgency=low |
21 | 2 | 17 | ||
22 | 3 | * New upstream release | 18 | * New upstream release |
23 | 4 | 19 | ||
24 | === modified file 'debian/control' | |||
25 | --- debian/control 2010-11-09 22:44:31 +0000 | |||
26 | +++ debian/control 2010-11-29 16:14:03 +0000 | |||
27 | @@ -18,7 +18,6 @@ | |||
28 | 18 | libglib2.0-dev (>= 2.22.0), | 18 | libglib2.0-dev (>= 2.22.0), |
29 | 19 | libgconf2-dev (>= 2.8.0), | 19 | libgconf2-dev (>= 2.8.0), |
30 | 20 | scrollkeeper (>= 0.1.4) | rarian-compat, | 20 | scrollkeeper (>= 0.1.4) | rarian-compat, |
31 | 21 | libpanel-applet2-dev (>= 2.13.4), | ||
32 | 22 | libpanel-applet-3-dev, | 21 | libpanel-applet-3-dev, |
33 | 23 | libgtop2-dev (>= 2.11.92), | 22 | libgtop2-dev (>= 2.11.92), |
34 | 24 | libwnck-dev (>= 2.9.3), | 23 | libwnck-dev (>= 2.9.3), |
35 | @@ -26,9 +25,7 @@ | |||
36 | 26 | libnotify-dev (>= 0.3.2), | 25 | libnotify-dev (>= 0.3.2), |
37 | 27 | libdbus-1-dev (>= 1.1.2), | 26 | libdbus-1-dev (>= 1.1.2), |
38 | 28 | libdbus-glib-1-dev (>= 0.74), | 27 | libdbus-glib-1-dev (>= 0.74), |
39 | 29 | python-gtk2-dev (>= 2.6), | ||
40 | 30 | python-gobject-dev (>= 2.6), | 28 | python-gobject-dev (>= 2.6), |
41 | 31 | python-gnome2-dev (>= 2.10), | ||
42 | 32 | gnome-icon-theme (>= 2.15.91), | 29 | gnome-icon-theme (>= 2.15.91), |
43 | 33 | libxml2-dev (>= 2.5.0), | 30 | libxml2-dev (>= 2.5.0), |
44 | 34 | libgweather-dev (>= 2.22.1), | 31 | libgweather-dev (>= 2.22.1), |
45 | @@ -47,8 +44,7 @@ | |||
46 | 47 | network-manager-dev (>= 0.7), | 44 | network-manager-dev (>= 0.7), |
47 | 48 | x11proto-kb-dev, | 45 | x11proto-kb-dev, |
48 | 49 | gnome-pkg-tools (>= 0.10), | 46 | gnome-pkg-tools (>= 0.10), |
51 | 50 | python-support (>= 0.4), | 47 | python-support (>= 0.4) |
50 | 51 | python-gnome2-desktop-dev | ||
52 | 52 | Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/gnome-applets/ubuntu | 48 | Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/gnome-applets/ubuntu |
53 | 53 | 49 | ||
54 | 54 | Package: gnome-applets-data | 50 | Package: gnome-applets-data |
55 | @@ -71,17 +67,17 @@ | |||
56 | 71 | gnome-panel (>= 2.32), | 67 | gnome-panel (>= 2.32), |
57 | 72 | gnome-icon-theme (>= 2.15.91), | 68 | gnome-icon-theme (>= 2.15.91), |
58 | 73 | ${python:Depends}, | 69 | ${python:Depends}, |
60 | 74 | gvfs | 70 | gvfs, |
61 | 71 | gir1.0-gtk-2.0, | ||
62 | 72 | gir1.0-gdkpixbuf-2.0, | ||
63 | 73 | gir1.0-gconf-2.0, | ||
64 | 74 | gir1.0-panelapplet-3.0 | ||
65 | 75 | Conflicts: trashapplet | 75 | Conflicts: trashapplet |
66 | 76 | Replaces: trashapplet | 76 | Replaces: trashapplet |
67 | 77 | Provides: trashapplet | 77 | Provides: trashapplet |
68 | 78 | Recommends: gnome-system-monitor, | 78 | Recommends: gnome-system-monitor, |
69 | 79 | gnome-media, | 79 | gnome-media, |
70 | 80 | python-gconf, | ||
71 | 81 | python-gnome2, | ||
72 | 82 | python-gnomeapplet, | ||
73 | 83 | python-gobject, | 80 | python-gobject, |
74 | 84 | python-gtk2, | ||
75 | 85 | policykit-1-gnome | 81 | policykit-1-gnome |
76 | 86 | Suggests: tomboy, | 82 | Suggests: tomboy, |
77 | 87 | gnome-netstatus-applet, | 83 | gnome-netstatus-applet, |
78 | 88 | 84 | ||
79 | === modified file 'debian/control.in' | |||
80 | --- debian/control.in 2010-11-09 22:44:31 +0000 | |||
81 | +++ debian/control.in 2010-11-29 16:14:03 +0000 | |||
82 | @@ -13,7 +13,6 @@ | |||
83 | 13 | libglib2.0-dev (>= 2.22.0), | 13 | libglib2.0-dev (>= 2.22.0), |
84 | 14 | libgconf2-dev (>= 2.8.0), | 14 | libgconf2-dev (>= 2.8.0), |
85 | 15 | scrollkeeper (>= 0.1.4) | rarian-compat, | 15 | scrollkeeper (>= 0.1.4) | rarian-compat, |
86 | 16 | libpanel-applet2-dev (>= 2.13.4), | ||
87 | 17 | libpanel-applet-3-dev, | 16 | libpanel-applet-3-dev, |
88 | 18 | libgtop2-dev (>= 2.11.92), | 17 | libgtop2-dev (>= 2.11.92), |
89 | 19 | libwnck-dev (>= 2.9.3), | 18 | libwnck-dev (>= 2.9.3), |
90 | @@ -21,9 +20,7 @@ | |||
91 | 21 | libnotify-dev (>= 0.3.2), | 20 | libnotify-dev (>= 0.3.2), |
92 | 22 | libdbus-1-dev (>= 1.1.2), | 21 | libdbus-1-dev (>= 1.1.2), |
93 | 23 | libdbus-glib-1-dev (>= 0.74), | 22 | libdbus-glib-1-dev (>= 0.74), |
94 | 24 | python-gtk2-dev (>= 2.6), | ||
95 | 25 | python-gobject-dev (>= 2.6), | 23 | python-gobject-dev (>= 2.6), |
96 | 26 | python-gnome2-dev (>= 2.10), | ||
97 | 27 | gnome-icon-theme (>= 2.15.91), | 24 | gnome-icon-theme (>= 2.15.91), |
98 | 28 | libxml2-dev (>= 2.5.0), | 25 | libxml2-dev (>= 2.5.0), |
99 | 29 | libgweather-dev (>= 2.22.1), | 26 | libgweather-dev (>= 2.22.1), |
100 | @@ -42,8 +39,7 @@ | |||
101 | 42 | network-manager-dev (>= 0.7), | 39 | network-manager-dev (>= 0.7), |
102 | 43 | x11proto-kb-dev, | 40 | x11proto-kb-dev, |
103 | 44 | gnome-pkg-tools (>= 0.10), | 41 | gnome-pkg-tools (>= 0.10), |
106 | 45 | python-support (>= 0.4), | 42 | python-support (>= 0.4) |
105 | 46 | python-gnome2-desktop-dev | ||
107 | 47 | Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/gnome-applets/ubuntu | 43 | Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/gnome-applets/ubuntu |
108 | 48 | 44 | ||
109 | 49 | Package: gnome-applets-data | 45 | Package: gnome-applets-data |
110 | @@ -66,17 +62,17 @@ | |||
111 | 66 | gnome-panel (>= 2.32), | 62 | gnome-panel (>= 2.32), |
112 | 67 | gnome-icon-theme (>= 2.15.91), | 63 | gnome-icon-theme (>= 2.15.91), |
113 | 68 | ${python:Depends}, | 64 | ${python:Depends}, |
115 | 69 | gvfs | 65 | gvfs, |
116 | 66 | gir1.0-gtk-2.0, | ||
117 | 67 | gir1.0-gdkpixbuf-2.0, | ||
118 | 68 | gir1.0-gconf-2.0, | ||
119 | 69 | gir1.0-panelapplet-3.0 | ||
120 | 70 | Conflicts: trashapplet | 70 | Conflicts: trashapplet |
121 | 71 | Replaces: trashapplet | 71 | Replaces: trashapplet |
122 | 72 | Provides: trashapplet | 72 | Provides: trashapplet |
123 | 73 | Recommends: gnome-system-monitor, | 73 | Recommends: gnome-system-monitor, |
124 | 74 | gnome-media, | 74 | gnome-media, |
125 | 75 | python-gconf, | ||
126 | 76 | python-gnome2, | ||
127 | 77 | python-gnomeapplet, | ||
128 | 78 | python-gobject, | 75 | python-gobject, |
129 | 79 | python-gtk2, | ||
130 | 80 | policykit-1-gnome | 76 | policykit-1-gnome |
131 | 81 | Suggests: tomboy, | 77 | Suggests: tomboy, |
132 | 82 | gnome-netstatus-applet, | 78 | gnome-netstatus-applet, |
133 | 83 | 79 | ||
134 | === added file 'debian/patches/01_no_more_deprecated.patch' | |||
135 | --- debian/patches/01_no_more_deprecated.patch 1970-01-01 00:00:00 +0000 | |||
136 | +++ debian/patches/01_no_more_deprecated.patch 2010-11-29 16:14:03 +0000 | |||
137 | @@ -0,0 +1,915 @@ | |||
138 | 1 | diff --git a/configure.in b/configure.in | ||
139 | 2 | index 1779cd0..eca3982 100644 | ||
140 | 3 | --- a/configure.in | ||
141 | 4 | +++ b/configure.in | ||
142 | 5 | @@ -16,7 +16,6 @@ GLIB_REQUIRED=2.22.0 | ||
143 | 6 | GIO_REQUIRED=2.15.3 | ||
144 | 7 | GCONF_REQUIRED=2.8.0 | ||
145 | 8 | SCROLLKEEPER_REQUIRED=0.1.4 | ||
146 | 9 | -LIBPANEL_REQUIRED=2.13.4 | ||
147 | 10 | LIBPANEL3_REQUIRED=2.31.2 | ||
148 | 11 | LIBGTOP_REQUIRED=2.11.92 | ||
149 | 12 | LIBXKLAVIER_REQUIRED=4.0 | ||
150 | 13 | @@ -26,9 +25,7 @@ LIBNOTIFY_REQUIRED=0.3.2 | ||
151 | 14 | HAL_REQUIRED=0.5.3 | ||
152 | 15 | DBUS_REQUIRED=1.1.2 | ||
153 | 16 | DBUS_GLIB_REQUIRED=0.74 | ||
154 | 17 | -PYGTK_REQUIRED=2.6 | ||
155 | 18 | -PYGOBJECT_REQUIRED=2.6 | ||
156 | 19 | -GNOME_PYTHON_REQUIRED=2.10 | ||
157 | 20 | +PYGOBJECT_REQUIRED=2.26 | ||
158 | 21 | GNOME_ICON_THEME_REQUIRED=2.15.91 | ||
159 | 22 | LIBXML_REQUIRED=2.5.0 | ||
160 | 23 | GWEATHER_REQUIRED=2.22.1 | ||
161 | 24 | @@ -116,11 +113,6 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED) | ||
162 | 25 | AC_SUBST(GTK_FLAGS) | ||
163 | 26 | AC_SUBST(GTK_LIBS) | ||
164 | 27 | |||
165 | 28 | -dnl -- check for libpanelapplet (required) ------------------------------------ | ||
166 | 29 | -PKG_CHECK_MODULES(GNOME_APPLETS, libpanelapplet-2.0 >= $LIBPANEL_REQUIRED) | ||
167 | 30 | -AC_SUBST(GNOME_APPLETS_CFLAGS) | ||
168 | 31 | -AC_SUBST(GNOME_APPLETS_LIBS) | ||
169 | 32 | - | ||
170 | 33 | dnl -- check for libpanelapplet3 (required) ------------------------------------ | ||
171 | 34 | PKG_CHECK_MODULES(GNOME_APPLETS3, libpanelapplet-3.0 >= $LIBPANEL3_REQUIRED) | ||
172 | 35 | AC_SUBST(GNOME_APPLETS3_CFLAGS) | ||
173 | 36 | @@ -254,9 +246,7 @@ dnl -- check for Python/GNOME modules (optional) ------------------------------ | ||
174 | 37 | PYGTK_CFLAGS= | ||
175 | 38 | PYGTK_LIBS= | ||
176 | 39 | PKG_CHECK_MODULES(PYGTK, | ||
177 | 40 | - pygtk-2.0 >= $PYGTK_REQUIRED | ||
178 | 41 | - pygobject-2.0 >= $PYGOBJECT_REQUIRED | ||
179 | 42 | - gnome-python-2.0 >= $GNOME_PYTHON_REQUIRED, | ||
180 | 43 | + pygobject-2.0 >= $PYGOBJECT_REQUIRED, | ||
181 | 44 | HAVE_PYGTK="yes", HAVE_PYGTK="no") | ||
182 | 45 | AC_SUBST(PYGTK_LIBS) | ||
183 | 46 | AC_SUBST(PYGTK_CFLAGS) | ||
184 | 47 | @@ -559,14 +549,7 @@ dnl *************************************************************************** | ||
185 | 48 | dnl *** invest-applet specific checks *** | ||
186 | 49 | dnl *************************************************************************** | ||
187 | 50 | |||
188 | 51 | -if test "x$HAVE_PYGTK" = "xyes" -a "x$HAVE_PYHDRS" = "xyes"; then | ||
189 | 52 | - AM_CHECK_PYMOD(gnomeapplet,, | ||
190 | 53 | - BUILD_INVEST_APPLET="yes", BUILD_INVEST_APPLET="no") | ||
191 | 54 | -else | ||
192 | 55 | - BUILD_INVEST_APPLET="no" | ||
193 | 56 | -fi | ||
194 | 57 | - | ||
195 | 58 | -AM_CONDITIONAL(BUILD_INVEST_APPLET, test "x$BUILD_INVEST_APPLET" = "xyes") | ||
196 | 59 | +AM_CONDITIONAL(BUILD_INVEST_APPLET, test "x$HAVE_PYGTK" = "xyes") | ||
197 | 60 | |||
198 | 61 | dnl *************************************************************************** | ||
199 | 62 | dnl *** Check if IPv6 is available *** | ||
200 | 63 | diff --git a/invest-applet/invest/__init__.py b/invest-applet/invest/__init__.py | ||
201 | 64 | index 29fb7d6..ec53bcb 100644 | ||
202 | 65 | --- a/invest-applet/invest/__init__.py | ||
203 | 66 | +++ b/invest-applet/invest/__init__.py | ||
204 | 67 | @@ -3,7 +3,7 @@ from os.path import join, exists, isdir, isfile, dirname, abspath, expanduser | ||
205 | 68 | from types import ListType | ||
206 | 69 | import datetime | ||
207 | 70 | |||
208 | 71 | -import gtk, gtk.gdk, gconf, gobject | ||
209 | 72 | +from gi.repository import Gtk, Gdk, GConf, GObject | ||
210 | 73 | import cPickle | ||
211 | 74 | |||
212 | 75 | import networkmanager | ||
213 | 76 | @@ -55,7 +55,7 @@ if not exists(USER_INVEST_DIR): | ||
214 | 77 | os.chdir(expanduser("~")) | ||
215 | 78 | |||
216 | 79 | #Gconf client | ||
217 | 80 | -GCONF_CLIENT = gconf.client_get_default() | ||
218 | 81 | +GCONF_CLIENT = GConf.Client.get_default() | ||
219 | 82 | |||
220 | 83 | # GConf directory for invest in window mode and shared settings | ||
221 | 84 | GCONF_DIR = "/apps/invest" | ||
222 | 85 | @@ -205,7 +205,7 @@ def get_gnome_proxy_retry(client, attempts, sleep): | ||
223 | 86 | gobject.timeout_add(sleep * 1000, get_gnome_proxy_retry, client, attempts, sleep) | ||
224 | 87 | |||
225 | 88 | # use gconf to get proxy config | ||
226 | 89 | -client = gconf.client_get_default() | ||
227 | 90 | +client = GConf.Client.get_default() | ||
228 | 91 | get_gnome_proxy(client) | ||
229 | 92 | |||
230 | 93 | |||
231 | 94 | diff --git a/invest-applet/invest/about.py b/invest-applet/invest/about.py | ||
232 | 95 | index e2829e8..f228ae1 100644 | ||
233 | 96 | --- a/invest-applet/invest/about.py | ||
234 | 97 | +++ b/invest-applet/invest/about.py | ||
235 | 98 | @@ -3,16 +3,16 @@ from os.path import join | ||
236 | 99 | from gettext import gettext as _ | ||
237 | 100 | from invest.defs import VERSION | ||
238 | 101 | import invest | ||
239 | 102 | -import gtk, gtk.gdk | ||
240 | 103 | +from gi.repository import Gtk, GdkPixbuf | ||
241 | 104 | |||
242 | 105 | invest_logo = None | ||
243 | 106 | try: | ||
244 | 107 | - invest_logo = gtk.gdk.pixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest_neutral.svg"), 96, 96) | ||
245 | 108 | + invest_logo = GdkPixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest_neutral.svg"), 96, 96) | ||
246 | 109 | except Exception, msg: | ||
247 | 110 | pass | ||
248 | 111 | |||
249 | 112 | def show_about(): | ||
250 | 113 | - about = gtk.AboutDialog() | ||
251 | 114 | + about = Gtk.AboutDialog() | ||
252 | 115 | infos = { | ||
253 | 116 | "program-name" : _("Invest"), | ||
254 | 117 | "logo" : invest_logo, | ||
255 | 118 | diff --git a/invest-applet/invest/applet.py b/invest-applet/invest/applet.py | ||
256 | 119 | index 4cd5ad7..a0236f2 100644 | ||
257 | 120 | --- a/invest-applet/invest/applet.py | ||
258 | 121 | +++ b/invest-applet/invest/applet.py | ||
259 | 122 | @@ -1,17 +1,16 @@ | ||
260 | 123 | import os, time | ||
261 | 124 | from os.path import * | ||
262 | 125 | -import gnomeapplet, gtk, gtk.gdk, gconf, gobject | ||
263 | 126 | -gobject.threads_init() | ||
264 | 127 | +from gi.repository import Gdk, GdkPixbuf, Gtk, PanelApplet, GObject, GConf | ||
265 | 128 | +GObject.threads_init() | ||
266 | 129 | from gettext import gettext as _ | ||
267 | 130 | -import gconf | ||
268 | 131 | |||
269 | 132 | import invest, invest.about, invest.chart, invest.preferences, invest.defs | ||
270 | 133 | from invest.quotes import QuoteUpdater | ||
271 | 134 | from invest.widgets import * | ||
272 | 135 | |||
273 | 136 | -gtk.window_set_default_icon_from_file(join(invest.ART_DATA_DIR, "invest_neutral.svg")) | ||
274 | 137 | +Gtk.Window.set_default_icon_from_file(join(invest.ART_DATA_DIR, "invest_neutral.svg")) | ||
275 | 138 | |||
276 | 139 | -class InvestApplet: | ||
277 | 140 | +class InvestApplet(PanelApplet.Applet): | ||
278 | 141 | def __init__(self, applet): | ||
279 | 142 | self.applet = applet | ||
280 | 143 | self.applet.setup_menu_from_file ( | ||
281 | 144 | @@ -22,8 +21,8 @@ class InvestApplet: | ||
282 | 145 | ("Refresh", self.on_refresh) | ||
283 | 146 | ]) | ||
284 | 147 | |||
285 | 148 | - evbox = gtk.HBox() | ||
286 | 149 | - self.applet_icon = gtk.Image() | ||
287 | 150 | + evbox = Gtk.HBox() | ||
288 | 151 | + self.applet_icon = Gtk.Image() | ||
289 | 152 | self.set_applet_icon(0) | ||
290 | 153 | self.applet_icon.show() | ||
291 | 154 | evbox.add(self.applet_icon) | ||
292 | 155 | @@ -43,7 +42,7 @@ class InvestApplet: | ||
293 | 156 | self.new_ilw() | ||
294 | 157 | |||
295 | 158 | def button_clicked(self, widget,event): | ||
296 | 159 | - if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: | ||
297 | 160 | + if event.type == Gdk.BUTTON_PRESS and event.button == 1: | ||
298 | 161 | # Three cases... | ||
299 | 162 | if len (invest.STOCKS) == 0: | ||
300 | 163 | # a) We aren't configured yet | ||
301 | 164 | @@ -51,7 +50,7 @@ class InvestApplet: | ||
302 | 165 | self.reload_ilw() | ||
303 | 166 | elif not self.quotes_updater.quotes_valid: | ||
304 | 167 | # b) We can't get the data (e.g. offline) | ||
305 | 168 | - alert = gtk.MessageDialog(buttons=gtk.BUTTONS_CLOSE) | ||
306 | 169 | + alert = Gtk.MessageDialog(buttons=gtk.BUTTONS_CLOSE) | ||
307 | 170 | alert.set_markup(_("<b>No stock quotes are currently available</b>")) | ||
308 | 171 | alert.format_secondary_text(_("The server could not be contacted. The computer is either offline or the servers are down. Try again later.")) | ||
309 | 172 | alert.run() | ||
310 | 173 | @@ -75,19 +74,19 @@ class InvestApplet: | ||
311 | 174 | |||
312 | 175 | def set_applet_icon(self, change): | ||
313 | 176 | if change == 1: | ||
314 | 177 | - pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest-22_up.png"), -1,-1) | ||
315 | 178 | + pixbuf = GdkPixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest-22_up.png"), -1,-1) | ||
316 | 179 | elif change == 0: | ||
317 | 180 | - pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest-22_neutral.png"), -1,-1) | ||
318 | 181 | + pixbuf = GdkPixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest-22_neutral.png"), -1,-1) | ||
319 | 182 | else: | ||
320 | 183 | - pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest-22_down.png"), -1,-1) | ||
321 | 184 | + pixbuf = GdkPixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest-22_down.png"), -1,-1) | ||
322 | 185 | self.applet_icon.set_from_pixbuf(pixbuf) | ||
323 | 186 | |||
324 | 187 | def set_applet_tooltip(self, text): | ||
325 | 188 | self.applet_icon.set_tooltip_text(text) | ||
326 | 189 | |||
327 | 190 | -class InvestmentsListWindow(gtk.Window): | ||
328 | 191 | +class InvestmentsListWindow(Gtk.Window): | ||
329 | 192 | def __init__(self, applet, list): | ||
330 | 193 | - gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) | ||
331 | 194 | + Gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) | ||
332 | 195 | self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK) | ||
333 | 196 | self.stick() | ||
334 | 197 | self.set_resizable(False) | ||
335 | 198 | @@ -128,58 +127,58 @@ class InvestmentsListWindow(gtk.Window): | ||
336 | 199 | screen = self.applet.window.get_screen() | ||
337 | 200 | monitor = screen.get_monitor_geometry (screen.get_monitor_at_window (self.applet.window)) | ||
338 | 201 | |||
339 | 202 | - if self.alignment == gnomeapplet.ORIENT_LEFT: | ||
340 | 203 | - x = ax - ww | ||
341 | 204 | - y = ay | ||
342 | 205 | + if self.alignment == PanelApplet.ORIENT_LEFT: | ||
343 | 206 | + x = ax - ww | ||
344 | 207 | + y = ay | ||
345 | 208 | |||
346 | 209 | - if (y + wh > monitor.y + monitor.height): | ||
347 | 210 | - y = monitor.y + monitor.height - wh | ||
348 | 211 | + if (y + wh > monitor.y + monitor.height): | ||
349 | 212 | + y = monitor.y + monitor.height - wh | ||
350 | 213 | |||
351 | 214 | - if (y < 0): | ||
352 | 215 | - y = 0 | ||
353 | 216 | + if (y < 0): | ||
354 | 217 | + y = 0 | ||
355 | 218 | |||
356 | 219 | - if (y + wh > monitor.height / 2): | ||
357 | 220 | - gravity = gtk.gdk.GRAVITY_SOUTH_WEST | ||
358 | 221 | - else: | ||
359 | 222 | - gravity = gtk.gdk.GRAVITY_NORTH_WEST | ||
360 | 223 | + if (y + wh > monitor.height / 2): | ||
361 | 224 | + gravity = gtk.gdk.GRAVITY_SOUTH_WEST | ||
362 | 225 | + else: | ||
363 | 226 | + gravity = gtk.gdk.GRAVITY_NORTH_WEST | ||
364 | 227 | |||
365 | 228 | elif self.alignment == gnomeapplet.ORIENT_RIGHT: | ||
366 | 229 | - x = ax + aw | ||
367 | 230 | - y = ay | ||
368 | 231 | + x = ax + aw | ||
369 | 232 | + y = ay | ||
370 | 233 | |||
371 | 234 | - if (y + wh > monitor.y + monitor.height): | ||
372 | 235 | - y = monitor.y + monitor.height - wh | ||
373 | 236 | + if (y + wh > monitor.y + monitor.height): | ||
374 | 237 | + y = monitor.y + monitor.height - wh | ||
375 | 238 | |||
376 | 239 | - if (y < 0): | ||
377 | 240 | - y = 0 | ||
378 | 241 | + if (y < 0): | ||
379 | 242 | + y = 0 | ||
380 | 243 | |||
381 | 244 | - if (y + wh > monitor.height / 2): | ||
382 | 245 | - gravity = gtk.gdk.GRAVITY_SOUTH_EAST | ||
383 | 246 | - else: | ||
384 | 247 | - gravity = gtk.gdk.GRAVITY_NORTH_EAST | ||
385 | 248 | + if (y + wh > monitor.height / 2): | ||
386 | 249 | + gravity = gtk.gdk.GRAVITY_SOUTH_EAST | ||
387 | 250 | + else: | ||
388 | 251 | + gravity = gtk.gdk.GRAVITY_NORTH_EAST | ||
389 | 252 | |||
390 | 253 | elif self.alignment == gnomeapplet.ORIENT_DOWN: | ||
391 | 254 | - x = ax | ||
392 | 255 | - y = ay + ah | ||
393 | 256 | + x = ax | ||
394 | 257 | + y = ay + ah | ||
395 | 258 | |||
396 | 259 | - if (x + ww > monitor.x + monitor.width): | ||
397 | 260 | - x = monitor.x + monitor.width - ww | ||
398 | 261 | + if (x + ww > monitor.x + monitor.width): | ||
399 | 262 | + x = monitor.x + monitor.width - ww | ||
400 | 263 | |||
401 | 264 | - if (x < 0): | ||
402 | 265 | - x = 0 | ||
403 | 266 | + if (x < 0): | ||
404 | 267 | + x = 0 | ||
405 | 268 | |||
406 | 269 | - gravity = gtk.gdk.GRAVITY_NORTH_WEST | ||
407 | 270 | + gravity = gtk.gdk.GRAVITY_NORTH_WEST | ||
408 | 271 | elif self.alignment == gnomeapplet.ORIENT_UP: | ||
409 | 272 | - x = ax | ||
410 | 273 | - y = ay - wh | ||
411 | 274 | + x = ax | ||
412 | 275 | + y = ay - wh | ||
413 | 276 | |||
414 | 277 | - if (x + ww > monitor.x + monitor.width): | ||
415 | 278 | - x = monitor.x + monitor.width - ww | ||
416 | 279 | + if (x + ww > monitor.x + monitor.width): | ||
417 | 280 | + x = monitor.x + monitor.width - ww | ||
418 | 281 | |||
419 | 282 | - if (x < 0): | ||
420 | 283 | - x = 0 | ||
421 | 284 | + if (x < 0): | ||
422 | 285 | + x = 0 | ||
423 | 286 | |||
424 | 287 | - gravity = gtk.gdk.GRAVITY_SOUTH_WEST | ||
425 | 288 | + gravity = gtk.gdk.GRAVITY_SOUTH_WEST | ||
426 | 289 | |||
427 | 290 | self.move(x, y) | ||
428 | 291 | self.set_gravity(gravity) | ||
429 | 292 | diff --git a/invest-applet/invest/chart.py b/invest-applet/invest/chart.py | ||
430 | 293 | index c6caff7..3e226e0 100644 | ||
431 | 294 | --- a/invest-applet/invest/chart.py | ||
432 | 295 | +++ b/invest-applet/invest/chart.py | ||
433 | 296 | @@ -1,7 +1,6 @@ | ||
434 | 297 | #!/usr/bin/env python | ||
435 | 298 | |||
436 | 299 | -import gtk, gtk.gdk | ||
437 | 300 | -import gobject | ||
438 | 301 | +from gi.repository import Gtk, GdkPixbuf, GObject | ||
439 | 302 | import os | ||
440 | 303 | import invest | ||
441 | 304 | from gettext import gettext as _ | ||
442 | 305 | @@ -15,16 +14,16 @@ import time | ||
443 | 306 | AUTOREFRESH_TIMEOUT = 20*60*1000 # 15 minutes | ||
444 | 307 | |||
445 | 308 | # based on http://www.johnstowers.co.nz/blog/index.php/2007/03/12/threading-and-pygtk/ | ||
446 | 309 | -class _IdleObject(gobject.GObject): | ||
447 | 310 | +class _IdleObject(GObject.GObject): | ||
448 | 311 | """ | ||
449 | 312 | Override gobject.GObject to always emit signals in the main thread | ||
450 | 313 | by emmitting on an idle handler | ||
451 | 314 | """ | ||
452 | 315 | def __init__(self): | ||
453 | 316 | - gobject.GObject.__init__(self) | ||
454 | 317 | + GObject.GObject.__init__(self) | ||
455 | 318 | |||
456 | 319 | def emit(self, *args): | ||
457 | 320 | - gobject.idle_add(gobject.GObject.emit,self,*args) | ||
458 | 321 | + GObject.idle_add(gobject.GObject.emit,self,*args) | ||
459 | 322 | |||
460 | 323 | class ImageRetriever(Thread, _IdleObject): | ||
461 | 324 | """ | ||
462 | 325 | @@ -33,7 +32,7 @@ class ImageRetriever(Thread, _IdleObject): | ||
463 | 326 | """ | ||
464 | 327 | __gsignals__ = { | ||
465 | 328 | "completed": ( | ||
466 | 329 | - gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []), | ||
467 | 330 | + GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []), | ||
468 | 331 | # FIXME: should we be making use of this? | ||
469 | 332 | #"progress": ( | ||
470 | 333 | # gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [ | ||
471 | 334 | @@ -47,12 +46,12 @@ class ImageRetriever(Thread, _IdleObject): | ||
472 | 335 | self.retrieved = False | ||
473 | 336 | |||
474 | 337 | def run(self): | ||
475 | 338 | - self.image = gtk.Image() | ||
476 | 339 | + self.image = Gtk.Image() | ||
477 | 340 | try: sock = urllib.urlopen(self.image_url, proxies = invest.PROXY) | ||
478 | 341 | except Exception, msg: | ||
479 | 342 | invest.debug("Error while opening %s: %s" % (self.image_url, msg)) | ||
480 | 343 | else: | ||
481 | 344 | - loader = gtk.gdk.PixbufLoader() | ||
482 | 345 | + loader = GdkPixbuf.PixbufLoader() | ||
483 | 346 | loader.connect("closed", lambda loader: self.image.set_from_pixbuf(loader.get_pixbuf())) | ||
484 | 347 | loader.write(sock.read()) | ||
485 | 348 | sock.close() | ||
486 | 349 | @@ -107,7 +106,7 @@ class FinancialChart: | ||
487 | 350 | win.set_title(_("Financial Chart")) | ||
488 | 351 | |||
489 | 352 | try: | ||
490 | 353 | - pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest_neutral.svg"), 96,96) | ||
491 | 354 | + pixbuf = GdkPixbuf.pixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest_neutral.svg"), 96,96) | ||
492 | 355 | self.ui.get_object("plot").set_from_pixbuf(pixbuf) | ||
493 | 356 | except Exception, msg: | ||
494 | 357 | invest.debug("Could not load 'invest-neutral.svg' file: %s" % msg) | ||
495 | 358 | @@ -241,14 +240,14 @@ class FinancialChart: | ||
496 | 359 | |||
497 | 360 | def on_autorefresh_toggled(self, autorefresh): | ||
498 | 361 | if self.autorefresh_id != 0: | ||
499 | 362 | - gobject.source_remove(self.autorefresh_id) | ||
500 | 363 | + GObject.source_remove(self.autorefresh_id) | ||
501 | 364 | self.autorefresh_id = 0 | ||
502 | 365 | |||
503 | 366 | if autorefresh.get_active(): | ||
504 | 367 | - self.autorefresh_id = gobject.timeout_add(AUTOREFRESH_TIMEOUT, self.on_refresh_chart, True) | ||
505 | 368 | + self.autorefresh_id = GObject.timeout_add(AUTOREFRESH_TIMEOUT, self.on_refresh_chart, True) | ||
506 | 369 | |||
507 | 370 | def show_chart(tickers): | ||
508 | 371 | - ui = gtk.Builder(); | ||
509 | 372 | + ui = Gtk.Builder(); | ||
510 | 373 | ui.add_from_file(os.path.join(invest.BUILDER_DATA_DIR, "financialchart.ui")) | ||
511 | 374 | chart = FinancialChart(ui) | ||
512 | 375 | ui.get_object("s").set_text(' '.join(tickers)) | ||
513 | 376 | diff --git a/invest-applet/invest/help.py b/invest-applet/invest/help.py | ||
514 | 377 | index 7dfaabf..66399c5 100644 | ||
515 | 378 | --- a/invest-applet/invest/help.py | ||
516 | 379 | +++ b/invest-applet/invest/help.py | ||
517 | 380 | @@ -1,8 +1,8 @@ | ||
518 | 381 | # -*- coding: utf-8 -*- | ||
519 | 382 | -import gtk, gtk.gdk | ||
520 | 383 | +from gi.repository import Gdk, Gtk | ||
521 | 384 | |||
522 | 385 | def show_help(): | ||
523 | 386 | - gtk.show_uri(None, "ghelp:invest-applet", gtk.gdk.CURRENT_TIME) | ||
524 | 387 | + Gtk.show_uri(None, "ghelp:invest-applet", Gdk.CURRENT_TIME) | ||
525 | 388 | |||
526 | 389 | def show_help_section(id): | ||
527 | 390 | - gtk.show_uri(None, "ghelp:invest-applet?%s" % id, gtk.gdk.CURRENT_TIME) | ||
528 | 391 | + Gtk.show_uri(None, "ghelp:invest-applet?%s" % id, Gdk.CURRENT_TIME) | ||
529 | 392 | diff --git a/invest-applet/invest/invest-applet.py b/invest-applet/invest/invest-applet.py | ||
530 | 393 | index da1fb05..fd7b334 100755 | ||
531 | 394 | --- a/invest-applet/invest/invest-applet.py | ||
532 | 395 | +++ b/invest-applet/invest/invest-applet.py | ||
533 | 396 | @@ -1,8 +1,8 @@ | ||
534 | 397 | #!/usr/bin/env python | ||
535 | 398 | # | ||
536 | 399 | |||
537 | 400 | -import gobject | ||
538 | 401 | -import gtk, gnomeapplet | ||
539 | 402 | +from gi.repository import GObject, Gtk, PanelApplet | ||
540 | 403 | +from invest.applet import InvestApplet | ||
541 | 404 | |||
542 | 405 | import getopt, sys | ||
543 | 406 | from os.path import * | ||
544 | 407 | @@ -37,12 +37,12 @@ def applet_factory(applet, iid): | ||
545 | 408 | |||
546 | 409 | # Return a standalone window that holds the applet | ||
547 | 410 | def build_window(): | ||
548 | 411 | - app = gtk.Window(gtk.WINDOW_TOPLEVEL) | ||
549 | 412 | + app = Gtk.Window(Gtk.WindowType.toplevel) | ||
550 | 413 | app.set_title(_("Invest Applet")) | ||
551 | 414 | app.connect("destroy", gtk.main_quit) | ||
552 | 415 | app.set_property('resizable', False) | ||
553 | 416 | |||
554 | 417 | - applet = gnomeapplet.Applet() | ||
555 | 418 | + applet = PanelApplet.Applet() | ||
556 | 419 | applet_factory(applet, None) | ||
557 | 420 | applet.reparent(app) | ||
558 | 421 | |||
559 | 422 | @@ -68,7 +68,7 @@ if __name__ == "__main__": | ||
560 | 423 | try: | ||
561 | 424 | opts, args = getopt.getopt(sys.argv[1:], "hdw", ["help", "debug", "window"]) | ||
562 | 425 | except getopt.GetoptError: | ||
563 | 426 | - # Unknown args were passed, we fallback to bahave as if | ||
564 | 427 | + # Unknown args were passed, we fallback to behave as if | ||
565 | 428 | # no options were passed | ||
566 | 429 | opts = [] | ||
567 | 430 | args = sys.argv[1:] | ||
568 | 431 | @@ -88,11 +88,11 @@ if __name__ == "__main__": | ||
569 | 432 | |||
570 | 433 | if standalone: | ||
571 | 434 | build_window() | ||
572 | 435 | - gtk.main() | ||
573 | 436 | + Gtk.main() | ||
574 | 437 | else: | ||
575 | 438 | - gnomeapplet.bonobo_factory( | ||
576 | 439 | - "OAFIID:Invest_Applet_Factory", | ||
577 | 440 | - gnomeapplet.Applet.__gtype__, | ||
578 | 441 | - invest.defs.PACKAGE, | ||
579 | 442 | - invest.defs.VERSION, | ||
580 | 443 | - applet_factory) | ||
581 | 444 | + PanelApplet.Applet.factory_main( | ||
582 | 445 | + "InvestAppletFactory", | ||
583 | 446 | + True, | ||
584 | 447 | + InvestApplet.__gtype__, | ||
585 | 448 | + applet_factory, | ||
586 | 449 | + None) | ||
587 | 450 | diff --git a/invest-applet/invest/preferences.py b/invest-applet/invest/preferences.py | ||
588 | 451 | index 2485e16..018a630 100644 | ||
589 | 452 | --- a/invest-applet/invest/preferences.py | ||
590 | 453 | +++ b/invest-applet/invest/preferences.py | ||
591 | 454 | @@ -1,14 +1,14 @@ | ||
592 | 455 | from gettext import gettext as _ | ||
593 | 456 | import locale | ||
594 | 457 | from os.path import join | ||
595 | 458 | -import gtk, gobject, gconf | ||
596 | 459 | +from gi.repository import Gtk, GObject, GConf | ||
597 | 460 | import invest | ||
598 | 461 | import currencies | ||
599 | 462 | import cPickle | ||
600 | 463 | |||
601 | 464 | class PrefsDialog: | ||
602 | 465 | def __init__(self, applet): | ||
603 | 466 | - self.ui = gtk.Builder() | ||
604 | 467 | + self.ui = Gtk.Builder() | ||
605 | 468 | self.ui.add_from_file(join(invest.BUILDER_DATA_DIR, "prefs-dialog.ui")) | ||
606 | 469 | |||
607 | 470 | self.dialog = self.ui.get_object("preferences") | ||
608 | 471 | @@ -29,14 +29,14 @@ class PrefsDialog: | ||
609 | 472 | |||
610 | 473 | self.typs = (str, str, float, float, float, float) | ||
611 | 474 | self.names = (_("Symbol"), _("Label"), _("Amount"), _("Price"), _("Commission"), _("Currency Rate")) | ||
612 | 475 | - store = gtk.ListStore(*self.typs) | ||
613 | 476 | + store = Gtk.ListStore(*self.typs) | ||
614 | 477 | store.set_sort_column_id(0, gtk.SORT_ASCENDING) | ||
615 | 478 | self.treeview.set_model(store) | ||
616 | 479 | self.model = store | ||
617 | 480 | |||
618 | 481 | - completion = gtk.EntryCompletion() | ||
619 | 482 | + completion = Gtk.EntryCompletion() | ||
620 | 483 | self.currency.set_completion(completion) | ||
621 | 484 | - liststore = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) | ||
622 | 485 | + liststore = Gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) | ||
623 | 486 | completion.set_model(liststore) | ||
624 | 487 | completion.set_text_column(0) | ||
625 | 488 | for code, label in self.currencies.items(): | ||
626 | 489 | @@ -107,12 +107,12 @@ class PrefsDialog: | ||
627 | 490 | return len(text) - text.find(".") - 1 | ||
628 | 491 | |||
629 | 492 | def create_cell (self, view, column, name, typ): | ||
630 | 493 | - cell_description = gtk.CellRendererText () | ||
631 | 494 | + cell_description = Gtk.CellRendererText () | ||
632 | 495 | if typ == float: | ||
633 | 496 | cell_description.set_property("xalign", 1.0) | ||
634 | 497 | cell_description.set_property("editable", True) | ||
635 | 498 | cell_description.connect("edited", self.on_cell_edited, column, typ) | ||
636 | 499 | - column_description = gtk.TreeViewColumn (name, cell_description) | ||
637 | 500 | + column_description = Gtk.TreeViewColumn (name, cell_description) | ||
638 | 501 | if typ == str: | ||
639 | 502 | column_description.set_attributes (cell_description, text=column) | ||
640 | 503 | column_description.set_sort_column_id(column) | ||
641 | 504 | diff --git a/invest-applet/invest/quotes.py b/invest-applet/invest/quotes.py | ||
642 | 505 | index b7ec21b..69472f3 100644 | ||
643 | 506 | --- a/invest-applet/invest/quotes.py | ||
644 | 507 | +++ b/invest-applet/invest/quotes.py | ||
645 | 508 | @@ -1,5 +1,5 @@ | ||
646 | 509 | from os.path import join | ||
647 | 510 | -import gnomeapplet, gtk, gtk.gdk, gconf, gobject | ||
648 | 511 | +from gi.repository import PanelApplet, Gtk, Gdk, GConf, GObject | ||
649 | 512 | from gettext import gettext as _ | ||
650 | 513 | import csv | ||
651 | 514 | import locale | ||
652 | 515 | @@ -19,16 +19,16 @@ QUOTES_URL="http://finance.yahoo.com/d/quotes.csv?s=%(s)s&f=snc4l1d1t1c1ohgv&e=. | ||
653 | 516 | QUOTES_CSV_FIELDS=["ticker", "label", "currency", ("trade", float), "date", "time", ("variation", float), ("open", float), ("high", float), ("low", float), ("volume", int)] | ||
654 | 517 | |||
655 | 518 | # based on http://www.johnstowers.co.nz/blog/index.php/2007/03/12/threading-and-pygtk/ | ||
656 | 519 | -class _IdleObject(gobject.GObject): | ||
657 | 520 | +class _IdleObject(GObject.GObject): | ||
658 | 521 | """ | ||
659 | 522 | Override gobject.GObject to always emit signals in the main thread | ||
660 | 523 | by emmitting on an idle handler | ||
661 | 524 | """ | ||
662 | 525 | def __init__(self): | ||
663 | 526 | - gobject.GObject.__init__(self) | ||
664 | 527 | + GObject.GObject.__init__(self) | ||
665 | 528 | |||
666 | 529 | def emit(self, *args): | ||
667 | 530 | - gobject.idle_add(gobject.GObject.emit,self,*args) | ||
668 | 531 | + GObject.idle_add(gobject.GObject.emit,self,*args) | ||
669 | 532 | |||
670 | 533 | class QuotesRetriever(Thread, _IdleObject): | ||
671 | 534 | """ | ||
672 | 535 | @@ -37,7 +37,7 @@ class QuotesRetriever(Thread, _IdleObject): | ||
673 | 536 | """ | ||
674 | 537 | __gsignals__ = { | ||
675 | 538 | "completed": ( | ||
676 | 539 | - gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []), | ||
677 | 540 | + GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []), | ||
678 | 541 | # FIXME: We don't monitor progress, yet ... | ||
679 | 542 | #"progress": ( | ||
680 | 543 | # gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [ | ||
681 | 544 | @@ -65,14 +65,14 @@ class QuotesRetriever(Thread, _IdleObject): | ||
682 | 545 | self.emit("completed") | ||
683 | 546 | |||
684 | 547 | |||
685 | 548 | -class QuoteUpdater(gtk.ListStore): | ||
686 | 549 | +class QuoteUpdater(Gtk.ListStore): | ||
687 | 550 | updated = False | ||
688 | 551 | last_updated = None | ||
689 | 552 | quotes_valid = False | ||
690 | 553 | timeout_id = None | ||
691 | 554 | SYMBOL, LABEL, CURRENCY, TICKER_ONLY, BALANCE, BALANCE_PCT, VALUE, VARIATION_PCT, PB = range(9) | ||
692 | 555 | def __init__ (self, change_icon_callback, set_tooltip_callback): | ||
693 | 556 | - gtk.ListStore.__init__ (self, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, bool, float, float, float, float, gtk.gdk.Pixbuf) | ||
694 | 557 | + Gtk.ListStore.__init__ (self, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, bool, float, float, float, float, gtk.gdk.Pixbuf) | ||
695 | 558 | self.set_update_interval(AUTOREFRESH_TIMEOUT) | ||
696 | 559 | self.change_icon_callback = change_icon_callback | ||
697 | 560 | self.set_tooltip_callback = set_tooltip_callback | ||
698 | 561 | @@ -85,11 +85,11 @@ class QuoteUpdater(gtk.ListStore): | ||
699 | 562 | def set_update_interval(self, interval): | ||
700 | 563 | if self.timeout_id != None: | ||
701 | 564 | invest.debug("Canceling refresh timer") | ||
702 | 565 | - gobject.source_remove(self.timeout_id) | ||
703 | 566 | + GObject.source_remove(self.timeout_id) | ||
704 | 567 | self.timeout_id = None | ||
705 | 568 | if interval > 0: | ||
706 | 569 | invest.debug("Setting refresh timer to %s:%02d.%03d" % ( interval / 60000, interval % 60000 / 1000, interval % 1000) ) | ||
707 | 570 | - self.timeout_id = gobject.timeout_add(interval, self.refresh) | ||
708 | 571 | + self.timeout_id = GObject.timeout_add(interval, self.refresh) | ||
709 | 572 | |||
710 | 573 | def nm_state_changed(self): | ||
711 | 574 | # when nm is online but we do not have an update timer, create it and refresh | ||
712 | 575 | @@ -406,6 +406,3 @@ class QuoteUpdater(gtk.ListStore): | ||
713 | 576 | res = False | ||
714 | 577 | break | ||
715 | 578 | return res | ||
716 | 579 | - | ||
717 | 580 | -if gtk.pygtk_version < (2,8,0): | ||
718 | 581 | - gobject.type_register(QuoteUpdater) | ||
719 | 582 | diff --git a/invest-applet/invest/widgets.py b/invest-applet/invest/widgets.py | ||
720 | 583 | index 13a2ec9..7c9bc91 100644 | ||
721 | 584 | --- a/invest-applet/invest/widgets.py | ||
722 | 585 | +++ b/invest-applet/invest/widgets.py | ||
723 | 586 | @@ -1,6 +1,6 @@ | ||
724 | 587 | import os, time | ||
725 | 588 | from os.path import * | ||
726 | 589 | -import gnomeapplet, gtk, gtk.gdk, gconf, gobject, pango | ||
727 | 590 | +from gi.repository import PanelApplet, Gtk, Gdk, GConf, GObject, Pango | ||
728 | 591 | from gettext import gettext as _ | ||
729 | 592 | import locale | ||
730 | 593 | import csv | ||
731 | 594 | @@ -35,9 +35,9 @@ MEDIUM = -1 | ||
732 | 595 | |||
733 | 596 | TICKER_TIMEOUT = 10000#3*60*1000# | ||
734 | 597 | |||
735 | 598 | -class InvestWidget(gtk.TreeView): | ||
736 | 599 | +class InvestWidget(Gtk.TreeView): | ||
737 | 600 | def __init__(self, quotes_updater): | ||
738 | 601 | - gtk.TreeView.__init__(self) | ||
739 | 602 | + Gtk.TreeView.__init__(self) | ||
740 | 603 | self.set_property("rules-hint", True) | ||
741 | 604 | self.set_reorderable(True) | ||
742 | 605 | self.set_hover_selection(True) | ||
743 | 606 | @@ -54,10 +54,10 @@ class InvestWidget(gtk.TreeView): | ||
744 | 607 | self._getcelldata_balancepct] | ||
745 | 608 | for i, col_name in enumerate(col_names): | ||
746 | 609 | if i < 3: | ||
747 | 610 | - cell = gtk.CellRendererText() | ||
748 | 611 | + cell = Gtk.CellRendererText() | ||
749 | 612 | if i > 0: | ||
750 | 613 | cell.set_property("xalign", 1.0) | ||
751 | 614 | - column = gtk.TreeViewColumn (col_name, cell) | ||
752 | 615 | + column = Gtk.TreeViewColumn (col_name, cell) | ||
753 | 616 | if i == 0: | ||
754 | 617 | column.set_sort_column_id(quotes_updater.LABEL) | ||
755 | 618 | elif i == 2: | ||
756 | 619 | @@ -65,15 +65,15 @@ class InvestWidget(gtk.TreeView): | ||
757 | 620 | column.set_cell_data_func(cell, col_cellgetdata_functions[i]) | ||
758 | 621 | self.append_column(column) | ||
759 | 622 | elif i == 3: | ||
760 | 623 | - cell_pb = gtk.CellRendererPixbuf() | ||
761 | 624 | - column = gtk.TreeViewColumn (col_name, cell_pb, pixbuf=quotes_updater.PB) | ||
762 | 625 | + cell_pb = Gtk.CellRendererPixbuf() | ||
763 | 626 | + column = Gtk.TreeViewColumn (col_name, cell_pb, pixbuf=quotes_updater.PB) | ||
764 | 627 | self.append_column(column) | ||
765 | 628 | else: | ||
766 | 629 | # add the last two column only if we have any positions | ||
767 | 630 | if simple_quotes_only == False: | ||
768 | 631 | - cell = gtk.CellRendererText() | ||
769 | 632 | + cell = Gtk.CellRendererText() | ||
770 | 633 | cell.set_property("xalign", 1.0) | ||
771 | 634 | - column = gtk.TreeViewColumn (col_name, cell) | ||
772 | 635 | + column = Gtk.TreeViewColumn (col_name, cell) | ||
773 | 636 | if i == 4: | ||
774 | 637 | column.set_sort_column_id(quotes_updater.BALANCE) | ||
775 | 638 | elif i == 5: | ||
776 | 639 | @@ -156,12 +156,12 @@ class InvestWidget(gtk.TreeView): | ||
777 | 640 | |||
778 | 641 | invest.chart.show_chart([ticker]) | ||
779 | 642 | |||
780 | 643 | -#class InvestTicker(gtk.Label): | ||
781 | 644 | +#class InvestTicker(Gtk.Label): | ||
782 | 645 | # def __init__(self): | ||
783 | 646 | -# gtk.Label.__init__(self, _("Waiting...")) | ||
784 | 647 | +# Gtk.Label.__init__(self, _("Waiting...")) | ||
785 | 648 | # | ||
786 | 649 | # self.quotes = [] | ||
787 | 650 | -# gobject.timeout_add(TICKER_TIMEOUT, self.scroll_quotes) | ||
788 | 651 | +# GObject.timeout_add(TICKER_TIMEOUT, self.scroll_quotes) | ||
789 | 652 | # | ||
790 | 653 | # get_quotes_updater().connect('quotes-updated', self.on_quotes_update) | ||
791 | 654 | # | ||
792 | 655 | @@ -190,9 +190,9 @@ class InvestWidget(gtk.TreeView): | ||
793 | 656 | # | ||
794 | 657 | #gobject.type_register(InvestTicker) | ||
795 | 658 | |||
796 | 659 | -class InvestTrend(gtk.Image): | ||
797 | 660 | +class InvestTrend(Gtk.Image): | ||
798 | 661 | def __init__(self): | ||
799 | 662 | - gtk.Image.__init__(self) | ||
800 | 663 | + Gtk.Image.__init__(self) | ||
801 | 664 | self.pixbuf = None | ||
802 | 665 | self.previous_allocation = (0,0) | ||
803 | 666 | self.connect('size-allocate', self.on_size_allocate) | ||
804 | 667 | @@ -202,14 +202,14 @@ class InvestTrend(gtk.Image): | ||
805 | 668 | if self.previous_allocation == (allocation.width, allocation.height): | ||
806 | 669 | return | ||
807 | 670 | |||
808 | 671 | - self.pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, allocation.height, allocation.height) | ||
809 | 672 | + self.pixbuf = GdkPixbuf.Pixbuf(Gdk.COLORSPACE_RGB, True, 8, allocation.height, allocation.height) | ||
810 | 673 | self.set_color("grey") | ||
811 | 674 | self.previous_allocation = (allocation.width, allocation.height) | ||
812 | 675 | |||
813 | 676 | def set_color(self, color, opacity=0xFF): | ||
814 | 677 | if self.pixbuf != None: | ||
815 | 678 | try: | ||
816 | 679 | - color = pango.Color(color) | ||
817 | 680 | + color = Pango.Color(color) | ||
818 | 681 | factor = float(0xFF)/0xFFFF | ||
819 | 682 | self.pixbuf.fill( | ||
820 | 683 | int(color.red*factor)<<24|int(color.green*factor)<<16|int(color.blue*factor)<<8|opacity) | ||
821 | 684 | @@ -247,4 +247,4 @@ class InvestTrend(gtk.Image): | ||
822 | 685 | |||
823 | 686 | self.set_color(color, opacity) | ||
824 | 687 | |||
825 | 688 | -gobject.type_register(InvestTrend) | ||
826 | 689 | +GObject.type_register(InvestTrend) | ||
827 | 690 | diff --git a/null_applet/Makefile.am b/null_applet/Makefile.am | ||
828 | 691 | index 2fe1d3e..b072b04 100644 | ||
829 | 692 | --- a/null_applet/Makefile.am | ||
830 | 693 | +++ b/null_applet/Makefile.am | ||
831 | 694 | @@ -1,44 +1,40 @@ | ||
832 | 695 | +applet_in_files = org.gnome.applets.NullApplet.panel-applet.in | ||
833 | 696 | +service_in_files = org.gnome.panel.applet.NullAppletFactory.service.in | ||
834 | 697 | + | ||
835 | 698 | INCLUDES = \ | ||
836 | 699 | -I. \ | ||
837 | 700 | -I$(srcdir) \ | ||
838 | 701 | - $(GNOME_APPLETS_CFLAGS) | ||
839 | 702 | - | ||
840 | 703 | -## The null applet takes over if the mixer isn't built. | ||
841 | 704 | -if !BUILD_MIXER_APPLET | ||
842 | 705 | -mixer_server_in = GNOME_MixerApplet.server.in | ||
843 | 706 | -endif | ||
844 | 707 | + $(GNOME_APPLETS3_CFLAGS) | ||
845 | 708 | |||
846 | 709 | libexec_PROGRAMS = null_applet | ||
847 | 710 | |||
848 | 711 | -null_applet_SOURCES = null_applet.c | ||
849 | 712 | +null_applet_SOURCES = null_applet.c null_applet.h | ||
850 | 713 | + | ||
851 | 714 | +null_applet_LDADD = $(GNOME_APPLETS3_LIBS) | ||
852 | 715 | + | ||
853 | 716 | +appletdir = $(datadir)/gnome-panel/applets | ||
854 | 717 | +applet_DATA = $(applet_in_files:.panel-applet.in=.panel-applet) | ||
855 | 718 | |||
856 | 719 | -null_applet_LDADD = $(GNOME_APPLETS_LIBS) | ||
857 | 720 | +$(applet_in_files): $(applet_in_files).in Makefile | ||
858 | 721 | + $(AM_V_GEN)sed \ | ||
859 | 722 | + -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ | ||
860 | 723 | + -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \ | ||
861 | 724 | + $< > $@ | ||
862 | 725 | |||
863 | 726 | -serverdir = $(libdir)/bonobo/servers | ||
864 | 727 | -server_in_files = \ | ||
865 | 728 | - GNOME_NullApplet_Factory.server.in \ | ||
866 | 729 | - GNOME_CDPlayerApplet.server.in \ | ||
867 | 730 | - GNOME_MailcheckApplet_Factory.server.in \ | ||
868 | 731 | - GNOME_Panel_WirelessApplet.server.in \ | ||
869 | 732 | - GNOME_KeyboardApplet.server.in \ | ||
870 | 733 | - $(mixer_server_in) | ||
871 | 734 | -server_DATA = $(server_in_files:.server.in=.server) | ||
872 | 735 | +%.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache | ||
873 | 736 | |||
874 | 737 | -@INTLTOOL_SERVER_RULE@ | ||
875 | 738 | +servicedir = $(datadir)/dbus-1/services | ||
876 | 739 | +service_DATA = $(service_in_files:.service.in=.service) | ||
877 | 740 | |||
878 | 741 | -GNOME_NullApplet_Factory.server.in: GNOME_NullApplet_Factory.server.in.in | ||
879 | 742 | - sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@ | ||
880 | 743 | +org.gnome.panel.applet.NullAppletFactory.service: $(service_in_files) | ||
881 | 744 | + $(AM_V_GEN)sed \ | ||
882 | 745 | + -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ | ||
883 | 746 | + $< > $@ | ||
884 | 747 | |||
885 | 748 | -CLEANFILES = GNOME_NullApplet_Factory.server.in $(server_DATA) | ||
886 | 749 | +CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA) $(schemas_DATA) | ||
887 | 750 | |||
888 | 751 | -## Note that the mixer applet server.in file is always distributed, but | ||
889 | 752 | -## note always used. | ||
890 | 753 | -EXTRA_DIST = \ | ||
891 | 754 | - GNOME_NullApplet_Factory.server.in.in \ | ||
892 | 755 | - GNOME_CDPlayerApplet.server.in \ | ||
893 | 756 | - GNOME_MailcheckApplet_Factory.server.in \ | ||
894 | 757 | - GNOME_Panel_WirelessApplet.server.in \ | ||
895 | 758 | - GNOME_MixerApplet.server.in \ | ||
896 | 759 | - GNOME_KeyboardApplet.server.in | ||
897 | 760 | +EXTRA_DIST = \ | ||
898 | 761 | + $(service_in_files) \ | ||
899 | 762 | + org.gnome.applets.NullApplet.panel-applet.in.in | ||
900 | 763 | |||
901 | 764 | -include $(top_srcdir)/git.mk | ||
902 | 765 | diff --git a/null_applet/null_applet.c b/null_applet/null_applet.c | ||
903 | 766 | index b03521b..d6fb35d 100644 | ||
904 | 767 | --- a/null_applet/null_applet.c | ||
905 | 768 | +++ b/null_applet/null_applet.c | ||
906 | 769 | @@ -24,11 +24,22 @@ | ||
907 | 770 | #include <config.h> | ||
908 | 771 | #endif | ||
909 | 772 | |||
910 | 773 | +#include <glib/gi18n-lib.h> | ||
911 | 774 | #include <gtk/gtk.h> | ||
912 | 775 | #include <gconf/gconf-client.h> | ||
913 | 776 | -#include <panel-applet.h> | ||
914 | 777 | +#include "null_applet.h" | ||
915 | 778 | |||
916 | 779 | -static const char factory_iid[] = "OAFIID:GNOME_NullApplet_Factory"; | ||
917 | 780 | +G_DEFINE_TYPE(NullApplet, null_applet, PANEL_TYPE_APPLET) | ||
918 | 781 | + | ||
919 | 782 | +static void | ||
920 | 783 | +null_applet_class_init (NullAppletClass *klass) | ||
921 | 784 | +{ | ||
922 | 785 | +} | ||
923 | 786 | + | ||
924 | 787 | +static void | ||
925 | 788 | +null_applet_init (NullApplet *applet) | ||
926 | 789 | +{ | ||
927 | 790 | +} | ||
928 | 791 | |||
929 | 792 | static inline void | ||
930 | 793 | insert_oafiids (GHashTable *hash_table) | ||
931 | 794 | @@ -48,8 +59,6 @@ insert_oafiids (GHashTable *hash_table) | ||
932 | 795 | "OAFIID:GNOME_KeyboardApplet", _("Keyboard Indicator")); | ||
933 | 796 | } | ||
934 | 797 | |||
935 | 798 | -static gboolean already_running; | ||
936 | 799 | - | ||
937 | 800 | static void | ||
938 | 801 | response_cb (GtkWidget *dialog, gint arg1, gpointer user_data) | ||
939 | 802 | { | ||
940 | 803 | @@ -135,11 +144,8 @@ applet_factory (PanelApplet *applet, | ||
941 | 804 | char *applet_list; | ||
942 | 805 | GtkWidget *dialog; | ||
943 | 806 | |||
944 | 807 | - if (already_running) | ||
945 | 808 | - { | ||
946 | 809 | - return FALSE; | ||
947 | 810 | - } | ||
948 | 811 | - already_running = TRUE; | ||
949 | 812 | + if (!g_str_equal (iid, "NullApplet")) | ||
950 | 813 | + return FALSE; | ||
951 | 814 | |||
952 | 815 | applet_list = get_all_applets (); | ||
953 | 816 | |||
954 | 817 | @@ -167,7 +173,8 @@ applet_factory (PanelApplet *applet, | ||
955 | 818 | return TRUE; | ||
956 | 819 | } | ||
957 | 820 | |||
958 | 821 | -PANEL_APPLET_BONOBO_FACTORY (factory_iid, | ||
959 | 822 | - PANEL_TYPE_APPLET, | ||
960 | 823 | - "Null-Applet", "0", | ||
961 | 824 | - applet_factory, NULL) | ||
962 | 825 | +PANEL_APPLET_OUT_PROCESS_FACTORY ("NullApplet", | ||
963 | 826 | + TYPE_NULL_APPLET, | ||
964 | 827 | + "null", | ||
965 | 828 | + applet_factory, | ||
966 | 829 | + NULL) | ||
967 | 830 | diff --git a/null_applet/null_applet.h b/null_applet/null_applet.h | ||
968 | 831 | new file mode 100644 | ||
969 | 832 | index 0000000..1c5f5bf | ||
970 | 833 | --- /dev/null | ||
971 | 834 | +++ b/null_applet/null_applet.h | ||
972 | 835 | @@ -0,0 +1,50 @@ | ||
973 | 836 | +/* -*- mode: C; c-basic-offset: 4 -*- | ||
974 | 837 | + * Null Applet - The Applet Deprecation Applet | ||
975 | 838 | + * Copyright (c) 2004, Davyd Madeley | ||
976 | 839 | + * | ||
977 | 840 | + * This library is free software; you can redistribute it and/or | ||
978 | 841 | + * modify it under the terms of the GNU General Public | ||
979 | 842 | + * License as published by the Free Software Foundation; either | ||
980 | 843 | + * version 2 of the License, or (at your option) any later version. | ||
981 | 844 | + * | ||
982 | 845 | + * This program is distributed in the hope that it will be useful, | ||
983 | 846 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
984 | 847 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
985 | 848 | + * GNU General Public License for more details. | ||
986 | 849 | + * | ||
987 | 850 | + * You should have received a copy of the GNU General Public License | ||
988 | 851 | + * along with this program; if not, write to the Free Software | ||
989 | 852 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
990 | 853 | + * | ||
991 | 854 | + * Author: | ||
992 | 855 | + * Rodrigo Moya <rodrigo@gnome.org> | ||
993 | 856 | + */ | ||
994 | 857 | + | ||
995 | 858 | +#ifndef __NULL_APPLET_H | ||
996 | 859 | +#define __NULL_APPLET_H | ||
997 | 860 | + | ||
998 | 861 | +#include <panel-applet.h> | ||
999 | 862 | + | ||
1000 | 863 | +G_BEGIN_DECLS | ||
1001 | 864 | + | ||
1002 | 865 | +#define TYPE_NULL_APPLET (null_applet_get_type ()) | ||
1003 | 866 | +#define NULL_APPLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NULL_APPLET, NullApplet)) | ||
1004 | 867 | +#define NULL_APPLET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), TYPE_NULL_APPLET, NullAppletClass)) | ||
1005 | 868 | +#define IS_NULL_APPLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NULL_APPLET)) | ||
1006 | 869 | +#define IS_NULL_APPLET_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), TYPE_NULL_APPLET)) | ||
1007 | 870 | +#define NULL_APPLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NULL_APPLET, NullAppletClass)) | ||
1008 | 871 | + | ||
1009 | 872 | +typedef struct _NullApplet NullApplet; | ||
1010 | 873 | +typedef struct _NullAppletClass NullAppletClass; | ||
1011 | 874 | + | ||
1012 | 875 | +struct _NullApplet { | ||
1013 | 876 | + PanelApplet parent; | ||
1014 | 877 | +}; | ||
1015 | 878 | + | ||
1016 | 879 | +struct _NullAppletClass { | ||
1017 | 880 | + PanelAppletClass parent_class; | ||
1018 | 881 | +}; | ||
1019 | 882 | + | ||
1020 | 883 | +G_END_DECLS | ||
1021 | 884 | + | ||
1022 | 885 | +#endif | ||
1023 | 886 | diff --git a/null_applet/org.gnome.applets.NullApplet.panel-applet.in.in b/null_applet/org.gnome.applets.NullApplet.panel-applet.in.in | ||
1024 | 887 | new file mode 100644 | ||
1025 | 888 | index 0000000..b349511 | ||
1026 | 889 | --- /dev/null | ||
1027 | 890 | +++ b/null_applet/org.gnome.applets.NullApplet.panel-applet.in.in | ||
1028 | 891 | @@ -0,0 +1,15 @@ | ||
1029 | 892 | +[Applet Factory] | ||
1030 | 893 | +Id=NullAppletFactory | ||
1031 | 894 | +Location=@LIBEXECDIR@/null_applet | ||
1032 | 895 | +_Name=Null Applet Factory | ||
1033 | 896 | +_Description=Null Applet Factory | ||
1034 | 897 | + | ||
1035 | 898 | +[NullApplet] | ||
1036 | 899 | +_Name=Null applet | ||
1037 | 900 | +_Description=Check for obsolete applets | ||
1038 | 901 | +BonoboId=OAFIID:GNOME_MailcheckApplet;OAFIID:GNOME_CDPlayerApplet;OAFIID:GNOME_MixerApplet_Factory;OAFIID:GNOME_MixerApplet;OAFIID:GNOME_KeyboardApplet;OAFIID:GNOME_BattstatApplet;OAFIID:GNOME_ModemLightsApplet; | ||
1039 | 902 | +X-GNOME-Bugzilla-Bugzilla=GNOME | ||
1040 | 903 | +X-GNOME-Bugzilla-Product=gnome-applets | ||
1041 | 904 | +X-GNOME-Bugzilla-Component=null | ||
1042 | 905 | +X-GNOME-Bugzilla-Version=@VERSION@ | ||
1043 | 906 | +X-GNOME-Bugzilla-OtherBinaries=null_applet | ||
1044 | 907 | diff --git a/null_applet/org.gnome.panel.applet.NullAppletFactory.service.in b/null_applet/org.gnome.panel.applet.NullAppletFactory.service.in | ||
1045 | 908 | new file mode 100644 | ||
1046 | 909 | index 0000000..49f8d40 | ||
1047 | 910 | --- /dev/null | ||
1048 | 911 | +++ b/null_applet/org.gnome.panel.applet.NullAppletFactory.service.in | ||
1049 | 912 | @@ -0,0 +1,3 @@ | ||
1050 | 913 | +[D-BUS Service] | ||
1051 | 914 | +Name=org.gnome.panel.applet.NullAppletFactory | ||
1052 | 915 | +Exec=@LIBEXECDIR@/null_applet | ||
1053 | 0 | 916 | ||
1054 | === modified file 'debian/patches/81_silent_applet_cleaning' | |||
1055 | --- debian/patches/81_silent_applet_cleaning 2010-07-13 04:27:53 +0000 | |||
1056 | +++ debian/patches/81_silent_applet_cleaning 2010-11-29 16:14:03 +0000 | |||
1057 | @@ -2,9 +2,9 @@ | |||
1058 | 2 | =================================================================== | 2 | =================================================================== |
1059 | 3 | --- gnome-applets-2.30.0.orig/null_applet/null_applet.c 2010-03-28 16:29:51.000000000 +1100 | 3 | --- gnome-applets-2.30.0.orig/null_applet/null_applet.c 2010-03-28 16:29:51.000000000 +1100 |
1060 | 4 | +++ gnome-applets-2.30.0/null_applet/null_applet.c 2010-07-13 14:23:45.398124000 +1000 | 4 | +++ gnome-applets-2.30.0/null_applet/null_applet.c 2010-07-13 14:23:45.398124000 +1000 |
1062 | 5 | @@ -50,11 +50,13 @@ | 5 | @@ -62,11 +62,13 @@ |
1063 | 6 | 6 | ||
1065 | 7 | static gboolean already_running; | 7 | } |
1066 | 8 | 8 | ||
1067 | 9 | +/* | 9 | +/* |
1068 | 10 | static void | 10 | static void |
1069 | @@ -16,7 +16,7 @@ | |||
1070 | 16 | 16 | ||
1071 | 17 | static char | 17 | static char |
1072 | 18 | *get_all_applets (void) | 18 | *get_all_applets (void) |
1074 | 19 | @@ -133,16 +135,18 @@ | 19 | @@ -142,12 +145,14 @@ |
1075 | 20 | gpointer user_data) | 20 | gpointer user_data) |
1076 | 21 | { | 21 | { |
1077 | 22 | char *applet_list; | 22 | char *applet_list; |
1078 | @@ -24,11 +24,8 @@ | |||
1079 | 24 | GtkWidget *dialog; | 24 | GtkWidget *dialog; |
1080 | 25 | + */ | 25 | + */ |
1081 | 26 | 26 | ||
1084 | 27 | if (already_running) | 27 | if (!g_str_equal (iid, "NullApplet")) |
1083 | 28 | { | ||
1085 | 29 | return FALSE; | 28 | return FALSE; |
1086 | 30 | } | ||
1087 | 31 | already_running = TRUE; | ||
1088 | 32 | - | 29 | - |
1089 | 33 | + | 30 | + |
1090 | 34 | applet_list = get_all_applets (); | 31 | applet_list = get_all_applets (); |
1091 | @@ -37,7 +34,7 @@ | |||
1092 | 37 | dialog = gtk_message_dialog_new_with_markup (NULL, | 34 | dialog = gtk_message_dialog_new_with_markup (NULL, |
1093 | 38 | GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, | 35 | GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, |
1094 | 39 | GTK_MESSAGE_INFO, GTK_BUTTONS_OK, | 36 | GTK_MESSAGE_INFO, GTK_BUTTONS_OK, |
1096 | 40 | @@ -156,13 +160,14 @@ | 37 | @@ -162,13 +166,14 @@ |
1097 | 41 | applet_list, | 38 | applet_list, |
1098 | 42 | _("You will not receive this message again.") | 39 | _("You will not receive this message again.") |
1099 | 43 | ); | 40 | ); |
1100 | 44 | 41 | ||
1101 | === modified file 'debian/patches/86_deprecate_battstatus.patch' | |||
1102 | --- debian/patches/86_deprecate_battstatus.patch 2010-03-29 09:59:14 +0000 | |||
1103 | +++ debian/patches/86_deprecate_battstatus.patch 2010-11-29 16:14:03 +0000 | |||
1104 | @@ -1,69 +1,8 @@ | |||
1105 | 1 | Index: gnome-applets-2.30.0/null_applet/GNOME_BattstatApplet.server.in | ||
1106 | 2 | =================================================================== | ||
1107 | 3 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
1108 | 4 | +++ gnome-applets-2.30.0/null_applet/GNOME_BattstatApplet.server.in 2010-03-29 11:55:08.885546800 +0200 | ||
1109 | 5 | @@ -0,0 +1,21 @@ | ||
1110 | 6 | +<oaf_info> | ||
1111 | 7 | + | ||
1112 | 8 | +<oaf_server iid="OAFIID:GNOME_BattstatApplet" | ||
1113 | 9 | + type="factory" | ||
1114 | 10 | + location="OAFIID:GNOME_NullApplet_Factory"> | ||
1115 | 11 | + | ||
1116 | 12 | + <oaf_attribute name="repo_ids" type="stringv"> | ||
1117 | 13 | + <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/> | ||
1118 | 14 | + <item value="IDL:Bonobo/Control:1.0"/> | ||
1119 | 15 | + <item value="IDL:Bonobo/Unknown:1.0"/> | ||
1120 | 16 | + </oaf_attribute> | ||
1121 | 17 | + <oaf_attribute name="name" type="string" _value="Battery Charge Monitor (Deprecated)"/> | ||
1122 | 18 | + <oaf_attribute name="description" type="string" _value="Monitor a laptop's remaining power"/> | ||
1123 | 19 | + <oaf_attribute name="bugzilla:bugzilla" type="string" value="GNOME"/> | ||
1124 | 20 | + <oaf_attribute name="bugzilla:product" type="string" value="gnome-applets"/> | ||
1125 | 21 | + <oaf_attribute name="bugzilla:component" type="string" value="battery"/> | ||
1126 | 22 | + <oaf_attribute name="bugzilla:other_binaries" type="string" value="battstat-applet-2"/> | ||
1127 | 23 | + | ||
1128 | 24 | +</oaf_server> | ||
1129 | 25 | + | ||
1130 | 26 | +</oaf_info> | ||
1131 | 27 | Index: gnome-applets-2.30.0/null_applet/Makefile.am | ||
1132 | 28 | =================================================================== | ||
1133 | 29 | --- gnome-applets-2.30.0.orig/null_applet/Makefile.am 2010-03-28 07:29:51.000000000 +0200 | ||
1134 | 30 | +++ gnome-applets-2.30.0/null_applet/Makefile.am 2010-03-29 11:57:44.597546031 +0200 | ||
1135 | 31 | @@ -8,6 +8,11 @@ | ||
1136 | 32 | mixer_server_in = GNOME_MixerApplet.server.in | ||
1137 | 33 | endif | ||
1138 | 34 | |||
1139 | 35 | +## The null applet takes over if the battstat applet isn't built | ||
1140 | 36 | +if !BUILD_BATTSTAT_APPLET | ||
1141 | 37 | +battstat_server_in = GNOME_BattstatApplet.server.in | ||
1142 | 38 | +endif | ||
1143 | 39 | + | ||
1144 | 40 | libexec_PROGRAMS = null_applet | ||
1145 | 41 | |||
1146 | 42 | null_applet_SOURCES = null_applet.c | ||
1147 | 43 | @@ -21,7 +26,8 @@ | ||
1148 | 44 | GNOME_MailcheckApplet_Factory.server.in \ | ||
1149 | 45 | GNOME_Panel_WirelessApplet.server.in \ | ||
1150 | 46 | GNOME_KeyboardApplet.server.in \ | ||
1151 | 47 | - $(mixer_server_in) | ||
1152 | 48 | + $(mixer_server_in) \ | ||
1153 | 49 | + $(battstat_server_in) | ||
1154 | 50 | server_DATA = $(server_in_files:.server.in=.server) | ||
1155 | 51 | |||
1156 | 52 | @INTLTOOL_SERVER_RULE@ | ||
1157 | 53 | @@ -39,6 +45,7 @@ | ||
1158 | 54 | GNOME_MailcheckApplet_Factory.server.in \ | ||
1159 | 55 | GNOME_Panel_WirelessApplet.server.in \ | ||
1160 | 56 | GNOME_MixerApplet.server.in \ | ||
1161 | 57 | - GNOME_KeyboardApplet.server.in | ||
1162 | 58 | + GNOME_KeyboardApplet.server.in \ | ||
1163 | 59 | + GNOME_BattstatApplet.server.in | ||
1164 | 60 | |||
1165 | 61 | -include $(top_srcdir)/git.mk | ||
1166 | 62 | Index: gnome-applets-2.30.0/null_applet/null_applet.c | 1 | Index: gnome-applets-2.30.0/null_applet/null_applet.c |
1167 | 63 | =================================================================== | 2 | =================================================================== |
1168 | 64 | --- gnome-applets-2.30.0.orig/null_applet/null_applet.c 2010-03-29 11:55:08.000000000 +0200 | 3 | --- gnome-applets-2.30.0.orig/null_applet/null_applet.c 2010-03-29 11:55:08.000000000 +0200 |
1169 | 65 | +++ gnome-applets-2.30.0/null_applet/null_applet.c 2010-03-29 11:58:38.588546843 +0200 | 4 | +++ gnome-applets-2.30.0/null_applet/null_applet.c 2010-03-29 11:58:38.588546843 +0200 |
1171 | 66 | @@ -46,6 +46,8 @@ | 5 | @@ -57,6 +57,8 @@ |
1172 | 67 | "OAFIID:GNOME_MixerApplet", _("Volume Control")); | 6 | "OAFIID:GNOME_MixerApplet", _("Volume Control")); |
1173 | 68 | g_hash_table_insert (hash_table, | 7 | g_hash_table_insert (hash_table, |
1174 | 69 | "OAFIID:GNOME_KeyboardApplet", _("Keyboard Indicator")); | 8 | "OAFIID:GNOME_KeyboardApplet", _("Keyboard Indicator")); |
1175 | @@ -71,4 +10,4 @@ | |||
1176 | 71 | + "OAFIID:GNOME_BattstatApplet", _("Battery Charge Monitor")); | 10 | + "OAFIID:GNOME_BattstatApplet", _("Battery Charge Monitor")); |
1177 | 72 | } | 11 | } |
1178 | 73 | 12 | ||
1180 | 74 | static gboolean already_running; | 13 | static void |
1181 | 75 | 14 | ||
1182 | === modified file 'debian/patches/87_deprecate_modemlights.patch' | |||
1183 | --- debian/patches/87_deprecate_modemlights.patch 2010-03-29 10:01:09 +0000 | |||
1184 | +++ debian/patches/87_deprecate_modemlights.patch 2010-11-29 16:14:03 +0000 | |||
1185 | @@ -1,34 +1,8 @@ | |||
1186 | 1 | Index: gnome-applets-2.30.0/null_applet/GNOME_ModemLights.server.in | ||
1187 | 2 | =================================================================== | ||
1188 | 3 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
1189 | 4 | +++ gnome-applets-2.30.0/null_applet/GNOME_ModemLights.server.in 2010-03-29 12:00:10.201547164 +0200 | ||
1190 | 5 | @@ -0,0 +1,21 @@ | ||
1191 | 6 | +<oaf_info> | ||
1192 | 7 | + | ||
1193 | 8 | +<oaf_server iid="OAFIID:GNOME_ModemLightsApplet" | ||
1194 | 9 | + type="factory" | ||
1195 | 10 | + location="OAFIID:GNOME_NullApplet_Factory"> | ||
1196 | 11 | + | ||
1197 | 12 | + <oaf_attribute name="repo_ids" type="stringv"> | ||
1198 | 13 | + <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/> | ||
1199 | 14 | + <item value="IDL:Bonobo/Control:1.0"/> | ||
1200 | 15 | + <item value="IDL:Bonobo/Unknown:1.0"/> | ||
1201 | 16 | + </oaf_attribute> | ||
1202 | 17 | + <oaf_attribute name="name" type="string" _value="Modem Monitor (Deprecated)"/> | ||
1203 | 18 | + <oaf_attribute name="description" type="string" _value="Activate and monitor a dial-up network connection"/> | ||
1204 | 19 | + <oaf_attribute name="bugzilla:bugzilla" type="string" value="GNOME"/> | ||
1205 | 20 | + <oaf_attribute name="bugzilla:product" type="string" value="gnome-applets"/> | ||
1206 | 21 | + <oaf_attribute name="bugzilla:component" type="string" value="modemlights"/> | ||
1207 | 22 | + <oaf_attribute name="bugzilla:other_binaries" type="string" value="modem_applet"/> | ||
1208 | 23 | + | ||
1209 | 24 | +</oaf_server> | ||
1210 | 25 | + | ||
1211 | 26 | +</oaf_info> | ||
1212 | 27 | Index: gnome-applets-2.30.0/null_applet/null_applet.c | 1 | Index: gnome-applets-2.30.0/null_applet/null_applet.c |
1213 | 28 | =================================================================== | 2 | =================================================================== |
1214 | 29 | --- gnome-applets-2.30.0.orig/null_applet/null_applet.c 2010-03-29 11:59:59.000000000 +0200 | 3 | --- gnome-applets-2.30.0.orig/null_applet/null_applet.c 2010-03-29 11:59:59.000000000 +0200 |
1215 | 30 | +++ gnome-applets-2.30.0/null_applet/null_applet.c 2010-03-29 12:00:46.173545772 +0200 | 4 | +++ gnome-applets-2.30.0/null_applet/null_applet.c 2010-03-29 12:00:46.173545772 +0200 |
1217 | 31 | @@ -48,6 +48,8 @@ | 5 | @@ -59,6 +59,8 @@ |
1218 | 32 | "OAFIID:GNOME_KeyboardApplet", _("Keyboard Indicator")); | 6 | "OAFIID:GNOME_KeyboardApplet", _("Keyboard Indicator")); |
1219 | 33 | g_hash_table_insert (hash_table, | 7 | g_hash_table_insert (hash_table, |
1220 | 34 | "OAFIID:GNOME_BattstatApplet", _("Battery Charge Monitor")); | 8 | "OAFIID:GNOME_BattstatApplet", _("Battery Charge Monitor")); |
1221 | @@ -36,24 +10,4 @@ | |||
1222 | 36 | + "OAFIID:GNOME_ModemLightsApplet", _("Modem Monitor")); | 10 | + "OAFIID:GNOME_ModemLightsApplet", _("Modem Monitor")); |
1223 | 37 | } | 11 | } |
1224 | 38 | 12 | ||
1246 | 39 | static gboolean already_running; | 13 | static void |
1226 | 40 | Index: gnome-applets-2.30.0/null_applet/Makefile.am | ||
1227 | 41 | =================================================================== | ||
1228 | 42 | --- gnome-applets-2.30.0.orig/null_applet/Makefile.am 2010-03-29 11:59:59.000000000 +0200 | ||
1229 | 43 | +++ gnome-applets-2.30.0/null_applet/Makefile.am 2010-03-29 12:00:10.213548548 +0200 | ||
1230 | 44 | @@ -24,6 +24,7 @@ | ||
1231 | 45 | GNOME_NullApplet_Factory.server.in \ | ||
1232 | 46 | GNOME_CDPlayerApplet.server.in \ | ||
1233 | 47 | GNOME_MailcheckApplet_Factory.server.in \ | ||
1234 | 48 | + GNOME_ModemLights.server.in \ | ||
1235 | 49 | GNOME_Panel_WirelessApplet.server.in \ | ||
1236 | 50 | GNOME_KeyboardApplet.server.in \ | ||
1237 | 51 | $(mixer_server_in) \ | ||
1238 | 52 | @@ -43,6 +44,7 @@ | ||
1239 | 53 | GNOME_NullApplet_Factory.server.in.in \ | ||
1240 | 54 | GNOME_CDPlayerApplet.server.in \ | ||
1241 | 55 | GNOME_MailcheckApplet_Factory.server.in \ | ||
1242 | 56 | + GNOME_ModemLights.server.in \ | ||
1243 | 57 | GNOME_Panel_WirelessApplet.server.in \ | ||
1244 | 58 | GNOME_MixerApplet.server.in \ | ||
1245 | 59 | GNOME_KeyboardApplet.server.in \ | ||
1247 | 60 | 14 | ||
1248 | === modified file 'debian/patches/series' | |||
1249 | --- debian/patches/series 2010-11-09 22:10:19 +0000 | |||
1250 | +++ debian/patches/series 2010-11-29 16:14:03 +0000 | |||
1251 | @@ -1,6 +1,7 @@ | |||
1252 | 1 | 01_no_more_deprecated.patch | ||
1253 | 1 | 15_path-max.patch | 2 | 15_path-max.patch |
1254 | 2 | 80_correct_minicommander_install.patch | 3 | 80_correct_minicommander_install.patch |
1256 | 3 | 81_silent_applet_cleaning | 4 | #81_silent_applet_cleaning |
1257 | 4 | 86_deprecate_battstatus.patch | 5 | 86_deprecate_battstatus.patch |
1258 | 5 | 87_deprecate_modemlights.patch | 6 | 87_deprecate_modemlights.patch |
1259 | 6 | 88_hide_deprecated_mixer.patch | 7 | 88_hide_deprecated_mixer.patch |
Setting to Needs Fixing for now, as discussed on IRC the invest applet needs fixing before landing the update