r16867 - in /desktop/unstable/gnome-power-manager/debian: changelog patches/05_translation_crash.patch

joss at users.alioth.debian.org joss at users.alioth.debian.org
Tue Sep 2 14:12:28 UTC 2008


Author: joss
Date: Tue Sep  2 14:12:28 2008
New Revision: 16867

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=16867
Log:
05_translation_crash.patch: patch from upstream (SVN r2798 and 
r2799). Fixes crashes when some translations exceed 100 characters.
Closes: #495945.

Added:
    desktop/unstable/gnome-power-manager/debian/patches/05_translation_crash.patch
Modified:
    desktop/unstable/gnome-power-manager/debian/changelog

Modified: desktop/unstable/gnome-power-manager/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-power-manager/debian/changelog?rev=16867&op=diff
==============================================================================
--- desktop/unstable/gnome-power-manager/debian/changelog (original)
+++ desktop/unstable/gnome-power-manager/debian/changelog Tue Sep  2 14:12:28 2008
@@ -1,3 +1,11 @@
+gnome-power-manager (2.22.1-3) UNRELEASED; urgency=low
+
+  * 05_translation_crash.patch: patch from upstream (SVN r2798 and 
+    r2799). Fixes crashes when some translations exceed 100 characters.
+    Closes: #495945.
+
+ -- Josselin Mouette <joss at debian.org>  Tue, 02 Sep 2008 16:11:30 +0200
+
 gnome-power-manager (2.22.1-2) unstable; urgency=low
 
   [ Josselin Mouette ]

Added: desktop/unstable/gnome-power-manager/debian/patches/05_translation_crash.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-power-manager/debian/patches/05_translation_crash.patch?rev=16867&op=file
==============================================================================
--- desktop/unstable/gnome-power-manager/debian/patches/05_translation_crash.patch (added)
+++ desktop/unstable/gnome-power-manager/debian/patches/05_translation_crash.patch Tue Sep  2 14:12:28 2008
@@ -1,0 +1,48 @@
+--- trunk/applets/inhibit/inhibit-applet.c	2008/05/19 13:40:19	2798
++++ trunk/applets/inhibit/inhibit-applet.c	2008/05/19 19:25:56	2800
+@@ -344,14 +344,14 @@
+ static void
+ gpm_applet_update_tooltip (GpmInhibitApplet *applet)
+ {
+-	static gchar buf[101];
++	const gchar *buf;
+ 	if (applet->proxy == NULL) {
+-		snprintf (buf, 100, _("Cannot connect to gnome-power-manager"));
++		buf = _("Cannot connect to gnome-power-manager");
+ 	} else {
+ 		if (applet->cookie > 0) {
+-			snprintf (buf, 100, _("Automatic sleep inhibited"));
++			buf = _("Automatic sleep inhibited");
+ 		} else {
+-			snprintf (buf, 100, _("Automatic sleep enabled"));
++			buf = _("Automatic sleep enabled");
+ 		}
+ 	}
+ 	gtk_widget_set_tooltip_text (GTK_WIDGET(applet), buf);
+--- trunk/applets/brightness/brightness-applet.c	2008/04/10 13:52:24	2774
++++ trunk/applets/brightness/brightness-applet.c	2008/05/19 14:24:45	2799
+@@ -349,19 +349,20 @@
+ static void
+ gpm_applet_update_tooltip (GpmBrightnessApplet *applet)
+ {
+-	static gchar buf[101];
++	gchar *buf = NULL;
+ 	if (applet->popped == FALSE) {
+ 		if (applet->proxy == NULL) {
+-			snprintf (buf, 100, _("Cannot connect to gnome-power-manager"));
++			buf = g_strdup (_("Cannot connect to gnome-power-manager"));
+ 		} else if (applet->call_worked == FALSE) {
+-			snprintf (buf, 100, _("Cannot get laptop panel brightness"));
++			buf = g_strdup (_("Cannot get laptop panel brightness"));
+ 		} else {
+-			snprintf (buf, 100, _("LCD brightness : %d%%"), applet->level);
++			buf = g_strdup_printf (_("LCD brightness : %d%%"), applet->level);
+ 		}
+ 		gtk_widget_set_tooltip_text (GTK_WIDGET(applet), buf);
+ 	} else {
+ 		gtk_widget_set_tooltip_text (GTK_WIDGET(applet), NULL);
+ 	}
++	g_free (buf);
+ }
+ 
+ /**




More information about the pkg-gnome-commits mailing list