[evolution-patches] send/receive dialog resizing



just use an eclippedlabel.  its the only way to fix it 'fully',
otherwise, translations or different server names or anything could
cause resizes.

for 1.4 and head

Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2782.2.34
diff -u -3 -r1.2782.2.34 ChangeLog
--- mail/ChangeLog	4 Sep 2003 23:12:40 -0000	1.2782.2.34
+++ mail/ChangeLog	9 Sep 2003 14:17:02 -0000
@@ -1,3 +1,5 @@
+2003-09-09  Not Zed  <NotZed Ximian com>
+
+	* mail-send-recv.c (build_dialogue): use an eclippedlabel for
+	status.  Fixed all uses.
+
 2003-09-04  Not Zed  <NotZed Ximian com>
 
 	* em-utils.c (confirm_expunge): rename it to emu_confirm_expunge
Index: mail/mail-send-recv.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-send-recv.c,v
retrieving revision 1.73.14.1
diff -u -3 -r1.73.14.1 mail-send-recv.c
--- mail/mail-send-recv.c	12 Aug 2003 21:17:53 -0000	1.73.14.1
+++ mail/mail-send-recv.c	9 Sep 2003 14:17:04 -0000
@@ -36,6 +36,7 @@
 
 #include "e-util/e-gtk-utils.h"
 
+#include "widgets/misc/e-clipped-label.h"
 #include "filter/filter-filter.h"
 #include "camel/camel-filter-driver.h"
 #include "camel/camel-folder.h"
@@ -110,7 +111,7 @@
 	send_state_t state;
 	GtkProgressBar *bar;
 	GtkButton *stop;
-	GtkLabel *status;
+	EClippedLabel *status;
 
 	int timeout_id;
 	char *what;
@@ -143,7 +144,7 @@
 	if (info->state == SEND_ACTIVE) {
 		camel_operation_cancel(info->cancel);
 		if (info->status)
-			gtk_label_set_text(info->status, _("Cancelling..."));
+			e_clipped_label_set_text(info->status, _("Cancelling..."));
 		info->state = SEND_CANCELLED;
 	}
 	if (info->stop)
@@ -294,7 +295,8 @@
 	GList *list = NULL;
 	struct _send_data *data;
         GtkWidget *send_icon, *recv_icon; 
-	GtkLabel *label, *status_label;
+	GtkLabel *label;
+	EClippedLabel *status_label;
 	GtkProgressBar *bar;
 	GtkButton *stop;
 	GtkHSeparator *line;
@@ -386,9 +388,9 @@
 		
 		stop = (GtkButton *)e_gtk_button_new_with_icon(_("Cancel"), GTK_STOCK_CANCEL);
 
-		status_label = (GtkLabel *)gtk_label_new ((info->type == SEND_UPDATE) ? _("Updating...") :
-							  _("Waiting..."));
-		
+		status_label = (EClippedLabel *)e_clipped_label_new((info->type == SEND_UPDATE)?_("Updating..."):_("Waiting..."),
+								    PANGO_WEIGHT_NORMAL, 1.0);
+
 		/* g_object_set(data->label, "bold", TRUE, NULL); */
 		gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
 		gtk_misc_set_alignment (GTK_MISC (status_label), 0, .5);
@@ -443,8 +445,8 @@
 		bar = (GtkProgressBar *)gtk_progress_bar_new ();
 		stop = (GtkButton *)e_gtk_button_new_with_icon(_("Cancel"), GTK_STOCK_CANCEL);
 
-		status_label = (GtkLabel *)gtk_label_new (_("Waiting..."));
-		
+		status_label = (EClippedLabel *)e_clipped_label_new(_("Waiting..."), PANGO_WEIGHT_NORMAL, 1.0);
+
 		gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
 		gtk_misc_set_alignment (GTK_MISC (status_label), 0, .5);
 		
@@ -538,7 +540,8 @@
 
 	if (info->bar) {
 		gtk_progress_bar_set_fraction((GtkProgressBar *)info->bar, (gfloat)(info->pc/100.0));
-		gtk_label_set_text(info->status, info->what);
+		if (info->what)
+			e_clipped_label_set_text(info->status, info->what);
 		return TRUE;
 	}
 
@@ -574,11 +577,11 @@
 
 		switch(info->state) {
 		case SEND_CANCELLED:
-			gtk_label_set_text(info->status, _("Cancelled."));
+			e_clipped_label_set_text(info->status, _("Cancelled."));
 			break;
 		default:
 			info->state = SEND_COMPLETE;
-			gtk_label_set_text(info->status, _("Complete."));
+			e_clipped_label_set_text(info->status, _("Complete"));
 		}
 	}
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]