Merge lp:~rodrigo-moya/ubuntu/natty/gnome-applets/no-more-deprecated into lp:~ubuntu-desktop/gnome-applets/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
Reviewer Review Type Date Requested Status
Sebastien Bacher Needs Fixing
Review via email: mp+41494@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Setting to Needs Fixing for now, as discussed on IRC the invest applet needs fixing before landing the update

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

Subscribers

People subscribed via source and target branches

to all changes: