]> git.0d.be Git - empathy.git/commitdiff
Make possible to remove nothere applet from planel and activate it by defaut if dep...
authorXavier Claessens <xclaesse@src.gnome.org>
Sun, 13 Apr 2008 19:52:08 +0000 (19:52 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sun, 13 Apr 2008 19:52:08 +0000 (19:52 +0000)
svn path=/trunk/; revision=934

configure.ac
nothere/src/nothere-applet.c

index c6e1aefdcbf253fcf080455173d6780a6c777fb9..ec78ded3366c754ed42c0011c2d428920d208d26 100644 (file)
@@ -192,7 +192,7 @@ AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
 AC_ARG_ENABLE(nothere,
               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
                              [build nothere applet]), ,
 AC_ARG_ENABLE(nothere,
               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
                              [build nothere applet]), ,
-                             enable_nothere=no)
+                             enable_nothere=auto)
 
 if test "x$enable_nothere" != "xno"; then
    PKG_CHECK_MODULES(NOTHERE, 
 
 if test "x$enable_nothere" != "xno"; then
    PKG_CHECK_MODULES(NOTHERE, 
index 5d225698babfd51ad53b83de23737adb4c339443..b0a8b6e555db6680a0b5cc0560dcdc9964c34b95 100644 (file)
@@ -55,10 +55,24 @@ nothere_applet_class_init (NotHereAppletClass *class)
        GTK_OBJECT_CLASS (class)->destroy = nothere_applet_destroy;
 }
 
        GTK_OBJECT_CLASS (class)->destroy = nothere_applet_destroy;
 }
 
+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 ();
 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);
        gtk_widget_show (applet->presence_chooser);
 
        gtk_container_add (GTK_CONTAINER (applet), applet->presence_chooser);