/[gentoo-x86]/net-wireless/blueman/files/blueman-9999-set-codeset-for-gettext-to-UTF-8-always.patch
Gentoo

Contents of /net-wireless/blueman/files/blueman-9999-set-codeset-for-gettext-to-UTF-8-always.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download) (as text)
Sat Aug 8 15:03:18 2015 UTC (4 years, 6 months ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +122 -74 lines
File MIME type: text/x-diff
Update and clean up the live ebuild and patches.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)

1 From a28a982ba05a3b84dcfed43e5bd6801067b5d0c5 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
3 Date: Sat, 8 Aug 2015 14:57:51 +0200
4 Subject: [PATCH] Always set codeset for gettext to utf8
5
6 ---
7 apps/blueman-adapters | 2 ++
8 apps/blueman-assistant | 2 ++
9 apps/blueman-manager | 2 ++
10 apps/blueman-sendto | 2 ++
11 apps/blueman-services | 2 ++
12 blueman/gui/GsmSettings.py | 3 +++
13 blueman/gui/applet/PluginDialog.py | 3 +++
14 blueman/gui/manager/ManagerDeviceMenu.py | 2 ++
15 blueman/main/applet/BluezAgent.py | 2 ++
16 blueman/plugins/applet/NetUsage.py | 3 ++-
17 blueman/plugins/services/Network.py | 2 ++
18 blueman/plugins/services/Transfer.py | 3 +++
19 12 files changed, 27 insertions(+), 1 deletion(-)
20
21 diff --git a/apps/blueman-adapters b/apps/blueman-adapters
22 index 4ac81fe..c8d8c06 100755
23 --- a/apps/blueman-adapters
24 +++ b/apps/blueman-adapters
25 @@ -11,6 +11,7 @@ from gi.repository import Pango
26 import os.path
27 import sys
28 import signal
29 +from locale import bind_textdomain_codeset
30
31 #support running uninstalled
32 _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
33 @@ -40,6 +41,7 @@ class BluemanAdapters:
34
35 builder = Gtk.Builder()
36 builder.set_translation_domain("blueman")
37 + bind_textdomain_codeset("blueman", "UTF-8")
38 builder.add_from_file(UI_PATH + "/adapters.ui")
39 self.dialog = builder.get_object("dialog")
40
41 diff --git a/apps/blueman-assistant b/apps/blueman-assistant
42 index 0b8544b..b23150f 100755
43 --- a/apps/blueman-assistant
44 +++ b/apps/blueman-assistant
45 @@ -19,6 +19,7 @@ import os
46 import sys
47 import signal
48 from optparse import OptionParser
49 +from locale import bind_textdomain_codeset
50
51 #support running uninstalled
52 _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
53 @@ -60,6 +61,7 @@ class Assistant:
54
55 self.Builder = Gtk.Builder()
56 self.Builder.set_translation_domain("blueman")
57 + bind_textdomain_codeset("blueman", "UTF-8")
58 self.Builder.add_from_file(UI_PATH + "/assistant.ui")
59 self.assistant = self.Builder.get_object("assistant")
60 self.assistant.set_title(_("Bluetooth Assistant"))
61 diff --git a/apps/blueman-manager b/apps/blueman-manager
62 index d276692..e272528 100755
63 --- a/apps/blueman-manager
64 +++ b/apps/blueman-manager
65 @@ -14,6 +14,7 @@ from blueman.Constants import *
66 import gi
67 gi.require_version("Gtk", "3.0")
68 from gi.repository import Gtk
69 +from locale import bind_textdomain_codeset
70
71 #support running uninstalled
72 _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
73 @@ -47,6 +48,7 @@ class Blueman:
74
75 self.Builder = Gtk.Builder()
76 self.Builder.set_translation_domain("blueman")
77 + bind_textdomain_codeset("blueman", "UTF-8")
78 self.Builder.add_from_file(UI_PATH + "/manager-main.ui")
79
80 self.window = self.Builder.get_object("window")
81 diff --git a/apps/blueman-sendto b/apps/blueman-sendto
82 index 54e30b4..3f99d1e 100755
83 --- a/apps/blueman-sendto
84 +++ b/apps/blueman-sendto
85 @@ -17,6 +17,7 @@ from optparse import OptionParser
86 import gettext
87 import urllib
88 import time
89 +from locale import bind_textdomain_codeset
90
91 from blueman.Constants import *
92 import gi
93 @@ -52,6 +53,7 @@ class Sender(GObject.GObject):
94 GObject.GObject.__init__(self)
95 self.Builder = Gtk.Builder()
96 self.Builder.set_translation_domain("blueman")
97 + bind_textdomain_codeset("blueman", "UTF-8")
98 self.Builder.add_from_file(UI_PATH + "/send-dialog.ui")
99 self.window = self.Builder.get_object("window")
100
101 diff --git a/apps/blueman-services b/apps/blueman-services
102 index 3e343ca..5e41261 100755
103 --- a/apps/blueman-services
104 +++ b/apps/blueman-services
105 @@ -7,6 +7,7 @@ from __future__ import unicode_literals
106
107 import os
108 import sys
109 +from locale import bind_textdomain_codeset
110 #support running uninstalled
111 _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
112 if os.path.exists(os.path.join(_dirname, "CHANGELOG.md")):
113 @@ -35,6 +36,7 @@ class BluemanServices:
114
115 self.Builder = Gtk.Builder()
116 self.Builder.set_translation_domain("blueman")
117 + bind_textdomain_codeset("blueman", "UTF-8")
118 self.Builder.add_from_file(UI_PATH + "/services.ui")
119
120 self.Config = Config("org.blueman.general")
121 diff --git a/blueman/gui/GsmSettings.py b/blueman/gui/GsmSettings.py
122 index 2919a69..3cb7057 100644
123 --- a/blueman/gui/GsmSettings.py
124 +++ b/blueman/gui/GsmSettings.py
125 @@ -3,6 +3,8 @@ from __future__ import division
126 from __future__ import absolute_import
127 from __future__ import unicode_literals
128
129 +from locale import bind_textdomain_codeset
130 +
131 from blueman.main.Config import Config
132 from blueman.Functions import *
133 from blueman.Constants import *
134 @@ -20,6 +22,7 @@ class GsmSettings(Gtk.Dialog):
135
136 self.Builder = Gtk.Builder()
137 self.Builder.set_translation_domain("blueman")
138 + bind_textdomain_codeset("blueman", "UTF-8")
139 self.Builder.add_from_file(UI_PATH + "/gsm-settings.ui")
140
141 vbox = self.Builder.get_object("vbox1")
142 diff --git a/blueman/gui/applet/PluginDialog.py b/blueman/gui/applet/PluginDialog.py
143 index eb70b45..def7e48 100644
144 --- a/blueman/gui/applet/PluginDialog.py
145 +++ b/blueman/gui/applet/PluginDialog.py
146 @@ -3,6 +3,8 @@ from __future__ import division
147 from __future__ import absolute_import
148 from __future__ import unicode_literals
149
150 +from locale import bind_textdomain_codeset
151 +
152 import gi
153 gi.require_version("Gtk", "3.0")
154 from gi.repository import Gtk
155 @@ -105,6 +107,7 @@ class PluginDialog(Gtk.Dialog):
156
157 self.Builder = Gtk.Builder()
158 self.Builder.set_translation_domain("blueman")
159 + bind_textdomain_codeset("blueman", "UTF-8")
160 self.Builder.add_from_file(UI_PATH + "/applet-plugins-widget.ui")
161
162 self.set_title(_("Plugins"))
163 diff --git a/blueman/gui/manager/ManagerDeviceMenu.py b/blueman/gui/manager/ManagerDeviceMenu.py
164 index f0dea5a..031b456 100644
165 --- a/blueman/gui/manager/ManagerDeviceMenu.py
166 +++ b/blueman/gui/manager/ManagerDeviceMenu.py
167 @@ -3,6 +3,7 @@ from __future__ import division
168 from __future__ import absolute_import
169 from __future__ import unicode_literals
170
171 +from locale import bind_textdomain_codeset
172 from operator import itemgetter
173 from blueman.Sdp import uuid128_to_uuid16, SERIAL_PORT_SVCLASS_ID, OBEX_OBJPUSH_SVCLASS_ID, OBEX_FILETRANS_SVCLASS_ID
174 from blueman.Functions import *
175 @@ -312,6 +313,7 @@ class ManagerDeviceMenu(Gtk.Menu):
176
177 builder = Gtk.Builder()
178 builder.set_translation_domain("blueman")
179 + bind_textdomain_codeset("blueman", "UTF-8")
180 builder.add_from_file(UI_PATH + "/rename-device.ui")
181 dialog = builder.get_object("dialog")
182 dialog.set_transient_for(self.Blueman.window)
183 diff --git a/blueman/main/applet/BluezAgent.py b/blueman/main/applet/BluezAgent.py
184 index f49946d..e930963 100644
185 --- a/blueman/main/applet/BluezAgent.py
186 +++ b/blueman/main/applet/BluezAgent.py
187 @@ -6,6 +6,7 @@ from __future__ import unicode_literals
188 import dbus
189 from dbus.mainloop.glib import DBusGMainLoop
190 import dbus.service
191 +from locale import bind_textdomain_codeset
192 from blueman.Functions import get_icon, dprint
193
194 import gi
195 @@ -68,6 +69,7 @@ class BluezAgent(_GObjectAgent, Agent, GObject.GObject):
196 builder = Gtk.Builder()
197 builder.add_from_file(UI_PATH + "/applet-passkey.ui")
198 builder.set_translation_domain("blueman")
199 + bind_textdomain_codeset("blueman", "UTF-8")
200 dialog = builder.get_object("dialog")
201
202 dialog.props.icon_name = "blueman"
203 diff --git a/blueman/plugins/applet/NetUsage.py b/blueman/plugins/applet/NetUsage.py
204 index 1f3ad04..a498f98 100644
205 --- a/blueman/plugins/applet/NetUsage.py
206 +++ b/blueman/plugins/applet/NetUsage.py
207 @@ -24,7 +24,7 @@ import dbus
208 import time
209 import datetime
210 import gettext
211 -
212 +from locale import bind_textdomain_codeset
213
214 class MonitorBase(GObject.GObject):
215 __gsignals__ = {
216 @@ -135,6 +135,7 @@ class Dialog:
217 builder = Gtk.Builder()
218 builder.add_from_file(UI_PATH + "/net-usage.ui")
219 builder.set_translation_domain("blueman")
220 + bind_textdomain_codeset("blueman", "UTF-8")
221
222 self.dialog = builder.get_object("dialog")
223 self.dialog.connect("response", self.on_response)
224 diff --git a/blueman/plugins/services/Network.py b/blueman/plugins/services/Network.py
225 index 59e1da3..f36691a 100644
226 --- a/blueman/plugins/services/Network.py
227 +++ b/blueman/plugins/services/Network.py
228 @@ -18,6 +18,7 @@ from blueman.main.Mechanism import Mechanism
229 from blueman.main.AppletService import AppletService
230 from blueman.gui.Dialogs import NetworkErrorDialog
231 from random import randint
232 +from locale import bind_textdomain_codeset
233
234
235 class Network(ServicePlugin):
236 @@ -27,6 +28,7 @@ class Network(ServicePlugin):
237
238 self.Builder = Gtk.Builder()
239 self.Builder.set_translation_domain("blueman")
240 + bind_textdomain_codeset("blueman", "UTF-8")
241 self.Builder.add_from_file(UI_PATH + "/services-network.ui")
242 self.widget = self.Builder.get_object("network")
243
244 diff --git a/blueman/plugins/services/Transfer.py b/blueman/plugins/services/Transfer.py
245 index 61b9db1..4474e93 100644
246 --- a/blueman/plugins/services/Transfer.py
247 +++ b/blueman/plugins/services/Transfer.py
248 @@ -3,6 +3,8 @@ from __future__ import division
249 from __future__ import absolute_import
250 from __future__ import unicode_literals
251
252 +from locale import bind_textdomain_codeset
253 +
254 import gi
255 gi.require_version("Gtk", "3.0")
256 from gi.repository import Gtk
257 @@ -21,6 +23,7 @@ class Transfer(ServicePlugin):
258
259 self.Builder = Gtk.Builder()
260 self.Builder.set_translation_domain("blueman")
261 + bind_textdomain_codeset("blueman", "UTF-8")
262 self.Builder.add_from_file(UI_PATH + "/services-transfer.ui")
263 self.widget = self.Builder.get_object("transfer")
264
265 --
266 2.5.0
267

  ViewVC Help
Powered by ViewVC 1.1.20