Merge lp:~lkundrak/qreator/libnm into lp:qreator

Proposed by Lubomir Rintel
Status: Merged
Approved by: David Planella
Approved revision: 202
Merged at revision: 200
Proposed branch: lp:~lkundrak/qreator/libnm
Merge into: lp:qreator
Diff against target: 91 lines (+18/-11)
4 files modified
debian/control (+1/-1)
qreator/QRCode.py (+7/-2)
qreator/qrcodes/QRCodeWifiGtk.py (+5/-4)
setup.py (+5/-4)
To merge this branch: bzr merge lp:~lkundrak/qreator/libnm
Reviewer Review Type Date Requested Status
David Planella Approve
Review via email: mp+335383@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Lubomir Rintel (lkundrak) wrote :

Ping?

Revision history for this message
David Planella (dpm) wrote :

Apologies for not replying sooner, life got in the way. Thanks so much for your work on this fix and for the merge request.

Looks good to me, happy to merge!

review: Approve
Revision history for this message
Lubomir Rintel (lkundrak) wrote :

On Sun, 2018-07-29 at 23:21 +0000, David Planella wrote:
> Review: Approve
>
> Apologies for not replying sooner, life got in the way. Thanks so
> much for your work on this fix and for the merge request.
>
> Looks good to me, happy to merge!

Actually, a pleasant surprise. With the libnm porting crusade, I've
encountered way too many dormant projects, and I getting a response
after months is not what happens often.

Thank you

Lubo

Revision history for this message
David Planella (dpm) wrote :

Excellent. Note that I had to do an extra change to the branch afterwards, to avoid an exception when the SSID has no data:

https://bazaar.launchpad.net/~qreator-hackers/qreator/trunk/revision/203?remember=201&compare_revid=201

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2016-06-13 20:01:23 +0000
3+++ debian/control 2017-12-19 14:48:45 +0000
4@@ -26,7 +26,7 @@
5 gir1.2-gtk-3.0,
6 gir1.2-gtkchamplain-0.12,
7 gir1.2-gtkclutter-1.0,
8- gir1.2-networkmanager-1.0,
9+ gir1.2-nm-1.0,
10 gnome-icon-theme-symbolic,
11 python-cairo,
12 python-dbus,
13
14=== modified file 'qreator/QRCode.py'
15--- qreator/QRCode.py 2016-06-10 13:57:52 +0000
16+++ qreator/QRCode.py 2017-12-19 14:48:45 +0000
17@@ -20,8 +20,13 @@
18 except ImportError:
19 print "You need to install the python-qrencode package"
20 sys.exit(1)
21-import Image
22-import ImageOps
23+
24+try:
25+ from PIL import Image
26+ from PIL import ImageOps
27+except ImportError:
28+ import Image
29+ import ImageOps
30 import cairo
31 import array
32
33
34=== modified file 'qreator/qrcodes/QRCodeWifiGtk.py'
35--- qreator/qrcodes/QRCodeWifiGtk.py 2013-08-06 06:40:48 +0000
36+++ qreator/qrcodes/QRCodeWifiGtk.py 2017-12-19 14:48:45 +0000
37@@ -17,7 +17,7 @@
38 from GtkHelpers import clear_text_entry, show_clear_icon
39 from qreator_lib.i18n import _
40 from qreator_lib.helpers import get_data_file
41-from gi.repository import Gtk, NetworkManager, NMClient, GLib, GdkPixbuf
42+from gi.repository import Gtk, NM, GLib, GdkPixbuf
43
44
45 def _escape(st):
46@@ -141,14 +141,15 @@
47
48 def get_ssids():
49 """Returns a list of ssids sorted by the signal strength."""
50- nmc = NMClient.Client.new()
51+ nmc = NM.Client.new()
52 devs = nmc.get_devices()
53
54 ssids = []
55 for dev in devs:
56- if dev.get_device_type() == NetworkManager.DeviceType.WIFI:
57+ if dev.get_device_type() == NM.DeviceType.WIFI:
58 for ap in dev.get_access_points():
59- ssids.append((ap.get_strength(), ap.get_ssid()))
60+ ssid = NM.utils_ssid_to_utf8(ap.get_ssid().get_data());
61+ ssids.append((ap.get_strength(), ssid))
62 ssids.sort()
63 ssids.reverse() # strongest has the highest number -> should be first
64 return ssids
65
66=== modified file 'setup.py'
67--- setup.py 2016-06-13 19:28:58 +0000
68+++ setup.py 2017-12-19 14:48:45 +0000
69@@ -117,17 +117,18 @@
70 def run(self):
71 DistUtilsExtra.auto.install_auto.run(self)
72
73- target_data = '/' + os.path.relpath(self.install_data, self.root) + '/'
74+ root = '/' if self.root is None else self.root
75+ target_data = '/' + os.path.relpath(self.install_data, root) + '/'
76 target_pkgdata = target_data + 'share/qreator/'
77- target_scripts = '/' + os.path.relpath(self.install_scripts, self.root) + '/'
78+ target_scripts = '/' + os.path.relpath(self.install_scripts, root) + '/'
79
80 values = {'__qreator_data_directory__': "'%s'" % (target_pkgdata),
81 '__version__': "'%s'" % self.distribution.get_version()}
82 update_config(self.install_lib, values)
83
84- desktop_file = move_desktop_file(self.root, target_data, self.prefix)
85+ desktop_file = move_desktop_file(root, target_data, self.prefix)
86 update_desktop_file(desktop_file, target_pkgdata, target_scripts)
87- compile_schemas(self.root, target_data)
88+ compile_schemas(root, target_data)
89
90
91 ##################################################################################

Subscribers

People subscribed via source and target branches