2007-07-20 [wwp] 2.10.0cvs50
authorTristan Chabredier <wwp@claws-mail.org>
Fri, 20 Jul 2007 14:03:27 +0000 (14:03 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Fri, 20 Jul 2007 14:03:27 +0000 (14:03 +0000)
* src/mimeview.c
* src/stock_pixmap.c
Draw a frame around the selected mimeview part icon (instead of the
shifted 'dancing' icon).

ChangeLog
PATCHSETS
configure.ac
src/mimeview.c
src/stock_pixmap.c

index 3adb597b982d7162141f2fd48fd6e95ab919573e..2f10e22bbd3d10b56c2a141127e3222d6ead4328 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-20 [wwp]       2.10.0cvs50
+
+       * src/mimeview.c
+       * src/stock_pixmap.c
+               Draw a frame around the selected mimeview part icon (instead of the
+               shifted 'dancing' icon).
+
 2007-07-20 [colin]     2.10.0cvs49
 
        * src/main.c
index d1cfc2a2e9395b74280ff52071622a184d801ff3..cafe3bc94f49e7175d34312cbe36eb2dda215012 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.654.2.2756 -r 1.654.2.2757 configure.ac;  cvs diff -u -r 1.115.2.158 -r 1.115.2.159 src/main.c;  cvs diff -u -r 1.204.2.141 -r 1.204.2.142 src/prefs_common.c;  cvs diff -u -r 1.103.2.87 -r 1.103.2.88 src/prefs_common.h;  cvs diff -u -r 1.1.2.57 -r 1.1.2.58 src/wizard.c;  cvs diff -u -r 1.9.2.40 -r 1.9.2.41 src/common/defs.h;  cvs diff -u -r 1.36.2.106 -r 1.36.2.107 src/common/utils.c;  ) > 2.10.0cvs47.patchset
 ( cvs diff -u -r 1.274.2.199 -r 1.274.2.200 src/mainwindow.c;  cvs diff -u -r 1.94.2.141 -r 1.94.2.142 src/messageview.c;  cvs diff -u -r 1.43.2.76 -r 1.43.2.77 src/toolbar.c;  cvs diff -u -r 1.19.2.19 -r 1.19.2.20 src/toolbar.h;  ) > 2.10.0cvs48.patchset
 ( cvs diff -u -r 1.115.2.159 -r 1.115.2.160 src/main.c;  cvs diff -u -r 1.1.2.58 -r 1.1.2.59 src/wizard.c;  ) > 2.10.0cvs49.patchset
+( cvs diff -u -r 1.83.2.111 -r 1.83.2.112 src/mimeview.c;  cvs diff -u -r 1.25.2.43 -r 1.25.2.44 src/stock_pixmap.c;  ) > 2.10.0cvs50.patchset
index 0d6cf02ab02c4a2425266305c61c8fa74b07061f..bd023366e033212815d6d14eed29ba3c5e51eb6b 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=10
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=49
+EXTRA_VERSION=50
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5eef45c03ecd80ed2c7b8397204ce52e5f8c56ad..c54527d1c66104de3efd8c77c0a1a1c1b6ee0d75 100644 (file)
@@ -2283,16 +2283,16 @@ static void icon_list_toggle_by_mime_info (MimeView     *mimeview,
                        continue;
                if(g_object_get_data(G_OBJECT(child->data),
                                      "partinfo") == (gpointer)mimeinfo) {
-                       gint *border_x = NULL;
+                       gboolean *highlight = NULL;
                        GtkWidget *icon = gtk_bin_get_child(GTK_BIN(child->data));
-                       border_x = g_object_get_data(G_OBJECT(icon), "border_x");
-                       *border_x = 0;
+                       highlight = g_object_get_data(G_OBJECT(icon), "highlight");
+                       *highlight = TRUE;
                        gtk_widget_queue_draw(icon);
                } else {
-                       gint *border_x = NULL;
+                       gint *highlight = NULL;
                        GtkWidget *icon = gtk_bin_get_child(GTK_BIN(child->data));
-                       border_x = g_object_get_data(G_OBJECT(icon), "border_x");
-                       *border_x = 6;
+                       highlight = g_object_get_data(G_OBJECT(icon), "highlight");
+                       *highlight = FALSE;
                        gtk_widget_queue_draw(icon);
                }                        
        }
index 6e234cc92fdd5f7b7b649897dd30f6e5259ae245..f3b8987e4ffdb09f98941d3a0d08e6db1ee47ec7 100644 (file)
@@ -200,6 +200,7 @@ struct _OverlayData
        OverlayPosition position;
        gint border_x;
        gint border_y;
+       gboolean highlight;
 };
 
 static void stock_pixmap_find_themes_in_dir(GList **list, const gchar *dirname);
@@ -599,6 +600,23 @@ static gboolean pixmap_with_overlay_expose_event_cb(GtkWidget *widget, GdkEventE
        gdk_window_clear_area (drawable, expose->area.x, expose->area.y,
                               expose->area.width, expose->area.height);
 
+       if (data->highlight) {
+               MainWindow *mw = NULL;
+
+               mw = mainwindow_get_mainwindow();
+               if (mw != NULL && mw->menubar != NULL) {
+                       GdkGC *gc_frame = gdk_gc_new((GdkWindow *)drawable);
+                       GdkColor color = gtk_widget_get_style(mw->menubar)->base[GTK_STATE_SELECTED];
+
+                       gdk_gc_set_foreground(gc_frame, &color);
+                       gdk_gc_set_line_attributes(gc_frame, 1, GDK_LINE_SOLID,
+                                       GDK_CAP_BUTT, GDK_JOIN_BEVEL);
+                       gdk_draw_rectangle(drawable, gc_frame, FALSE, data->border_x-2, data->border_y-2, 
+                                       data->base_width+3, data->base_height+3);
+                       g_object_unref(gc_frame);
+               }
+       }
+
        gdk_gc_set_tile(gc_pix, data->base_pixmap);
        gdk_gc_set_ts_origin(gc_pix, data->border_x, data->border_y);
        gdk_gc_set_clip_mask(gc_pix, data->base_mask);
@@ -736,6 +754,7 @@ GtkWidget *stock_pixmap_widget_with_overlay(GtkWidget *window, StockPixmap icon,
        data->position = pos;
        data->border_x = border_x;
        data->border_y = border_y;
+       data->highlight = FALSE;
 
        widget = gtk_drawing_area_new();
        gtk_drawing_area_size(GTK_DRAWING_AREA(widget), data->base_width + border_x * 2, 
@@ -744,7 +763,7 @@ GtkWidget *stock_pixmap_widget_with_overlay(GtkWidget *window, StockPixmap icon,
                         G_CALLBACK(pixmap_with_overlay_expose_event_cb), data);
        g_signal_connect(G_OBJECT(widget), "destroy",
                         G_CALLBACK(pixmap_with_overlay_destroy_cb), data);
-       g_object_set_data(G_OBJECT(widget), "border_x", &(data->border_x));
+       g_object_set_data(G_OBJECT(widget), "highlight", &(data->highlight));
        return widget;
 
 }