diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-06-15 21:58:34 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-06-15 21:58:34 +0800 |
commit | 60f7f10f45ca4e15ae250e7cc9533dcd959bf324 (patch) | |
tree | 0be42abb77e1a2a1ecf391d1f08a6a4e639bddd3 /widgets/misc/e-info-label.c | |
parent | a3f0966a6916c502586da58867c5f79dbe88075a (diff) | |
download | gsoc2013-evolution-60f7f10f45ca4e15ae250e7cc9533dcd959bf324.tar.gz gsoc2013-evolution-60f7f10f45ca4e15ae250e7cc9533dcd959bf324.tar.zst gsoc2013-evolution-60f7f10f45ca4e15ae250e7cc9533dcd959bf324.zip |
** Fixes bug #447727
2007-06-15 Matthew Barnes <mbarnes@redhat.com>
** 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
Diffstat (limited to 'widgets/misc/e-info-label.c')
-rw-r--r-- | widgets/misc/e-info-label.c | 49 |
1 files changed, 28 insertions, 21 deletions
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 <gtk/gtklabel.h> -#include "e-clipped-label.h" #include <e-util/e-icon-factory.h> @@ -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("<span size=\"smaller\">%s</span>", info); - gtk_label_set_markup((GtkLabel *)el->info, tmp); - g_free(tmp); + markup = g_markup_printf_escaped ("<b>%s</b>", location); + gtk_label_set_markup (GTK_LABEL (el->location), markup); + g_free (markup); + + markup = g_markup_printf_escaped ("<small>%s</small>", info); + gtk_label_set_markup (GTK_LABEL (el->info), markup); + g_free (markup); } |