378 lines
13 KiB
Diff
378 lines
13 KiB
Diff
--- evolution-2.11.3/mail/mail-send-recv.c.e-clipped-label 2007-06-06 13:02:07.000000000 -0400
|
||
+++ evolution-2.11.3/mail/mail-send-recv.c 2007-06-14 21:05:16.000000000 -0400
|
||
@@ -43,7 +43,6 @@
|
||
|
||
#include "libedataserver/e-account-list.h"
|
||
|
||
-#include "misc/e-clipped-label.h"
|
||
#include "em-filter-rule.h"
|
||
#include "camel/camel-filter-driver.h"
|
||
#include "camel/camel-folder.h"
|
||
@@ -156,8 +155,8 @@ receive_cancel(GtkButton *button, struct
|
||
if (info->state == SEND_ACTIVE) {
|
||
camel_operation_cancel(info->cancel);
|
||
if (info->status_label)
|
||
- e_clipped_label_set_text (
|
||
- E_CLIPPED_LABEL (info->status_label),
|
||
+ gtk_label_set_text (
|
||
+ GTK_LABEL (info->status_label),
|
||
_("Canceling..."));
|
||
info->state = SEND_CANCELLED;
|
||
}
|
||
@@ -267,8 +266,8 @@ operation_status_timeout(void *data)
|
||
GTK_PROGRESS_BAR (info->progress_bar),
|
||
info->pc / 100.0);
|
||
if (info->what)
|
||
- e_clipped_label_set_text (
|
||
- E_CLIPPED_LABEL (info->status_label),
|
||
+ gtk_label_set_text (
|
||
+ GTK_LABEL (info->status_label),
|
||
info->what);
|
||
return TRUE;
|
||
}
|
||
@@ -496,10 +495,11 @@ build_dialog (EAccountList *accounts, Ca
|
||
|
||
cancel_button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
|
||
|
||
- status_label = e_clipped_label_new (
|
||
+ status_label = gtk_label_new (
|
||
(info->type == SEND_UPDATE) ?
|
||
- _("Updating...") : _("Waiting..."),
|
||
- PANGO_WEIGHT_NORMAL, 1.0);
|
||
+ _("Updating...") : _("Waiting..."));
|
||
+ gtk_label_set_ellipsize (
|
||
+ GTK_LABEL (status_label), PANGO_ELLIPSIZE_END);
|
||
|
||
/* g_object_set(data->label, "bold", TRUE, NULL); */
|
||
gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
|
||
@@ -566,8 +566,9 @@ build_dialog (EAccountList *accounts, Ca
|
||
progress_bar = gtk_progress_bar_new ();
|
||
cancel_button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
|
||
|
||
- status_label = e_clipped_label_new (
|
||
- _("Waiting..."), PANGO_WEIGHT_NORMAL, 1.0);
|
||
+ status_label = gtk_label_new (_("Waiting..."));
|
||
+ gtk_label_set_ellipsize (
|
||
+ GTK_LABEL (status_label), PANGO_ELLIPSIZE_END);
|
||
|
||
gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
|
||
gtk_misc_set_alignment (GTK_MISC (status_label), 0, .5);
|
||
@@ -692,8 +693,7 @@ receive_done (char *uri, void *data)
|
||
info->state = SEND_COMPLETE;
|
||
}
|
||
|
||
- e_clipped_label_set_text (
|
||
- E_CLIPPED_LABEL (info->status_label), text);
|
||
+ gtk_label_set_text (GTK_LABEL (info->status_label), text);
|
||
}
|
||
|
||
if (info->cancel_button)
|
||
--- evolution-2.11.3/widgets/misc/e-task-bar.c.e-clipped-label 2007-04-18 06:18:34.000000000 -0400
|
||
+++ evolution-2.11.3/widgets/misc/e-task-bar.c 2007-06-14 21:05:16.000000000 -0400
|
||
@@ -26,11 +26,12 @@
|
||
|
||
#include "e-task-bar.h"
|
||
|
||
-#include "misc/e-clipped-label.h"
|
||
+#include <gtk/gtklabel.h>
|
||
+#include <gtk/gtkmisc.h>
|
||
|
||
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,11 @@ e_task_bar_set_message (ETaskBar *task
|
||
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);
|
||
+ GtkWidget *label;
|
||
+
|
||
+ label = task_bar->priv->message_label;
|
||
+ gtk_label_set_text (GTK_LABEL (label), message);
|
||
+ gtk_widget_show (label);
|
||
} else {
|
||
e_task_bar_unset_message (task_bar);
|
||
}
|
||
@@ -144,7 +148,7 @@ e_task_bar_set_message (ETaskBar *task
|
||
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
|
||
--- evolution-2.11.3/widgets/misc/Makefile.am.e-clipped-label 2007-06-01 03:09:21.000000000 -0400
|
||
+++ evolution-2.11.3/widgets/misc/Makefile.am 2007-06-14 21:05:16.000000000 -0400
|
||
@@ -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 \
|
||
--- evolution-2.11.3/widgets/misc/e-info-label.c.e-clipped-label 2007-04-18 06:18:34.000000000 -0400
|
||
+++ evolution-2.11.3/widgets/misc/e-info-label.c 2007-06-14 21:05:16.000000000 -0400
|
||
@@ -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);
|
||
+ el->location = gtk_label_new (NULL);
|
||
+ 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);
|
||
+ 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);
|
||
}
|
||
|
||
--- evolution-2.11.3/widgets/misc/e-multi-config-dialog.c.e-clipped-label 2007-06-03 11:08:14.000000000 -0400
|
||
+++ evolution-2.11.3/widgets/misc/e-multi-config-dialog.c 2007-06-14 21:05:16.000000000 -0400
|
||
@@ -26,8 +26,6 @@
|
||
|
||
#include "e-multi-config-dialog.h"
|
||
|
||
-#include "e-clipped-label.h"
|
||
-
|
||
#include <table/e-table-scrolled.h>
|
||
#include <table/e-table-memory-store.h>
|
||
#include <table/e-cell-pixbuf.h>
|
||
@@ -87,18 +85,6 @@ create_page_container (const char *descr
|
||
|
||
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);
|
||
--- evolution-2.11.3/shell/e-shell-folder-title-bar.c.e-clipped-label 2007-04-18 06:15:47.000000000 -0400
|
||
+++ evolution-2.11.3/shell/e-shell-folder-title-bar.c 2007-06-14 21:05:16.000000000 -0400
|
||
@@ -34,7 +34,6 @@
|
||
#include <glib/gi18n.h>
|
||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||
|
||
-#include "misc/e-clipped-label.h"
|
||
#include "e-shell-constants.h"
|
||
#include "e-shell-marshal.h"
|
||
#include "e-shell-folder-title-bar.h"
|
||
@@ -117,13 +116,15 @@ new_empty_image_widget (void)
|
||
|
||
/* Utility functions. */
|
||
|
||
-static int
|
||
-get_max_clipped_label_width (EClippedLabel *clipped_label)
|
||
+static gint
|
||
+get_max_label_width (GtkWidget *label)
|
||
{
|
||
- int width;
|
||
+ PangoLayout *layout;
|
||
+ gint width;
|
||
|
||
- pango_layout_get_pixel_size (clipped_label->layout, &width, NULL);
|
||
- width += 2 * GTK_MISC (clipped_label)->xpad;
|
||
+ layout = gtk_label_get_layout (GTK_LABEL (label));
|
||
+ pango_layout_get_pixel_size (layout, &width, NULL);
|
||
+ width += 2 * GTK_MISC (label)->xpad;
|
||
|
||
return width;
|
||
}
|
||
@@ -152,7 +153,7 @@ size_allocate_title_button (EShellFolder
|
||
child_allocation.height = allocation->height - 2 * border_width;
|
||
|
||
child_allocation.width = child_requisition.width;
|
||
- child_allocation.width += get_max_clipped_label_width (E_CLIPPED_LABEL (priv->title_button_label));
|
||
+ child_allocation.width += get_max_label_width (priv->title_button_label);
|
||
|
||
child_allocation.width = MIN (child_allocation.width, *available_width_inout);
|
||
|
||
@@ -218,7 +219,7 @@ size_allocate_label (EShellFolderTitleBa
|
||
child_allocation.y = allocation->y + border_width;
|
||
child_allocation.height = allocation->height - 2 * border_width;
|
||
|
||
- child_allocation.width = MIN (get_max_clipped_label_width (E_CLIPPED_LABEL (priv->title_label)),
|
||
+ child_allocation.width = MIN (get_max_label_width (priv->title_label),
|
||
*available_width_inout);
|
||
|
||
gtk_widget_size_allocate (priv->title_label, & child_allocation);
|
||
@@ -478,6 +479,7 @@ e_shell_folder_title_bar_construct (EShe
|
||
{
|
||
EShellFolderTitleBarPrivate *priv;
|
||
GtkWidget *title_button_hbox;
|
||
+ GtkWidget *label;
|
||
|
||
g_return_if_fail (folder_title_bar != NULL);
|
||
g_return_if_fail (E_IS_SHELL_FOLDER_TITLE_BAR (folder_title_bar));
|
||
@@ -489,18 +491,24 @@ e_shell_folder_title_bar_construct (EShe
|
||
gtk_misc_set_padding (GTK_MISC (priv->title_icon), 2, 0);
|
||
gtk_widget_show (priv->title_icon);
|
||
|
||
- priv->title_label = e_clipped_label_new ("", PANGO_WEIGHT_BOLD, 1.2);
|
||
- gtk_misc_set_padding (GTK_MISC (priv->title_label), 0, 0);
|
||
- gtk_misc_set_alignment (GTK_MISC (priv->title_label), 0.0, 0.5);
|
||
-
|
||
- priv->title_button_label = e_clipped_label_new ("", PANGO_WEIGHT_BOLD, 1.2);
|
||
- gtk_misc_set_padding (GTK_MISC (priv->title_button_label), 2, 0);
|
||
- gtk_misc_set_alignment (GTK_MISC (priv->title_button_label), 0.0, 0.5);
|
||
- gtk_widget_show (priv->title_button_label);
|
||
-
|
||
- priv->folder_bar_label = e_clipped_label_new ("", PANGO_WEIGHT_NORMAL, 1.0);
|
||
- gtk_misc_set_alignment (GTK_MISC (priv->folder_bar_label), 1.0, 0.5);
|
||
- gtk_widget_show (priv->folder_bar_label);
|
||
+ label = gtk_label_new ("");
|
||
+ gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
|
||
+ gtk_misc_set_padding (GTK_MISC (label), 0, 0);
|
||
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||
+ priv->title_label = label;
|
||
+
|
||
+ label = gtk_label_new ("");
|
||
+ gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
|
||
+ gtk_misc_set_padding (GTK_MISC (label), 2, 0);
|
||
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||
+ gtk_widget_show (label);
|
||
+ priv->title_button_label = label;
|
||
+
|
||
+ label = gtk_label_new ("");
|
||
+ gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
|
||
+ gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
|
||
+ gtk_widget_show (label);
|
||
+ priv->folder_bar_label = label;
|
||
|
||
priv->title_button_icon = new_empty_image_widget ();
|
||
gtk_widget_show (priv->title_button_icon);
|
||
@@ -574,21 +582,21 @@ e_shell_folder_title_bar_set_title (EShe
|
||
const char *title)
|
||
{
|
||
EShellFolderTitleBarPrivate *priv;
|
||
+ gchar *markup;
|
||
|
||
g_return_if_fail (folder_title_bar != NULL);
|
||
g_return_if_fail (E_IS_SHELL_FOLDER_TITLE_BAR (folder_title_bar));
|
||
|
||
priv = folder_title_bar->priv;
|
||
|
||
- if (title == NULL) {
|
||
- e_clipped_label_set_text (E_CLIPPED_LABEL (priv->title_button_label), _("(Untitled)"));
|
||
- e_clipped_label_set_text (E_CLIPPED_LABEL (priv->title_label), _("(Untitled)"));
|
||
- } else {
|
||
- e_clipped_label_set_text (E_CLIPPED_LABEL (priv->title_button_label), title);
|
||
- e_clipped_label_set_text (E_CLIPPED_LABEL (priv->title_label), title);
|
||
- }
|
||
+ if (title == NULL)
|
||
+ title = _("Untitled");
|
||
+
|
||
+ markup = g_markup_printf_escaped ("<big><b>%s</b></big>", title);
|
||
+ gtk_label_set_markup (GTK_LABEL (priv->title_button_label), markup);
|
||
+ gtk_label_set_markup (GTK_LABEL (priv->title_label), markup);
|
||
+ g_free (markup);
|
||
|
||
- /* FIXME: There seems to be a bug in EClippedLabel, this is just a workaround. */
|
||
gtk_widget_queue_resize (GTK_WIDGET (folder_title_bar));
|
||
}
|
||
|
||
@@ -611,10 +619,7 @@ e_shell_folder_title_bar_set_folder_bar_
|
||
|
||
priv = folder_title_bar->priv;
|
||
|
||
- if (text == NULL)
|
||
- e_clipped_label_set_text (E_CLIPPED_LABEL (priv->folder_bar_label), "");
|
||
- else
|
||
- e_clipped_label_set_text (E_CLIPPED_LABEL (priv->folder_bar_label), text);
|
||
+ gtk_label_set_text (GTK_LABEL (priv->folder_bar_label), text);
|
||
|
||
/* FIXME: Might want to set the styles somewhere in here too,
|
||
black text on grey background isn't the best combination */
|