diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-24 12:45:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-24 12:45:19 +0800 |
commit | cbb3a71adc5551f4c600cfc6f53fc112f3022a78 (patch) | |
tree | 74aee71ae289b726bb9c1e5097dbdc29aa22c610 /widgets | |
parent | bd9f473a896496b95b9896d30940f2ab27493432 (diff) | |
download | gsoc2013-evolution-cbb3a71adc5551f4c600cfc6f53fc112f3022a78.tar.gz gsoc2013-evolution-cbb3a71adc5551f4c600cfc6f53fc112f3022a78.tar.zst gsoc2013-evolution-cbb3a71adc5551f4c600cfc6f53fc112f3022a78.zip |
Get automatic message selection working.
Add a tooltip to the online button.
svn path=/branches/kill-bonobo/; revision=37126
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/e-online-button.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/widgets/misc/e-online-button.c b/widgets/misc/e-online-button.c index dec24a6587..fbfb850272 100644 --- a/widgets/misc/e-online-button.c +++ b/widgets/misc/e-online-button.c @@ -23,6 +23,12 @@ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_ONLINE_BUTTON, EOnlineButtonPrivate)) +#define ONLINE_TOOLTIP \ + "Evolution is currently online. Click this button to work offline." + +#define OFFLINE_TOOLTIP \ + "Evolution is currently offline. Click this button to work online." + struct _EOnlineButtonPrivate { GtkWidget *image; gboolean online; @@ -175,6 +181,7 @@ e_online_button_set_online (EOnlineButton *button, GtkIconTheme *icon_theme; const gchar *filename; const gchar *icon_name; + const gchar *tooltip; g_return_if_fail (E_IS_ONLINE_BUTTON (button)); @@ -191,5 +198,8 @@ e_online_button_set_online (EOnlineButton *button, gtk_image_set_from_file (image, filename); gtk_icon_info_free (icon_info); + tooltip = _(online ? ONLINE_TOOLTIP : OFFLINE_TOOLTIP); + gtk_widget_set_tooltip_text (GTK_WIDGET (button), tooltip); + g_object_notify (G_OBJECT (button), "online"); } |