2006-01-18 [paul] 1.9.100cvs168
authorPaul Mangan <paul@claws-mail.org>
Wed, 18 Jan 2006 13:22:59 +0000 (13:22 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 18 Jan 2006 13:22:59 +0000 (13:22 +0000)
* src/compose.c
give widget yellow background was To is
set via folder prefs
* src/gtk/quicksearch.c
give widget yellow background when quick
search is active.
Thanks to Colin

ChangeLog
PATCHSETS
configure.ac
src/compose.c
src/gtk/quicksearch.c

index cb0a5561e256c9096338e7d8dafc93485dcc11f7..8557c6b0dc93f8b7b14c851e51288e43df736554 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-01-18 [paul]      1.9.100cvs168
+
+       * src/compose.c
+               give widget yellow background was To is
+               set via folder prefs
+       * src/gtk/quicksearch.c
+               give widget yellow background when quick
+               search is active.
+               Thanks to Colin
+
 2006-01-18 [paul]      1.9.100cvs167
 
        * doc/man/sylpheed-claws.1
index 68c32fc9d20d5410d850df42b0f93a723933e7eb..92525358f9243f56b3dce633e0a68dfaa05f3aab 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.158 -r 1.395.2.159 src/summaryview.c;  ) > 1.9.100cvs165.patchset
 ( cvs diff -u -r 1.3.2.5 -r 1.3.2.6 tools/kdeservicemenu/template_sylpheed-attach-files.desktop;  cvs diff -u -r 1.3.2.5 -r 1.3.2.6 tools/kdeservicemenu/template_sylpheed-compress-attach.desktop;  ) > 1.9.100cvs166.patchset
 ( cvs diff -u -r 1.1.2.1 -r 1.1.2.2 doc/man/sylpheed-claws.1;  ) > 1.9.100cvs167.patchset
+( cvs diff -u -r 1.382.2.226 -r 1.382.2.227 src/compose.c;  cvs diff -u -r 1.1.2.30 -r 1.1.2.31 src/gtk/quicksearch.c;  ) > 1.9.100cvs168.patchset
index 89509df128ca2ed30574da1fa1492f219bd0d7a7..2a62fdb56b98e87af12ded9a39742f18dbd50c40 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=167
+EXTRA_VERSION=168
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 59df6f04ab8b3dcc8811672edf6ae5d2074a9707..823e8f8d5608e6b85dc920d69739f59d326242fd 100644 (file)
@@ -1822,26 +1822,26 @@ void compose_entry_append(Compose *compose, const gchar *address,
 
 void compose_entry_mark_default_to(Compose *compose, const gchar *mailto)
 {
-       static GtkStyle *bold_style = NULL;
-       static GdkColor bold_color;
+       static GdkColor yellow;
+       static gboolean yellow_initialised = FALSE;
        GSList *h_list;
        GtkEntry *entry;
                
+       if (!yellow_initialised) {
+               gdk_color_parse("#f5f6be", &yellow);
+               yellow_initialised = gdk_colormap_alloc_color(
+                       gdk_colormap_get_system(), &yellow, FALSE, TRUE);
+               
+       }
+
        for (h_list = compose->header_list; h_list != NULL; h_list = h_list->next) {
                entry = GTK_ENTRY(((ComposeHeaderEntry *)h_list->data)->entry);
                if (gtk_entry_get_text(entry) && 
                    !g_utf8_collate(gtk_entry_get_text(entry), mailto)) {
-                       gtk_widget_ensure_style(GTK_WIDGET(entry));
-                       if (!bold_style) {
-                               gtkut_convert_int_to_gdk_color
-                                       (prefs_common.color_new, &bold_color);
-                               bold_style = gtk_style_copy(gtk_widget_get_style
-                                       (GTK_WIDGET(entry)));
-                               pango_font_description_set_weight
-                                       (bold_style->font_desc, PANGO_WEIGHT_BOLD);
-                               bold_style->fg[GTK_STATE_NORMAL] = bold_color;
-                       }
-                       gtk_widget_set_style(GTK_WIDGET(entry), bold_style);
+                       if (yellow_initialised)
+                               gtk_widget_modify_base(
+                                       GTK_WIDGET(((ComposeHeaderEntry *)h_list->data)->entry),
+                                       GTK_STATE_NORMAL, &yellow);
                }
        }
 }
index 08e06ef4224b569098f78958ce9766376a4f1f0b..4c3b8a35248039613bba6eb43ffb06e945ebb7bd 100644 (file)
@@ -47,6 +47,7 @@ struct _QuickSearch
        GtkWidget                       *search_string_entry;
        GtkWidget                       *search_condition_expression;
        GtkWidget                       *search_description;
+       GtkWidget                       *clear_search;
 
        gboolean                         active;
        gchar                           *search_string;
@@ -478,7 +479,8 @@ QuickSearch *quicksearch_new()
        quicksearch->matcher_list = NULL;
        quicksearch->active = FALSE;
        quicksearch->running = FALSE;
-       
+       quicksearch->clear_search = clear_search;
+
        update_extended_buttons(quicksearch);
        
        return quicksearch;
@@ -529,7 +531,31 @@ gboolean quicksearch_is_active(QuickSearch *quicksearch)
 
 static void quicksearch_set_active(QuickSearch *quicksearch, gboolean active)
 {
+       static GdkColor yellow;
+       static gboolean yellow_initialised = FALSE;
+
+       if (!yellow_initialised) {
+               gdk_color_parse("#f5f6be", &yellow);
+               yellow_initialised = gdk_colormap_alloc_color(
+                       gdk_colormap_get_system(), &yellow, FALSE, TRUE);
+               
+       }
        quicksearch->active = active;
+
+       if (active) {
+               gtk_widget_set_sensitive(quicksearch->clear_search, TRUE);
+               if (yellow_initialised)
+                       gtk_widget_modify_base(
+                               GTK_COMBO(quicksearch->search_string_entry)->entry, 
+                               GTK_STATE_NORMAL, &yellow);
+       } else {
+               gtk_widget_set_sensitive(quicksearch->clear_search, FALSE);
+               if (yellow_initialised)
+                       gtk_widget_modify_base(
+                               GTK_COMBO(quicksearch->search_string_entry)->entry, 
+                               GTK_STATE_NORMAL, NULL);
+       }
+       
        if (!active) {
                quicksearch_reset_cur_folder_item(quicksearch);
        }