gnome-docker r11 - trunk/src
- From: hmacht svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-docker r11 - trunk/src
- Date: Wed, 14 May 2008 14:26:16 +0100 (BST)
Author: hmacht
Date: Wed May 14 13:26:16 2008
New Revision: 11
URL: http://svn.gnome.org/viewvc/gnome-docker?rev=11&view=rev
Log:
add tooltip showing the status
Modified:
trunk/src/gd-tray.c
Modified: trunk/src/gd-tray.c
==============================================================================
--- trunk/src/gd-tray.c (original)
+++ trunk/src/gd-tray.c Wed May 14 13:26:16 2008
@@ -108,6 +108,16 @@
1, gtk_get_current_event_time());
}
+void gd_tray_icon_update_status(gboolean docked)
+{
+ if (docked) {
+ gtk_status_icon_set_tooltip(icon, _("Status: System docked"));
+ gd_tray_icon_set_visible(TRUE);
+ } else {
+ gd_tray_icon_set_visible(FALSE);
+ }
+}
+
gboolean gd_tray_icon_init(const char *udi)
{
int docked;
@@ -119,12 +129,6 @@
return FALSE;
}
- if (docked)
- gtk_status_icon_set_visible(icon, TRUE);
- else
- gtk_status_icon_set_visible(icon, FALSE);
-
-
g_signal_connect_object(G_OBJECT (icon),
"popup_menu",
G_CALLBACK (tray_icon_popup_menu_cb),
@@ -133,5 +137,13 @@
"activate",
G_CALLBACK (tray_icon_popup_menu_cb),
icon, 0);
+
+ if (docked)
+ gd_tray_icon_update_status(TRUE);
+ else
+ gd_tray_icon_update_status(FALSE);
+
+ gd_tray_icon_set_visible(TRUE);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]