From c6976ebc4b575fb5052b6f45c24e97b6d234ea6b Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Wed, 18 Jan 2006 13:22:59 +0000 Subject: [PATCH] 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 --- ChangeLog | 10 ++++++++++ PATCHSETS | 1 + configure.ac | 2 +- src/compose.c | 26 +++++++++++++------------- src/gtk/quicksearch.c | 28 +++++++++++++++++++++++++++- 5 files changed, 52 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb0a5561e..8557c6b0d 100644 --- 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 diff --git a/PATCHSETS b/PATCHSETS index 68c32fc9d..92525358f 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1151,3 +1151,4 @@ ( 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 diff --git a/configure.ac b/configure.ac index 89509df12..2a62fdb56 100644 --- a/configure.ac +++ b/configure.ac @@ -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= diff --git a/src/compose.c b/src/compose.c index 59df6f04a..823e8f8d5 100644 --- a/src/compose.c +++ b/src/compose.c @@ -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); } } } diff --git a/src/gtk/quicksearch.c b/src/gtk/quicksearch.c index 08e06ef42..4c3b8a352 100644 --- a/src/gtk/quicksearch.c +++ b/src/gtk/quicksearch.c @@ -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); } -- 2.25.1