empathy r934 - in trunk: . nothere/src



Author: xclaesse
Date: Sun Apr 13 20:52:08 2008
New Revision: 934
URL: http://svn.gnome.org/viewvc/empathy?rev=934&view=rev

Log:
Make possible to remove nothere applet from planel and activate it by defaut if dep are met. Fixes bug #489978 (Frederic Peters).


Modified:
   trunk/configure.ac
   trunk/nothere/src/nothere-applet.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Sun Apr 13 20:52:08 2008
@@ -192,7 +192,7 @@
 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, 

Modified: trunk/nothere/src/nothere-applet.c
==============================================================================
--- trunk/nothere/src/nothere-applet.c	(original)
+++ trunk/nothere/src/nothere-applet.c	Sun Apr 13 20:52:08 2008
@@ -55,10 +55,24 @@
 	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 ();
+	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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]