aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog4
-rw-r--r--addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in1
-rw-r--r--calendar/ChangeLog4
-rw-r--r--calendar/gui/GNOME_Evolution_Calendar.server.in.in2
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/GNOME_Evolution_Mail.server.in.in1
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/e-component-registry.c8
-rw-r--r--shell/e-component-registry.h1
-rw-r--r--shell/e-shell-window.c2
-rw-r--r--shell/e-sidebar.c19
-rw-r--r--shell/e-sidebar.h1
12 files changed, 52 insertions, 4 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index cd5ee69f09..bcf6623141 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,7 @@
+2005-05-16 Srinivasa Ragavan <sragavan@novell.com>
+
+ * gui/components/GNOME_Evolution_Addressbook.server.in.in: Added tooltips
+
2005-05-12 Ulrich Neumann <uli@myuli.com>
* gui/contact-editor/contact-editor.glade:
diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
index f57fcb7f09..c212b28b53 100644
--- a/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
+++ b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
@@ -48,6 +48,7 @@
<oaf_attribute name="evolution:menu_label" type="string" _value="C_ontacts"/>
<oaf_attribute name="evolution:menu_accelerator" type="string" value="*Control*F2"/>
<oaf_attribute name="evolution:button_label" type="string" _value="Contacts"/>
+ <oaf_attribute name="evolution:button_tooltips" type="string" _value="Contacts"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-9"/>
<oaf_attribute name="evolution:button_icon" type="string" value="stock_addressbook"/>
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 11584e4d49..39ef0b77a9 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,7 @@
+2005-05-16: Srinivasa Ragavan <sragavan@novell.com>
+
+ * gui/GNOME_Evolution_Calendar.server.in.in: Added tooltips
+
2005-05-13 Thouis R. Jones <thouis@csail.mit.edu>
Fixes #272301
diff --git a/calendar/gui/GNOME_Evolution_Calendar.server.in.in b/calendar/gui/GNOME_Evolution_Calendar.server.in.in
index 21690f8f71..ba3dd43029 100644
--- a/calendar/gui/GNOME_Evolution_Calendar.server.in.in
+++ b/calendar/gui/GNOME_Evolution_Calendar.server.in.in
@@ -46,6 +46,7 @@
<oaf_attribute name="evolution:menu_label" type="string" _value="_Calendars"/>
<oaf_attribute name="evolution:menu_accelerator" type="string" value="*Control*F3"/>
<oaf_attribute name="evolution:button_label" type="string" _value="Calendars"/>
+ <oaf_attribute name="evolution:button_tooltips" type="string" _value="Calendars"/>
<oaf_attribute name="evolution:button_icon" type="string" value="stock_calendar"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
</oaf_server>
@@ -65,6 +66,7 @@
<oaf_attribute name="evolution:menu_label" type="string" _value="_Tasks"/>
<oaf_attribute name="evolution:menu_accelerator" type="string" value="*Control*F4"/>
<oaf_attribute name="evolution:button_label" type="string" _value="Tasks"/>
+ <oaf_attribute name="evolution:button_tooltips" type="string" _value="Tasks"/>
<oaf_attribute name="evolution:button_icon" type="string" value="stock_todo"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
</oaf_server>
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b247d8cdde..0b52e672e2 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,7 @@
+2005-05-16 Srinivasa Ragavan <sragavan@novell.com>
+
+ * GNOME_Evolution_Mail.server.in.in: Added tooltips
+
2005-05-13 Rodney Dawes <dobey@novell.com>
* Makefile.am: Add new em-folder-utils.[ch] abstraction
diff --git a/mail/GNOME_Evolution_Mail.server.in.in b/mail/GNOME_Evolution_Mail.server.in.in
index d313817c5c..fed018732f 100644
--- a/mail/GNOME_Evolution_Mail.server.in.in
+++ b/mail/GNOME_Evolution_Mail.server.in.in
@@ -32,6 +32,7 @@
<oaf_attribute name="evolution:menu_label" type="string" _value="_Mail"/>
<oaf_attribute name="evolution:menu_accelerator" type="string" value="*Control*F1"/>
<oaf_attribute name="evolution:button_label" type="string" _value="Mail"/>
+ <oaf_attribute name="evolution:button_tooltips" type="string" _value="Mail"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-10"/>
<oaf_attribute name="evolution:button_icon" type="string" value="stock_mail"/>
diff --git a/shell/ChangeLog b/shell/ChangeLog
index bbab3dd7ce..7fe7be6b2e 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,12 @@
+2005-05-16 Srinivasa Ragavan <sragavan@novell.com>
+ * e-component-registry.c(component_info_new) (component_info_free)(query_components):
+ e-component-registry.h:
+ e-shell-window.c (setup_widgets):
+ e-sidebar.c (button_new) (button_free) (e_sidebar_add_button) (set_mode_internal):
+ e-sidebar.h:
+
+ Added support to read .server files for tooltips and show them in ICON only mode.
+
2005-05-13 Rodney Dawes <dobey@novell.com>
* e-shell-window.c (setup_widgets): Update for the new menu layout by
diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c
index 73df6f569b..218da86015 100644
--- a/shell/e-component-registry.c
+++ b/shell/e-component-registry.c
@@ -51,6 +51,7 @@ component_info_new (const char *id,
GNOME_Evolution_Component iface,
const char *alias,
const char *button_label,
+ const char *button_tooltips,
const char *menu_label,
const char *menu_accelerator,
int sort_order,
@@ -63,6 +64,7 @@ component_info_new (const char *id,
info->iface = bonobo_object_dup_ref(iface, NULL);
info->alias = g_strdup (alias);
info->button_label = g_strdup (button_label);
+ info->button_tooltips = g_strdup (button_tooltips);
info->menu_label = g_strdup (menu_label);
info->menu_accelerator = g_strdup (menu_accelerator);
info->sort_order = sort_order;
@@ -84,6 +86,7 @@ component_info_free (EComponentInfo *info)
g_free (info->id);
g_free (info->alias);
g_free (info->button_label);
+ g_free (info->button_tooltips);
g_free (info->menu_label);
g_free (info->menu_accelerator);
@@ -179,6 +182,7 @@ query_components (EComponentRegistry *registry)
const char *alias;
const char *icon_name;
const char *sort_order_string;
+ const char *tooltips;
GdkPixbuf *icon = NULL, *menuicon = NULL;
EComponentInfo *info;
int sort_order;
@@ -200,6 +204,8 @@ query_components (EComponentRegistry *registry)
if (label == NULL)
label = g_strdup (_("Unknown"));
+ tooltips = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:button_tooltips", language_list);
+
menu_label = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:menu_label", language_list);
if (menu_label == NULL)
menu_label = g_strdup (_("Unknown"));
@@ -221,7 +227,7 @@ query_components (EComponentRegistry *registry)
else
sort_order = atoi (sort_order_string);
- info = component_info_new (id, iface, alias, label, menu_label,
+ info = component_info_new (id, iface, alias, label, tooltips, menu_label,
menu_accelerator, sort_order, icon, menuicon);
set_schemas (info, & info_list->_buffer [i]);
diff --git a/shell/e-component-registry.h b/shell/e-component-registry.h
index f4ba0df912..06a979a986 100644
--- a/shell/e-component-registry.h
+++ b/shell/e-component-registry.h
@@ -72,6 +72,7 @@ struct _EComponentInfo {
GNOME_Evolution_Component iface;
char *button_label;
+ char *button_tooltips;
GdkPixbuf *button_icon;
char *menu_label;
char *menu_accelerator;
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 53b8489751..df71f96266 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -694,7 +694,7 @@ setup_widgets (EShellWindow *window)
ComponentView *view = component_view_new (info->id, info->alias, button_id);
window->priv->component_views = g_slist_prepend (window->priv->component_views, view);
- e_sidebar_add_button (E_SIDEBAR (priv->sidebar), info->button_label, info->button_icon, button_id);
+ e_sidebar_add_button (E_SIDEBAR (priv->sidebar), info->button_label, info->button_tooltips, info->button_icon, button_id);
g_string_printf(xml, "SwitchComponent-%s", info->alias);
bonobo_ui_component_add_verb (e_shell_window_peek_bonobo_ui_component (window),
diff --git a/shell/e-sidebar.c b/shell/e-sidebar.c
index 7a7932eff0..c483543971 100644
--- a/shell/e-sidebar.c
+++ b/shell/e-sidebar.c
@@ -28,6 +28,7 @@
#include "e-shell-marshal.h"
+#include <gtk/gtk.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkimage.h>
#include <gtk/gtklabel.h>
@@ -41,6 +42,7 @@ typedef struct {
GtkWidget *label;
GtkWidget *icon;
GtkWidget *hbox;
+ GtkTooltips *tooltips;
int id;
} Button;
@@ -75,7 +77,7 @@ G_DEFINE_TYPE (ESidebar, e_sidebar, GTK_TYPE_CONTAINER)
/* Utility functions. */
static Button *
-button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon,
+button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon, GtkTooltips *tooltips,
GtkWidget *hbox, int id)
{
Button *button = g_new (Button, 1);
@@ -84,12 +86,14 @@ button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon,
button->label = label;
button->icon = icon;
button->hbox = hbox;
+ button->tooltips = tooltips;
button->id = id;
g_object_ref (button_widget);
g_object_ref (label);
g_object_ref (icon);
g_object_ref (hbox);
+ g_object_ref (tooltips);
return button;
}
@@ -101,6 +105,7 @@ button_free (Button *button)
g_object_unref (button->label);
g_object_unref (button->icon);
g_object_unref (button->hbox);
+ g_object_unref (button->tooltips);
g_free (button);
}
@@ -470,6 +475,7 @@ e_sidebar_set_selection_widget (ESidebar *sidebar, GtkWidget *widget)
void
e_sidebar_add_button (ESidebar *sidebar,
const char *label,
+ const char *tooltips,
GdkPixbuf *icon,
int id)
{
@@ -477,6 +483,7 @@ e_sidebar_add_button (ESidebar *sidebar,
GtkWidget *hbox;
GtkWidget *icon_widget;
GtkWidget *label_widget;
+ GtkTooltips *button_tooltips;
button_widget = gtk_toggle_button_new ();
if (sidebar->priv->show)
@@ -493,24 +500,29 @@ e_sidebar_add_button (ESidebar *sidebar,
label_widget = gtk_label_new (label);
gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5);
gtk_widget_show (label_widget);
+ button_tooltips = gtk_tooltips_new();
+ gtk_tooltips_set_tip (GTK_TOOLTIPS (button_tooltips), button_widget, tooltips, NULL);
switch (INTERNAL_MODE (sidebar)) {
case E_SIDEBAR_MODE_TEXT:
gtk_box_pack_start (GTK_BOX (hbox), label_widget, TRUE, TRUE, 0);
+ gtk_tooltips_disable (button_tooltips);
break;
case E_SIDEBAR_MODE_ICON:
gtk_box_pack_start (GTK_BOX (hbox), icon_widget, TRUE, TRUE, 0);
+ gtk_tooltips_enable (button_tooltips);
break;
case E_SIDEBAR_MODE_BOTH:
default:
gtk_box_pack_start (GTK_BOX (hbox), icon_widget, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), label_widget, TRUE, TRUE, 0);
+ gtk_tooltips_disable (button_tooltips);
break;
}
gtk_container_add (GTK_CONTAINER (button_widget), hbox);
- sidebar->priv->buttons = g_slist_append (sidebar->priv->buttons, button_new (button_widget, label_widget, icon_widget, hbox, id));
+ sidebar->priv->buttons = g_slist_append (sidebar->priv->buttons, button_new (button_widget, label_widget, icon_widget, button_tooltips, hbox, id));
gtk_widget_set_parent (button_widget, GTK_WIDGET (sidebar));
gtk_widget_queue_resize (GTK_WIDGET (sidebar));
@@ -558,6 +570,7 @@ set_mode_internal (ESidebar *sidebar, ESidebarMode mode )
if (INTERNAL_MODE (sidebar) == E_SIDEBAR_MODE_ICON) {
gtk_box_pack_start (GTK_BOX (button->hbox), button->label, TRUE, TRUE, 0);
gtk_widget_show (button->label);
+ gtk_tooltips_disable (button->tooltips);
}
break;
case E_SIDEBAR_MODE_ICON:
@@ -569,6 +582,7 @@ set_mode_internal (ESidebar *sidebar, ESidebarMode mode )
gtk_container_child_set (GTK_CONTAINER (button->hbox), button->icon,
"expand", TRUE,
NULL);
+ gtk_tooltips_enable (button->tooltips);
break;
case E_SIDEBAR_MODE_BOTH:
if (INTERNAL_MODE (sidebar) == E_SIDEBAR_MODE_TEXT) {
@@ -581,6 +595,7 @@ set_mode_internal (ESidebar *sidebar, ESidebarMode mode )
NULL);
}
+ gtk_tooltips_disable (button->tooltips);
gtk_box_pack_start (GTK_BOX (button->hbox), button->label, TRUE, TRUE, 0);
gtk_widget_show (button->label);
break;
diff --git a/shell/e-sidebar.h b/shell/e-sidebar.h
index 873d366b38..c93300c53f 100644
--- a/shell/e-sidebar.h
+++ b/shell/e-sidebar.h
@@ -64,6 +64,7 @@ void e_sidebar_set_selection_widget (ESidebar *sidebar,
void e_sidebar_add_button (ESidebar *sidebar,
const char *label,
+ const char *tooltips,
GdkPixbuf *icon,
int id);