aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog10
-rw-r--r--debian/control4
-rw-r--r--debian/patches/workaround-icon-crash.patch74
-rwxr-xr-xdebian/rules3
4 files changed, 89 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 438fe31..f495c3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+libindicator (0.3.11-0ubuntu2) maverick; urgency=low
+
+ * workaround-icon-crash.patch:
+ - change from Mikkel Kamstrup Erlandsen to workaround a crasher in the
+ new version
+ * debian/control:
+ - updated the gtk build requirement
+
+ -- Sebastien Bacher <seb128@ubuntu.com> Fri, 13 Aug 2010 11:40:29 +0200
+
libindicator (0.3.11-0ubuntu1) maverick; urgency=low
* New upstream release.
diff --git a/debian/control b/debian/control
index af01ed9..6530e9b 100644
--- a/debian/control
+++ b/debian/control
@@ -7,12 +7,12 @@ Uploaders: Evgeni Golov <evgeni@debian.org>, Kartik Mistry <kartik@debian.org>
Build-Depends: debhelper (>= 5.0),
cdbs (>= 0.4.41),
libglib2.0-dev (>= 2.22),
- libgtk2.0-dev (>= 2.12.0),
+ libgtk2.0-dev (>= 2.18),
libdbus-glib-1-dev,
libtool,
intltool,
gtk-doc-tools
-Standards-Version: 3.8.4
+Standards-Version: 3.9.0
Homepage: https://launchpad.net/libindicator
Vcs-Bzr: https://code.launchpad.net/~indicator-applet-developers/libindicator/ubuntu
Vcs-Browser: http://bazaar.launchpad.net/~indicator-applet-developers/libindicator/ubuntu
diff --git a/debian/patches/workaround-icon-crash.patch b/debian/patches/workaround-icon-crash.patch
new file mode 100644
index 0000000..5b6f1d6
--- /dev/null
+++ b/debian/patches/workaround-icon-crash.patch
@@ -0,0 +1,74 @@
+=== modified file 'libindicator/indicator-image-helper.c'
+--- libindicator/indicator-image-helper.c 2010-08-12 19:37:24 +0000
++++ libindicator/indicator-image-helper.c 2010-08-13 09:03:45 +0000
+@@ -29,61 +29,15 @@
+ static void
+ refresh_image (GtkImage * image)
+ {
++ GIcon * icon;
++
+ g_return_if_fail(GTK_IS_IMAGE(image));
+- const gchar * icon_filename = NULL;
+- GtkIconInfo * icon_info = NULL;
+- gint icon_size = 22;
+-
+- GIcon * icon_names = (GIcon *)g_object_get_data(G_OBJECT(image), INDICATOR_NAMES_DATA);
+- g_return_if_fail(icon_names != NULL);
+-
+- /* Get the default theme */
+- GtkIconTheme * default_theme = gtk_icon_theme_get_default();
+- g_return_if_fail(default_theme != NULL);
+-
+- /* Look through the themes for that icon */
+- icon_info = gtk_icon_theme_lookup_by_gicon(default_theme, icon_names, icon_size, 0);
+- if (icon_info == NULL) {
+- /* Try using the second item in the names, which should be the original filename supplied */
+- const gchar * const * names = g_themed_icon_get_names(G_THEMED_ICON( icon_names ));
+- if (names) {
+- icon_filename = names[1];
+- } else {
+- g_warning("Unable to find icon\n");
+- return;
+- }
+- } else {
+- /* Grab the filename */
+- icon_filename = gtk_icon_info_get_filename(icon_info);
+- }
+- g_return_if_fail(icon_filename != NULL); /* An error because we don't have a filename */
+-
+- /* Build a pixbuf */
+- GError * error = NULL;
+- GdkPixbuf * pixbuf = gdk_pixbuf_new_from_file(icon_filename, &error);
+-
+- if (icon_info != NULL) {
+- gtk_icon_info_free(icon_info);
+- }
+-
+- if (pixbuf == NULL) {
+- g_error("Unable to load icon from file '%s' because: %s", icon_filename, error == NULL ? "I don't know" : error->message);
+- return;
+- }
+-
+- /* Scale icon if all we get is something too big. */
+- if (gdk_pixbuf_get_height(pixbuf) > icon_size) {
+- gfloat scale = (gfloat)icon_size / (gfloat)gdk_pixbuf_get_height(pixbuf);
+- gint width = round(gdk_pixbuf_get_width(pixbuf) * scale);
+-
+- GdkPixbuf * scaled = gdk_pixbuf_scale_simple(pixbuf, width, icon_size, GDK_INTERP_BILINEAR);
+- g_object_unref(G_OBJECT(pixbuf));
+- pixbuf = scaled;
+- }
+-
+- /* Put the pixbuf on the image */
+- gtk_image_set_from_pixbuf(image, pixbuf);
+- g_object_unref(G_OBJECT(pixbuf));
++
++ icon = (GIcon *)g_object_get_data(G_OBJECT(image), INDICATOR_NAMES_DATA);
++ g_return_if_fail(G_IS_ICON (icon));
++
++ gtk_image_set_pixel_size (image, 22);
++ gtk_image_set_from_gicon (image, icon, GTK_ICON_SIZE_SMALL_TOOLBAR);
+
+ return;
+ }
+
diff --git a/debian/rules b/debian/rules
index 151c78d..095f53b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,10 @@
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/gnome.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
LDFLAGS += -Wl,-z,defs -Wl,--as-needed
DEB_DH_MAKESHLIBS_ARGS_libindicator0 += -V 'libindicator0 (>= 0.3.6)'
+