[Frugalware-git] fun: fun-ui: clicking the tray icon should toggle the visibility of the fun main window

Priyank priyank at frugalware.org
Wed Nov 21 15:09:41 CET 2007


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fun.git;a=commitdiff;h=175bf1ee7a134d1d8244577feaf34598dd9f926c

commit 175bf1ee7a134d1d8244577feaf34598dd9f926c
Author: Priyank <priyank at frugalware.org>
Date:   Wed Nov 21 19:39:09 2007 +0530

fun-ui: clicking the tray icon should toggle the visibility of the fun main window

diff --git a/src/fun-ui.c b/src/fun-ui.c
index e8fa83f..f4f6c4b 100644
--- a/src/fun-ui.c
+++ b/src/fun-ui.c
@@ -195,7 +195,10 @@ cb_fun_systray_icon_clicked (GtkWidget *widget, GdkEventButton *event, gpointer
/* Left Click */
if (event->button == 1)
{
-		gtk_widget_show (GTK_WIDGET(fun_main_window));
+		if (!GTK_WIDGET_VISIBLE(fun_main_window))
+			gtk_widget_show (GTK_WIDGET(fun_main_window));
+		else
+			fun_main_window_hide ();
return TRUE;
}
/* Right Click */


More information about the Frugalware-git mailing list