summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2012-06-19 06:10:22 +0000
committerTiziano Müller <dev-zero@gentoo.org>2012-06-19 06:10:22 +0000
commitdb3ddd2e06b909aee4ade8f3ab19731f181ef9b5 (patch)
tree887c7a4322c59d91518c00f5c49b5d2cdb6df2cc /net-wireless/blueman/files
parentmarked x86 per bug 414733 (diff)
downloadgentoo-2-db3ddd2e06b909aee4ade8f3ab19731f181ef9b5.tar.gz
gentoo-2-db3ddd2e06b909aee4ade8f3ab19731f181ef9b5.tar.bz2
gentoo-2-db3ddd2e06b909aee4ade8f3ab19731f181ef9b5.zip
Fix segfault with non-UTF-8 locale (bug #414871).
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Diffstat (limited to 'net-wireless/blueman/files')
-rw-r--r--net-wireless/blueman/files/blueman-1.23-set-codeset-for-gettext-to-UTF-8-always.patch266
1 files changed, 266 insertions, 0 deletions
diff --git a/net-wireless/blueman/files/blueman-1.23-set-codeset-for-gettext-to-UTF-8-always.patch b/net-wireless/blueman/files/blueman-1.23-set-codeset-for-gettext-to-UTF-8-always.patch
new file mode 100644
index 000000000000..a7df10db506e
--- /dev/null
+++ b/net-wireless/blueman/files/blueman-1.23-set-codeset-for-gettext-to-UTF-8-always.patch
@@ -0,0 +1,266 @@
+From f585aea768ad98440d4967894aa9213cea6e6f14 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Tue, 19 Jun 2012 08:03:47 +0200
+Subject: [PATCH] Set codeset for gettext to UTF-8 always
+
+This fixes a segfault in g_markup_escape_text when loading the UI files
+with a non-UTF-8 locale since GTK+ expects all strings (including translation)
+to be in UTF-8.
+---
+ apps/blueman-adapters | 2 ++
+ apps/blueman-assistant | 2 ++
+ apps/blueman-manager | 2 ++
+ apps/blueman-sendto | 2 ++
+ apps/blueman-services | 2 ++
+ blueman/gui/GsmSettings.py | 2 ++
+ blueman/gui/applet/PluginDialog.py | 2 ++
+ blueman/main/applet/BluezAgent.py | 2 ++
+ blueman/plugins/applet/NetUsage.py | 2 ++
+ blueman/plugins/services/Audio.py | 2 ++
+ blueman/plugins/services/Network.py | 2 ++
+ blueman/plugins/services/Transfer.py | 2 ++
+ 12 files changed, 24 insertions(+), 0 deletions(-)
+
+diff --git a/apps/blueman-adapters b/apps/blueman-adapters
+index 6adc642..51325ad 100755
+--- a/apps/blueman-adapters
++++ b/apps/blueman-adapters
+@@ -26,6 +26,7 @@ import gobject
+ import pango
+ import os.path
+ import sys
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -47,6 +48,7 @@ class BluemanAdapters:
+
+ builder = gtk.Builder()
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ builder.add_from_file(UI_PATH +"/adapters.ui")
+ self.dialog = builder.get_object("dialog")
+
+diff --git a/apps/blueman-assistant b/apps/blueman-assistant
+index 32d8bd8..c30f663 100755
+--- a/apps/blueman-assistant
++++ b/apps/blueman-assistant
+@@ -35,6 +35,7 @@ import gtk
+ import random
+ import dbus.glib
+ from optparse import OptionParser
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -74,6 +75,7 @@ class Assistant(Agent):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/assistant.ui")
+ self.assistant = self.Builder.get_object("assistant")
+ self.assistant.set_title(_("Bluetooth Assistant"))
+diff --git a/apps/blueman-manager b/apps/blueman-manager
+index e4a04e3..3aeb80f 100755
+--- a/apps/blueman-manager
++++ b/apps/blueman-manager
+@@ -25,6 +25,7 @@ import sys
+ import gtk
+ import dbus, dbus.glib
+ import gobject
++from locale import bind_textdomain_codeset
+
+ #support running uninstalled
+ _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+@@ -56,6 +57,7 @@ class Blueman:
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/manager-main.ui")
+
+ self.window = self.Builder.get_object("window")
+diff --git a/apps/blueman-sendto b/apps/blueman-sendto
+index 72fcfa9..f8c082a 100755
+--- a/apps/blueman-sendto
++++ b/apps/blueman-sendto
+@@ -33,6 +33,7 @@ from optparse import OptionParser
+ import gettext
+ import urllib
+ import time
++from locale import bind_textdomain_codeset
+
+ from blueman.bluez.Adapter import Adapter
+ from blueman.main.Device import Device
+@@ -56,6 +57,7 @@ class Sender(gobject.GObject):
+ gobject.GObject.__init__(self)
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/send-dialog.ui")
+ self.window = self.Builder.get_object("window")
+
+diff --git a/apps/blueman-services b/apps/blueman-services
+index d6d4545..2c15f03 100755
+--- a/apps/blueman-services
++++ b/apps/blueman-services
+@@ -8,6 +8,7 @@ if os.path.exists(os.path.join(_dirname,"ChangeLog")):
+ sys.path.insert(0, _dirname)
+
+ import gtk
++from locale import bind_textdomain_codeset
+ from blueman.gui.GenericList import GenericList
+
+ from blueman.Functions import *
+@@ -25,6 +26,7 @@ class BluemanServices:
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/services.ui")
+
+ self.Config = Config()
+diff --git a/blueman/gui/GsmSettings.py b/blueman/gui/GsmSettings.py
+index 2e845ec..b4e1059 100644
+--- a/blueman/gui/GsmSettings.py
++++ b/blueman/gui/GsmSettings.py
+@@ -20,6 +20,7 @@ from blueman.main.Config import Config
+ from blueman.Functions import *
+ from blueman.Constants import *
+ import gtk
++from locale import bind_textdomain_codeset
+
+ class GsmSettings(gtk.Dialog):
+ def __init__(self, bd_address):
+@@ -29,6 +30,7 @@ class GsmSettings(gtk.Dialog):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/gsm-settings.ui")
+
+ vbox = self.Builder.get_object("vbox1")
+diff --git a/blueman/gui/applet/PluginDialog.py b/blueman/gui/applet/PluginDialog.py
+index 1d8cbec..299aa32 100644
+--- a/blueman/gui/applet/PluginDialog.py
++++ b/blueman/gui/applet/PluginDialog.py
+@@ -23,6 +23,7 @@ from blueman.Functions import *
+
+ from blueman.gui.GenericList import GenericList
+ import weakref
++from locale import bind_textdomain_codeset
+
+ class SettingsWidget(gtk.VBox):
+ def __init__(self, inst):
+@@ -118,6 +119,7 @@ class PluginDialog(gtk.Dialog):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/applet-plugins-widget.ui")
+
+ self.set_title(_("Plugins"))
+diff --git a/blueman/main/applet/BluezAgent.py b/blueman/main/applet/BluezAgent.py
+index 9c7f93e..377f84b 100644
+--- a/blueman/main/applet/BluezAgent.py
++++ b/blueman/main/applet/BluezAgent.py
+@@ -24,6 +24,7 @@ from blueman.Functions import get_icon, dprint
+ import gtk
+ import gobject
+ import cgi
++from locale import bind_textdomain_codeset
+ import blueman.bluez as Bluez
+ from blueman.Sdp import *
+ from blueman.Constants import *
+@@ -65,6 +66,7 @@ class CommonAgent(gobject.GObject, Agent):
+ builder = gtk.Builder()
+ builder.add_from_file(UI_PATH +"/applet-passkey.ui")
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ dialog = builder.get_object("dialog")
+
+ dialog.props.icon_name = "blueman"
+diff --git a/blueman/plugins/applet/NetUsage.py b/blueman/plugins/applet/NetUsage.py
+index 0cf15e8..bcebb44 100644
+--- a/blueman/plugins/applet/NetUsage.py
++++ b/blueman/plugins/applet/NetUsage.py
+@@ -33,6 +33,7 @@ import dbus
+ import time
+ import datetime
+ import gettext
++from locale import bind_textdomain_codeset
+
+ class MonitorBase(gobject.GObject):
+ __gsignals__ = {
+@@ -146,6 +147,7 @@ class Dialog:
+ builder = gtk.Builder()
+ builder.add_from_file(UI_PATH + "/net-usage.ui")
+ builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+
+ self.dialog = builder.get_object("dialog")
+ self.dialog.connect("response", self.on_response)
+diff --git a/blueman/plugins/services/Audio.py b/blueman/plugins/services/Audio.py
+index a725923..6a67fb0 100644
+--- a/blueman/plugins/services/Audio.py
++++ b/blueman/plugins/services/Audio.py
+@@ -19,6 +19,7 @@
+
+ import gtk
+ import dbus
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.plugins.ServicePlugin import ServicePlugin
+
+@@ -35,6 +36,7 @@ class Audio(ServicePlugin):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/services-audio.ui")
+ self.widget = self.Builder.get_object("audio")
+
+diff --git a/blueman/plugins/services/Network.py b/blueman/plugins/services/Network.py
+index d7b9f45..fc8a8f4 100644
+--- a/blueman/plugins/services/Network.py
++++ b/blueman/plugins/services/Network.py
+@@ -18,6 +18,7 @@
+ #
+
+ import gtk
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.Functions import have, dprint, mask_ip4_address
+ from blueman.Lib import get_net_interfaces, get_net_address, get_net_netmask
+@@ -36,6 +37,7 @@ class Network(ServicePlugin):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/services-network.ui")
+ self.widget = self.Builder.get_object("network")
+
+diff --git a/blueman/plugins/services/Transfer.py b/blueman/plugins/services/Transfer.py
+index d8ba6be..5dd44f0 100644
+--- a/blueman/plugins/services/Transfer.py
++++ b/blueman/plugins/services/Transfer.py
+@@ -18,6 +18,7 @@
+ #
+
+ import gtk
++from locale import bind_textdomain_codeset
+ from blueman.Constants import *
+ from blueman.plugins.ServicePlugin import ServicePlugin
+
+@@ -32,6 +33,7 @@ class Transfer(ServicePlugin):
+
+ self.Builder = gtk.Builder()
+ self.Builder.set_translation_domain("blueman")
++ bind_textdomain_codeset("blueman", "UTF-8")
+ self.Builder.add_from_file(UI_PATH +"/services-transfer.ui")
+ self.widget = self.Builder.get_object("transfer")
+
+--
+1.7.8.6
+