2005-02-03 [paul] 1.0.0cvs25.3
authorPaul Mangan <paul@claws-mail.org>
Thu, 3 Feb 2005 07:47:34 +0000 (07:47 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 3 Feb 2005 07:47:34 +0000 (07:47 +0000)
* src/folderview.c
* src/headerview.c
* src/summaryview.c
* src/textview.c
* src/gtk/colorlabel.c
third and final part of initial sync with main-gtk2

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/folderview.c
src/gtk/colorlabel.c
src/headerview.c
src/summaryview.c
src/textview.c

index 89893099a84e17f7ac463e4def450f3d7493a00b..806184170b90707ab7e96b0aa47f9d2456e8f583 100644 (file)
@@ -1,3 +1,12 @@
+2005-02-03 [paul]      1.0.0cvs25.3
+
+       * src/folderview.c
+       * src/headerview.c
+       * src/summaryview.c
+       * src/textview.c
+       * src/gtk/colorlabel.c
+               third and final part of initial sync with main-gtk2
+
 2005-02-03 [paul]      1.0.0cvs25.2
 
        * src/jpilot.c
 2005-02-03 [paul]      1.0.0cvs25.2
 
        * src/jpilot.c
index 825341594563c10c45da0e0bdd2aae936dd22505..a75d716e28bad14e401ef0f8131002a25826a239 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.4.6 -r 1.1.4.7 src/common/xml.c; ) > 1.0.0cvs24.3.patchset
 ( cvs diff -u -r 1.94.2.41 -r 1.94.2.42 src/messageview.c; ) > 1.0.0cvs25.1.patchset
 ( cvs diff -u -r 1.18.2.6 -r 1.18.2.7 src/jpilot.c; ) > 1.0.0cvs25.2.patchset
 ( cvs diff -u -r 1.1.4.6 -r 1.1.4.7 src/common/xml.c; ) > 1.0.0cvs24.3.patchset
 ( cvs diff -u -r 1.94.2.41 -r 1.94.2.42 src/messageview.c; ) > 1.0.0cvs25.1.patchset
 ( cvs diff -u -r 1.18.2.6 -r 1.18.2.7 src/jpilot.c; ) > 1.0.0cvs25.2.patchset
+( cvs diff -u -r 1.207.2.28 -r 1.207.2.29 src/folderview.c; cvs diff -u -r 1.8.2.3 -r 1.8.2.4 src/headerview.c; cvs diff -u -r 1.395.2.50 -r 1.395.2.51 src/summaryview.c; cvs diff -u -r 1.96.2.41 -r 1.96.2.42 src/textview.c; cvs diff -u -r 1.2.2.4 -r 1.2.2.5 src/gtk/colorlabel.c; ) > 1.0.0cvs25.3.patchset
index fed82d0bc9bdec07e6a6ac937840a6e668677e0e..268f802d3fc53f4fbc84ad3eaaeb24e47b9476b7 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=25
 EXTRA_RELEASE=
 BINARY_AGE=0
 EXTRA_VERSION=25
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.2
+EXTRA_GTK2_VERSION=.3
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index ab3a5534a62b7ce6ba096abd09dc9a5adc8d4798..e0943e8b81be1929b079fd1cc6e9f591320f8fc8 100644 (file)
@@ -518,13 +518,15 @@ void folderview_init(FolderView *folderview)
        if (!bold_style) {
                PangoFontDescription *font_desc;
                bold_style = gtk_style_copy(gtk_widget_get_style(ctree));
        if (!bold_style) {
                PangoFontDescription *font_desc;
                bold_style = gtk_style_copy(gtk_widget_get_style(ctree));
-               font_desc = pango_font_description_from_string(prefs_common.boldfont);
+               font_desc = pango_font_description_from_string(BOLD_FONT);
                if (font_desc) {
                        if (bold_style->font_desc)
                                pango_font_description_free
                                        (bold_style->font_desc);
                        bold_style->font_desc = font_desc;
                }
                if (font_desc) {
                        if (bold_style->font_desc)
                                pango_font_description_free
                                        (bold_style->font_desc);
                        bold_style->font_desc = font_desc;
                }
+               pango_font_description_set_weight
+                       (bold_style->font_desc, PANGO_WEIGHT_BOLD);
                bold_color_style = gtk_style_copy(bold_style);
                bold_color_style->fg[GTK_STATE_NORMAL] = folderview->color_new;
 
                bold_color_style = gtk_style_copy(bold_style);
                bold_color_style->fg[GTK_STATE_NORMAL] = folderview->color_new;
 
index 80c222d646f47825fede8c24580a986405384b3b..1532b3fd94ff8e544d360b1a7b5dd95489b9f6bd 100644 (file)
@@ -25,9 +25,6 @@
 #include "defs.h"
 
 #include <glib.h>
 #include "defs.h"
 
 #include <glib.h>
-#ifdef GDK_WINDOWING_X11
-#      include <gdk/gdkx.h>
-#endif /* GDK_WINDOWING_X11 */
 #include <gtk/gtk.h>
 #include <gtk/gtkwidget.h>
 #include <gtk/gtkimage.h>
 #include <gtk/gtk.h>
 #include <gtk/gtkwidget.h>
 #include <gtk/gtkimage.h>
index abe4033b2aec50b6a5c300cc67a29f36b3c92882..9d24146418832c3fc6ced882db3b641e1c9e7156 100644 (file)
@@ -133,20 +133,17 @@ void headerview_init(HeaderView *headerview)
 {
        static PangoFontDescription *boldfont = NULL;
 
 {
        static PangoFontDescription *boldfont = NULL;
 
-       if (!boldfont && BOLD_FONT)
-               boldfont = pango_font_description_from_string
-                               (BOLD_FONT);
-
-#define SET_FONT_STYLE(wid) \
-{ \
-       if (boldfont) \
-               gtk_widget_modify_font(headerview->wid, boldfont); \
-}
+       if (!boldfont) {
+               boldfont = pango_font_description_from_string(BOLD_FONT);
+               pango_font_description_set_weight(boldfont, PANGO_WEIGHT_BOLD);
+       }
 
 
-       SET_FONT_STYLE(from_header_label);
-       SET_FONT_STYLE(to_header_label);
-       SET_FONT_STYLE(ng_header_label);
-       SET_FONT_STYLE(subject_header_label);
+       if (boldfont) {
+               gtk_widget_modify_font(headerview->from_header_label, boldfont);
+               gtk_widget_modify_font(headerview->to_header_label, boldfont);
+               gtk_widget_modify_font(headerview->ng_header_label, boldfont);
+               gtk_widget_modify_font(headerview->subject_header_label, boldfont);
+       }
 
        headerview_clear(headerview);
        headerview_set_visibility(headerview, prefs_common.display_header_pane);
 
        headerview_clear(headerview);
        headerview_set_visibility(headerview, prefs_common.display_header_pane);
index 343d141e7d3c8ca76d54665bc15ebb688bf81432..258f0f08339e2f7215f7cf5fc3434cc16310f440 100644 (file)
@@ -611,8 +611,9 @@ SummaryView *summary_create(void)
 
 void summary_init(SummaryView *summaryview)
 {
 
 void summary_init(SummaryView *summaryview)
 {
-       GtkStyle *style;
        GtkWidget *pixmap;
        GtkWidget *pixmap;
+       PangoFontDescription *font_desc;
+       gint size;
 
        gtk_widget_realize(summaryview->ctree);
        stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_MARK,
 
        gtk_widget_realize(summaryview->ctree);
        stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_MARK,
@@ -640,39 +641,11 @@ void summary_init(SummaryView *summaryview)
        stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_GPG_SIGNED,
                         &gpgsignedxpm, &gpgsignedxpmmask);
 
        stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_GPG_SIGNED,
                         &gpgsignedxpm, &gpgsignedxpmmask);
 
-       if (!small_style) {
-               PangoFontDescription *font_desc = NULL;
-
-               small_style = gtk_style_copy
-                       (gtk_widget_get_style(summaryview->ctree));
-               if (SMALL_FONT)
-                       font_desc = pango_font_description_from_string
-                                               (SMALL_FONT);
-               if (font_desc) {
-                       if (small_style->font_desc)
-                               pango_font_description_free(small_style->font_desc);
-                       small_style->font_desc = font_desc;
-               }
-               small_marked_style = gtk_style_copy(small_style);
-               small_marked_style->fg[GTK_STATE_NORMAL] =
-                       summaryview->color_marked;
-               small_deleted_style = gtk_style_copy(small_style);
-               small_deleted_style->fg[GTK_STATE_NORMAL] =
-                       summaryview->color_dim;
-       }
        if (!bold_style) {
        if (!bold_style) {
-               PangoFontDescription *font_desc = NULL;
                bold_style = gtk_style_copy
                        (gtk_widget_get_style(summaryview->ctree));
                bold_style = gtk_style_copy
                        (gtk_widget_get_style(summaryview->ctree));
-               if (BOLD_FONT)
-                       font_desc = pango_font_description_from_string
-                                               (BOLD_FONT);
-               if (font_desc) {
-                       if (bold_style->font_desc)
-                               pango_font_description_free
-                                       (bold_style->font_desc);
-                       bold_style->font_desc = font_desc;
-               }
+               pango_font_description_set_weight
+                       (bold_style->font_desc, PANGO_WEIGHT_BOLD);
                bold_marked_style = gtk_style_copy(bold_style);
                bold_marked_style->fg[GTK_STATE_NORMAL] =
                        summaryview->color_marked;
                bold_marked_style = gtk_style_copy(bold_style);
                bold_marked_style->fg[GTK_STATE_NORMAL] =
                        summaryview->color_marked;
@@ -681,11 +654,14 @@ void summary_init(SummaryView *summaryview)
                        summaryview->color_dim;
        }
 
                        summaryview->color_dim;
        }
 
-       style = gtk_style_copy(gtk_widget_get_style
-                               (summaryview->statlabel_folder));
-       gtk_widget_set_style(summaryview->statlabel_folder, style);
-       gtk_widget_set_style(summaryview->statlabel_select, style);
-       gtk_widget_set_style(summaryview->statlabel_msgs, style);
+       font_desc = pango_font_description_new();
+       size = pango_font_description_get_size
+               (summaryview->statlabel_folder->style->font_desc);
+       pango_font_description_set_size(font_desc, size * PANGO_SCALE_SMALL);
+       gtk_widget_modify_font(summaryview->statlabel_folder, font_desc);
+       gtk_widget_modify_font(summaryview->statlabel_select, font_desc);
+       gtk_widget_modify_font(summaryview->statlabel_msgs, font_desc);
+       pango_font_description_free(font_desc);
 
        pixmap = stock_pixmap_widget(summaryview->hbox_l, STOCK_PIXMAP_DIR_OPEN);
        gtk_box_pack_start(GTK_BOX(summaryview->hbox_l), pixmap, FALSE, FALSE, 4);
 
        pixmap = stock_pixmap_widget(summaryview->hbox_l, STOCK_PIXMAP_DIR_OPEN);
        gtk_box_pack_start(GTK_BOX(summaryview->hbox_l), pixmap, FALSE, FALSE, 4);
index 8e3c0b165bd182716bc50b9cffd4ab61f7168193..a50dd104f7a633ec1f6687ef6d5a8ca01b63907b 100644 (file)
@@ -211,7 +211,6 @@ TextView *textview_create(void)
        GtkItemFactory *popupfactory;
        GtkWidget *popupmenu;
        gint n_entries;
        GtkItemFactory *popupfactory;
        GtkWidget *popupmenu;
        gint n_entries;
-       PangoFontDescription *font_desc = NULL;
 
        debug_print("Creating text view...\n");
        textview = g_new0(TextView, 1);
 
        debug_print("Creating text view...\n");
        textview = g_new0(TextView, 1);
@@ -240,14 +239,6 @@ TextView *textview_create(void)
 
        gtk_widget_ensure_style(text);
 
 
        gtk_widget_ensure_style(text);
 
-       if (prefs_common.normalfont)
-               font_desc = pango_font_description_from_string
-                                       (prefs_common.normalfont);
-       if (font_desc) {
-               gtk_widget_modify_font(text, font_desc);
-       }
-       pango_font_description_free(font_desc);
-
        gtk_widget_ref(scrolledwin);
 
        gtk_container_add(GTK_CONTAINER(scrolledwin), text);
        gtk_widget_ref(scrolledwin);
 
        gtk_container_add(GTK_CONTAINER(scrolledwin), text);
@@ -298,19 +289,34 @@ TextView *textview_create(void)
 
 static void textview_create_tags(GtkTextView *text, TextView *textview)
 {
 
 static void textview_create_tags(GtkTextView *text, TextView *textview)
 {
-       GtkTextBuffer *buffer = gtk_text_view_get_buffer(text);
+       GtkTextBuffer *buffer;
        GtkTextTag *tag;
        GtkTextTag *tag;
+       static PangoFontDescription *font_desc, *bold_font_desc;
+
+       if (!font_desc)
+               font_desc = pango_font_description_from_string
+                       (NORMAL_FONT);
+
+       if (!bold_font_desc) {
+               bold_font_desc = pango_font_description_from_string
+                       (BOLD_FONT);
+               pango_font_description_set_weight
+                       (bold_font_desc, PANGO_WEIGHT_BOLD);
+       }
+
+       buffer = gtk_text_view_get_buffer(text);
 
        gtk_text_buffer_create_tag(buffer, "header",
                                   "pixels-above-lines", 0,
                                   "pixels-above-lines-set", TRUE,
                                   "pixels-below-lines", 0,
                                   "pixels-below-lines-set", TRUE,
 
        gtk_text_buffer_create_tag(buffer, "header",
                                   "pixels-above-lines", 0,
                                   "pixels-above-lines-set", TRUE,
                                   "pixels-below-lines", 0,
                                   "pixels-below-lines-set", TRUE,
+                                  "font-desc", font_desc,
                                   "left-margin", 0,
                                   "left-margin-set", TRUE,
                                   NULL);
        gtk_text_buffer_create_tag(buffer, "header_title",
                                   "left-margin", 0,
                                   "left-margin-set", TRUE,
                                   NULL);
        gtk_text_buffer_create_tag(buffer, "header_title",
-                                  "font", prefs_common.boldfont,
+                                  "font-desc", bold_font_desc,
                                   NULL);
        gtk_text_buffer_create_tag(buffer, "quote0",
                                   "foreground-gdk", &quote_colors[0],
                                   NULL);
        gtk_text_buffer_create_tag(buffer, "quote0",
                                   "foreground-gdk", &quote_colors[0],
@@ -1276,8 +1282,7 @@ void textview_set_font(TextView *textview, const gchar *codeset)
        if (prefs_common.textfont) {
                PangoFontDescription *font_desc = NULL;
 
        if (prefs_common.textfont) {
                PangoFontDescription *font_desc = NULL;
 
-               if (prefs_common.textfont)
-                       font_desc = pango_font_description_from_string
+               font_desc = pango_font_description_from_string
                                                (prefs_common.textfont);
                if (font_desc) {
                        gtk_widget_modify_font(textview->text, font_desc);
                                                (prefs_common.textfont);
                if (font_desc) {
                        gtk_widget_modify_font(textview->text, font_desc);