From 60f7f10f45ca4e15ae250e7cc9533dcd959bf324 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 15 Jun 2007 13:58:34 +0000 Subject: ** Fixes bug #447727 2007-06-15 Matthew Barnes ** Fixes bug #447727 * po/POTFILES.in: Remove e-clipped-label.c * mail/mail-send-recv.c: * shell/e-shell-folder-title-bar.c: * widgets/misc/e-info-label.c: * widgets/misc/e-multi-config-dialog.c: * widgets/misc/e-task-bar.c: Use ellipsized GtkLabels instead of EClippedLabels. * widgets/misc/e-clipped-label.[ch]: Remove these files. GTK+ provides this functionality now. * widgets/misc/Makefile.am: Remove e-clipped-label.[ch]. svn path=/trunk/; revision=33680 --- widgets/misc/ChangeLog | 15 ++ widgets/misc/Makefile.am | 2 - widgets/misc/e-clipped-label.c | 420 ----------------------------------- widgets/misc/e-clipped-label.h | 102 --------- widgets/misc/e-info-label.c | 49 ++-- widgets/misc/e-multi-config-dialog.c | 14 -- widgets/misc/e-task-bar.c | 20 +- 7 files changed, 54 insertions(+), 568 deletions(-) delete mode 100644 widgets/misc/e-clipped-label.c delete mode 100644 widgets/misc/e-clipped-label.h (limited to 'widgets/misc') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index ba8beae7d7..706a3abad2 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,18 @@ +2007-06-15 Matthew Barnes + + ** Fixes part of bug #447727 + + * e-info-label.c: + * e-multi-config-dialog.c: + * e-task-bar.c: + Use ellipsized GtkLabels instead of EClippedLabels. + + * e-clipped-label.[ch]: + Remove these files. GTK+ provides this functionality now. + + * Makefile.am: + Remove e-clipped-label.[ch]. + 2007-06-04 Chenthill Palanisamy * e-filter-bar.[c]: (e_filter_bar_new), (e_filter_bar_new_construct): diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am index c811f81034..24930ec79c 100644 --- a/widgets/misc/Makefile.am +++ b/widgets/misc/Makefile.am @@ -45,7 +45,6 @@ widgetsinclude_HEADERS = \ e-cell-percent.h \ e-cell-renderer-combo.h \ e-charset-picker.h \ - e-clipped-label.h \ e-combo-cell-editable.h \ e-config-page.h \ e-combo-button.h \ @@ -91,7 +90,6 @@ libemiscwidgets_la_SOURCES = \ e-cell-percent.c \ e-cell-renderer-combo.c \ e-charset-picker.c \ - e-clipped-label.c \ e-combo-cell-editable.c \ e-config-page.c \ e-combo-button.c \ diff --git a/widgets/misc/e-clipped-label.c b/widgets/misc/e-clipped-label.c deleted file mode 100644 index 6a37c301bd..0000000000 --- a/widgets/misc/e-clipped-label.c +++ /dev/null @@ -1,420 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - * This is similar to GtkLabel but clips itself and displays '...' if it - * can't fit inside its allocated area. The intended use is for inside buttons - * that are a fixed size. The GtkLabel would normally display only the middle - * part of the text, which doesn't look very good. This only supports one line - * of text (so no wrapping/justification), without underlined characters. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "e-clipped-label.h" - -#include -#include - -#include -#include -#include - - -static void e_clipped_label_class_init (EClippedLabelClass *class); -static void e_clipped_label_init (EClippedLabel *label); -static void e_clipped_label_size_request (GtkWidget *widget, - GtkRequisition *requisition); -static void e_clipped_label_size_allocate (GtkWidget *widget, - GtkAllocation *allocation); -static gint e_clipped_label_expose (GtkWidget *widget, - GdkEventExpose *event); -static void e_clipped_label_recalc_chars_displayed (EClippedLabel *label); -static void e_clipped_label_finalize (GObject *object); - -static void build_layout (EClippedLabel *label, const char *text); - -static GtkMiscClass *parent_class; - -/* This is the string to draw when the label is clipped, e.g. '...'. */ -static gchar *e_clipped_label_ellipsis; - -/* Flags used in chars_displayed field. Must be negative. */ -#define E_CLIPPED_LABEL_NEED_RECALC -1 -#define E_CLIPPED_LABEL_SHOW_ENTIRE_LABEL -2 - - -GtkType -e_clipped_label_get_type (void) -{ - static GtkType e_clipped_label_type = 0; - - if (!e_clipped_label_type){ - GtkTypeInfo e_clipped_label_info = { - "EClippedLabel", - sizeof (EClippedLabel), - sizeof (EClippedLabelClass), - (GtkClassInitFunc) e_clipped_label_class_init, - (GtkObjectInitFunc) e_clipped_label_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - parent_class = g_type_class_ref(GTK_TYPE_MISC); - e_clipped_label_type = gtk_type_unique (GTK_TYPE_MISC, - &e_clipped_label_info); - } - - return e_clipped_label_type; -} - - -static void -e_clipped_label_class_init (EClippedLabelClass *class) -{ - GObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - /* Method override */ - widget_class->size_request = e_clipped_label_size_request; - widget_class->size_allocate = e_clipped_label_size_allocate; - widget_class->expose_event = e_clipped_label_expose; - - object_class->finalize = e_clipped_label_finalize; - - /* Translators: This is the string to draw when the label - * of a fixed-size button is clipped, e.g. '...'. - */ - e_clipped_label_ellipsis = _("..."); -} - - -static void -e_clipped_label_init (EClippedLabel *label) -{ - GTK_WIDGET_SET_FLAGS (label, GTK_NO_WINDOW); - - label->label = NULL; - label->chars_displayed = E_CLIPPED_LABEL_NEED_RECALC; -} - - -/** - * e_clipped_label_new: - * - * @text: The label text. - * @Returns: A new #EClippedLabel. - * - * Creates a new #EClippedLabel with the given text. - **/ -GtkWidget * -e_clipped_label_new (const gchar *text, - PangoWeight font_weight, - gfloat font_size) -{ - GtkWidget *label; - EClippedLabel *clipped; - - label = g_object_new (e_clipped_label_get_type (), NULL); - - clipped = E_CLIPPED_LABEL (label); - - clipped->font_size = font_size; - clipped->font_weight = font_weight; - clipped->layout = NULL; - - build_layout (clipped, e_clipped_label_ellipsis); - pango_layout_get_pixel_size (clipped->layout, &clipped->ellipsis_width, NULL); - - if (text && *text) - e_clipped_label_set_text (clipped, text); - - return label; -} - -static void -build_layout (EClippedLabel *label, const char *text) -{ - if (!label->layout) { - GtkStyle *style = gtk_widget_get_style (GTK_WIDGET (label)); - PangoFontDescription *desc = pango_font_description_copy (style->font_desc); - - label->layout = gtk_widget_create_pango_layout (GTK_WIDGET (label), text); - - pango_font_description_set_size (desc, pango_font_description_get_size (desc) * label->font_size); - - pango_font_description_set_weight (desc, label->font_weight); - pango_layout_set_font_description (label->layout, desc); - pango_font_description_free (desc); - } - - pango_layout_set_text (label->layout, text, -1); -} - -static void -e_clipped_label_size_request (GtkWidget *widget, - GtkRequisition *requisition) -{ - EClippedLabel *label; - int height; - int width; - - g_return_if_fail (E_IS_CLIPPED_LABEL (widget)); - g_return_if_fail (requisition != NULL); - - label = E_CLIPPED_LABEL (widget); - - pango_layout_get_pixel_size (label->layout, &width, &height); - - requisition->width = 0; - requisition->height = height + 2 * GTK_MISC (widget)->ypad; -} - - -static void -e_clipped_label_size_allocate (GtkWidget *widget, - GtkAllocation *allocation) -{ - EClippedLabel *label; - - label = E_CLIPPED_LABEL (widget); - - widget->allocation = *allocation; - - /* Flag that we need to recalculate how many characters to display. */ - label->chars_displayed = E_CLIPPED_LABEL_NEED_RECALC; -} - - -static gint -e_clipped_label_expose (GtkWidget *widget, - GdkEventExpose *event) -{ - EClippedLabel *label; - GtkMisc *misc; - gint x; - PangoRectangle rect; - - g_return_val_if_fail (E_IS_CLIPPED_LABEL (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - label = E_CLIPPED_LABEL (widget); - misc = GTK_MISC (widget); - - /* If the label isn't visible or has no text, just return. */ - if (!GTK_WIDGET_VISIBLE (widget) || !GTK_WIDGET_MAPPED (widget) - || !label->label || (*label->label == '\0')) - return TRUE; - - /* Recalculate the number of characters displayed, if necessary. */ - if (label->chars_displayed == E_CLIPPED_LABEL_NEED_RECALC) - e_clipped_label_recalc_chars_displayed (label); - - /* - * GC Clipping - */ - gdk_gc_set_clip_rectangle (widget->style->white_gc, - &event->area); - gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], - &event->area); - - pango_layout_get_pixel_extents (label->layout, &rect, NULL); - - if (label->chars_displayed == E_CLIPPED_LABEL_SHOW_ENTIRE_LABEL) { - x = floor (widget->allocation.x + (gint)misc->xpad - + (((gint)widget->allocation.width - - (gint)label->label_width - 2 * (gint)misc->xpad) - * misc->xalign) + 0.5); - - gdk_draw_layout (widget->window, widget->style->fg_gc[widget->state], - x, label->label_y, label->layout); - } else { - int layout_width; - - x = widget->allocation.x + (gint)misc->xpad; - - /* trim the layout to the number of characters we're displaying */ - pango_layout_set_text (label->layout, label->label, label->chars_displayed); - - /* draw it */ - gdk_draw_layout (widget->window, widget->style->fg_gc[widget->state], - x, label->label_y, label->layout); - - pango_layout_get_pixel_size (label->layout, &layout_width, NULL); - - /* offset the X position for the ellipsis */ - x = widget->allocation.x + (gint)misc->xpad - + label->ellipsis_x; - - /* then draw the ellipsis */ - pango_layout_set_text (label->layout, e_clipped_label_ellipsis, strlen (e_clipped_label_ellipsis)); - - gdk_draw_layout (widget->window, widget->style->fg_gc[widget->state], - x, label->label_y, label->layout); - - /* then reset the layout to our original label text */ - pango_layout_set_text (label->layout, label->label, -1); - } - - gdk_gc_set_clip_mask (widget->style->white_gc, NULL); - gdk_gc_set_clip_mask (widget->style->fg_gc[widget->state], NULL); - - return TRUE; -} - - -static void -e_clipped_label_finalize (GObject *object) -{ - EClippedLabel *label; - - g_return_if_fail (E_IS_CLIPPED_LABEL (object)); - - label = E_CLIPPED_LABEL(object); - - g_free (label->label); - - g_object_unref (label->layout); - - (* G_OBJECT_CLASS (parent_class)->finalize) (object); -} - - -/** - * e_clipped_label_get_text: - * - * @label: An #EClippedLabel. - * @Return: The label text. - * - * Returns the label text, or NULL. - **/ -gchar* -e_clipped_label_get_text (EClippedLabel *label) -{ - g_return_val_if_fail (E_IS_CLIPPED_LABEL (label), NULL); - - return label->label; -} - - -/** - * e_clipped_label_set_text: - * - * @label: An #EClippedLabel. - * @text: The new label text. - * - * Sets the label text. - **/ -void -e_clipped_label_set_text (EClippedLabel *label, - const gchar *text) -{ - g_return_if_fail (E_IS_CLIPPED_LABEL (label)); - - if (label->label != text || !label->label || !text - || strcmp (label->label, text)) { - g_free (label->label); - label->label = NULL; - - if (text) - label->label = g_strdup (text); - - build_layout (label, text); - - /* Reset the number of characters displayed, so it is - recalculated when needed. */ - label->chars_displayed = E_CLIPPED_LABEL_NEED_RECALC; - - /* We don't queue a resize, since the label should not affect - the widget size, but we queue a draw. */ - gtk_widget_queue_draw (GTK_WIDGET (label)); - } -} - - -static void -e_clipped_label_recalc_chars_displayed (EClippedLabel *label) -{ - gint max_width, width; - GSList *lines; - PangoLayoutLine *line; - int index; - PangoRectangle rect; - GtkWidget *widget = GTK_WIDGET (label); - GtkMisc *misc = GTK_MISC (label); - - max_width = GTK_WIDGET (label)->allocation.width - - 2 * GTK_MISC (label)->xpad; - - if (!label->label) { - label->chars_displayed = 0; - return; - } - - /* See if the entire label fits in the allocated width. */ - pango_layout_set_text (label->layout, label->label, -1); - - pango_layout_get_pixel_extents (label->layout, &rect, NULL); - - label->label_y = floor (widget->allocation.y + (gint)misc->ypad - + (((gint)widget->allocation.height - 2 * (gint)misc->ypad - + (gint)PANGO_ASCENT (rect) - PANGO_DESCENT(rect)) - * misc->yalign) + 0.5); - - pango_layout_get_pixel_size (label->layout, &label->label_width, NULL); - if (label->label_width <= max_width) { - label->chars_displayed = E_CLIPPED_LABEL_SHOW_ENTIRE_LABEL; - return; - } - - label->chars_displayed = 0; - label->ellipsis_x = 0; - - if (max_width <= 0) - return; - - max_width -= label->ellipsis_width; - - lines = pango_layout_get_lines (label->layout); - line = lines->data; - - if (!pango_layout_line_x_to_index (line, - max_width * PANGO_SCALE, - &index, - NULL)) { - return; - } - - label->chars_displayed = index; - - pango_layout_set_text (label->layout, label->label, label->chars_displayed); - pango_layout_get_pixel_size (label->layout, &width, NULL); - - label->ellipsis_x = width; -} diff --git a/widgets/misc/e-clipped-label.h b/widgets/misc/e-clipped-label.h deleted file mode 100644 index b0165b3e7d..0000000000 --- a/widgets/misc/e-clipped-label.h +++ /dev/null @@ -1,102 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - * This is similar to GtkLabel but clips itself and displays '...' if it - * can't fit inside its allocated area. The intended use is for inside buttons - * that are a fixed size. The GtkLabel would normally display only the middle - * part of the text, which doesn't look very good. This only supports one line - * of text (so no wrapping/justification), without underlined characters. - */ -#ifndef _E_CLIPPED_LABEL_H_ -#define _E_CLIPPED_LABEL_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define E_CLIPPED_LABEL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, e_clipped_label_get_type (), EClippedLabel) -#define E_CLIPPED_LABEL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, e_clipped_label_get_type (), EClippedLabelClass) -#define E_IS_CLIPPED_LABEL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, e_clipped_label_get_type ()) - - -typedef struct _EClippedLabel EClippedLabel; -typedef struct _EClippedLabelClass EClippedLabelClass; - -struct _EClippedLabel -{ - GtkMisc misc; - - gchar *label; - - /* Font size multiplication factor; 1.0 means "default GTK font - size" */ - gfloat font_size; - PangoWeight font_weight; - - /* Our PangoLayout */ - PangoLayout *layout; - - /* This is the width of the entire label string, in pixels. */ - gint label_width; - - /* This is the label's y coord. we store it here so it won't - change as the label's baseline changes (for example if we - ellide the 'y' from 'Summary' the baseline drops) */ - gint label_y; - - /* This is the number of characters we can fit in, or - E_CLIPPED_LABEL_NEED_RECALC if it needs to be recalculated, or - E_CLIPPED_LABEL_SHOW_ENTIRE_LABEL to show the entire label. */ - gint chars_displayed; - - /* This is the x position to display the ellipsis string, e.g. '...', - relative to the start of the label. */ - gint ellipsis_x; - - /* This is the width of the ellipsis, in pixels */ - gint ellipsis_width; -}; - -struct _EClippedLabelClass -{ - GtkMiscClass parent_class; -}; - - -GtkType e_clipped_label_get_type (void); -GtkWidget *e_clipped_label_new (const gchar *text, - PangoWeight font_weight, - gfloat font_size); - -gchar *e_clipped_label_get_text (EClippedLabel *label); -void e_clipped_label_set_text (EClippedLabel *label, - const gchar *text); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_CLIPPED_LABEL_H_ */ diff --git a/widgets/misc/e-info-label.c b/widgets/misc/e-info-label.c index 620e9a3552..636e696839 100644 --- a/widgets/misc/e-info-label.c +++ b/widgets/misc/e-info-label.c @@ -28,7 +28,6 @@ #include "e-info-label.h" #include -#include "e-clipped-label.h" #include @@ -142,29 +141,37 @@ e_info_label_new(const char *icon) void e_info_label_set_info(EInfoLabel *el, const char *location, const char *info) { - char *tmp; + gchar *markup; if (el->location == NULL) { - el->location = e_clipped_label_new(location, PANGO_WEIGHT_BOLD, 1.0); - el->info = gtk_label_new(NULL); - - gtk_misc_set_alignment((GtkMisc *)el->location, 0.0, 0.0); - gtk_misc_set_padding((GtkMisc *)el->location, 0, 6); - gtk_misc_set_alignment((GtkMisc *)el->info, 0.0, 1.0); - gtk_misc_set_padding((GtkMisc *)el->info, 0, 6); - - gtk_widget_show(el->location); - gtk_widget_show(el->info); - - gtk_box_pack_start((GtkBox *)el, (GtkWidget *)el->location, TRUE, TRUE, 0); - gtk_box_pack_end((GtkBox *)el, (GtkWidget *)el->info, FALSE, TRUE, 6); - gtk_widget_set_state((GtkWidget *)el, GTK_STATE_ACTIVE); - } else { - e_clipped_label_set_text((EClippedLabel *)el->location, location); + el->location = gtk_label_new (NULL); + el->info = gtk_label_new (NULL); + + gtk_label_set_ellipsize ( + GTK_LABEL (el->location), PANGO_ELLIPSIZE_END); + gtk_misc_set_alignment (GTK_MISC (el->location), 0.0, 0.0); + gtk_misc_set_padding (GTK_MISC (el->location), 0, 6); + gtk_misc_set_alignment (GTK_MISC (el->info), 0.0, 1.0); + gtk_misc_set_padding (GTK_MISC (el->info), 0, 6); + + gtk_widget_show (el->location); + gtk_widget_show (el->info); + + gtk_box_pack_start ( + GTK_BOX (el), GTK_WIDGET (el->location), + TRUE, TRUE, 0); + gtk_box_pack_end ( + GTK_BOX (el), GTK_WIDGET (el->info), + FALSE, TRUE, 6); + gtk_widget_set_state (GTK_WIDGET (el), GTK_STATE_ACTIVE); } - tmp = g_strdup_printf("%s", info); - gtk_label_set_markup((GtkLabel *)el->info, tmp); - g_free(tmp); + markup = g_markup_printf_escaped ("%s", location); + gtk_label_set_markup (GTK_LABEL (el->location), markup); + g_free (markup); + + markup = g_markup_printf_escaped ("%s", info); + gtk_label_set_markup (GTK_LABEL (el->info), markup); + g_free (markup); } diff --git a/widgets/misc/e-multi-config-dialog.c b/widgets/misc/e-multi-config-dialog.c index b63b7827e4..6424814ca2 100644 --- a/widgets/misc/e-multi-config-dialog.c +++ b/widgets/misc/e-multi-config-dialog.c @@ -26,8 +26,6 @@ #include "e-multi-config-dialog.h" -#include "e-clipped-label.h" - #include #include
#include
@@ -87,18 +85,6 @@ create_page_container (const char *description, vbox = gtk_vbox_new (FALSE, 0); -#if 0 - label = e_clipped_label_new (description); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0); - - separator = gtk_hseparator_new (); - gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0); - - gtk_widget_show (label); - gtk_widget_show (separator); -#endif - gtk_box_pack_start (GTK_BOX (vbox), widget, TRUE, TRUE, 0); gtk_widget_show (widget); diff --git a/widgets/misc/e-task-bar.c b/widgets/misc/e-task-bar.c index 2e28a6c76a..c80c4e16b3 100644 --- a/widgets/misc/e-task-bar.c +++ b/widgets/misc/e-task-bar.c @@ -26,11 +26,12 @@ #include "e-task-bar.h" -#include "misc/e-clipped-label.h" +#include +#include struct _ETaskBarPrivate { - EClippedLabel *message_label; + GtkWidget *message_label; GtkHBox *hbox; }; @@ -96,11 +97,12 @@ e_task_bar_init (ETaskBar *task_bar) task_bar->priv = g_new (ETaskBarPrivate, 1); gtk_box_set_spacing (GTK_BOX (task_bar), 10); - - label = e_clipped_label_new ("", PANGO_WEIGHT_NORMAL, 1.0); + + label = gtk_label_new (NULL); + gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); gtk_box_pack_start (GTK_BOX (task_bar), label, TRUE, TRUE, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); - task_bar->priv->message_label = E_CLIPPED_LABEL (label); + task_bar->priv->message_label = label; hbox = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (task_bar), hbox); @@ -133,9 +135,9 @@ e_task_bar_set_message (ETaskBar *task_bar, const char *message) { if (message) { - gtk_widget_show (GTK_WIDGET (task_bar->priv->message_label)); - e_clipped_label_set_text (task_bar->priv->message_label, - message); + gtk_label_set_text ( + GTK_LABEL (task_bar->priv->message_label), message); + gtk_widget_show (task_bar->priv->message_label); } else { e_task_bar_unset_message (task_bar); } @@ -144,7 +146,7 @@ e_task_bar_set_message (ETaskBar *task_bar, void e_task_bar_unset_message (ETaskBar *task_bar) { - gtk_widget_hide (GTK_WIDGET (task_bar->priv->message_label)); + gtk_widget_hide (task_bar->priv->message_label); } void -- cgit v1.2.3