Fix icon lookup in nothere. Fixes bug #527924 (Frederic Peters).
[empathy.git] / nothere / src / nothere-applet.c
index 5d225698babfd51ad53b83de23737adb4c339443..f2adb0b9f5cc8203373a7c8fb42b01197f8680ee 100644 (file)
@@ -53,12 +53,29 @@ static void
 nothere_applet_class_init (NotHereAppletClass *class)
 {
        GTK_OBJECT_CLASS (class)->destroy = nothere_applet_destroy;
+
+       gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+                       PKGDATADIR G_DIR_SEPARATOR_S "icons");
+}
+
+static gboolean
+do_not_eat_button_press (GtkWidget      *widget,
+                         GdkEventButton *event)
+{
+        if (event->button != 1) {
+                g_signal_stop_emission_by_name (widget, "button_press_event");
+        }
+
+        return FALSE;
 }
 
 static void
 nothere_applet_init (NotHereApplet *applet)
 {
        applet->presence_chooser = empathy_presence_chooser_new ();
+       g_signal_connect (G_OBJECT (applet->presence_chooser), "button_press_event",
+                          G_CALLBACK (do_not_eat_button_press), NULL);
+
        gtk_widget_show (applet->presence_chooser);
 
        gtk_container_add (GTK_CONTAINER (applet), applet->presence_chooser);