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
=== modified file 'debian/control'
--- debian/control 2016-06-13 20:01:23 +0000
+++ debian/control 2017-12-19 14:48:45 +0000
@@ -26,7 +26,7 @@
26 gir1.2-gtk-3.0,26 gir1.2-gtk-3.0,
27 gir1.2-gtkchamplain-0.12,27 gir1.2-gtkchamplain-0.12,
28 gir1.2-gtkclutter-1.0,28 gir1.2-gtkclutter-1.0,
29 gir1.2-networkmanager-1.0,29 gir1.2-nm-1.0,
30 gnome-icon-theme-symbolic,30 gnome-icon-theme-symbolic,
31 python-cairo,31 python-cairo,
32 python-dbus,32 python-dbus,
3333
=== modified file 'qreator/QRCode.py'
--- qreator/QRCode.py 2016-06-10 13:57:52 +0000
+++ qreator/QRCode.py 2017-12-19 14:48:45 +0000
@@ -20,8 +20,13 @@
20except ImportError:20except ImportError:
21 print "You need to install the python-qrencode package"21 print "You need to install the python-qrencode package"
22 sys.exit(1)22 sys.exit(1)
23import Image23
24import ImageOps24try:
25 from PIL import Image
26 from PIL import ImageOps
27except ImportError:
28 import Image
29 import ImageOps
25import cairo30import cairo
26import array31import array
2732
2833
=== modified file 'qreator/qrcodes/QRCodeWifiGtk.py'
--- qreator/qrcodes/QRCodeWifiGtk.py 2013-08-06 06:40:48 +0000
+++ qreator/qrcodes/QRCodeWifiGtk.py 2017-12-19 14:48:45 +0000
@@ -17,7 +17,7 @@
17from GtkHelpers import clear_text_entry, show_clear_icon17from GtkHelpers import clear_text_entry, show_clear_icon
18from qreator_lib.i18n import _18from qreator_lib.i18n import _
19from qreator_lib.helpers import get_data_file19from qreator_lib.helpers import get_data_file
20from gi.repository import Gtk, NetworkManager, NMClient, GLib, GdkPixbuf20from gi.repository import Gtk, NM, GLib, GdkPixbuf
2121
2222
23def _escape(st):23def _escape(st):
@@ -141,14 +141,15 @@
141141
142def get_ssids():142def get_ssids():
143 """Returns a list of ssids sorted by the signal strength."""143 """Returns a list of ssids sorted by the signal strength."""
144 nmc = NMClient.Client.new()144 nmc = NM.Client.new()
145 devs = nmc.get_devices()145 devs = nmc.get_devices()
146146
147 ssids = []147 ssids = []
148 for dev in devs:148 for dev in devs:
149 if dev.get_device_type() == NetworkManager.DeviceType.WIFI:149 if dev.get_device_type() == NM.DeviceType.WIFI:
150 for ap in dev.get_access_points():150 for ap in dev.get_access_points():
151 ssids.append((ap.get_strength(), ap.get_ssid()))151 ssid = NM.utils_ssid_to_utf8(ap.get_ssid().get_data());
152 ssids.append((ap.get_strength(), ssid))
152 ssids.sort()153 ssids.sort()
153 ssids.reverse() # strongest has the highest number -> should be first154 ssids.reverse() # strongest has the highest number -> should be first
154 return ssids155 return ssids
155156
=== modified file 'setup.py'
--- setup.py 2016-06-13 19:28:58 +0000
+++ setup.py 2017-12-19 14:48:45 +0000
@@ -117,17 +117,18 @@
117 def run(self):117 def run(self):
118 DistUtilsExtra.auto.install_auto.run(self)118 DistUtilsExtra.auto.install_auto.run(self)
119119
120 target_data = '/' + os.path.relpath(self.install_data, self.root) + '/'120 root = '/' if self.root is None else self.root
121 target_data = '/' + os.path.relpath(self.install_data, root) + '/'
121 target_pkgdata = target_data + 'share/qreator/'122 target_pkgdata = target_data + 'share/qreator/'
122 target_scripts = '/' + os.path.relpath(self.install_scripts, self.root) + '/'123 target_scripts = '/' + os.path.relpath(self.install_scripts, root) + '/'
123124
124 values = {'__qreator_data_directory__': "'%s'" % (target_pkgdata),125 values = {'__qreator_data_directory__': "'%s'" % (target_pkgdata),
125 '__version__': "'%s'" % self.distribution.get_version()}126 '__version__': "'%s'" % self.distribution.get_version()}
126 update_config(self.install_lib, values)127 update_config(self.install_lib, values)
127128
128 desktop_file = move_desktop_file(self.root, target_data, self.prefix)129 desktop_file = move_desktop_file(root, target_data, self.prefix)
129 update_desktop_file(desktop_file, target_pkgdata, target_scripts)130 update_desktop_file(desktop_file, target_pkgdata, target_scripts)
130 compile_schemas(self.root, target_data)131 compile_schemas(root, target_data)
131132
132133
133##################################################################################134##################################################################################

Subscribers

People subscribed via source and target branches