← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~ted/indicator-messages/libindicator-icon-handling into lp:indicator-messages

 

Ted Gould has proposed merging lp:~ted/indicator-messages/libindicator-icon-handling into lp:indicator-messages.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)


Make the messaging indicator use the helper library so we're all the
same.  For better or worse.
-- 
https://code.launchpad.net/~ted/indicator-messages/libindicator-icon-handling/+merge/21614
Your team ayatana-commits is subscribed to branch lp:indicator-messages.
=== modified file 'configure.ac'
--- configure.ac	2010-03-04 21:58:38 +0000
+++ configure.ac	2010-03-18 04:35:27 +0000
@@ -30,7 +30,7 @@
 GIO_UNIX_REQUIRED_VERSION=2.18
 PANEL_REQUIRED_VERSION=2.0.0
 INDICATE_REQUIRED_VERSION=0.3.0
-INDICATOR_REQUIRED_VERSION=0.3.3
+INDICATOR_REQUIRED_VERSION=0.3.5
 DBUSMENUGTK_REQUIRED_VERSION=0.2.5
 
 PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION

=== modified file 'src/indicator-messages.c'
--- src/indicator-messages.c	2010-02-18 03:36:33 +0000
+++ src/indicator-messages.c	2010-03-18 04:35:27 +0000
@@ -31,6 +31,7 @@
 
 #include <libindicator/indicator.h>
 #include <libindicator/indicator-object.h>
+#include <libindicator/indicator-image-helper.h>
 
 #include "dbus-data.h"
 #include "messages-service-client.h"
@@ -61,8 +62,6 @@
 
 /* Globals */
 static GtkWidget * main_image = NULL;
-#define DESIGN_TEAM_SIZE  design_team_size
-static GtkIconSize design_team_size;
 static DBusGProxy * icon_proxy = NULL;
 static GtkSizeGroup * indicator_right_group = NULL;
 
@@ -116,9 +115,9 @@
 attention_changed_cb (DBusGProxy * proxy, gboolean dot, gpointer userdata)
 {
 	if (dot) {
-		gtk_image_set_from_icon_name(GTK_IMAGE(main_image), "indicator-messages-new", DESIGN_TEAM_SIZE);
+		indicator_image_helper_update(GTK_IMAGE(main_image), "indicator-messages-new");
 	} else {
-		gtk_image_set_from_icon_name(GTK_IMAGE(main_image), "indicator-messages", DESIGN_TEAM_SIZE);
+		indicator_image_helper_update(GTK_IMAGE(main_image), "indicator-messages");
 	}
 	return;
 }
@@ -340,9 +339,7 @@
 static GtkImage *
 get_icon (IndicatorObject * io)
 {
-	design_team_size = gtk_icon_size_register("design-team-size", 22, 22);
-
-	main_image = gtk_image_new_from_icon_name("indicator-messages", DESIGN_TEAM_SIZE);
+	main_image = GTK_WIDGET(indicator_image_helper("indicator-messages"));
 	gtk_widget_show(main_image);
 
 	return GTK_IMAGE(main_image);


Follow ups