talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit be8b88373a34eedf28533ea10ba363c569f925ef
parent 058e26c035d7c7259f358755fa142077d7e06d83
Author: Colin Leroy <colin@colino.net>
Date:   Fri,  7 Oct 2011 10:13:42 +0000

2011-10-07 [colin]	3.7.10cvs23

	* src/compose.c
	* src/gtk/gtkshruler.c
	* src/gtk/gtkshruler.h
		Disable ruler starting from 2.24.

Diffstat:
MChangeLog | 7+++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/compose.c | 38+++++++++++++++++++-------------------
Msrc/gtk/gtkshruler.c | 3+++
Msrc/gtk/gtkshruler.h | 2++
6 files changed, 33 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,10 @@ +2011-10-07 [colin] 3.7.10cvs23 + + * src/compose.c + * src/gtk/gtkshruler.c + * src/gtk/gtkshruler.h + Disable ruler starting from 2.24. + 2011-10-07 [colin] 3.7.10cvs22 * configure.ac diff --git a/PATCHSETS b/PATCHSETS @@ -4226,3 +4226,4 @@ ( cvs diff -u -r 1.61.2.99 -r 1.61.2.100 src/account.c; cvs diff -u -r 1.12.2.67 -r 1.12.2.68 src/action.c; cvs diff -u -r 1.27.2.54 -r 1.27.2.55 src/addr_compl.c; cvs diff -u -r 1.1.2.9 -r 1.1.2.10 src/addrcustomattr.c; cvs diff -u -r 1.1.2.17 -r 1.1.2.18 src/addrduplicates.c; cvs diff -u -r 1.9.2.32 -r 1.9.2.33 src/addressadd.c; cvs diff -u -r 1.60.2.144 -r 1.60.2.145 src/addressbook.c; cvs diff -u -r 1.1.2.19 -r 1.1.2.20 src/addressbook_foldersel.c; cvs diff -u -r 1.5.10.33 -r 1.5.10.34 src/addrgather.c; cvs diff -u -r 1.17.2.44 -r 1.17.2.45 src/alertpanel.c; cvs diff -u -r 1.2.4.26 -r 1.2.4.27 src/browseldap.c; cvs diff -u -r 1.382.2.581 -r 1.382.2.582 src/compose.c; cvs diff -u -r 1.14.2.60 -r 1.14.2.61 src/editaddress.c; cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/editaddress_other_attributes_ldap.c; cvs diff -u -r 1.5.12.16 -r 1.5.12.17 src/editbook.c; cvs diff -u -r 1.11.2.26 -r 1.11.2.27 src/editgroup.c; cvs diff -u -r 1.5.12.18 -r 1.5.12.19 src/editjpilot.c; cvs diff -u -r 1.8.2.40 -r 1.8.2.41 src/editldap.c; cvs diff -u -r 1.10.2.18 -r 1.10.2.19 src/editldap_basedn.c; cvs diff -u -r 1.1.2.25 -r 1.1.2.26 src/edittags.c; cvs diff -u -r 1.5.12.17 -r 1.5.12.18 src/editvcard.c; cvs diff -u -r 1.3.2.28 -r 1.3.2.29 src/exphtmldlg.c; cvs diff -u -r 1.1.4.33 -r 1.1.4.34 src/expldifdlg.c; cvs diff -u -r 1.8.2.31 -r 1.8.2.32 src/export.c; cvs diff -u -r 1.26.2.46 -r 1.26.2.47 src/foldersel.c; cvs diff -u -r 1.207.2.221 -r 1.207.2.222 src/folderview.c; cvs diff -u -r 1.14.2.29 -r 1.14.2.30 src/grouplistdialog.c; cvs diff -u -r 1.13.2.30 -r 1.13.2.31 src/import.c; cvs diff -u -r 1.14.2.26 -r 1.14.2.27 src/importldif.c; cvs diff -u -r 1.4.12.22 -r 1.4.12.23 src/importmutt.c; cvs diff -u -r 1.1.14.22 -r 1.1.14.23 src/importpine.c; cvs diff -u -r 1.274.2.329 -r 1.274.2.330 src/mainwindow.c; cvs diff -u -r 1.3.12.39 -r 1.3.12.40 src/message_search.c; cvs diff -u -r 1.94.2.218 -r 1.94.2.219 src/messageview.c; cvs diff -u -r 1.83.2.171 -r 1.83.2.172 src/mimeview.c; cvs diff -u -r 1.60.2.73 -r 1.60.2.74 src/prefs_actions.c; cvs diff -u -r 1.16.2.41 -r 1.16.2.42 src/prefs_customheader.c; cvs diff -u -r 1.16.2.43 -r 1.16.2.44 src/prefs_display_header.c; cvs diff -u -r 1.59.2.82 -r 1.59.2.83 src/prefs_filtering.c; cvs diff -u -r 1.1.4.70 -r 1.1.4.71 src/prefs_filtering_action.c; cvs diff -u -r 1.1.2.19 -r 1.1.2.20 src/prefs_folder_column.c; cvs diff -u -r 1.43.2.89 -r 1.43.2.90 src/prefs_matcher.c; cvs diff -u -r 1.1.2.43 -r 1.1.2.44 src/prefs_msg_colors.c; cvs diff -u -r 1.1.2.41 -r 1.1.2.42 src/prefs_other.c; cvs diff -u -r 1.1.2.66 -r 1.1.2.67 src/prefs_summaries.c; cvs diff -u -r 1.10.2.28 -r 1.10.2.29 src/prefs_summary_column.c; cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/prefs_summary_open.c; cvs diff -u -r 1.12.2.75 -r 1.12.2.76 src/prefs_template.c; cvs diff -u -r 1.30.2.68 -r 1.30.2.69 src/prefs_toolbar.c; cvs diff -u -r 1.1.2.32 -r 1.1.2.33 src/printing.c; cvs diff -u -r 1.9.2.26 -r 1.9.2.27 src/sourcewindow.c; cvs diff -u -r 1.3.2.35 -r 1.3.2.36 src/ssl_manager.c; cvs diff -u -r 1.15.2.65 -r 1.15.2.66 src/summary_search.c; cvs diff -u -r 1.395.2.431 -r 1.395.2.432 src/summaryview.c; cvs diff -u -r 1.96.2.233 -r 1.96.2.234 src/textview.c; cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/uri_opener.c; cvs diff -u -r 1.4.2.80 -r 1.4.2.81 src/gtk/about.c; cvs diff -u -r 1.1.4.16 -r 1.1.4.17 src/gtk/colorsel.c; cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/gtk/combobox.c; cvs diff -u -r 1.5.2.31 -r 1.5.2.32 src/gtk/description_window.c; cvs diff -u -r 1.1.2.21 -r 1.1.2.22 src/gtk/foldersort.c; cvs diff -u -r 1.9.2.72 -r 1.9.2.73 src/gtk/gtkaspell.c; cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/gtk/gtkcmclist.c; cvs diff -u -r 1.1.2.18 -r 1.1.2.19 src/gtk/gtkcmctree.c; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/gtk/gtkcmoptionmenu.c; cvs diff -u -r 1.5.2.96 -r 1.5.2.97 src/gtk/gtkutils.c; cvs diff -u -r 1.1.2.19 -r 1.1.2.20 src/gtk/icon_legend.c; cvs diff -u -r 1.2.2.43 -r 1.2.2.44 src/gtk/inputdialog.c; cvs diff -u -r 1.1.4.38 -r 1.1.4.39 src/gtk/logwindow.c; cvs diff -u -r 1.5.2.59 -r 1.5.2.60 src/gtk/pluginwindow.c; cvs diff -u -r 1.12.2.57 -r 1.12.2.58 src/gtk/prefswindow.c; cvs diff -u -r 1.1.2.103 -r 1.1.2.104 src/gtk/quicksearch.c; cvs diff -u -r 1.1.2.35 -r 1.1.2.36 src/plugins/pgpcore/passphrase.c; cvs diff -u -r 1.1.2.29 -r 1.1.2.30 src/plugins/pgpcore/select-keys.c; ) > 3.7.10cvs20.patchset ( cvs diff -u -r 1.654.2.4301 -r 1.654.2.4302 configure.ac; cvs diff -u -r 1.12.2.68 -r 1.12.2.69 src/action.c; cvs diff -u -r 1.27.2.55 -r 1.27.2.56 src/addr_compl.c; cvs diff -u -r 1.5.10.34 -r 1.5.10.35 src/addrgather.c; cvs diff -u -r 1.382.2.582 -r 1.382.2.583 src/compose.c; cvs diff -u -r 1.50.2.62 -r 1.50.2.63 src/compose.h; cvs diff -u -r 1.8.2.41 -r 1.8.2.42 src/editldap.c; cvs diff -u -r 1.274.2.330 -r 1.274.2.331 src/mainwindow.c; cvs diff -u -r 1.3.12.40 -r 1.3.12.41 src/message_search.c; cvs diff -u -r 1.83.2.172 -r 1.83.2.173 src/mimeview.c; cvs diff -u -r 1.20.2.32 -r 1.20.2.33 src/mimeview.h; cvs diff -u -r 1.105.2.168 -r 1.105.2.169 src/prefs_account.c; cvs diff -u -r 1.1.2.30 -r 1.1.2.31 src/prefs_compose_writing.c; cvs diff -u -r 1.1.4.71 -r 1.1.4.72 src/prefs_filtering_action.c; cvs diff -u -r 1.52.2.83 -r 1.52.2.84 src/prefs_folder_item.c; cvs diff -u -r 1.1.2.19 -r 1.1.2.20 src/prefs_logging.c; cvs diff -u -r 1.43.2.90 -r 1.43.2.91 src/prefs_matcher.c; cvs diff -u -r 1.1.2.33 -r 1.1.2.34 src/prefs_message.c; cvs diff -u -r 1.1.2.42 -r 1.1.2.43 src/prefs_other.c; cvs diff -u -r 1.1.2.28 -r 1.1.2.29 src/prefs_receive.c; cvs diff -u -r 1.1.2.67 -r 1.1.2.68 src/prefs_summaries.c; cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/prefs_wrapping.c; cvs diff -u -r 1.1.2.33 -r 1.1.2.34 src/printing.c; cvs diff -u -r 1.3.2.36 -r 1.3.2.37 src/ssl_manager.c; cvs diff -u -r 1.5.2.29 -r 1.5.2.30 src/statusbar.c; cvs diff -u -r 1.25.2.69 -r 1.25.2.70 src/stock_pixmap.c; cvs diff -u -r 1.15.2.66 -r 1.15.2.67 src/summary_search.c; cvs diff -u -r 1.96.2.234 -r 1.96.2.235 src/textview.c; cvs diff -u -r 1.20.2.24 -r 1.20.2.25 src/gtk/Makefile.am; cvs diff -u -r 1.2.2.34 -r 1.2.2.35 src/gtk/colorlabel.c; cvs diff -u -r 1.5.2.97 -r 1.5.2.98 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.57 -r 1.4.2.58 src/gtk/gtkutils.h; cvs diff -u -r 1.1.4.39 -r 1.1.4.40 src/gtk/logwindow.c; cvs diff -u -r 1.5.2.43 -r 1.5.2.44 src/gtk/menu.c; cvs diff -u -r 1.4.2.24 -r 1.4.2.25 src/gtk/menu.h; cvs diff -u -r 1.1.2.104 -r 1.1.2.105 src/gtk/quicksearch.c; cvs diff -u -r 1.1.2.11 -r 1.1.2.12 src/gtk/spell_entry.c; cvs diff -u -r 1.1.2.38 -r 1.1.2.39 src/plugins/bogofilter/bogofilter_gtk.c; cvs diff -u -r 1.12.2.29 -r 1.12.2.30 src/plugins/dillo_viewer/dillo_viewer.c; cvs diff -u -r 1.1.2.34 -r 1.1.2.35 src/plugins/pgpcore/prefs_gpg.c; cvs diff -u -r 1.23.2.55 -r 1.23.2.56 src/plugins/spamassassin/spamassassin_gtk.c; ) > 3.7.10cvs21.patchset ( cvs diff -u -r 1.654.2.4302 -r 1.654.2.4303 configure.ac; cvs diff -u -r 1.94.2.219 -r 1.94.2.220 src/messageview.c; cvs diff -u -r 1.20.2.25 -r 1.20.2.26 src/gtk/Makefile.am; ) > 3.7.10cvs22.patchset +( cvs diff -u -r 1.382.2.583 -r 1.382.2.584 src/compose.c; cvs diff -u -r 1.1.4.16 -r 1.1.4.17 src/gtk/gtkshruler.c; cvs diff -u -r 1.1.4.9 -r 1.1.4.10 src/gtk/gtkshruler.h; ) > 3.7.10cvs23.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=10 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=22 +EXTRA_VERSION=23 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/compose.c b/src/compose.c @@ -86,7 +86,7 @@ #include "socket.h" #include "alertpanel.h" #include "manage_window.h" -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) #include "gtkshruler.h" #endif #include "folder.h" @@ -353,7 +353,7 @@ static void compose_add_field_list ( Compose *compose, /* callback functions */ -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) static gboolean compose_edit_size_alloc (GtkEditable *widget, GtkAllocation *allocation, GtkSHRuler *shruler); @@ -441,7 +441,7 @@ static void compose_toggle_autowrap_cb (GtkToggleAction *action, static void compose_toggle_autoindent_cb(GtkToggleAction *action, gpointer data); -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) static void compose_toggle_ruler_cb (GtkToggleAction *action, gpointer data); #endif @@ -674,7 +674,7 @@ static GtkToggleActionEntry compose_toggle_entries[] = {"Options/Encrypt", NULL, N_("_Encrypt"), NULL, NULL, G_CALLBACK(compose_toggle_encrypt_cb) }, /* Toggle */ {"Options/RequestRetRcpt", NULL, N_("_Request Return Receipt"), NULL, NULL, G_CALLBACK(compose_toggle_return_receipt_cb) }, /* TOGGLE */ {"Options/RemoveReferences", NULL, N_("Remo_ve references"), NULL, NULL, G_CALLBACK(compose_toggle_remove_refs_cb) }, /* TOGGLE */ -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) {"Tools/ShowRuler", NULL, N_("Show _ruler"), NULL, NULL, G_CALLBACK(compose_toggle_ruler_cb) }, /* Toggle */ #endif }; @@ -794,7 +794,7 @@ static void compose_create_tags(GtkTextView *text, Compose *compose) { GtkTextBuffer *buffer; GdkColor black = {(gulong)0, (gushort)0, (gushort)0, (gushort)0}; -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) GdkColormap *cmap; gboolean success[8]; #endif @@ -869,7 +869,7 @@ static void compose_create_tags(GtkTextView *text, Compose *compose) color[5] = quote_bgcolor3; color[6] = signature_color; color[7] = uri_color; -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) cmap = gdk_drawable_get_colormap(gtk_widget_get_window(compose->window)); gdk_colormap_alloc_colors(cmap, color, 8, FALSE, TRUE, success); @@ -2436,7 +2436,7 @@ Compose *compose_redirect(PrefsAccount *account, MsgInfo *msginfo, cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Message/InsertSig", FALSE); cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Edit", FALSE); cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Options", FALSE); -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Tools/ShowRuler", FALSE); #endif cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Tools/Actions", FALSE); @@ -2547,7 +2547,7 @@ void compose_entry_append(Compose *compose, const gchar *address, static void compose_entry_mark_default_to(Compose *compose, const gchar *mailto) { -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) static GdkColor yellow; static GdkColor black; static gboolean yellow_initialised = FALSE; @@ -2558,7 +2558,7 @@ static void compose_entry_mark_default_to(Compose *compose, const gchar *mailto) GSList *h_list; GtkEntry *entry; -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) if (!yellow_initialised) { gdk_color_parse("#f5f6be", &yellow); gdk_color_parse("#000000", &black); @@ -2573,7 +2573,7 @@ static void compose_entry_mark_default_to(Compose *compose, const gchar *mailto) entry = GTK_ENTRY(((ComposeHeaderEntry *)h_list->data)->entry); if (gtk_entry_get_text(entry) && !g_utf8_collate(gtk_entry_get_text(entry), mailto)) { -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) if (yellow_initialised) { #endif gtk_widget_modify_base( @@ -2582,7 +2582,7 @@ static void compose_entry_mark_default_to(Compose *compose, const gchar *mailto) gtk_widget_modify_text( GTK_WIDGET(((ComposeHeaderEntry *)h_list->data)->entry), GTK_STATE_NORMAL, &black); -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) } #endif } @@ -7084,7 +7084,7 @@ static Compose *compose_create(PrefsAccount *account, GtkWidget *paned; GtkWidget *edit_vbox; -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) GtkWidget *ruler_hbox; GtkWidget *ruler; #endif @@ -7343,7 +7343,7 @@ static Compose *compose_create(PrefsAccount *account, /* phew. */ /* Tools menu */ -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Tools", "ShowRuler", "Tools/ShowRuler", GTK_UI_MANAGER_MENUITEM) #endif MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Tools", "AddressBook", "Tools/AddressBook", GTK_UI_MANAGER_MENUITEM) @@ -7447,7 +7447,7 @@ static Compose *compose_create(PrefsAccount *account, gtk_box_pack_start(GTK_BOX(edit_vbox), subject_hbox, FALSE, FALSE, 0); -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) /* ruler */ ruler_hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(edit_vbox), ruler_hbox, FALSE, FALSE, 0); @@ -7480,7 +7480,7 @@ static Compose *compose_create(PrefsAccount *account, gtk_text_buffer_add_selection_clipboard(buffer, clipboard); gtk_container_add(GTK_CONTAINER(scrolledwin), text); -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) g_signal_connect_after(G_OBJECT(text), "size_allocate", G_CALLBACK(compose_edit_size_alloc), ruler); @@ -7578,7 +7578,7 @@ static Compose *compose_create(PrefsAccount *account, compose->notebook = notebook; compose->edit_vbox = edit_vbox; -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) compose->ruler_hbox = ruler_hbox; compose->ruler = ruler; #endif @@ -7700,7 +7700,7 @@ static Compose *compose_create(PrefsAccount *account, compose_list = g_list_append(compose_list, compose); -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) if (!prefs_common.show_ruler) gtk_widget_hide(ruler_hbox); @@ -9149,7 +9149,7 @@ static void compose_undo_state_changed(UndoMain *undostruct, gint undo_state, * includes "non-client" (windows-izm) in calculation, so this calculation * may not be accurate. */ -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) static gboolean compose_edit_size_alloc(GtkEditable *widget, GtkAllocation *allocation, GtkSHRuler *shruler) @@ -10593,7 +10593,7 @@ static void activate_privacy_system(Compose *compose, PrefsAccount *account, gbo compose_update_privacy_system_menu_item(compose, warn); } -#if !GTK_CHECK_VERSION(3, 0, 0) +#if !GTK_CHECK_VERSION(2, 24, 0) static void compose_toggle_ruler_cb(GtkToggleAction *action, gpointer data) { Compose *compose = (Compose *)data; diff --git a/src/gtk/gtkshruler.c b/src/gtk/gtkshruler.c @@ -34,6 +34,8 @@ #include "utils.h" #include "gtkutils.h" +#if !GTK_CHECK_VERSION(2,24,0) + #define RULER_HEIGHT 14 #define MINIMUM_INCR 5 #define MAXIMUM_SUBDIVIDE 5 @@ -179,3 +181,4 @@ gtk_shruler_draw_ticks(GtkRuler *ruler) cairo_destroy(cr); } +#endif diff --git a/src/gtk/gtkshruler.h b/src/gtk/gtkshruler.h @@ -22,6 +22,7 @@ #include <gdk/gdk.h> #include <gtk/gtk.h> +#if !GTK_CHECK_VERSION(2,24,0) #ifdef __cplusplus extern "C" { @@ -56,3 +57,4 @@ GtkWidget* gtk_shruler_new (void); #endif /* __GTK_SHRULER_H__ */ +#endif