2010-02-08 [pawel] 3.7.5cvs9
authorPaweł Pękala <c0rn@gazeta.pl>
Mon, 8 Feb 2010 18:43:06 +0000 (18:43 +0000)
committerPaweł Pękala <c0rn@gazeta.pl>
Mon, 8 Feb 2010 18:43:06 +0000 (18:43 +0000)
* src/mimeview.c
Make tooltips less cryptic
* src/gtk/description_window.c
Improve window size calculation

ChangeLog
PATCHSETS
configure.ac
src/gtk/description_window.c
src/mimeview.c

index 601f3ea75a5334340acaa90db7885fb412e9eff4..063fada9b71292d714877f2bcab73de889a432ec 100644 (file)
--- 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
index 2785b6bb4d3d0914c4c35b693e85ae244d852c0e..b83d85bfe7ab6e123a2a423d20c6440894485961 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index a8d0be3cf993e3f4bf557ac6ad0b92593daae732..6305043396fa63e56ffe7e32119287e3a5166b73 100644 (file)
@@ -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=
 
index 725bbc5f2c17e702871a55296496f79807b0083e..ab2d7b7685568a8947d8182aed607ae30cce712a 100644 (file)
@@ -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,
index 2ded7505c6dc36fdeef7dc2aa6e87e2e664b5e9d..39d334fd47fe90d61b5cbf7924fb9dc791b68395 100644 (file)
@@ -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,