aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-task-bar.c
diff options
context:
space:
mode:
authorERDI Gergo <cactus@cactus.rulez.org>2004-01-07 22:29:08 +0800
committerÉRDI Gergo <cactus@src.gnome.org>2004-01-07 22:29:08 +0800
commite2b0897d8088cb4c118f4564e9f6de2845de3176 (patch)
tree23af259b80ece4d26fe94085123f326e7f60582b /shell/e-task-bar.c
parent79373d6650bfb2f10b91772e10aafcd52badfb26 (diff)
downloadgsoc2013-evolution-e2b0897d8088cb4c118f4564e9f6de2845de3176.tar
gsoc2013-evolution-e2b0897d8088cb4c118f4564e9f6de2845de3176.tar.gz
gsoc2013-evolution-e2b0897d8088cb4c118f4564e9f6de2845de3176.tar.bz2
gsoc2013-evolution-e2b0897d8088cb4c118f4564e9f6de2845de3176.tar.lz
gsoc2013-evolution-e2b0897d8088cb4c118f4564e9f6de2845de3176.tar.xz
gsoc2013-evolution-e2b0897d8088cb4c118f4564e9f6de2845de3176.tar.zst
gsoc2013-evolution-e2b0897d8088cb4c118f4564e9f6de2845de3176.zip
Emit a hover-url signal when the user mouses over a URL, ...
2004-01-04 ERDI Gergo <cactus@cactus.rulez.org> * em-folder-view.c (emfv_on_url_cb): Emit a hover-url signal when the user mouses over a URL, ... (emfv_hover_url_impl): ... and use BonoboUI to change the status bar message... (em_folder_view_set_statusbar): ... unless we are asked not to, ... * mail-component.c (impl_createControls): ... like in the case of the mail component, ... (view_hover_url_cb): ... that uses the ActivityHandler to do the same Add these together, and #127536 is neatly solved. 2004-01-05 ERDI Gergo <cactus@cactus.rulez.org> * e-task-bar.c (init): Create a separate label to the left of the progress messages... (e_task_bar_message): ...and allow components to set it... * e-activity-handler.c (e_activity_handler_message): ...through this new ActivityHandler method svn path=/trunk/; revision=24086
Diffstat (limited to 'shell/e-task-bar.c')
-rw-r--r--shell/e-task-bar.c50
1 files changed, 45 insertions, 5 deletions
diff --git a/shell/e-task-bar.c b/shell/e-task-bar.c
index 522d473373..7a706fd290 100644
--- a/shell/e-task-bar.c
+++ b/shell/e-task-bar.c
@@ -27,8 +27,15 @@
#include "e-task-bar.h"
#include <gal/util/e-util.h>
+#include <gtk/gtklabel.h>
+struct _ETaskBarPrivate
+{
+ GtkLabel *message_label;
+ GtkHBox *hbox;
+};
+
#define PARENT_TYPE gtk_hbox_get_type ()
static GtkHBoxClass *parent_class = NULL;
@@ -46,7 +53,7 @@ reduce_displayed_activities_per_component (ETaskBar *task_bar)
component_ids_hash = g_hash_table_new (g_str_hash, g_str_equal);
- box = GTK_BOX (task_bar);
+ box = GTK_BOX (task_bar->priv->hbox);
for (p = box->children; p != NULL; p = p->next) {
GtkBoxChild *child;
@@ -90,7 +97,22 @@ class_init (GtkObjectClass *object_class)
static void
init (ETaskBar *task_bar)
{
- /* Nothing to do here. */
+ GtkWidget *label, *hbox;
+
+ task_bar->priv = g_new (ETaskBarPrivate, 1);
+
+ gtk_box_set_spacing (GTK_BOX (task_bar), 10);
+
+ label = gtk_label_new ("");
+ gtk_widget_show (label);
+ gtk_box_pack_start (GTK_BOX (task_bar), label, FALSE, TRUE, 0);
+ gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ task_bar->priv->message_label = GTK_LABEL (label);
+
+ hbox = gtk_hbox_new (0, FALSE);
+ gtk_widget_show (hbox);
+ gtk_container_add (GTK_CONTAINER (task_bar), hbox);
+ task_bar->priv->hbox = GTK_HBOX (hbox);
}
@@ -115,6 +137,24 @@ e_task_bar_new (void)
}
void
+e_task_bar_set_message (ETaskBar *task_bar,
+ const char *message)
+{
+ if (message) {
+ gtk_widget_show (GTK_WIDGET (task_bar->priv->message_label));
+ gtk_label_set_text (task_bar->priv->message_label, message);
+ } else {
+ e_task_bar_unset_message (task_bar);
+ }
+}
+
+void
+e_task_bar_unset_message (ETaskBar *task_bar)
+{
+ gtk_widget_hide (GTK_WIDGET (task_bar->priv->message_label));
+}
+
+void
e_task_bar_prepend_task (ETaskBar *task_bar,
ETaskWidget *task_widget)
{
@@ -135,11 +175,11 @@ e_task_bar_prepend_task (ETaskBar *task_bar,
child_info->fill = TRUE;
child_info->pack = GTK_PACK_START;
- box = GTK_BOX (task_bar);
+ box = GTK_BOX (task_bar->priv->hbox);
box->children = g_list_prepend (box->children, child_info);
- gtk_widget_set_parent (GTK_WIDGET (task_widget), GTK_WIDGET (task_bar));
+ gtk_widget_set_parent (GTK_WIDGET (task_widget), GTK_WIDGET (task_bar->priv->hbox));
if (GTK_WIDGET_REALIZED (task_bar))
gtk_widget_realize (GTK_WIDGET (task_widget));
@@ -178,7 +218,7 @@ e_task_bar_get_task_widget (ETaskBar *task_bar,
g_return_val_if_fail (task_bar != NULL, NULL);
g_return_val_if_fail (E_IS_TASK_BAR (task_bar), NULL);
- child_info = (GtkBoxChild *) g_list_nth (GTK_BOX (task_bar)->children, n)->data;
+ child_info = (GtkBoxChild *) g_list_nth (GTK_BOX (task_bar->priv->hbox)->children, n)->data;
return E_TASK_WIDGET (child_info->widget);
}