commit c29b5c9c76b048c3f1631ceb0134d2f5d6af85e8
parent 86173d8ff8dc921b3a4347d891ae53f2f88fdc12
Author: Paweł Pękala <c0rn@gazeta.pl>
Date: Mon, 8 Feb 2010 18:43:06 +0000
2010-02-08 [pawel] 3.7.5cvs9
* src/mimeview.c
Make tooltips less cryptic
* src/gtk/description_window.c
Improve window size calculation
Diffstat:
5 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,10 @@
+2010-02-08 [pawel] 3.7.5cvs9
+
+ * src/mimeview.c
+ Make tooltips less cryptic
+ * src/gtk/description_window.c
+ Improve window size calculation
+
2010-02-08 [pawel] 3.7.5cvs8
* src/compose.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3949,3 +3949,4 @@
( cvs diff -u -r 1.14.2.69 -r 1.14.2.70 src/plugins/trayicon/trayicon.c; ) > 3.7.5cvs6.patchset
( cvs diff -u -r 1.2.4.1 -r 1.2.4.2 m4/.cvsignore; ) > 3.7.5cvs7.patchset
( cvs diff -u -r 1.382.2.541 -r 1.382.2.542 src/compose.c; cvs diff -u -r 1.50.2.58 -r 1.50.2.59 src/compose.h; cvs diff -u -r 1.36.2.182 -r 1.36.2.183 src/common/utils.c; cvs diff -u -r 1.20.2.73 -r 1.20.2.74 src/common/utils.h; cvs diff -u -r 1.1.2.64 -r 1.1.2.65 src/gtk/authors.h; ) > 3.7.5cvs8.patchset
+( cvs diff -u -r 1.83.2.158 -r 1.83.2.159 src/mimeview.c; cvs diff -u -r 1.5.2.28 -r 1.5.2.29 src/gtk/description_window.c; ) > 3.7.5cvs9.patchset
diff --git a/configure.ac b/configure.ac
@@ -12,7 +12,7 @@ MINOR_VERSION=7
MICRO_VERSION=5
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=8
+EXTRA_VERSION=9
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/gtk/description_window.c b/src/gtk/description_window.c
@@ -73,7 +73,7 @@ static void description_create(DescriptionWindow * dwindow)
int sz;
int line;
int j;
- int max_width = 0;
+ int *max_width = g_new0(int, dwindow->columns), width=0;
GtkRequisition req;
dwindow->window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "description_window");
@@ -124,8 +124,8 @@ static void description_create(DescriptionWindow * dwindow)
(GtkAttachOptions) (0), 0, 2);
gtk_widget_size_request(label, &req);
- if(req.width > max_width)
- max_width = req.width;
+ if(req.width > max_width[j])
+ max_width[j] = req.width;
}
} else {
GtkWidget *separator;
@@ -139,8 +139,12 @@ static void description_create(DescriptionWindow * dwindow)
line++;
}
- max_width += 150;
+ for(j=0; j<dwindow->columns; j++)
+ width += max_width[j];
+ g_free(max_width);
+ width += 100;
+
gtkut_stock_button_set_create(&hbbox, &close_btn, GTK_STOCK_CLOSE,
NULL, NULL, NULL, NULL);
@@ -151,7 +155,7 @@ static void description_create(DescriptionWindow * dwindow)
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new(gettext(dwindow->description));
- gtk_widget_set_size_request(GTK_WIDGET(label), max_width-2, -1);
+ gtk_widget_set_size_request(GTK_WIDGET(label), width-2, -1);
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
@@ -180,7 +184,7 @@ static void description_create(DescriptionWindow * dwindow)
gtk_widget_show_all(vbox);
gtk_widget_set_size_request(dwindow->window,
- (max_width < 400) ? 400 : max_width, 450);
+ (width < 400) ? 400 : width, 450);
}
static gboolean description_window_key_pressed(GtkWidget *widget,
diff --git a/src/mimeview.c b/src/mimeview.c
@@ -2332,8 +2332,9 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
content_type = procmime_get_content_type_str(mimeinfo->type,
mimeinfo->subtype);
- tip = g_strjoin("\n", content_type,
- to_human_readable((goffset)mimeinfo->length), NULL);
+ tip = g_strconcat("<b>", _("Type:"), " </b>", content_type,
+ "\n<b>", _("Size:"), " </b>",
+ to_human_readable((goffset)mimeinfo->length), NULL);
g_free(content_type);
if (desc && *desc) {
gchar *tmp = NULL;
@@ -2342,7 +2343,10 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
} else {
tmp = g_strdup(desc);
}
- tiptmp = g_strjoin("\n", tmp, tip, NULL);
+ tiptmp = g_strconcat(tip, "\n<b>",
+ prefs_common.attach_desc && mimeinfo->description ?
+ _("Description") : _("Filename:"),
+ " </b>", tmp, NULL);
g_free(tip);
tip = tiptmp;
g_free(tmp);
@@ -2354,7 +2358,7 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
}
g_free(sigshort);
- CLAWS_SET_TIP(button, tip);
+ gtk_widget_set_tooltip_markup(button, tip);
g_free(tip);
gtk_widget_show_all(button);
gtk_drag_source_set(button, GDK_BUTTON1_MASK|GDK_BUTTON3_MASK,