Merge lp:~ken-vandine/jockey/ubuntu into lp:~ubuntu-core-dev/jockey/ubuntu

Proposed by Ken VanDine
Status: Needs review
Proposed branch: lp:~ken-vandine/jockey/ubuntu
Merge into: lp:~ubuntu-core-dev/jockey/ubuntu
Diff against target: 178 lines (+136/-1)
4 files modified
debian/changelog (+17/-1)
debian/control (+1/-0)
debian/patches/01_app_indicator_integration.patch (+117/-0)
debian/rules (+1/-0)
To merge this branch: bzr merge lp:~ken-vandine/jockey/ubuntu
Reviewer Review Type Date Requested Status
Registry Administrators Pending
Review via email: mp+17045@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Merged in patch adding support for the application indicator

Unmerged revisions

386. By Ken VanDine

* debian/control:
  - Recommend nvidia-common > 0.2.15 because of the new alternatives
    class.
* data/handlers/nvidia.py:
  - Add support for the new alternatives system by using the
    Alternatives class from nvidia-common.
* data/handlers/fglrx.py:
  - Keep fglrx disabled until AMD provides us with a driver that is
    compatible with Lucid's xserver.

385. By Ken VanDine

* debian/control
  - Added recommends for python-appindicator (>= 0.0.6) to jockey-gtk

384. By Ken VanDine

set released

383. By Ken VanDine

Added patch header

382. By Ken VanDine

set unreleased

381. By Ken VanDine

* debian/patches/01_app_indicator_integration.patch
  - Adds application indicator support (LP: #497879)
* debian/rules
  - added simple-patchsys.mk

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-01-05 11:08:07 +0000
3+++ debian/changelog 2010-01-08 21:20:29 +0000
4@@ -1,4 +1,4 @@
5-jockey (0.5.5-0ubuntu5) UNRELEASED; urgency=low
6+jockey (0.5.5-0ubuntu7) UNRELEASED; urgency=low
7
8 * debian/control:
9 - Recommend nvidia-common > 0.2.15 because of the new alternatives
10@@ -12,6 +12,22 @@
11
12 -- Alberto Milone <alberto.milone@canonical.com> Tue, 05 Jan 2010 11:20:11 +0100
13
14+jockey (0.5.5-0ubuntu6) lucid; urgency=low
15+
16+ * debian/control
17+ - Added recommends for python-appindicator (>= 0.0.6) to jockey-gtk
18+
19+ -- Ken VanDine <ken.vandine@canonical.com> Fri, 08 Jan 2010 16:10:41 -0500
20+
21+jockey (0.5.5-0ubuntu5) lucid; urgency=low
22+
23+ * debian/patches/01_app_indicator_integration.patch
24+ - Adds application indicator support (LP: #497879)
25+ * debian/rules
26+ - added simple-patchsys.mk
27+
28+ -- Ken VanDine <ken.vandine@canonical.com> Fri, 08 Jan 2010 15:13:20 -0500
29+
30 jockey (0.5.5-0ubuntu4) lucid; urgency=low
31
32 * data/handlers/nvidia.py: Remove suppressing of driver version 71, it's not
33
34=== modified file 'debian/control'
35--- debian/control 2010-01-05 11:08:07 +0000
36+++ debian/control 2010-01-08 21:20:29 +0000
37@@ -28,6 +28,7 @@
38 Depends: ${python:Depends}, jockey-common (= ${binary:Version}),
39 python-notify (>= 0.1.1-0ubuntu2), python-xdg, synaptic,
40 policykit-1-gnome
41+Recommends: python-appindicator (>= 0.0.6)
42 Description: GNOME user interface and desktop integration for driver management
43 Jockey provides a user interface for configuring third-party drivers,
44 such as the Nvidia and ATI fglrx X.org and various Wireless LAN
45
46=== added directory 'debian/patches'
47=== added file 'debian/patches/01_app_indicator_integration.patch'
48--- debian/patches/01_app_indicator_integration.patch 1970-01-01 00:00:00 +0000
49+++ debian/patches/01_app_indicator_integration.patch 2010-01-08 21:20:29 +0000
50@@ -0,0 +1,117 @@
51+Description: Adds support for the application indicator
52+ .
53+ This patch moves jockey out of the notification area, and into
54+ the indicator-applet using libappindicator.
55+
56+Author: Conor Curran <conor.curran@canonical.com>
57+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/jockey/+bug/497879
58+Last-Update: 2010-01-08
59+
60+=== modified file 'gtk/jockey-gtk'
61+--- gtk/jockey-gtk 2009-09-02 13:49:09 +0000
62++++ gtk/jockey-gtk 2010-01-08 11:35:46 +0000
63+@@ -165,30 +165,37 @@
64+
65+ def ui_notification(self, title, text):
66+ '''Present a notification popup.
67+-
68+ This should preferably create a tray icon. Clicking on the tray icon or
69+ notification should run the GUI.
70+ '''
71++ trayicon = jockey.ui.AbstractUI.ui_notification(self, None, None)
72+ pynotify.init('jockey')
73+
74+- trayicon = gtk.status_icon_new_from_icon_name('jockey')
75+- trayicon.connect('activate', lambda widget: self.ui_show_main())
76+- trayicon.set_visible(False)
77+- trayicon.set_tooltip(title)
78+- trayicon.set_visible(True)
79+-
80+- self.ui_idle()
81+-
82+- # creating the notification immediately causes the bubble to point into
83+- # the void; icon needs to settle first
84+- gobject.timeout_add (500, self.show_notification,
85+- (title, text, trayicon))
86++ if trayicon is not None:
87++ menu = gtk.Menu()
88++ item = gtk.MenuItem("Install Drivers")
89++ menu.append(item)
90++ item.show()
91++ item.connect("activate", lambda widget: self.ui_show_main())
92++ trayicon.set_menu(menu)
93++ self.ui_idle()
94++ gobject.timeout_add (500, self.show_notification, (title, text, None))
95++ gtk.main()
96++ else:
97++ trayicon = gtk.status_icon_new_from_icon_name('jockey')
98++ trayicon.connect('activate', lambda widget: self.ui_show_main())
99++ trayicon.set_visible(False)
100++ trayicon.set_tooltip(title)
101++ trayicon.set_visible(True)
102++ self.ui_idle()
103++ gobject.timeout_add (500, self.show_notification, (title, text, trayicon))
104+
105+ def show_notification(self, data):
106+ (title, text, trayicon) = data
107+ notify = pynotify.Notification(title, text, 'jockey')
108+ notify.set_urgency(pynotify.URGENCY_NORMAL)
109+- notify.attach_to_status_icon(trayicon)
110++ if trayicon is not None:
111++ notify.attach_to_status_icon(trayicon)
112+ notify.set_timeout(10000)
113+ notify.show()
114+
115+@@ -196,7 +203,7 @@
116+ '''Process pending UI events and return.
117+
118+ This is called while waiting for external processes such as package
119+- installers.
120++ installer.
121+ '''
122+ while gtk.events_pending():
123+ gtk.main_iteration(False)
124+
125+=== modified file 'jockey/ui.py'
126+--- jockey/ui.py 2009-11-09 11:52:51 +0000
127++++ jockey/ui.py 2010-01-08 11:32:39 +0000
128+@@ -22,11 +22,17 @@
129+
130+ import gettext, optparse, urllib2, tempfile, sys, time, os, threading
131+
132++
133+ import gobject
134+ import dbus
135+ import dbus.service
136+ import dbus.mainloop.glib
137+
138++try:
139++ import appindicator
140++except:
141++ pass
142++
143+ from oslib import OSLib
144+ from backend import UnknownHandlerException, PermissionDeniedByPolicy, \
145+ BackendCrashError, convert_dbus_exceptions, \
146+@@ -889,11 +895,18 @@
147+
148+ def ui_notification(self, title, text):
149+ '''Present a notification popup.
150+-
151+ This should preferably create a tray icon. Clicking on the tray icon or
152+ notification should run the GUI.
153++ This method will attempt to instantiate an appindicator to return to both the GTK and KDE children.
154++ If whatever reason it fails (missing python-appindicator) then it should behave as it did before
155+ '''
156+- raise NotImplementedError, 'subclasses need to implement this'
157++ try:
158++ indicator = appindicator.Indicator("jockey", "jockey", appindicator.CATEGORY_HARDWARE)
159++ indicator.set_status(appindicator.STATUS_ATTENTION)
160++ except:
161++ indicator = None
162++
163++ return indicator
164+
165+ def ui_idle(self):
166+ '''Process pending UI events and return.
167+
168
169=== modified file 'debian/rules'
170--- debian/rules 2009-06-29 14:11:58 +0000
171+++ debian/rules 2010-01-08 21:20:28 +0000
172@@ -6,6 +6,7 @@
173 include /usr/share/cdbs/1/rules/debhelper.mk
174 include /usr/share/cdbs/1/class/python-distutils.mk
175 include /usr/share/cdbs/1/rules/langpack.mk
176+include /usr/share/cdbs/1/rules/simple-patchsys.mk
177
178 DEB_DH_INSTALL_SOURCEDIR := debian/tmp
179

Subscribers

People subscribed via source and target branches

to all changes: