2008-07-19 [colin] 3.5.0cvs25
authorColin Leroy <colin@colino.net>
Sat, 19 Jul 2008 14:02:31 +0000 (14:02 +0000)
committerColin Leroy <colin@colino.net>
Sat, 19 Jul 2008 14:02:31 +0000 (14:02 +0000)
* src/account.c
* src/addrgather.c
* src/compose.c
* src/editldap.c
* src/expldifdlg.c
* src/importldif.c
* src/main.c
* src/mainwindow.c
* src/mimeview.c
* src/noticeview.c
* src/prefs_account.c
* src/prefs_actions.c
* src/prefs_ext_prog.c
* src/prefs_filtering.c
* src/prefs_folder_item.c
* src/prefs_image_viewer.c
* src/prefs_logging.c
* src/prefs_msg_colors.c
* src/prefs_other.c
* src/prefs_send.c
* src/prefs_spelling.c
* src/prefs_summaries.c
* src/prefs_template.c
* src/printing.c
* src/quote_fmt.c
* src/summary_search.c
* src/summaryview.c
* src/toolbar.c
* src/wizard.c
* src/common/Makefile.am
* src/gtk/gtksctree.c
* src/gtk/gtkutils.h
* src/gtk/pluginwindow.c
* src/gtk/quicksearch.c
* src/plugins/bogofilter/bogofilter_gtk.c
* src/plugins/dillo_viewer/dillo_prefs.c
* src/plugins/pgpcore/prefs_gpg.c
* src/plugins/spamassassin/spamassassin_gtk.c
* src/plugins/trayicon/trayicon.c
* src/plugins/trayicon/trayicon_prefs.c
Use the shiny new GTK tooltips API when possible (GTK+ 2.12
or greater). Use the old deprecated one on GTK+ < 2.12.
Easy! Straightforward! I'm not annoyed at all! It's not a loss
of time!

43 files changed:
ChangeLog
PATCHSETS
configure.ac
src/account.c
src/addrgather.c
src/common/Makefile.am
src/compose.c
src/editldap.c
src/expldifdlg.c
src/gtk/gtksctree.c
src/gtk/gtkutils.h
src/gtk/pluginwindow.c
src/gtk/quicksearch.c
src/importldif.c
src/main.c
src/mainwindow.c
src/mimeview.c
src/noticeview.c
src/plugins/bogofilter/bogofilter_gtk.c
src/plugins/dillo_viewer/dillo_prefs.c
src/plugins/pgpcore/prefs_gpg.c
src/plugins/spamassassin/spamassassin_gtk.c
src/plugins/trayicon/trayicon.c
src/plugins/trayicon/trayicon_prefs.c
src/prefs_account.c
src/prefs_actions.c
src/prefs_ext_prog.c
src/prefs_filtering.c
src/prefs_folder_item.c
src/prefs_image_viewer.c
src/prefs_logging.c
src/prefs_msg_colors.c
src/prefs_other.c
src/prefs_send.c
src/prefs_spelling.c
src/prefs_summaries.c
src/prefs_template.c
src/printing.c
src/quote_fmt.c
src/summary_search.c
src/summaryview.c
src/toolbar.c
src/wizard.c

index 18913a9..f641c46 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,50 @@
+2008-07-19 [colin]     3.5.0cvs25
+
+       * src/account.c
+       * src/addrgather.c
+       * src/compose.c
+       * src/editldap.c
+       * src/expldifdlg.c
+       * src/importldif.c
+       * src/main.c
+       * src/mainwindow.c
+       * src/mimeview.c
+       * src/noticeview.c
+       * src/prefs_account.c
+       * src/prefs_actions.c
+       * src/prefs_ext_prog.c
+       * src/prefs_filtering.c
+       * src/prefs_folder_item.c
+       * src/prefs_image_viewer.c
+       * src/prefs_logging.c
+       * src/prefs_msg_colors.c
+       * src/prefs_other.c
+       * src/prefs_send.c
+       * src/prefs_spelling.c
+       * src/prefs_summaries.c
+       * src/prefs_template.c
+       * src/printing.c
+       * src/quote_fmt.c
+       * src/summary_search.c
+       * src/summaryview.c
+       * src/toolbar.c
+       * src/wizard.c
+       * src/common/Makefile.am
+       * src/gtk/gtksctree.c
+       * src/gtk/gtkutils.h
+       * src/gtk/pluginwindow.c
+       * src/gtk/quicksearch.c
+       * src/plugins/bogofilter/bogofilter_gtk.c
+       * src/plugins/dillo_viewer/dillo_prefs.c
+       * src/plugins/pgpcore/prefs_gpg.c
+       * src/plugins/spamassassin/spamassassin_gtk.c
+       * src/plugins/trayicon/trayicon.c
+       * src/plugins/trayicon/trayicon_prefs.c
+               Use the shiny new GTK tooltips API when possible (GTK+ 2.12 
+               or greater). Use the old deprecated one on GTK+ < 2.12.
+               Easy! Straightforward! I'm not annoyed at all! It's not a loss
+               of time!
+
 2008-07-16 [colin]     3.5.0cvs24
 
        * src/mainwindow.c
index 39bd9fb..03f3928 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.207.2.201 -r 1.207.2.202 src/folderview.c;  cvs diff -u -r 1.395.2.372 -r 1.395.2.373 src/summaryview.c;  ) > 3.5.0cvs22.patchset
 ( cvs diff -u -r 1.382.2.455 -r 1.382.2.456 src/compose.c;  ) > 3.5.0cvs23.patchset
 ( cvs diff -u -r 1.274.2.252 -r 1.274.2.253 src/mainwindow.c;  ) > 3.5.0cvs24.patchset
+( cvs diff -u -r 1.61.2.79 -r 1.61.2.80 src/account.c;  cvs diff -u -r 1.5.10.21 -r 1.5.10.22 src/addrgather.c;  cvs diff -u -r 1.382.2.456 -r 1.382.2.457 src/compose.c;  cvs diff -u -r 1.8.2.30 -r 1.8.2.31 src/editldap.c;  cvs diff -u -r 1.1.4.28 -r 1.1.4.29 src/expldifdlg.c;  cvs diff -u -r 1.14.2.17 -r 1.14.2.18 src/importldif.c;  cvs diff -u -r 1.115.2.198 -r 1.115.2.199 src/main.c;  cvs diff -u -r 1.274.2.253 -r 1.274.2.254 src/mainwindow.c;  cvs diff -u -r 1.83.2.133 -r 1.83.2.134 src/mimeview.c;  cvs diff -u -r 1.5.2.17 -r 1.5.2.18 src/noticeview.c;  cvs diff -u -r 1.105.2.137 -r 1.105.2.138 src/prefs_account.c;  cvs diff -u -r 1.60.2.58 -r 1.60.2.59 src/prefs_actions.c;  cvs diff -u -r 1.3.2.19 -r 1.3.2.20 src/prefs_ext_prog.c;  cvs diff -u -r 1.59.2.69 -r 1.59.2.70 src/prefs_filtering.c;  cvs diff -u -r 1.52.2.64 -r 1.52.2.65 src/prefs_folder_item.c;  cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/prefs_image_viewer.c;  cvs diff -u -r 1.1.2.13 -r 1.1.2.14 src/prefs_logging.c;  cvs diff -u -r 1.1.2.36 -r 1.1.2.37 src/prefs_msg_colors.c;  cvs diff -u -r 1.1.2.29 -r 1.1.2.30 src/prefs_other.c;  cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/prefs_send.c;  cvs diff -u -r 1.5.2.35 -r 1.5.2.36 src/prefs_spelling.c;  cvs diff -u -r 1.1.2.55 -r 1.1.2.56 src/prefs_summaries.c;  cvs diff -u -r 1.12.2.63 -r 1.12.2.64 src/prefs_template.c;  cvs diff -u -r 1.1.2.13 -r 1.1.2.14 src/printing.c;  cvs diff -u -r 1.8.2.35 -r 1.8.2.36 src/quote_fmt.c;  cvs diff -u -r 1.15.2.53 -r 1.15.2.54 src/summary_search.c;  cvs diff -u -r 1.395.2.373 -r 1.395.2.374 src/summaryview.c;  cvs diff -u -r 1.43.2.101 -r 1.43.2.102 src/toolbar.c;  cvs diff -u -r 1.1.2.70 -r 1.1.2.71 src/wizard.c;  cvs diff -u -r 1.24.2.16 -r 1.24.2.17 src/common/Makefile.am;  cvs diff -u -r 1.1.4.45 -r 1.1.4.46 src/gtk/gtksctree.c;  cvs diff -u -r 1.4.2.40 -r 1.4.2.41 src/gtk/gtkutils.h;  cvs diff -u -r 1.5.2.51 -r 1.5.2.52 src/gtk/pluginwindow.c;  cvs diff -u -r 1.1.2.82 -r 1.1.2.83 src/gtk/quicksearch.c;  cvs diff -u -r 1.1.2.32 -r 1.1.2.33 src/plugins/bogofilter/bogofilter_gtk.c;  cvs diff -u -r 1.5.2.22 -r 1.5.2.23 src/plugins/dillo_viewer/dillo_prefs.c;  cvs diff -u -r 1.1.2.30 -r 1.1.2.31 src/plugins/pgpcore/prefs_gpg.c;  cvs diff -u -r 1.23.2.48 -r 1.23.2.49 src/plugins/spamassassin/spamassassin_gtk.c;  cvs diff -u -r 1.14.2.63 -r 1.14.2.64 src/plugins/trayicon/trayicon.c;  cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/plugins/trayicon/trayicon_prefs.c;  ) > 3.5.0cvs25.patchset
index a9758da..3d9463f 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=24
+EXTRA_VERSION=25
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 15a81e7..a6bf789 100644 (file)
@@ -1497,7 +1497,7 @@ static void account_create_list_view_columns(GtkWidget *list_view)
 {
        GtkTreeViewColumn *column;
        GtkCellRenderer *renderer;
-       GtkTooltips *tooltips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
 
        renderer = gtk_cell_renderer_toggle_new();
        g_object_set(renderer, 
@@ -1510,8 +1510,8 @@ static void account_create_list_view_columns(GtkWidget *list_view)
                 NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column);          
        gtk_tree_view_column_set_alignment (column, 0.5);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), column->button,
-                       _("'Get Mail' retrieves mail from the checked accounts"), NULL);
+       CLAWS_SET_TIP(column->button,
+                       _("'Get Mail' retrieves mail from the checked accounts"));
        g_signal_connect(G_OBJECT(renderer), "toggled",                      
                         G_CALLBACK(account_get_all_toggled),
                         list_view);
index 095c3d2..e1c1422 100644 (file)
@@ -329,9 +329,7 @@ static void addrgather_page_fields(gint pageNum, gchar *pageLbl)
        GtkWidget *checkRecurse;
        gint top;
        gint i;
-       GtkTooltips *tooltips;
-
-       tooltips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
 
        /* Container */
        vbox = gtk_vbox_new(FALSE, 6);
@@ -377,8 +375,8 @@ static void addrgather_page_fields(gint pageNum, gchar *pageLbl)
        label = gtk_label_new(_("Address book folder size:"));
        gtk_table_attach( GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0 );
        gtk_misc_set_alignment( GTK_MISC(label), 1.0, 0.5 );
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), label,
-                       _("Maximum amount of entries per folder within the newly created address book"), NULL);
+       CLAWS_SET_TIP(label,
+                       _("Maximum amount of entries per folder within the newly created address book"));
 
        hboxs = gtk_hbox_new(FALSE, 8);
        adjFolder = gtk_adjustment_new(DFL_FOLDER_SIZE, MIN_FOLDER_SIZE, G_MAXINT, 1, 10, 100);
@@ -387,8 +385,8 @@ static void addrgather_page_fields(gint pageNum, gchar *pageLbl)
        gtk_widget_set_size_request(spinbtnFolder, 100, -1);
        gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spinbtnFolder), TRUE);
        gtk_table_attach(GTK_TABLE(table), hboxs, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), spinbtnFolder,
-                       _("Maximum amount of entries per folder within the newly created address book"), NULL);
+       CLAWS_SET_TIP(spinbtnFolder,
+                       _("Maximum amount of entries per folder within the newly created address book"));
 
        /* Fourth row */
        top = 3;
index 508ba9d..d5b0175 100644 (file)
@@ -77,7 +77,8 @@ AM_CPPFLAGS = \
        $(OPENSSL_CFLAGS) \
        $(MAEMO_CFLAGS) \
        -DLOCALEDIR=\""$(localedir)"\" \
-       -DPLUGINDIR=\"$(PLUGINDIR)\" 
+       -DPLUGINDIR=\"$(PLUGINDIR)\" \
+       -DGTK_DISABLE_DEPRECATED
 
 libclawscommon_la_LIBADD = \
        $(GLIB_LIBS) \
index 28bffad..9db7041 100644 (file)
@@ -6257,6 +6257,9 @@ static void compose_create_header_entry(Compose *compose)
        const gchar *header = NULL;
        ComposeHeaderEntry *headerentry;
        gboolean standard_header = FALSE;
+#if !(GTK_CHECK_VERSION(2,12,0))
+       GtkTooltips *tips = compose->tooltips;
+#endif
        
        headerentry = g_new0(ComposeHeaderEntry, 1);
 
@@ -6306,8 +6309,8 @@ static void compose_create_header_entry(Compose *compose)
        /* Entry field */
        entry = gtk_entry_new(); 
        gtk_widget_show(entry);
-       gtk_tooltips_set_tip(compose->tooltips, entry,
-               _("Use <tab> to autocomplete from addressbook"), NULL);
+       CLAWS_SET_TIP(entry,
+               _("Use <tab> to autocomplete from addressbook"));
        gtk_table_attach(GTK_TABLE(compose->header_table), entry, 1, 2,
                        compose->header_nextrow, compose->header_nextrow+1,
                        GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
@@ -6740,6 +6743,7 @@ static Compose *compose_create(PrefsAccount *account,
        GtkWidget *text;
        GtkTextBuffer *buffer;
        GtkClipboard *clipboard;
+       CLAWS_TIP_DECL();
 
        UndoMain *undostruct;
 
@@ -6774,7 +6778,9 @@ static Compose *compose_create(PrefsAccount *account,
        compose->mutex = g_mutex_new();
        compose->set_cursor_pos = -1;
 
-       compose->tooltips = gtk_tooltips_new();
+#if !(GTK_CHECK_VERSION(2,12,0))
+       compose->tooltips = tips;
+#endif
 
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "compose");
 
@@ -7182,6 +7188,9 @@ static GtkWidget *compose_account_option_menu_create(Compose *compose)
        GtkListStore *menu;
        GtkTreeIter iter;
        GtkWidget *from_name = NULL;
+#if !(GTK_CHECK_VERSION(2,12,0))
+       GtkTooltips *tips = compose->tooltips;
+#endif
 
        gint num = 0, def_menu = 0;
        
@@ -7237,10 +7246,10 @@ static GtkWidget *compose_account_option_menu_create(Compose *compose)
        gtk_box_pack_start(GTK_BOX(hbox), optmenubox, FALSE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(hbox), from_name, TRUE, TRUE, 0);
        
-       gtk_tooltips_set_tip(compose->tooltips, optmenubox,
-               _("Account to use for this email"), NULL);
-       gtk_tooltips_set_tip(compose->tooltips, from_name,
-               _("Sender address to be used"), NULL);
+       CLAWS_SET_TIP(optmenubox,
+               _("Account to use for this email"));
+       CLAWS_SET_TIP(from_name,
+               _("Sender address to be used"));
 
        compose->from_name = from_name;
        
index c1c048e..c3178da 100644 (file)
@@ -410,7 +410,7 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        GtkWidget *entry_baseDN;
        GtkWidget *check_btn;
        GtkWidget *lookdn_btn;
-       GtkTooltips *toolTip;
+       CLAWS_TIP_DECL();
        gint top;
 
        vbox = gtk_vbox_new( FALSE, 8 );
@@ -439,10 +439,8 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), entry_name, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, entry_name, _( 
-               "A name that you wish to call the server." ),
-               NULL );
+       CLAWS_SET_TIP(entry_name, _( 
+               "A name that you wish to call the server." ));
 
        /* Next row */
        ++top;
@@ -454,14 +452,12 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), entry_server, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, entry_server, _( 
+       CLAWS_SET_TIP(entry_server, _( 
                "This is the hostname of the server. For example, " \
                "\"ldap.mydomain.com\" may be appropriate for the " \
                "\"mydomain.com\" organization. An IP address may also be " \
                "used. You may specify \"localhost\" if running an LDAP " \
-               "server on the same computer as Claws Mail." ),
-               NULL );
+               "server on the same computer as Claws Mail." ));
 
        /* Next row */
        ++top;
@@ -481,16 +477,14 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        enable_ssl_checkbtn = gtk_check_button_new_with_label(_("SSL"));
        SET_TOGGLE_SENSITIVITY_REVERSE(enable_tls_checkbtn, enable_ssl_checkbtn);
        SET_TOGGLE_SENSITIVITY_REVERSE(enable_ssl_checkbtn, enable_tls_checkbtn);
-       gtk_tooltips_set_tip( toolTip, enable_tls_checkbtn, _( 
+       CLAWS_SET_TIP(enable_tls_checkbtn, _( 
                "Enable secure connection to the LDAP server via TLS."
                "If connection fails, be sure to check the correct "
-               "configuration in ldap.conf (TLS_CACERTDIR and TLS_REQCERT fields)." ),
-               NULL );
-       gtk_tooltips_set_tip( toolTip, enable_ssl_checkbtn, _( 
+               "configuration in ldap.conf (TLS_CACERTDIR and TLS_REQCERT fields)." ));
+       CLAWS_SET_TIP(enable_ssl_checkbtn, _( 
                "Enable secure connection to the LDAP server via SSL."
                "If connection fails, be sure to check the correct "
-               "configuration in ldap.conf (TLS_CACERTDIR and TLS_REQCERT fields)." ),
-               NULL );
+               "configuration in ldap.conf (TLS_CACERTDIR and TLS_REQCERT fields)." ));
 
        gtk_box_pack_start (GTK_BOX (hbox_spin), enable_tls_checkbtn, TRUE, FALSE, 0);
        gtk_box_pack_start (GTK_BOX (hbox_spin), enable_ssl_checkbtn, TRUE, FALSE, 0);
@@ -499,19 +493,15 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), hbox_spin, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, spinbtn_port, _( 
+       CLAWS_SET_TIP(spinbtn_port, _( 
                "The port number that the server listens on. Port 389 is " \
-               "the default." ),
-               NULL );
+               "the default." ));
 
        check_btn = gtk_button_new_with_label( _(" Check Server "));
        gtk_table_attach(GTK_TABLE(table), check_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, check_btn, _( 
-               "Press this button to test the connection to the server." ),
-               NULL );
+       CLAWS_SET_TIP(check_btn, _( 
+               "Press this button to test the connection to the server." ));
 
        /* Next row */
        ++top;
@@ -523,24 +513,20 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), entry_baseDN, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, entry_baseDN, _( 
+       CLAWS_SET_TIP(entry_baseDN, _( 
                "This specifies the name of the directory to be searched " \
                "on the server. Examples include:\n" \
                "  dc=claws-mail,dc=org\n" \
                "  ou=people,dc=domainname,dc=com\n" \
                "  o=Organization Name,c=Country\n"
-               ),
-               NULL );
+               ));
 
        lookdn_btn = gtkut_get_browse_file_btn(_("_Browse"));
        gtk_table_attach(GTK_TABLE(table), lookdn_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, lookdn_btn, _( 
+       CLAWS_SET_TIP(lookdn_btn, _( 
                "Press this button to lookup the name of available " \
-               "directory names on the server." ),
-               NULL );
+               "directory names on the server." ));
 
        /* Signal handlers */
        g_signal_connect(G_OBJECT(check_btn), "clicked",
@@ -575,7 +561,7 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
        GtkWidget *check_dynsearch;
        GtkWidget *check_matchoption;
        GtkWidget *reset_btn;
-       GtkTooltips *toolTip;
+       CLAWS_TIP_DECL();
        gint top;
 
        vbox = gtk_vbox_new( FALSE, 8 );
@@ -604,21 +590,17 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), entry_criteria, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, entry_criteria, _( 
+       CLAWS_SET_TIP(entry_criteria, _( 
                "A list of LDAP attribute names that should be searched " \
-               "when attempting to find a name or address." ),
-               NULL );
+               "when attempting to find a name or address." ));
 
        reset_btn = gtk_button_new_with_label( _(" Defaults "));
        gtk_table_attach(GTK_TABLE(table), reset_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, reset_btn, _( 
+       CLAWS_SET_TIP(reset_btn, _( 
                "This resets the attribute names to a default value " \
                "that should find most names and addresses during a " \
-               "name or address search process." ),
-               NULL );
+               "name or address search process." ));
 
        /* Next row */
        ++top;
@@ -636,8 +618,7 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), hbox_spin, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, spinbtn_queryage, _( 
+       CLAWS_SET_TIP(spinbtn_queryage, _( 
                "This defines the maximum period of time (in seconds) that " \
                "an address search result is valid for address completion " \
                "purposes. Search results are stored in a cache until this " \
@@ -650,8 +631,7 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
                "servers. A larger value will reduce the search time for " \
                "subsequent searches. This is useful for servers that have " \
                "slow response times at the expense of more memory to cache " \
-               "results." ),
-               NULL );
+               "results." ));
 
        /* Next row */
        ++top;
@@ -660,11 +640,9 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), check_dynsearch, 1, 3, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, check_dynsearch, _( 
+       CLAWS_SET_TIP(check_dynsearch, _( 
                "Check this option to include this server for dynamic " \
-               "searches when using address completion." ),
-               NULL );
+               "searches when using address completion." ));
 
        /* Next row */
        ++top;
@@ -673,8 +651,7 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), check_matchoption, 1, 3, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, check_matchoption, _( 
+       CLAWS_SET_TIP(check_matchoption, _( 
                "Searches for names and addresses can be performed either " \
                "using \"begins-with\" or \"contains\" search term. Check " \
                "this option to perform a \"contains\" search; this type of " \
@@ -682,8 +659,7 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
                "performance reasons, address completion uses " \
                "\"begins-with\" for all searches against other address " \
                "interfaces." \
-               ),
-               NULL );
+               ));
 
        /* Signal handlers */
        g_signal_connect(G_OBJECT(reset_btn), "clicked",
@@ -709,7 +685,7 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
        GtkWidget *spinbtn_timeout;
        GtkObject *spinbtn_maxentry_adj;
        GtkWidget *spinbtn_maxentry;
-       GtkTooltips *toolTip;
+       CLAWS_TIP_DECL();
        gint top;
 
        vbox = gtk_vbox_new( FALSE, 8 );
@@ -738,13 +714,11 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
        gtk_table_attach(GTK_TABLE(table), entry_bindDN, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, entry_bindDN, _( 
+       CLAWS_SET_TIP(entry_bindDN, _( 
                "The LDAP user account name to be used to connect to the server. " \
                "This is usually only used for protected servers. This name " \
                "is typically formatted as: \"cn=user,dc=claws-mail,dc=org\". " \
-               "This is usually left empty when performing a search." ),
-               NULL );
+               "This is usually left empty when performing a search." ));
 
        /* Next row */
        ++top;
@@ -761,11 +735,9 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
                HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
 #endif
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, entry_bindPW, _( 
+       CLAWS_SET_TIP(entry_bindPW, _( 
                "The password to be used when connecting as the \"Bind DN\" " \
-               "user." ),
-               NULL );
+               "user." ));
 
        /* Next row */
        ++top;
@@ -782,9 +754,8 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
        gtk_table_attach(GTK_TABLE(table), hbox_spin, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, spinbtn_timeout, _( 
-               "The timeout period in seconds." ), NULL );
+       CLAWS_SET_TIP(spinbtn_timeout, _( 
+               "The timeout period in seconds." ));
 
        /* Next row */
        ++top;
@@ -801,11 +772,9 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
        gtk_table_attach(GTK_TABLE(table), hbox_spin, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, spinbtn_maxentry, _( 
+       CLAWS_SET_TIP(spinbtn_maxentry, _( 
                "The maximum number of entries that should be returned " \
-               "in the search result." ),
-               NULL );
+               "in the search result." ));
 
        /* Done */
        gtk_widget_show_all(vbox);
index fa9bf43..a675538 100644 (file)
@@ -468,7 +468,7 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
        GtkWidget *checkEMail;
        GtkListStore *store;
        GtkTreeIter iter;
-       GtkTooltips *toolTip;
+       CLAWS_TIP_DECL();
        gint top;
 
        vbox = gtk_vbox_new(FALSE, 8);
@@ -500,15 +500,12 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), entrySuffix, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip(
-               GTK_TOOLTIPS(toolTip), entrySuffix, _(
+       CLAWS_SET_TIP(entrySuffix, _(
                "The suffix is used to create a \"Distinguished Name\" " \
                "(or DN) for an LDAP entry. Examples include:\n" \
                "  dc=claws-mail,dc=org\n" \
                "  ou=people,dc=domainname,dc=com\n" \
-               "  o=Organization Name,c=Country\n"
-               ), NULL );
+               "  o=Organization Name,c=Country\n"));
 
        /* Second row */
        top++;
@@ -527,9 +524,7 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), optmenuRDN, 1, 2, top, (top + 1),
                GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip(
-               GTK_TOOLTIPS(toolTip), optmenuRDN, _(
+       CLAWS_SET_TIP(optmenuRDN, _(
                "The LDIF file contains several data records that " \
                "are usually loaded into an LDAP server. Each data " \
                "record in the LDIF file is uniquely identified by " \
@@ -537,8 +532,7 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
                "appended to the \"Relative Distinguished Name\" "\
                "(or RDN) to create the DN. Please select one of " \
                "the available RDN options that will be used to " \
-               "create the DN."
-               ), NULL );
+               "create the DN."));
        
        /* Third row*/
        top++;
@@ -555,16 +549,13 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), checkUseDN, 1, 2, top, (top + 1),
                GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip(
-               GTK_TOOLTIPS(toolTip), checkUseDN, _(
+       CLAWS_SET_TIP(checkUseDN, _(
                "The addressbook may contain entries that were " \
                "previously imported from an LDIF file. The " \
                "\"Distinguished Name\" (DN) user attribute, if " \
                "present in the address book data, may be used in " \
                "the exported LDIF file. The RDN selected above " \
-               "will be used if the DN user attribute is not found."
-               ), NULL );
+               "will be used if the DN user attribute is not found."));
 
        /* Fifth row */
        top++;
@@ -573,13 +564,10 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), checkEMail, 1, 2, top, (top + 1),
                GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip(
-               GTK_TOOLTIPS(toolTip), checkEMail, _(
+       CLAWS_SET_TIP(checkEMail, _(
                "An addressbook may contain entries without " \
                "Email Addresses. Check this option to ignore " \
-               "these records."
-               ), NULL );
+               "these records."));
 
 
        gtk_widget_show_all(vbox);
index c1aaa39..9d2da93 100644 (file)
@@ -3260,12 +3260,14 @@ void gtk_sctree_set_column_tooltip          (GtkSCTree          *sctree,
                                             int                 column,
                                             const gchar        *tip)
 {
+#if !(GTK_CHECK_VERSION(2,12,0))
+       GtkTooltips *tips;
        if (!sctree->tips)
                sctree->tips = gtk_tooltips_new();
-               
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(sctree->tips), 
-               GTK_CLIST(sctree)->column[column].button,
-                       tip, NULL);
+       tips = sctree->tips;
+#endif
 
+       CLAWS_SET_TIP(GTK_CLIST(sctree)->column[column].button,
+                       tip);
 }
 
index 1a0324a..f63ca06 100644 (file)
 
 #include <glib.h>
 #include <gdk/gdk.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkcontainer.h>
-#include <gtk/gtkeditable.h>
-#include <gtk/gtkctree.h>
-#include <gtk/gtkcombo.h>
-#include <gtk/gtktextview.h>
-#include <gtk/gtkitemfactory.h>
-#include <gtk/gtktreemodel.h>
+#include <gtk/gtk.h>
 #include <stdlib.h>
 #if HAVE_WCHAR_H
 #  include <wchar.h>
@@ -224,4 +216,23 @@ gboolean gtkut_tree_model_get_iter_last(GtkTreeModel *model,
 gint gtkut_list_view_get_selected_row(GtkWidget *list_view);
 gboolean gtkut_list_view_select_row(GtkWidget *list, gint row);
 
+#if GTK_CHECK_VERSION(2,12,0)
+#define CLAWS_TIP_DECL() {}
+#define CLAWS_SET_TIP(widget,tip) {                                    \
+       if (tip != NULL)                                                \
+               gtk_widget_set_tooltip_text(GTK_WIDGET(widget), tip);   \
+       else                                                            \
+               gtk_widget_set_has_tooltip(GTK_WIDGET(widget), FALSE);  \
+}
+
+#else
+#define CLAWS_TIP_DECL() \
+       GtkTooltips *tips = gtk_tooltips_new();
+
+#define CLAWS_SET_TIP(widget,tip) {                            \
+       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), widget,        \
+                           tip, NULL);                         \
+}
+
+#endif
 #endif /* __GTKUTILS_H__ */
index 53b0153..5f49c63 100644 (file)
@@ -286,8 +286,8 @@ void pluginwindow_create()
        GtkWidget *vbox3;
        GtkWidget *hbox_info;
        static GdkGeometry geometry;
-       GtkTooltips *tooltips;
-       
+       CLAWS_TIP_DECL();       
+
        debug_print("Creating plugins window...\n");
 
        pluginwindow = g_new0(PluginWindow, 1);
@@ -403,15 +403,11 @@ void pluginwindow_create()
        g_signal_connect(G_OBJECT(window), "delete_event",
                         G_CALLBACK(pluginwindow_delete_cb), pluginwindow);
 
-       tooltips = gtk_tooltips_new();
-
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips),
-                       load_btn,
-                       _("Click here to load one or more plugins"), NULL);
+       CLAWS_SET_TIP(load_btn,
+                       _("Click here to load one or more plugins"));
 
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips),
-                       unload_btn,
-                       _("Unload the selected plugin"), NULL);
+       CLAWS_SET_TIP(unload_btn,
+                       _("Unload the selected plugin"));
 
        pluginwindow->window = window;
        pluginwindow->plugin_list_view = plugin_list_view;
index 6994800..6a0599c 100644 (file)
@@ -549,7 +549,7 @@ QuickSearch *quicksearch_new()
        GtkWidget *clear_search;
        GtkWidget *search_condition_expression;
        GtkWidget *menuitem;
-       GtkTooltips *tips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
        GtkWidget *vbox;
 
        quicksearch = g_new0(QuickSearch, 1);
@@ -669,9 +669,8 @@ QuickSearch *quicksearch_new()
                           FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(clear_search), "clicked",
                         G_CALLBACK(clear_search_cb), quicksearch);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips),
-                            clear_search,
-                            _("Clear the current search"), NULL);
+       CLAWS_SET_TIP(clear_search,
+                            _("Clear the current search"));
        gtk_widget_show(clear_search);
 
 #if GTK_CHECK_VERSION(2, 8, 0)
@@ -684,9 +683,8 @@ QuickSearch *quicksearch_new()
        g_signal_connect(G_OBJECT (search_condition_expression), "clicked",
                         G_CALLBACK(search_condition_expr),
                         quicksearch);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips),
-                            search_condition_expression,
-                            _("Edit search criteria"), NULL);
+       CLAWS_SET_TIP(search_condition_expression,
+                            _("Edit search criteria"));
        gtk_widget_show(search_condition_expression);
 
 #if GTK_CHECK_VERSION(2, 8, 0)
@@ -698,9 +696,8 @@ QuickSearch *quicksearch_new()
                           FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(search_description), "clicked",
                         G_CALLBACK(search_description_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips),
-                            search_description,
-                            _("Information about extended symbols"), NULL);
+       CLAWS_SET_TIP(search_description,
+                            _("Information about extended symbols"));
        gtk_widget_show(search_description);
 
        gtk_box_pack_start(GTK_BOX(hbox_search), search_hbox, FALSE, FALSE, 2);
index b65f222..a1ebc08 100644 (file)
@@ -634,7 +634,7 @@ static void imp_ldif_page_file( gint pageNum, gchar *pageLbl ) {
        GtkWidget *entryFile;
        GtkWidget *entryName;
        GtkWidget *btnFile;
-       GtkTooltips *toolTip;
+       CLAWS_TIP_DECL();
        gint top;
 
        vbox = gtk_vbox_new(FALSE, 8);
@@ -666,11 +666,9 @@ static void imp_ldif_page_file( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), entryName, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, entryName, _( 
+       CLAWS_SET_TIP(entryName, _( 
                "Specify the name for the address book that will " \
-               "be created from the LDIF file data." ),
-               NULL );
+               "be created from the LDIF file data." ));
 
        /* Second row */
        top = 1;
@@ -683,19 +681,15 @@ static void imp_ldif_page_file( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), entryFile, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, entryFile,
-               _( "The full file specification of the LDIF file to import." ),
-               NULL );
+       CLAWS_SET_TIP(entryFile,
+               _( "The full file specification of the LDIF file to import." ));
 
        btnFile = gtkut_get_browse_file_btn(_("B_rowse"));
        gtk_table_attach(GTK_TABLE(table), btnFile, 2, 3, top, (top + 1),
                GTK_FILL, 0, 3, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, btnFile,
-               _( "Select the LDIF file to import." ),
-               NULL );
+       CLAWS_SET_TIP(btnFile,
+               _( "Select the LDIF file to import." ));
 
        gtk_widget_show_all(vbox);
 
@@ -726,7 +720,7 @@ static void imp_ldif_page_fields( gint pageNum, gchar *pageLbl ) {
        GtkWidget *checkSelect;
        GtkWidget *btnModify;
        GtkWidget *eventBox;
-       GtkTooltips *toolTip;
+       CLAWS_TIP_DECL();
        gint top;
 
        gchar *titles[ FIELDS_N_COLS ];
@@ -813,8 +807,7 @@ static void imp_ldif_page_fields( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), eventBox, 0, 1, top, (top + 1),
                GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, eventBox, _(
+       CLAWS_SET_TIP(eventBox, _(
                "Choose the LDIF field that will be renamed or selected " \
                "for import in the list above. Reserved fields (marked " \
                "with a tick in the \"R\" column), are automatically " \
@@ -823,17 +816,14 @@ static void imp_ldif_page_fields( gint pageNum, gchar *pageLbl ) {
                "with a tick. A single click anywhere in the row will " \
                "select that field for rename in the input area below " \
                "the list. A double click anywhere in the row will also " \
-               "select the field for import."
-               ), NULL );
+               "select the field for import."));
 
        entryAttrib = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entryAttrib, 1, 3, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, entryAttrib,
-               _( "The LDIF field can be renamed to the User Attribute name." ),
-               NULL );
+       CLAWS_SET_TIP(entryAttrib,
+               _( "The LDIF field can be renamed to the User Attribute name." ));
 
        /* Next row */
        ++top;
@@ -842,19 +832,15 @@ static void imp_ldif_page_fields( gint pageNum, gchar *pageLbl ) {
        gtk_table_attach(GTK_TABLE(table), checkSelect, 1, 2, top, (top + 1),
                GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, checkSelect,
-               _( "Select the LDIF field for import into the address book." ),
-               NULL );
+       CLAWS_SET_TIP(checkSelect,
+               _( "Select the LDIF field for import into the address book." ));
 
        btnModify = gtk_button_new_with_label( _(" Modify "));
        gtk_table_attach(GTK_TABLE(table), btnModify, 2, 3, top, (top + 1),
                GTK_FILL, 0, 3, 0);
 
-       toolTip = gtk_tooltips_new();
-       gtk_tooltips_set_tip( toolTip, btnModify,
-               _( "This button will update the list above with the data supplied." ),
-               NULL );
+       CLAWS_SET_TIP(btnModify,
+               _( "This button will update the list above with the data supplied." ));
 
        gtk_widget_show_all(vbox);
 
index 2bc773e..c084e6e 100644 (file)
@@ -420,17 +420,16 @@ static gboolean migrate_old_config(const gchar *old_cfg_dir, const gchar *new_cf
        gint r = 0;
        GtkWidget *window = NULL;
        GtkWidget *keep_backup_chk;
-       GtkTooltips *tips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
        gboolean backup = TRUE;
 
        keep_backup_chk = gtk_check_button_new_with_label (_("Keep old configuration"));
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(keep_backup_chk), TRUE);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), keep_backup_chk,
+       CLAWS_SET_TIP(keep_backup_chk,
                             _("Keeping a backup will allow you to go back to an "
                               "older version, but may take a while if you have "
                               "cached IMAP or News data, and will take some extra "
-                              "room on your disk."),
-                            NULL);
+                              "room on your disk."));
 
        g_signal_connect(G_OBJECT(keep_backup_chk), "toggled", 
                        G_CALLBACK(chk_update_val), &backup);
index fb58083..bf65245 100644 (file)
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkcontainer.h>
-#include <gtk/gtkstatusbar.h>
-#include <gtk/gtkprogressbar.h>
-#include <gtk/gtkhpaned.h>
-#include <gtk/gtkvpaned.h>
-#include <gtk/gtkcheckmenuitem.h>
-#include <gtk/gtkitemfactory.h>
-#include <gtk/gtkeditable.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkhandlebox.h>
-#include <gtk/gtktoolbar.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtktooltips.h>
+#include <gtk/gtk.h>
 #include <string.h>
 
 #include "main.h"
@@ -1572,9 +1554,9 @@ MainWindow *main_window_create()
        GtkWidget *ac_label;
        GtkWidget *online_pixmap;
        GtkWidget *offline_pixmap;
-       GtkTooltips *tips;
        GtkWidget *warning_icon;
        GtkWidget *warning_btn;
+       CLAWS_TIP_DECL();
 #endif
        GtkWidget *online_switch;
        GtkWidget *offline_switch;
@@ -1683,8 +1665,6 @@ MainWindow *main_window_create()
        hbox_stat = gtk_hbox_new(FALSE, 2);
        gtk_box_pack_end(GTK_BOX(vbox_body), hbox_stat, FALSE, FALSE, 0);
 
-       tips = gtk_tooltips_new();
-
        warning_icon = gtk_image_new_from_stock
                         (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_SMALL_TOOLBAR);
        warning_btn = gtk_event_box_new();
@@ -1706,8 +1686,8 @@ MainWindow *main_window_create()
 
        gtk_container_add (GTK_CONTAINER(warning_btn), warning_icon);
 
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips),warning_btn, 
-                            _("Some error(s) happened. Click here to view log."), NULL);
+       CLAWS_SET_TIP(warning_btn, 
+                            _("Some error(s) happened. Click here to view log."));
        gtk_box_pack_start(GTK_BOX(hbox_stat), warning_btn, FALSE, FALSE, 0);
 
        statusbar = statusbar_create();
@@ -1720,12 +1700,11 @@ MainWindow *main_window_create()
        online_pixmap = stock_pixmap_widget(hbox_stat, STOCK_PIXMAP_ONLINE);
        offline_pixmap = stock_pixmap_widget(hbox_stat, STOCK_PIXMAP_OFFLINE);
        online_switch = gtk_button_new ();
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips),online_switch, 
-                            _("You are online. Click the icon to go offline"), NULL);
+       CLAWS_SET_TIP(online_switch, 
+                            _("You are online. Click the icon to go offline"));
        offline_switch = gtk_button_new ();
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips),offline_switch, 
-                            _("You are offline. Click the icon to go online"),
-                            NULL);
+       CLAWS_SET_TIP(offline_switch, 
+                            _("You are offline. Click the icon to go online"));
        gtk_container_add (GTK_CONTAINER(online_switch), online_pixmap);
        gtk_button_set_relief (GTK_BUTTON(online_switch), GTK_RELIEF_NONE);
        g_signal_connect (G_OBJECT(online_switch), "clicked", G_CALLBACK(online_switch_clicked), mainwin);
@@ -1739,8 +1718,7 @@ MainWindow *main_window_create()
        gtk_box_pack_start(GTK_BOX(hbox_stat), statuslabel, FALSE, FALSE, 0);
 
        ac_button = gtk_button_new();
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips),
-                            ac_button, _("Select account"), NULL);
+       CLAWS_SET_TIP(ac_button, _("Select account"));
        GTK_WIDGET_UNSET_FLAGS(ac_button, GTK_CAN_FOCUS);
        gtk_widget_set_size_request(ac_button, -1, 0);
        gtk_box_pack_end(GTK_BOX(hbox_stat), ac_button, FALSE, FALSE, 0);
index 4f035d7..60c3e63 100644 (file)
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
-#include <gtk/gtknotebook.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtkctree.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkvpaned.h>
-#include <gtk/gtktext.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkdnd.h>
-#include <gtk/gtkselection.h>
-#include <gtk/gtktooltips.h>
-#include <gtk/gtkcontainer.h>
-#include <gtk/gtkbutton.h>
+#include <gtk/gtk.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -236,12 +223,12 @@ MimeView *mimeview_create(MainWindow *mainwin)
        GtkWidget *arrow;
        GtkWidget *scrollbutton;
        GtkWidget *hbox;
-       GtkTooltips *tooltips;
        GtkItemFactory *popupfactory;
        NoticeView *siginfoview;
        gchar *titles[N_MIMEVIEW_COLS];
        gint n_entries;
        gint i;
+       CLAWS_TIP_DECL();
 
        if (!hand_cursor)
                hand_cursor = gdk_cursor_new(GDK_HAND2);
@@ -337,8 +324,6 @@ MimeView *mimeview_create(MainWindow *mainwin)
                sizeof(mimeview_popup_entries[0]);
        popupmenu = menu_create_items(mimeview_popup_entries, n_entries,
                                      "<MimeView>", &popupfactory, mimeview);
-       tooltips = gtk_tooltips_new();
-
        vbox = gtk_vbox_new(FALSE, 0);
        gtk_widget_show(vbox);
        siginfoview = noticeview_create(mainwin);
@@ -376,7 +361,9 @@ MimeView *mimeview_create(MainWindow *mainwin)
        mimeview->icon_mainbox  = icon_mainbox;
        mimeview->icon_count    = 0;
        mimeview->mainwin       = mainwin;
-       mimeview->tooltips      = tooltips;
+#if !(GTK_CHECK_VERSION(2,12,0))
+       mimeview->tooltips      = tips;
+#endif
        mimeview->oldsize       = 60;
        mimeview->mime_toggle   = mime_toggle;
        mimeview->siginfoview   = siginfoview;
@@ -2131,6 +2118,9 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
        MimeInfo *partinfo;
        MimeInfo *siginfo = NULL;
        MimeInfo *encrypted = NULL;
+#if !(GTK_CHECK_VERSION(2,12,0))
+       GtkTooltips *tips = mimeview->tooltips;
+#endif
        
        vbox = mimeview->icon_vbox;
        mimeview->icon_count++;
@@ -2266,7 +2256,7 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
        }
        g_free(sigshort);
 
-       gtk_tooltips_set_tip(mimeview->tooltips, button, tip, NULL);
+       CLAWS_SET_TIP(button, tip);
        g_free(tip);
        gtk_widget_show_all(button);
        gtk_drag_source_set(button, GDK_BUTTON1_MASK|GDK_BUTTON3_MASK, 
index e6d072b..5a7b5c1 100644 (file)
@@ -72,7 +72,7 @@ NoticeView *noticeview_create(MainWindow *mainwin)
        GtkWidget  *widget;
        GtkWidget  *widget2;
        GtkWidget  *evtbox;
-       GtkTooltips *tooltips;
+       CLAWS_TIP_DECL();
 
        debug_print("Creating notice view...\n");
        noticeview = g_new0(NoticeView, 1);
@@ -129,8 +129,6 @@ NoticeView *noticeview_create(MainWindow *mainwin)
                         (gpointer) noticeview);
        gtk_box_pack_start(GTK_BOX(hbox), widget2, FALSE, FALSE, 0);
        
-       tooltips = gtk_tooltips_new();
-       
        noticeview->vbox   = vbox;
        noticeview->hsep   = hsep;
        noticeview->hbox   = hbox;
@@ -140,8 +138,9 @@ NoticeView *noticeview_create(MainWindow *mainwin)
        noticeview->button2= widget2;
        noticeview->evtbox = evtbox;
        noticeview->visible= TRUE;
-       noticeview->tooltips = tooltips;
-
+#if !(GTK_CHECK_VERSION(2,12,0))
+       noticeview->tooltips = tips;
+#endif
        return noticeview;
 }
 
@@ -290,9 +289,10 @@ void noticeview_set_icon_clickable(NoticeView *noticeview, gboolean setting)
 
 void noticeview_set_tooltip (NoticeView *noticeview, const gchar *text)
 {
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(noticeview->tooltips), 
-                       noticeview->evtbox,
-                       text,
-                       NULL);
+#if !(GTK_CHECK_VERSION(2,12,0))
+       GtkTooltips *tips = noticeview->tooltips;
+#endif
+       CLAWS_SET_TIP(noticeview->evtbox,
+                       text);
 
 }
index 4198bff..f3d2c88 100644 (file)
@@ -128,12 +128,9 @@ static void bogofilter_create_widget_func(PrefsPage * _page,
 
        GtkWidget *mark_as_read_checkbtn;
 
-       GtkTooltips *tooltips;
-
        GtkWidget *whitelist_ab_folder_combo;
        GtkWidget *whitelist_ab_select_btn;
-
-       tooltips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -164,8 +161,8 @@ static void bogofilter_create_widget_func(PrefsPage * _page,
        max_size_spinbtn = gtk_spin_button_new(GTK_ADJUSTMENT(max_size_spinbtn_adj), 1, 0);
        gtk_widget_show(max_size_spinbtn);
        gtk_box_pack_start(GTK_BOX(hbox_max_size), max_size_spinbtn, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, max_size_spinbtn,
-                       _("Messages larger than this will not be checked"), NULL);
+       CLAWS_SET_TIP(max_size_spinbtn,
+                       _("Messages larger than this will not be checked"));
        gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(max_size_spinbtn), TRUE);
 
        max_size_kb_label = gtk_label_new(_("KB"));
@@ -183,16 +180,14 @@ static void bogofilter_create_widget_func(PrefsPage * _page,
        save_spam_folder_entry = gtk_entry_new();
        gtk_widget_show (save_spam_folder_entry);
        gtk_box_pack_start (GTK_BOX (hbox_save_spam), save_spam_folder_entry, TRUE, TRUE, 0);
-       gtk_tooltips_set_tip(tooltips, save_spam_folder_entry,
-                       _("Folder for storing identified spam. Leave empty to use the trash folder."),
-                       NULL);
+       CLAWS_SET_TIP(save_spam_folder_entry,
+                       _("Folder for storing identified spam. Leave empty to use the trash folder."));
 
        save_spam_folder_select = gtkut_get_browse_directory_btn(_("_Browse"));
        gtk_widget_show (save_spam_folder_select);
        gtk_box_pack_start (GTK_BOX (hbox_save_spam), save_spam_folder_select, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, save_spam_folder_select,
-                       _("Click this button to select a folder for storing spam"),
-                       NULL);
+       CLAWS_SET_TIP(save_spam_folder_select,
+                       _("Click this button to select a folder for storing spam"));
 
        hbox_save_unsure = gtk_hbox_new(FALSE, 8);
        gtk_widget_show(hbox_save_unsure);
@@ -205,23 +200,20 @@ static void bogofilter_create_widget_func(PrefsPage * _page,
        save_unsure_folder_entry = gtk_entry_new();
        gtk_widget_show (save_unsure_folder_entry);
        gtk_box_pack_start (GTK_BOX (hbox_save_unsure), save_unsure_folder_entry, TRUE, TRUE, 0);
-       gtk_tooltips_set_tip(tooltips, save_unsure_folder_entry,
-                       _("Folder for storing mail for which spam status is Unsure. Leave empty to use the Inbox folder."),
-                       NULL);
+       CLAWS_SET_TIP(save_unsure_folder_entry,
+                       _("Folder for storing mail for which spam status is Unsure. Leave empty to use the Inbox folder."));
 
        save_unsure_folder_select = gtkut_get_browse_directory_btn(_("_Browse"));
        gtk_widget_show (save_unsure_folder_select);
        gtk_box_pack_start (GTK_BOX (hbox_save_unsure), save_unsure_folder_select, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, save_unsure_folder_select,
-                       _("Click this button to select a folder for storing Unsure mails."),
-                       NULL);
+       CLAWS_SET_TIP(save_unsure_folder_select,
+                       _("Click this button to select a folder for storing Unsure mails."));
 
        insert_header_checkbtn = gtk_check_button_new_with_label(_("Insert X-Bogosity header"));
        gtk_widget_show(insert_header_checkbtn);
        gtk_box_pack_start(GTK_BOX(vbox2), insert_header_checkbtn, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, insert_header_checkbtn,
-                       _("Only done for messages in MH folders"),
-                       NULL);
+       CLAWS_SET_TIP(insert_header_checkbtn,
+                       _("Only done for messages in MH folders"));
 
        hbox_whitelist = gtk_hbox_new(FALSE, 8);
        gtk_widget_show(hbox_whitelist);
@@ -230,8 +222,8 @@ static void bogofilter_create_widget_func(PrefsPage * _page,
        whitelist_ab_checkbtn = gtk_check_button_new_with_label(_("Whitelist senders found in address book/folder"));
        gtk_widget_show(whitelist_ab_checkbtn);
        gtk_box_pack_start(GTK_BOX(hbox_whitelist), whitelist_ab_checkbtn, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, whitelist_ab_checkbtn,
-                       _("Messages coming from your address book contacts will be received in the normal folder even if detected as spam"), NULL);
+       CLAWS_SET_TIP(whitelist_ab_checkbtn,
+                       _("Messages coming from your address book contacts will be received in the normal folder even if detected as spam"));
 
        whitelist_ab_folder_combo = combobox_text_new(TRUE, _("Any"), NULL);
        gtk_widget_set_size_request(whitelist_ab_folder_combo, 100, -1);
@@ -240,14 +232,13 @@ static void bogofilter_create_widget_func(PrefsPage * _page,
        whitelist_ab_select_btn = gtk_button_new_with_label(_("Select ..."));
        gtk_widget_show (whitelist_ab_select_btn);
        gtk_box_pack_start (GTK_BOX (hbox_whitelist), whitelist_ab_select_btn, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, whitelist_ab_select_btn,
-                       _("Click this button to select a book or folder in the address book"),
-                       NULL);
+       CLAWS_SET_TIP(whitelist_ab_select_btn,
+                       _("Click this button to select a book or folder in the address book"));
 
        learn_from_whitelist_chkbtn = gtk_check_button_new_with_label(_("Learn whitelisted emails as ham"));
-       gtk_tooltips_set_tip(tooltips, learn_from_whitelist_chkbtn,
+       CLAWS_SET_TIP(learn_from_whitelist_chkbtn,
                        _("If Bogofilter thought an email was spam or unsure, but it was whitelisted, "
-                         "learn it as ham."), NULL);
+                         "learn it as ham."));
        gtk_widget_show(learn_from_whitelist_chkbtn);
        gtk_box_pack_start (GTK_BOX (vbox2), learn_from_whitelist_chkbtn, TRUE, TRUE, 0);
 
@@ -262,9 +253,8 @@ static void bogofilter_create_widget_func(PrefsPage * _page,
        bogopath_entry = gtk_entry_new();
        gtk_widget_show(bogopath_entry);
        gtk_box_pack_start(GTK_BOX(hbox_bogopath), bogopath_entry, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, bogopath_entry,
-                       _("Path to bogofilter executable"),
-                       NULL);
+       CLAWS_SET_TIP(bogopath_entry,
+                       _("Path to bogofilter executable"));
 
        hbox_mark_as_read = gtk_hbox_new(FALSE, 8);
        gtk_widget_show(hbox_mark_as_read);
index 6602b3b..ef29c0c 100644 (file)
@@ -153,27 +153,24 @@ static void create_dillo_prefs_page(PrefsPage *page,
         GtkWidget *local_checkbox;
         GtkWidget *full_checkbox;
         GtkWidget *label;
-       GtkTooltips *local_tooltip;
-       GtkTooltips *full_tooltip;
        GtkWidget *whitelist_ab_checkbtn;
        GtkWidget *whitelist_ab_folder_combo;
        GtkWidget *whitelist_ab_select_btn;
        GtkWidget *hbox_whitelist, *spacer;
-
+       CLAWS_TIP_DECL();
 
         vbox = gtk_vbox_new(FALSE, 3);
         gtk_container_set_border_width(GTK_CONTAINER(vbox), VBOX_BORDER);
         gtk_widget_show(vbox);
         
-       local_tooltip = gtk_tooltips_new();
         local_checkbox = gtk_check_button_new_with_label
                                (_("Load remote links in mails"));
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(local_checkbox),
                                      !dillo_prefs.local);
         gtk_box_pack_start(GTK_BOX(vbox), local_checkbox, FALSE, FALSE, 0);
         gtk_widget_show(local_checkbox);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(local_tooltip), local_checkbox,
-                            _("Equivalent to Dillo's '--local' option"), NULL);
+       CLAWS_SET_TIP(local_checkbox,
+                            _("Equivalent to Dillo's '--local' option"));
         
        label = gtk_label_new(_("You can still load remote links "
                              "by reloading the page"));
@@ -220,16 +217,14 @@ static void create_dillo_prefs_page(PrefsPage *page,
                                        dillo_prefs.whitelist_ab_folder);
        }
 
-       full_tooltip = gtk_tooltips_new();
         full_checkbox = gtk_check_button_new_with_label
                                (_("Full window mode (hide controls)"));
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(full_checkbox),
                                       dillo_prefs.full);
         gtk_box_pack_start(GTK_BOX(vbox), full_checkbox, FALSE, FALSE, 0);
         gtk_widget_show(full_checkbox);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(full_tooltip), full_checkbox,
-                            _("Equivalent to Dillo's '--fullwindow' option"),
-                            NULL);
+       CLAWS_SET_TIP(full_checkbox,
+                            _("Equivalent to Dillo's '--fullwindow' option"));
 
        g_signal_connect(G_OBJECT(local_checkbox), "toggled",
                         G_CALLBACK(local_checkbox_toggled),
index 18e7fc7..db5e1c2 100644 (file)
@@ -88,9 +88,7 @@ static void prefs_gpg_create_widget_func(PrefsPage *_page,
        GtkWidget *spinbtn_store_passphrase;
        GtkWidget *label_expire2;
        GtkWidget *frame_passphrase;
-       GtkTooltips *tooltips;
-       
-       tooltips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -134,10 +132,9 @@ static void prefs_gpg_create_widget_func(PrefsPage *_page,
        gtk_box_pack_start(GTK_BOX(hbox1), spinbtn_store_passphrase, FALSE,
                           FALSE, 0);
        gtk_widget_set_size_request(spinbtn_store_passphrase, 64, -1);
-       gtk_tooltips_set_tip(tooltips, spinbtn_store_passphrase,
+       CLAWS_SET_TIP(spinbtn_store_passphrase,
                             _
-                            ("Setting to '0' will store the passphrase for the whole session"),
-                            NULL);
+                            ("Setting to '0' will store the passphrase for the whole session"));
        gtk_spin_button_set_numeric(GTK_SPIN_BUTTON
                                    (spinbtn_store_passphrase), TRUE);
 
index f9adeb3..bb836e7 100644 (file)
@@ -251,13 +251,10 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
 
        GtkWidget *mark_as_read_checkbtn;
 
-       GtkTooltips *tooltips;
-       
        GtkListStore *store;
        GtkCellRenderer *renderer;
        GtkTreeIter iter;
-
-       tooltips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -313,8 +310,7 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        gtk_table_attach (GTK_TABLE (table_transport), user_entry, 1, 2, 1, 2,
                        (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                        (GtkAttachOptions) (0), 0, 0);
-       gtk_tooltips_set_tip(tooltips, user_entry, _("User to use with spamd server"),
-                       NULL);
+       CLAWS_SET_TIP(user_entry, _("User to use with spamd server"));
 
        spamd_label = gtk_label_new(_("spamd"));
        gtk_widget_show(spamd_label);
@@ -333,8 +329,8 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        spamd_hostname_entry = gtk_entry_new();
        gtk_widget_show(spamd_hostname_entry);
        gtk_box_pack_start(GTK_BOX(hbox_spamd), spamd_hostname_entry, TRUE, TRUE, 0);
-       gtk_tooltips_set_tip(tooltips, spamd_hostname_entry,
-                       _("Hostname or IP address of spamd server"), NULL);
+       CLAWS_SET_TIP(spamd_hostname_entry,
+                       _("Hostname or IP address of spamd server"));
 
        spamd_colon_label = gtk_label_new(":");
        gtk_widget_show(spamd_colon_label);
@@ -344,15 +340,14 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        spamd_port_spinbtn = gtk_spin_button_new(GTK_ADJUSTMENT(spamd_port_spinbtn_adj), 1, 0);
        gtk_widget_show(spamd_port_spinbtn);
        gtk_box_pack_start(GTK_BOX(hbox_spamd), spamd_port_spinbtn, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, spamd_port_spinbtn,
-                       _("Port of spamd server"), NULL);
+       CLAWS_SET_TIP(spamd_port_spinbtn,
+                       _("Port of spamd server"));
        gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spamd_port_spinbtn), TRUE);
 
        spamd_socket_entry = gtk_entry_new();
        gtk_widget_show(spamd_socket_entry);
        gtk_box_pack_start(GTK_BOX(hbox_spamd), spamd_socket_entry, TRUE, TRUE, 0);
-       gtk_tooltips_set_tip(tooltips, spamd_socket_entry, _("Path of Unix socket"),
-                       NULL);
+       CLAWS_SET_TIP(spamd_socket_entry, _("Path of Unix socket"));
 
        hbox_max_size = gtk_hbox_new(FALSE, 8);
        gtk_widget_show(hbox_max_size);
@@ -366,8 +361,8 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        max_size_spinbtn = gtk_spin_button_new(GTK_ADJUSTMENT(max_size_spinbtn_adj), 1, 0);
        gtk_widget_show(max_size_spinbtn);
        gtk_box_pack_start(GTK_BOX(hbox_max_size), max_size_spinbtn, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, max_size_spinbtn,
-                       _("Messages larger than this will not be checked"), NULL);
+       CLAWS_SET_TIP(max_size_spinbtn,
+                       _("Messages larger than this will not be checked"));
        gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(max_size_spinbtn), TRUE);
 
        max_size_kb_label = gtk_label_new(_("KB"));
@@ -386,10 +381,9 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        timeout_spinbtn = gtk_spin_button_new(GTK_ADJUSTMENT(timeout_spinbtn_adj), 1, 0);
        gtk_widget_show(timeout_spinbtn);
        gtk_box_pack_start(GTK_BOX(hbox_timeout), timeout_spinbtn, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, timeout_spinbtn,
+       CLAWS_SET_TIP(timeout_spinbtn,
                        _("Maximum time allowed for checking. If the check takes longer "
-                               "it will be aborted."),
-                       NULL);
+                               "it will be aborted."));
        gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(timeout_spinbtn), TRUE);
 
        timeout_seconds_label = gtk_label_new(_("seconds"));
@@ -416,16 +410,14 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        save_spam_folder_entry = gtk_entry_new();
        gtk_widget_show (save_spam_folder_entry);
        gtk_box_pack_start (GTK_BOX (hbox_save_spam), save_spam_folder_entry, TRUE, TRUE, 0);
-       gtk_tooltips_set_tip(tooltips, save_spam_folder_entry,
-                       _("Folder for storing identified spam. Leave empty to use the trash folder."),
-                       NULL);
+       CLAWS_SET_TIP(save_spam_folder_entry,
+                       _("Folder for storing identified spam. Leave empty to use the trash folder."));
 
        save_spam_folder_select = gtkut_get_browse_directory_btn(_("_Browse"));
        gtk_widget_show (save_spam_folder_select);
        gtk_box_pack_start (GTK_BOX (hbox_save_spam), save_spam_folder_select, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, save_spam_folder_select,
-                       _("Click this button to select a folder for storing spam"),
-                       NULL);
+       CLAWS_SET_TIP(save_spam_folder_select,
+                       _("Click this button to select a folder for storing spam"));
 
        hbox_mark_as_read = gtk_hbox_new(FALSE, 8);
        gtk_widget_show(hbox_mark_as_read);
@@ -443,8 +435,8 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        whitelist_ab_checkbtn = gtk_check_button_new_with_label(_("Whitelist senders found in address book/folder"));
        gtk_widget_show(whitelist_ab_checkbtn);
        gtk_box_pack_start(GTK_BOX(hbox_whitelist), whitelist_ab_checkbtn, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, whitelist_ab_checkbtn,
-                       _("Messages coming from your address book contacts will be received in the normal folder even if detected as spam"), NULL);
+       CLAWS_SET_TIP(whitelist_ab_checkbtn,
+                       _("Messages coming from your address book contacts will be received in the normal folder even if detected as spam"));
 
        whitelist_ab_folder_combo = combobox_text_new(TRUE, _("Any"), NULL);
        gtk_widget_set_size_request(whitelist_ab_folder_combo, 100, -1);
@@ -453,9 +445,8 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        whitelist_ab_select_btn = gtk_button_new_with_label(_("Select ..."));
        gtk_widget_show (whitelist_ab_select_btn);
        gtk_box_pack_start (GTK_BOX (hbox_whitelist), whitelist_ab_select_btn, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, whitelist_ab_select_btn,
-                       _("Click this button to select a book or folder in the address book"),
-                       NULL);
+       CLAWS_SET_TIP(whitelist_ab_select_btn,
+                       _("Click this button to select a book or folder in the address book"));
 
        SET_TOGGLE_SENSITIVITY(enable_sa_checkbtn, frame_transport);
        SET_TOGGLE_SENSITIVITY(enable_sa_checkbtn, hbox_max_size);
index 94ac0c2..2081e38 100644 (file)
@@ -73,7 +73,10 @@ static GdkPixmap *nomail_bitmap[2] = {NULL, NULL};
 static EggTrayIcon *trayicon;
 static GtkWidget *eventbox;
 static GtkWidget *image = NULL;
+
+#if !(GTK_CHECK_VERSION(2,12,0))
 static GtkTooltips *tooltips;
+#endif
 static GtkWidget *traymenu_popup;
 static GtkItemFactory *traymenu_factory;
 static gboolean updating_menu = FALSE;
@@ -202,7 +205,11 @@ static void update(FolderItem *removed_item)
 
        buf = g_strdup_printf(_("New %d, Unread: %d, Total: %d"), new, unread, total);
 
+#if !(GTK_CHECK_VERSION(2,12,0))
         gtk_tooltips_set_tip(tooltips, eventbox, buf, "");
+#else
+       gtk_widget_set_tooltip_text(eventbox, buf);
+#endif
        g_free(buf);
 
        if (new > 0 && unreadmarked > 0) {
@@ -396,9 +403,10 @@ static void create_trayicon()
        g_signal_connect(G_OBJECT(eventbox), "button-press-event",
                G_CALLBACK(click_cb), NULL);
 
+#if !(GTK_CHECK_VERSION(2,12,0))
        tooltips = gtk_tooltips_new();
        gtk_tooltips_enable(tooltips);
-
+#endif
        n_entries = sizeof(trayicon_popup_menu_entries) /
        sizeof(trayicon_popup_menu_entries[0]);
        traymenu_popup = menu_create_items(trayicon_popup_menu_entries,
index 3c8427d..ba92a2a 100644 (file)
@@ -95,45 +95,40 @@ static void create_trayicon_prefs_page(PrefsPage *page,
 
         GtkWidget *vbox;
         GtkWidget *hide_at_startup_checkbox;
-       GtkTooltips *hide_at_startup_tooltip;
         GtkWidget *close_to_tray_checkbox;
-       GtkTooltips *close_to_tray_tooltip;
         GtkWidget *hide_when_iconified_checkbox;
-       GtkTooltips *hide_when_iconified_tooltip;
+       CLAWS_TIP_DECL();
 
         vbox = gtk_vbox_new(FALSE, 3);
         gtk_container_set_border_width(GTK_CONTAINER(vbox), VBOX_BORDER);
         gtk_widget_show(vbox);
         
-       hide_at_startup_tooltip = gtk_tooltips_new();
         hide_at_startup_checkbox = gtk_check_button_new_with_label
                                (_("Hide at start-up"));
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(hide_at_startup_checkbox),
                                      trayicon_prefs.hide_at_startup);
         gtk_box_pack_start(GTK_BOX(vbox), hide_at_startup_checkbox, FALSE, FALSE, 0);
         gtk_widget_show(hide_at_startup_checkbox);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(hide_at_startup_tooltip), hide_at_startup_checkbox,
-                            _("Hide Claws Mail at start-up"), NULL);
+       CLAWS_SET_TIP(hide_at_startup_checkbox,
+                            _("Hide Claws Mail at start-up"));
         
-       close_to_tray_tooltip = gtk_tooltips_new();
         close_to_tray_checkbox = gtk_check_button_new_with_label
                                (_("Close to tray"));
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(close_to_tray_checkbox),
                                      trayicon_prefs.close_to_tray);
         gtk_box_pack_start(GTK_BOX(vbox), close_to_tray_checkbox, FALSE, FALSE, 0);
         gtk_widget_show(close_to_tray_checkbox);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(close_to_tray_tooltip), close_to_tray_checkbox,
-                            _("Hide Claws Mail using the tray icon instead of closing it\nwhen the window close button is clicked"), NULL);
+       CLAWS_SET_TIP(close_to_tray_checkbox,
+                            _("Hide Claws Mail using the tray icon instead of closing it\nwhen the window close button is clicked"));
 
-       hide_when_iconified_tooltip = gtk_tooltips_new();
         hide_when_iconified_checkbox = gtk_check_button_new_with_label
                                (_("Minimize to tray"));
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(hide_when_iconified_checkbox),
                                      trayicon_prefs.hide_when_iconified);
         gtk_box_pack_start(GTK_BOX(vbox), hide_when_iconified_checkbox, FALSE, FALSE, 0);
         gtk_widget_show(hide_when_iconified_checkbox);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(hide_when_iconified_tooltip), hide_when_iconified_checkbox,
-                            _("Hide Claws Mail using the tray icon instead of minimizing it"), NULL);
+       CLAWS_SET_TIP(hide_when_iconified_checkbox,
+                            _("Hide Claws Mail using the tray icon instead of minimizing it"));
 
         prefs_page->hide_at_startup = hide_at_startup_checkbox;
         prefs_page->close_to_tray = close_to_tray_checkbox;
index 49ce861..26486e5 100644 (file)
@@ -1324,13 +1324,11 @@ static void receive_create_widget_func(PrefsPage * _page,
        GtkWidget *use_apop_checkbtn;
        GtkWidget *rmmail_checkbtn;
        GtkWidget *hbox_spc;
-       GtkTooltips *leave_time_tooltip;
        GtkWidget *leave_time_label;
        GtkWidget *leave_time_spinbtn;
        GtkWidget *hbox1;
        GtkWidget *size_limit_checkbtn;
        GtkWidget *size_limit_spinbtn;
-       GtkTooltips *size_limit_tooltip;
        GtkWidget *label;
        GtkWidget *filter_on_recv_checkbtn;
        GtkWidget *filterhook_on_recv_checkbtn;
@@ -1338,7 +1336,6 @@ static void receive_create_widget_func(PrefsPage * _page,
        GtkWidget *inbox_label;
        GtkWidget *inbox_entry;
        GtkWidget *inbox_btn;
-       GtkTooltips *inbox_tooltip;
        GtkWidget *imap_frame;
        GtkWidget *imapdir_label;
        GtkWidget *imapdir_entry;
@@ -1361,10 +1358,7 @@ static void receive_create_widget_func(PrefsPage * _page,
        GtkWidget *maxarticle_label;
        GtkWidget *maxarticle_spinbtn;
        GtkObject *maxarticle_spinbtn_adj;
-       GtkTooltips *maxarticle_tool_tip;
-
-       inbox_tooltip = gtk_tooltips_new();
-       size_limit_tooltip = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -1382,17 +1376,15 @@ static void receive_create_widget_func(PrefsPage * _page,
 
        local_inbox_entry = gtk_entry_new ();
        gtk_widget_show (local_inbox_entry);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(inbox_tooltip), local_inbox_entry,
-                            _("Unfiltered messages will be stored in this folder"),
-                            NULL);
+       CLAWS_SET_TIP(local_inbox_entry,
+                            _("Unfiltered messages will be stored in this folder"));
        gtk_widget_set_size_request (local_inbox_entry, DEFAULT_ENTRY_WIDTH, -1);
        gtk_box_pack_start (GTK_BOX (local_hbox), local_inbox_entry, TRUE, TRUE, 0);
 
        local_inbox_btn = gtkut_get_browse_file_btn(_("Bro_wse"));
        gtk_widget_show (local_inbox_btn);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(inbox_tooltip), local_inbox_btn,
-                            _("Unfiltered messages will be stored in this folder"),
-                            NULL);
+       CLAWS_SET_TIP(local_inbox_btn,
+                            _("Unfiltered messages will be stored in this folder"));
        gtk_box_pack_start (GTK_BOX (local_hbox), local_inbox_btn, FALSE, FALSE, 0);
        g_signal_connect (G_OBJECT (local_inbox_btn), "clicked",
                          G_CALLBACK (prefs_account_select_folder_cb),
@@ -1418,12 +1410,10 @@ static void receive_create_widget_func(PrefsPage * _page,
        gtk_widget_show (leave_time_label);
        gtk_box_pack_start (GTK_BOX (hbox1), leave_time_label, FALSE, FALSE, 0);
 
-       leave_time_tooltip = gtk_tooltips_new();
-
        leave_time_spinbtn = gtk_spin_button_new_with_range(0, 365, 1);
        gtk_widget_show (leave_time_spinbtn);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(leave_time_tooltip), leave_time_spinbtn,
-                            _("0 days: remove immediately"), NULL);
+       CLAWS_SET_TIP(leave_time_spinbtn,
+                            _("0 days: remove immediately"));
        gtk_box_pack_start (GTK_BOX (hbox1), leave_time_spinbtn, FALSE, FALSE, 0);
 
        leave_time_label = gtk_label_new (_("days"));
@@ -1438,11 +1428,10 @@ static void receive_create_widget_func(PrefsPage * _page,
 
        PACK_CHECK_BUTTON (hbox1, size_limit_checkbtn, _("Receive size limit"));
 
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(size_limit_tooltip), size_limit_checkbtn,
+       CLAWS_SET_TIP(size_limit_checkbtn,
                             _("Messages over this limit will be partially retrieved. "
                               "When selecting them you will be able to download them fully "
-                              "or delete them."),
-                            NULL);
+                              "or delete them."));
 
        size_limit_spinbtn = gtk_spin_button_new_with_range(0, 100000, 1);
        gtk_widget_show (size_limit_spinbtn);
@@ -1466,17 +1455,15 @@ static void receive_create_widget_func(PrefsPage * _page,
 
        inbox_entry = gtk_entry_new ();
        gtk_widget_show (inbox_entry);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(inbox_tooltip), inbox_entry,
-                            _("Unfiltered messages will be stored in this folder"),
-                            NULL);
+       CLAWS_SET_TIP(inbox_entry,
+                            _("Unfiltered messages will be stored in this folder"));
        gtk_widget_set_size_request (inbox_entry, DEFAULT_ENTRY_WIDTH, -1);
        gtk_box_pack_start (GTK_BOX (hbox1), inbox_entry, TRUE, TRUE, 0);
 
        inbox_btn = gtkut_get_browse_file_btn(_("Bro_wse"));
        gtk_widget_show (inbox_btn);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(inbox_tooltip), inbox_btn,
-                            _("Unfiltered messages will be stored in this folder"),
-                            NULL);
+       CLAWS_SET_TIP(inbox_btn,
+                            _("Unfiltered messages will be stored in this folder"));
        gtk_box_pack_start (GTK_BOX (hbox1), inbox_btn, FALSE, FALSE, 0);
        g_signal_connect (G_OBJECT (inbox_btn), "clicked",
                          G_CALLBACK (prefs_account_select_folder_cb),
@@ -1493,15 +1480,13 @@ static void receive_create_widget_func(PrefsPage * _page,
        gtk_widget_show (maxarticle_label);
        gtk_box_pack_start (GTK_BOX (hbox2), maxarticle_label, FALSE, FALSE, 0);
 
-       maxarticle_tool_tip = gtk_tooltips_new();
-
        maxarticle_spinbtn_adj =
                gtk_adjustment_new (300, 0, 10000, 10, 100, 100);
        maxarticle_spinbtn = gtk_spin_button_new
                (GTK_ADJUSTMENT (maxarticle_spinbtn_adj), 10, 0);
        gtk_widget_show (maxarticle_spinbtn);
-       gtk_tooltips_set_tip(maxarticle_tool_tip, maxarticle_spinbtn,
-                            _("unlimited if 0 is specified"), NULL);
+       CLAWS_SET_TIP(maxarticle_spinbtn,
+                            _("unlimited if 0 is specified"));
        gtk_box_pack_start (GTK_BOX (hbox2), maxarticle_spinbtn,
                            FALSE, FALSE, 0);
        gtk_widget_set_size_request (maxarticle_spinbtn, 64, -1);
@@ -1561,9 +1546,8 @@ static void receive_create_widget_func(PrefsPage * _page,
 
        PACK_CHECK_BUTTON (hbox1, low_bandwidth_checkbtn,
                           _("Bandwidth-efficient mode (prevents retrieving remote tags)"));
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(inbox_tooltip), low_bandwidth_checkbtn,
-                            _("This mode uses less bandwidth, but can be slower with some servers."),
-                            NULL);
+       CLAWS_SET_TIP(low_bandwidth_checkbtn,
+                            _("This mode uses less bandwidth, but can be slower with some servers."));
 
        PACK_CHECK_BUTTON (vbox1, filter_on_recv_checkbtn,
                           _("Filter messages on receiving"));
@@ -2309,7 +2293,7 @@ static void ssl_create_widget_func(PrefsPage * _page,
        GtkWidget *hbox;
        GtkWidget *hbox_spc;
        GtkWidget *label;
-       GtkTooltips *tips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -2380,10 +2364,10 @@ static void ssl_create_widget_func(PrefsPage * _page,
        gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
        entry_in_cert_file = gtk_entry_new();
        in_ssl_cert_browse_button = gtkut_get_browse_file_btn(_("Browse"));
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), label,
-                            _("Client certificate file as a PKCS12 or PEM file"), NULL);       
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), entry_in_cert_file,
-                            _("Client certificate file as a PKCS12 or PEM file"), NULL);       
+       CLAWS_SET_TIP(label,
+                            _("Client certificate file as a PKCS12 or PEM file"));
+       CLAWS_SET_TIP(entry_in_cert_file,
+                            _("Client certificate file as a PKCS12 or PEM file"));     
        gtk_table_attach(GTK_TABLE(cert_table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
        gtk_table_attach(GTK_TABLE(cert_table), entry_in_cert_file, 1, 2, 0, 1,
                         GTK_EXPAND|GTK_FILL, 0, 0, 0);
@@ -2402,10 +2386,10 @@ static void ssl_create_widget_func(PrefsPage * _page,
        gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
        entry_out_cert_file = gtk_entry_new();
        out_ssl_cert_browse_button = gtkut_get_browse_file_btn(_("Browse"));
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), label,
-                            _("Client certificate file as a PKCS12 or PEM file"), NULL);       
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), entry_out_cert_file,
-                            _("Client certificate file as a PKCS12 or PEM file"), NULL);       
+       CLAWS_SET_TIP(label,
+                            _("Client certificate file as a PKCS12 or PEM file"));
+       CLAWS_SET_TIP(entry_out_cert_file,
+                            _("Client certificate file as a PKCS12 or PEM file"));
        gtk_table_attach(GTK_TABLE(cert_table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
        gtk_table_attach(GTK_TABLE(cert_table), entry_out_cert_file, 1, 2, 2, 3,
                         GTK_EXPAND|GTK_FILL, 0, 0, 0);
@@ -2531,7 +2515,7 @@ static void advanced_create_widget_func(PrefsPage * _page,
        GtkWidget *draft_folder_entry;
        GtkWidget *trash_folder_checkbtn;
        GtkWidget *trash_folder_entry;
-       GtkTooltips *tips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
        GtkSizeGroup *size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
 #define PACK_HBOX(hbox) \
        { \
@@ -2586,21 +2570,19 @@ static void advanced_create_widget_func(PrefsPage * _page,
        PACK_CHECK_BUTTON (hbox1, checkbtn_domain, _("Domain name"));
        gtk_size_group_add_widget(size_group, checkbtn_domain); 
 
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), checkbtn_domain,
+       CLAWS_SET_TIP(checkbtn_domain,
                             _("The domain name will be used in the right part of "
                               "the generated Message-Ids, and when connecting to "
-                              "SMTP servers."),
-                            NULL);
+                              "SMTP servers."));
 
        entry_domain = gtk_entry_new ();
        gtk_widget_show (entry_domain);
        gtk_box_pack_start (GTK_BOX (hbox1), entry_domain, TRUE, TRUE, 0);
        SET_TOGGLE_SENSITIVITY (checkbtn_domain, entry_domain);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), entry_domain,
+       CLAWS_SET_TIP(entry_domain,
                             _("The domain name will be used in the right part of "
                               "the generated Message-Ids, and when connecting to "
-                              "SMTP servers."),
-                            NULL);
+                              "SMTP servers."));
 
 
 #ifndef G_OS_WIN32     
index 7483a32..f5c7e37 100644 (file)
@@ -196,12 +196,10 @@ static void prefs_actions_create(MainWindow *mainwin)
        GtkWidget *up_btn;
        GtkWidget *down_btn;
        static GdkGeometry geometry;
-       GtkTooltips *tooltips;
+       CLAWS_TIP_DECL();
 
        debug_print("Creating actions configuration window...\n");
 
-       tooltips = gtk_tooltips_new();
-
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "prefs_actions");
 
        gtk_container_set_border_width(GTK_CONTAINER (window), 8);
@@ -324,32 +322,32 @@ static void prefs_actions_create(MainWindow *mainwin)
        gtk_box_pack_start(GTK_BOX(btn_hbox), reg_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(reg_btn), "clicked",
                         G_CALLBACK(prefs_actions_register_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), reg_btn,
-                       _("Append the new action above to the list"), NULL);
+       CLAWS_SET_TIP(reg_btn,
+                       _("Append the new action above to the list"));
 
        subst_btn = gtkut_get_replace_btn(_("Replace"));
        gtk_widget_show(subst_btn);
        gtk_box_pack_start(GTK_BOX(btn_hbox), subst_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(subst_btn), "clicked",
                         G_CALLBACK(prefs_actions_substitute_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), subst_btn,
-                       _("Replace the selected action in list with the action above"), NULL);
+       CLAWS_SET_TIP(subst_btn,
+                       _("Replace the selected action in list with the action above"));
 
        del_btn = gtk_button_new_from_stock(GTK_STOCK_DELETE);
        gtk_widget_show(del_btn);
        gtk_box_pack_start(GTK_BOX(btn_hbox), del_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(del_btn), "clicked",
                         G_CALLBACK(prefs_actions_delete_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), del_btn,
-                       _("Delete the selected action from the list"), NULL);
+       CLAWS_SET_TIP(del_btn,
+                       _("Delete the selected action from the list"));
 
        clear_btn = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
        gtk_widget_show (clear_btn);
        gtk_box_pack_start (GTK_BOX (btn_hbox), clear_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (clear_btn), "clicked",
                        G_CALLBACK(prefs_actions_clear_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), clear_btn,
-                       _("Clear all the input fields in the dialog"), NULL);
+       CLAWS_SET_TIP(clear_btn,
+                       _("Clear all the input fields in the dialog"));
 
 #if GTK_CHECK_VERSION(2, 8, 0)
        info_btn = gtk_button_new_from_stock(GTK_STOCK_INFO);
@@ -360,8 +358,8 @@ static void prefs_actions_create(MainWindow *mainwin)
        gtk_box_pack_end(GTK_BOX(reg_hbox), info_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(info_btn), "clicked",
                         G_CALLBACK(prefs_actions_info_cb), GTK_WINDOW(window));
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), info_btn,
-                       _("Show information on configuring actions"), NULL);
+       CLAWS_SET_TIP(info_btn,
+                       _("Show information on configuring actions"));
 
        cond_hbox = gtk_hbox_new(FALSE, 8);
        gtk_widget_show(cond_hbox);
@@ -391,16 +389,16 @@ static void prefs_actions_create(MainWindow *mainwin)
        gtk_box_pack_start(GTK_BOX(btn_vbox), up_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(up_btn), "clicked",
                         G_CALLBACK(prefs_actions_up), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), up_btn,
-                       _("Move the selected action up"), NULL);
+       CLAWS_SET_TIP(up_btn,
+                       _("Move the selected action up"));
 
        down_btn = gtk_button_new_from_stock(GTK_STOCK_GO_DOWN);
        gtk_widget_show(down_btn);
        gtk_box_pack_start(GTK_BOX(btn_vbox), down_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(down_btn), "clicked",
                         G_CALLBACK(prefs_actions_down), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), down_btn,
-                       _("Move selected action down"), NULL);
+       CLAWS_SET_TIP(down_btn,
+                       _("Move selected action down"));
 
        if (!geometry.min_height) {
                geometry.min_width = 486;
index 9692ffa..3d35a25 100644 (file)
@@ -84,10 +84,9 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *astextviewer_entry;
        GtkWidget *printcmd_label;
        GtkWidget *printcmd_entry;
-       GtkTooltips *tooltip;
+       CLAWS_TIP_DECL();
        int i = 0;
        gchar *tmp;
-       tooltip = gtk_tooltips_new();
 
        table = gtk_table_new(2, 1, FALSE);
        gtk_widget_show(table);
@@ -219,11 +218,10 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
 
        astextviewer_entry = gtk_entry_new ();
        gtk_widget_show(astextviewer_entry);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltip), astextviewer_entry,
+       CLAWS_SET_TIP(astextviewer_entry,
                             _("This option enables MIME parts to be displayed in the "
                               "message view via a script when using the 'Display as text' "
-                              "contextual menu item"),
-                            NULL);
+                              "contextual menu item"));
        
        gtk_table_attach(GTK_TABLE (table2), astextviewer_entry, 1, 2, i, i+1,
                         (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
index b26fea1..34822a4 100644 (file)
@@ -329,12 +329,10 @@ static void prefs_filtering_create(void)
        GtkWidget *bottom_btn;
        GtkWidget *table;
        static GdkGeometry geometry;
-       GtkTooltips *tooltips;
+       CLAWS_TIP_DECL();
 
        debug_print("Creating filtering configuration window...\n");
 
-       tooltips = gtk_tooltips_new();
-
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "prefs_filtering");
        gtk_container_set_border_width (GTK_CONTAINER (window), 8);
        gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);
@@ -469,8 +467,8 @@ static void prefs_filtering_create(void)
        gtk_box_pack_start (GTK_BOX (btn_hbox), reg_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (reg_btn), "clicked",
                         G_CALLBACK(prefs_filtering_register_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), reg_btn,
-                       _("Append the new rule above to the list"), NULL);
+       CLAWS_SET_TIP(reg_btn,
+                       _("Append the new rule above to the list"));
 
        subst_btn = gtkut_get_replace_btn (_("Replace"));
        gtk_widget_show (subst_btn);
@@ -478,24 +476,24 @@ static void prefs_filtering_create(void)
        g_signal_connect(G_OBJECT (subst_btn), "clicked",
                         G_CALLBACK(prefs_filtering_substitute_cb),
                         NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), subst_btn,
-                       _("Replace the selected rule in list with the rule above"), NULL);
+       CLAWS_SET_TIP(subst_btn,
+                       _("Replace the selected rule in list with the rule above"));
 
        del_btn = gtk_button_new_from_stock (GTK_STOCK_DELETE);
        gtk_widget_show (del_btn);
        gtk_box_pack_start (GTK_BOX (btn_hbox), del_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (del_btn), "clicked",
                        G_CALLBACK(prefs_filtering_delete_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), del_btn,
-                       _("Delete the selected rule from the list"), NULL);
+       CLAWS_SET_TIP(del_btn,
+                       _("Delete the selected rule from the list"));
 
        clear_btn = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
        gtk_widget_show (clear_btn);
        gtk_box_pack_start (GTK_BOX (btn_hbox), clear_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (clear_btn), "clicked",
                        G_CALLBACK(prefs_filtering_clear_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), clear_btn,
-                       _("Clear all the input fields in the dialog"), NULL);
+       CLAWS_SET_TIP(clear_btn,
+                       _("Clear all the input fields in the dialog"));
 
        cond_hbox = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (cond_hbox);
@@ -523,8 +521,8 @@ static void prefs_filtering_create(void)
        gtk_box_pack_start (GTK_BOX (btn_vbox), top_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (top_btn), "clicked",
                         G_CALLBACK(prefs_filtering_top), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), top_btn,
-                       _("Move the selected rule to the top"), NULL);
+       CLAWS_SET_TIP(top_btn,
+                       _("Move the selected rule to the top"));
 
 #ifndef GENERIC_UMPC
        page_up_btn = gtk_button_new_with_mnemonic (_("Page up"));
@@ -534,8 +532,8 @@ static void prefs_filtering_create(void)
        gtk_box_pack_start (GTK_BOX (btn_vbox), page_up_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (page_up_btn), "clicked",
                         G_CALLBACK(prefs_filtering_page_up), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), page_up_btn,
-                       _("Move the selected rule one page up"), NULL);
+       CLAWS_SET_TIP(page_up_btn,
+                       _("Move the selected rule one page up"));
 #endif
 
        up_btn = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
@@ -543,16 +541,16 @@ static void prefs_filtering_create(void)
        gtk_box_pack_start (GTK_BOX (btn_vbox), up_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (up_btn), "clicked",
                         G_CALLBACK(prefs_filtering_up), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), up_btn,
-                       _("Move the selected rule up"), NULL);
+       CLAWS_SET_TIP(up_btn,
+                       _("Move the selected rule up"));
 
        down_btn = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
        gtk_widget_show (down_btn);
        gtk_box_pack_start (GTK_BOX (btn_vbox), down_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (down_btn), "clicked",
                         G_CALLBACK(prefs_filtering_down), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), down_btn,
-                       _("Move the selected rule down"), NULL);
+       CLAWS_SET_TIP(down_btn,
+                       _("Move the selected rule down"));
 
 #ifndef GENERIC_UMPC
        page_down_btn = gtk_button_new_with_mnemonic (_("Page down"));
@@ -562,8 +560,8 @@ static void prefs_filtering_create(void)
        gtk_box_pack_start (GTK_BOX (btn_vbox), page_down_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (page_down_btn), "clicked",
                         G_CALLBACK(prefs_filtering_page_down), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), page_down_btn,
-                       _("Move the selected rule one page down"), NULL);
+       CLAWS_SET_TIP(page_down_btn,
+                       _("Move the selected rule one page down"));
 #endif
 
        bottom_btn = gtk_button_new_from_stock (GTK_STOCK_GOTO_BOTTOM);
@@ -571,8 +569,8 @@ static void prefs_filtering_create(void)
        gtk_box_pack_start (GTK_BOX (btn_vbox), bottom_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (bottom_btn), "clicked",
                         G_CALLBACK(prefs_filtering_bottom), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), bottom_btn,
-                       _("Move the selected rule to the bottom"), NULL);
+       CLAWS_SET_TIP(bottom_btn,
+                       _("Move the selected rule to the bottom"));
 
        if (!geometry.min_height) {
                geometry.min_width = 500;
index fd50233..0057ead 100644 (file)
@@ -234,9 +234,8 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
        GtkWidget *enable_processing_when_opening_rec_checkbtn;
        GtkWidget *newmailcheck_rec_checkbtn;
        GtkWidget *offlinesync_rec_checkbtn;
-       GtkTooltips *tooltips;
+       CLAWS_TIP_DECL();
 
-       tooltips = gtk_tooltips_new();
        page->item         = item;
 
        /* Table */
@@ -411,8 +410,8 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
        folder_color_btn = gtk_button_new_with_label("");
        gtk_widget_set_size_request(folder_color_btn, 36, 26);
        gtk_box_pack_start (GTK_BOX(hbox), folder_color_btn, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, folder_color_btn,
-                            _("Pick color for folder"), NULL);
+       CLAWS_SET_TIP(folder_color_btn,
+                            _("Pick color for folder"));
 
        page->folder_color = item->prefs->color;
 
@@ -460,10 +459,10 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
 
        /* Check folder for new mail */
        checkbtn_newmailcheck = gtk_check_button_new_with_label(_("Scan for new mail"));
-       gtk_tooltips_set_tip(tooltips, checkbtn_newmailcheck,
+       CLAWS_SET_TIP(checkbtn_newmailcheck,
                             _("Turn this option on if mail is delivered directly "
                               "to this folder by server side filtering on IMAP or "
-                              "by an external application"), NULL);
+                              "by an external application"));
        gtk_table_attach(GTK_TABLE(table), checkbtn_newmailcheck, 0, 2,
                         rowcount, rowcount+1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
        
@@ -504,7 +503,7 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
        entry_offlinesync = gtk_entry_new();
        gtk_widget_set_size_request (entry_offlinesync, 64, -1);
        gtk_widget_show (entry_offlinesync);
-       gtk_tooltips_set_tip(tooltips, entry_offlinesync, _("0: all bodies"), NULL);
+       CLAWS_SET_TIP(entry_offlinesync, _("0: all bodies"));
        gtk_box_pack_start (GTK_BOX (hbox), entry_offlinesync, FALSE, FALSE, 0);
 
        label_end_offlinesync = gtk_label_new(_("days"));
index cf3f02b..4f1a31d 100644 (file)
@@ -58,7 +58,7 @@ static void imageviewer_create_widget_func(PrefsPage * _page,
        GtkWidget *resize_img;
        GtkWidget *inline_img;
        GtkWidget *print_imgs;
-       GtkTooltips *resize_tooltip;
+       CLAWS_TIP_DECL();
 
        table = gtk_table_new(4, 1, FALSE);
        gtk_widget_show(table);
@@ -72,13 +72,10 @@ static void imageviewer_create_widget_func(PrefsPage * _page,
                         (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                         (GtkAttachOptions) (0), 0, 0);
 
-       resize_tooltip = gtk_tooltips_new();
-
        resize_img = gtk_check_button_new_with_label(_("Resize attached images by default"));
        gtk_widget_show(resize_img);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(resize_tooltip), resize_img,
-                            _("Clicking image toggles scaling"),
-                            NULL);
+       CLAWS_SET_TIP(resize_img,
+                            _("Clicking image toggles scaling"));
        gtk_table_attach(GTK_TABLE(table), resize_img, 0, 1, 1, 2,
                         (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                         (GtkAttachOptions) (0), 0, 0);
index 3dd8655..3f19d48 100644 (file)
@@ -96,13 +96,11 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *checkbtn_clip_network_log;
        GtkWidget *spinbtn_network_log_length;
        GtkObject *spinbtn_network_log_length_adj;
-       GtkTooltips *network_log_length_tooltip;
        GtkWidget *vbox1_filtering_log;
        GtkWidget *hbox_clip_filtering_log;
        GtkWidget *checkbtn_clip_filtering_log;
        GtkWidget *spinbtn_filtering_log_length;
        GtkObject *spinbtn_filtering_log_length_adj;
-       GtkTooltips *filtering_log_length_tooltip;
        GtkWidget *hbox_filtering_log;
        GtkWidget *checkbtn_filtering_log;
        GtkWidget *frame_filtering_log;
@@ -113,13 +111,11 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *checkbtn_filtering_log_folder_proc;
        GtkWidget *checkbtn_filtering_log_pre_proc;
        GtkWidget *checkbtn_filtering_log_post_proc;
-       GtkTooltips *filtering_log_tooltip;
        GtkWidget *hbox_filtering_log_level;
        GtkWidget *label_filtering_log_level;
        GtkWidget *optmenu_filtering_log_level;
        GtkListStore *menu;
        GtkTreeIter iter;
-       GtkTooltips *filtering_log_level_tooltip;
        GtkWidget *frame_disk_log;
        GtkWidget *vbox_disk_log;
        GtkWidget *label;
@@ -130,6 +126,7 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *checkbtn_log_status;
        GtkSizeGroup *log_size_group;
        GtkSizeGroup *filter_size_group;
+       CLAWS_TIP_DECL();
        
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -145,8 +142,6 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        PACK_CHECK_BUTTON (hbox_clip_network_log, checkbtn_clip_network_log,
                           _("Restrict the log window to"));
        
-       network_log_length_tooltip = gtk_tooltips_new();
-
        spinbtn_network_log_length_adj = gtk_adjustment_new (500, 0, G_MAXINT, 1, 10, 10);
        spinbtn_network_log_length = gtk_spin_button_new
                (GTK_ADJUSTMENT (spinbtn_network_log_length_adj), 1, 0);
@@ -156,9 +151,8 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_widget_set_size_request (GTK_WIDGET (spinbtn_network_log_length), 64, -1);
        gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_network_log_length), TRUE);
 
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(network_log_length_tooltip), spinbtn_network_log_length,
-                            _("0 to stop logging in the log window"),
-                            NULL);
+       CLAWS_SET_TIP(spinbtn_network_log_length,
+                            _("0 to stop logging in the log window"));
 
        label = gtk_label_new(_("lines"));
        gtk_widget_show (label);
@@ -177,15 +171,12 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_container_add (GTK_CONTAINER (vbox1_filtering_log), hbox_filtering_log);
        gtk_widget_show (hbox_filtering_log);
 
-       filtering_log_tooltip = gtk_tooltips_new();
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(filtering_log_tooltip),
-                            checkbtn_filtering_log,
+       CLAWS_SET_TIP(checkbtn_filtering_log,
                             _("If checked, turns on logging of filtering and processing rules.\n"
                                "The log is accessible from 'Tools/Filtering log'.\n"
                                "Caution: enabling this option will slow down the filtering/processing, "
                                "this might be critical when applying many rules upon thousands of "
-                               "messages."),
-                               NULL);
+                               "messages."));
 
        vbox2_filtering_log = gtkut_get_options_frame(vbox1_filtering_log, &frame_filtering_log,
                                                        _("Log filtering/processing when..."));
@@ -238,9 +229,7 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
 
        gtk_box_pack_start(GTK_BOX(hbox_filtering_log_level), optmenu_filtering_log_level, FALSE, FALSE, 0);
 
-       filtering_log_level_tooltip = gtk_tooltips_new();
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(filtering_log_level_tooltip),
-                            optmenu_filtering_log_level,
+       CLAWS_SET_TIP(optmenu_filtering_log_level,
                             _("Select the level of detail of the logging.\n"
                                "Choose Low to see when rules are applied, which "
                                "conditions match or don't match and what actions are "
@@ -251,8 +240,7 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
                                "rules are processed or skipped, and why all conditions "
                                "are matched or not matched.\n"
                                "Caution: the higher the level, the greater the "
-                               "impact on performance."),
-                            NULL);
+                               "impact on performance."));
 
        hbox_clip_filtering_log = gtk_hbox_new (FALSE, 8);
        gtk_container_add (GTK_CONTAINER (vbox1_filtering_log), hbox_clip_filtering_log);
@@ -260,8 +248,6 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        PACK_CHECK_BUTTON (hbox_clip_filtering_log, checkbtn_clip_filtering_log,
                           _("Restrict the log window to"));
        
-       filtering_log_length_tooltip = gtk_tooltips_new();
-
        spinbtn_filtering_log_length_adj = gtk_adjustment_new (500, 0, G_MAXINT, 1, 10, 10);
        spinbtn_filtering_log_length = gtk_spin_button_new
                (GTK_ADJUSTMENT (spinbtn_filtering_log_length_adj), 1, 0);
@@ -271,9 +257,8 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_widget_set_size_request (GTK_WIDGET (spinbtn_filtering_log_length), 64, -1);
        gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_filtering_log_length), TRUE);
 
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(filtering_log_length_tooltip), spinbtn_filtering_log_length,
-                            _("0 to stop logging in the log window"),
-                            NULL);
+       CLAWS_SET_TIP(spinbtn_filtering_log_length,
+                            _("0 to stop logging in the log window"));
 
        label = gtk_label_new(_("lines"));
        gtk_widget_show (label);
index 9633920..00f913f 100644 (file)
@@ -131,9 +131,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *hbox_custom_color[COLORLABELS];
        GtkWidget *entry_custom_colorlabel[COLORLABELS];
        gint c;
-       GtkTooltips *tooltips;
        gchar *tooltip_btn_text = NULL;
        gchar *tooltip_entry_text = NULL;
+       CLAWS_TIP_DECL();
 
        notebook = gtk_notebook_new();
        gtk_widget_show(notebook);
@@ -175,10 +175,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        PACK_CHECK_BUTTON (hbox, checkbtn_recycle_colors,
                           _("Cycle quote colors"));
        SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, checkbtn_recycle_colors);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, checkbtn_recycle_colors,
-                            _("If there are more than 3 quote levels, the colors will be reused"),
-                            NULL);
+
+       CLAWS_SET_TIP(checkbtn_recycle_colors,
+                            _("If there are more than 3 quote levels, the colors will be reused"));
 
        hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
        gtk_widget_show (hbox);
@@ -202,9 +201,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_box_pack_end (GTK_BOX(hbox), color_buttons.btn_quote_level1, 
                            FALSE, FALSE, 0);
        SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, color_buttons.btn_quote_level1);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, color_buttons.btn_quote_level1,
-                            Q_("Tooltip|Pick color for 1st level text"), NULL);
+
+       CLAWS_SET_TIP(color_buttons.btn_quote_level1,
+                            Q_("Tooltip|Pick color for 1st level text"));
 
        hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
        gtk_widget_show (hbox);
@@ -228,9 +227,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_box_pack_end (GTK_BOX(hbox), color_buttons.btn_quote_level2, 
                            FALSE, FALSE, 0);
        SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, color_buttons.btn_quote_level2);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, color_buttons.btn_quote_level2,
-                            Q_("Tooltip|Pick color for 2nd level text"), NULL);
+
+       CLAWS_SET_TIP(color_buttons.btn_quote_level2,
+                            Q_("Tooltip|Pick color for 2nd level text"));
 
        hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
        gtk_widget_show (hbox);
@@ -254,9 +253,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_box_pack_end (GTK_BOX(hbox), color_buttons.btn_quote_level3, 
                            FALSE, FALSE, 0);
        SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, color_buttons.btn_quote_level3);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, color_buttons.btn_quote_level3,
-                            Q_("Tooltip|Pick color for 3rd level text"), NULL);
+
+       CLAWS_SET_TIP(color_buttons.btn_quote_level3,
+                            Q_("Tooltip|Pick color for 3rd level text"));
 
        hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
        gtk_widget_show (hbox);
@@ -277,9 +276,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_box_pack_start (GTK_BOX(hbox), color_buttons.btn_quote_level1_bg, 
                            FALSE, FALSE, 0);
        SET_TOGGLE_SENSITIVITY(checkbtn_enable_bgcolors, color_buttons.btn_quote_level1_bg);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, color_buttons.btn_quote_level1_bg,
-                            Q_("Tooltip|Pick color for 1st level text background"), NULL);
+
+       CLAWS_SET_TIP(color_buttons.btn_quote_level1_bg,
+                            Q_("Tooltip|Pick color for 1st level text background"));
 
        label_quote_bgcolor1 = gtk_label_new (_("Background"));
        gtk_widget_show(label_quote_bgcolor1);
@@ -298,9 +297,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_box_pack_start (GTK_BOX(hbox), color_buttons.btn_quote_level2_bg, 
                            FALSE, FALSE, 0);
        SET_TOGGLE_SENSITIVITY(checkbtn_enable_bgcolors, color_buttons.btn_quote_level2_bg);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, color_buttons.btn_quote_level2_bg,
-                            Q_("Tooltip|Pick color for 2nd level text background"), NULL);
+
+       CLAWS_SET_TIP(color_buttons.btn_quote_level2_bg,
+                            Q_("Tooltip|Pick color for 2nd level text background"));
 
        label_quote_bgcolor2 = gtk_label_new (_("Background"));
        gtk_widget_show(label_quote_bgcolor2);
@@ -319,9 +318,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_box_pack_start (GTK_BOX(hbox), color_buttons.btn_quote_level3_bg, 
                            FALSE, FALSE, 0);
        SET_TOGGLE_SENSITIVITY(checkbtn_enable_bgcolors, color_buttons.btn_quote_level3_bg);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, color_buttons.btn_quote_level3_bg,
-                            Q_("Tooltip|Pick color for 3rd level text background"), NULL);
+
+       CLAWS_SET_TIP(color_buttons.btn_quote_level3_bg,
+                            Q_("Tooltip|Pick color for 3rd level text background"));
 
        label_quote_bgcolor3 = gtk_label_new (_("Background"));
        gtk_widget_show(label_quote_bgcolor3);
@@ -339,9 +338,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_box_pack_start (GTK_BOX(hbox), color_buttons.btn_uri, 
                            FALSE, FALSE, 0);
        SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, color_buttons.btn_uri);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, color_buttons.btn_uri,
-                            Q_("Tooltip|Pick color for links"), NULL);
+
+       CLAWS_SET_TIP(color_buttons.btn_uri,
+                            Q_("Tooltip|Pick color for links"));
 
        lable_uri = gtk_label_new (_("URI link"));
        gtk_widget_show(lable_uri);
@@ -358,9 +357,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_box_pack_start (GTK_BOX(hbox), color_buttons.btn_signature, 
                            FALSE, FALSE, 0);
        SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, color_buttons.btn_signature);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, color_buttons.btn_signature,
-                            Q_("Tooltip|Pick color for signatures"), NULL);
+
+       CLAWS_SET_TIP(color_buttons.btn_signature,
+                            Q_("Tooltip|Pick color for signatures"));
 
        label_signature = gtk_label_new (_("Signatures"));
        gtk_widget_show(label_signature);
@@ -378,11 +377,11 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_widget_set_size_request (color_buttons.btn_tgt_folder, 30, 20);
        gtk_box_pack_start (GTK_BOX(hbox), color_buttons.btn_tgt_folder, 
                            FALSE, FALSE, 0);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, color_buttons.btn_tgt_folder,
+
+       CLAWS_SET_TIP(color_buttons.btn_tgt_folder,
                             _("Pick color for Target folder. "
                               "Target folder is used when the option 'Execute immediately "
-                              "when moving or deleting messages' is turned off"), NULL);
+                              "when moving or deleting messages' is turned off"));
 
        label_tgt_folder = gtk_label_new (_("Target folder"));
        gtk_widget_show(label_tgt_folder);
@@ -397,9 +396,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_widget_set_size_request (color_buttons.btn_color_new, 30, 20);
        gtk_box_pack_start (GTK_BOX(hbox), color_buttons.btn_color_new,
                            FALSE, FALSE, 0);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, color_buttons.btn_color_new,
-                            _("Pick color for folders containing new messages"), NULL);
+
+       CLAWS_SET_TIP(color_buttons.btn_color_new,
+                            _("Pick color for folders containing new messages"));
 
        label_color_new = gtk_label_new (_("Folder containing new messages"));
        gtk_widget_show(label_color_new);
@@ -444,17 +443,16 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
                gtk_widget_set_size_request(color_buttons.custom_color[c], 30, 20);
                gtk_box_pack_start(GTK_BOX (hbox_custom_color[c]), color_buttons.custom_color[c],
                                   FALSE, FALSE, 0);
-               tooltips = gtk_tooltips_new();
-               gtk_tooltips_set_tip(tooltips, color_buttons.custom_color[c],
-                                    tooltip_btn_text, NULL);
+
+               CLAWS_SET_TIP(color_buttons.custom_color[c],
+                                    tooltip_btn_text);
 
                entry_custom_colorlabel[c] = gtk_entry_new();
                gtk_widget_show (entry_custom_colorlabel[c]);
                gtk_box_pack_start(GTK_BOX (hbox_custom_color[c]), entry_custom_colorlabel[c],
                                   FALSE, FALSE, 0);
-               tooltips = gtk_tooltips_new();
-               gtk_tooltips_set_tip(tooltips, entry_custom_colorlabel[c],
-                                    tooltip_entry_text, NULL);
+               CLAWS_SET_TIP(entry_custom_colorlabel[c],
+                                    tooltip_entry_text);
        }
 
        for (c = (COLORLABELS>>1)+(COLORLABELS&1); c < COLORLABELS; c++) {
@@ -476,17 +474,15 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
                gtk_widget_set_size_request(color_buttons.custom_color[c], 30, 20);
                gtk_box_pack_start(GTK_BOX (hbox_custom_color[c]), color_buttons.custom_color[c],
                                   FALSE, FALSE, 0);
-               tooltips = gtk_tooltips_new();
-               gtk_tooltips_set_tip(tooltips, color_buttons.custom_color[c],
-                                    tooltip_btn_text, NULL);
+               CLAWS_SET_TIP(color_buttons.custom_color[c],
+                                    tooltip_btn_text);
 
                entry_custom_colorlabel[c] = gtk_entry_new();
                gtk_widget_show (entry_custom_colorlabel[c]);
                gtk_box_pack_start(GTK_BOX (hbox_custom_color[c]), entry_custom_colorlabel[c],
                                   FALSE, FALSE, 0);
-               tooltips = gtk_tooltips_new();
-               gtk_tooltips_set_tip(tooltips, entry_custom_colorlabel[c],
-                                    tooltip_entry_text, NULL);
+               CLAWS_SET_TIP(entry_custom_colorlabel[c],
+                                    tooltip_entry_text);
        }
 
        g_free(tooltip_btn_text);
index 15abaf6..8aaa0b2 100644 (file)
@@ -497,7 +497,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *frame_keys;
        GtkWidget *vbox_keys;
        GtkWidget *checkbtn_gtk_can_change_accels;
-       GtkTooltips *tooltips;
        GtkWidget *button_keybind;
 
        GtkWidget *label_iotimeout;
@@ -510,6 +509,8 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *checkbtn_use_shred;
        GtkWidget *checkbtn_real_time_sync;
        gchar *shred_binary = NULL;
+       CLAWS_TIP_DECL();
+
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
        gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
@@ -540,15 +541,13 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
 
        PACK_CHECK_BUTTON(vbox_keys, checkbtn_gtk_can_change_accels,
                        _("Enable customisable keyboard shortcuts"));
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips),
-                       checkbtn_gtk_can_change_accels,
+
+       CLAWS_SET_TIP(checkbtn_gtk_can_change_accels,
                        _("If checked, you can change the keyboard shortcuts of "
                                "most of the menu items by focusing on the menu "
                                "item and pressing a key combination.\n"
                                "Uncheck this option if you want to lock all "
-                               "existing keyboard shortcuts."),
-                       NULL);
+                               "existing keyboard shortcuts."));
 
        button_keybind = gtk_button_new_with_label(
                                _(" Choose preset keyboard shortcuts... "));
@@ -601,12 +600,10 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
                                     "(the 'shred' program is not available)"));
                gtk_widget_set_sensitive(checkbtn_use_shred, FALSE);
        }
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips),
-                       checkbtn_use_shred,
+       CLAWS_SET_TIP(checkbtn_use_shred,
                        _("Use the 'shred' program to overwrite files with random data before "
                          "deleting them. This slows down deletion. Be sure to "
-                         "read shred's man page for caveats."),
-                       NULL);
+                         "read shred's man page for caveats."));
        PACK_CHECK_BUTTON (vbox2, checkbtn_real_time_sync,
                           _("Synchronise offline folders as soon as possible"));
 
index 090953f..4661bef 100644 (file)
@@ -139,14 +139,13 @@ static void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkListStore *optmenu;
        GtkTreeIter iter;
        GtkCellRenderer *rend;
-       GtkTooltips *charset_tooltip;
        GtkWidget *combobox_encoding;
        GtkWidget *label_encoding;
-       GtkTooltips *encoding_tooltip;
        GtkWidget *checkbtn_senddialog;
        GtkWidget *checkbtn_confirm_send_queued_messages;
        GtkWidget *checkbtn_never_send_retrcpt;
        GtkWidget *table;
+       CLAWS_TIP_DECL();
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -182,8 +181,6 @@ static void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_label_set_justify(GTK_LABEL(label_outcharset), GTK_JUSTIFY_RIGHT);
        gtk_misc_set_alignment(GTK_MISC(label_outcharset), 1, 0.5);
 
-       charset_tooltip = gtk_tooltips_new();
-
        optmenu = gtk_list_store_new(2,
                        G_TYPE_STRING,          /* Menu label */
                        G_TYPE_STRING);         /* Actual charset data string */
@@ -200,10 +197,9 @@ static void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window,
                        (GtkTreeViewRowSeparatorFunc)_combobox_separator_func, NULL, NULL);
 
        gtk_widget_show (combobox_charset);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(charset_tooltip), combobox_charset,
+       CLAWS_SET_TIP(combobox_charset,
                             _("If 'Automatic' is selected, the optimal encoding"
-                              " for the current locale will be used"),
-                            NULL);
+                              " for the current locale will be used"));
        gtk_table_attach(GTK_TABLE(table), combobox_charset, 1, 2, 1, 2,
                        (GtkAttachOptions) (GTK_FILL),
                        (GtkAttachOptions) (0), 0, 0);
@@ -274,14 +270,11 @@ static void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_label_set_justify(GTK_LABEL(label_encoding), GTK_JUSTIFY_RIGHT);
        gtk_misc_set_alignment(GTK_MISC(label_encoding), 1, 0.5);
 
-       encoding_tooltip = gtk_tooltips_new();
-
        combobox_encoding = gtkut_sc_combobox_create(NULL, FALSE);
        gtk_widget_show (combobox_encoding);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(encoding_tooltip), combobox_encoding,
+       CLAWS_SET_TIP(combobox_encoding,
                             _("Specify Content-Transfer-Encoding used when"
-                              " message body contains non-ASCII characters"),
-                            NULL);
+                              " message body contains non-ASCII characters"));
        gtk_table_attach(GTK_TABLE(table), combobox_encoding, 1, 2, 2, 3,
                        (GtkAttachOptions) (GTK_FILL),
                        (GtkAttachOptions) (0), 0, 0);
index ced5843..1253902 100644 (file)
@@ -160,7 +160,7 @@ static void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gp
        GtkWidget *misspelled_label;
        GtkWidget *misspelled_hbox;
        GtkWidget *misspelled_colorbtn;
-       GtkTooltips *tooltips;
+       CLAWS_TIP_DECL();
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -180,9 +180,8 @@ static void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gp
        gtk_widget_show(use_alternate_checkbtn);
        gtk_box_pack_start(GTK_BOX(vbox2), use_alternate_checkbtn, TRUE, TRUE, 0);
 
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, use_alternate_checkbtn, 
-                       _("Faster switching with last used dictionary"), NULL);
+       CLAWS_SET_TIP(use_alternate_checkbtn, 
+                       _("Faster switching with last used dictionary"));
 
        PACK_FRAME(vbox1, path_frame, _("Path to dictionaries"));
        aspell_path_hbox = gtk_hbox_new(FALSE, 8);
@@ -284,10 +283,9 @@ static void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gp
        gtk_box_pack_start(GTK_BOX(misspelled_hbox), misspelled_colorbtn,
                FALSE, FALSE, 0);
        gtk_widget_set_size_request(misspelled_colorbtn, 30, 20);
-       tooltips = gtk_tooltips_new();
-       gtk_tooltips_set_tip(tooltips, misspelled_colorbtn,
+       CLAWS_SET_TIP(misspelled_colorbtn,
                             _("Pick color for misspelled word. "
-                              "Use black to underline"), NULL);
+                              "Use black to underline"));
 
        SET_TOGGLE_SENSITIVITY(enable_aspell_checkbtn, automatic_frame);
        SET_TOGGLE_SENSITIVITY(enable_aspell_checkbtn, dictionary_frame);
index 996fc14..7924c14 100644 (file)
@@ -327,10 +327,8 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *label_datefmt;
        GtkWidget *button_datefmt;
        GtkWidget *entry_datefmt;
-       GtkTooltips *tip_datefmt;
        GtkWidget *hbox_dispitem;
        GtkWidget *button_dispitem;
-
        GtkWidget *hbox2;
        GtkWidget *checkbtn_reopen_last_folder;
        GtkWidget *optmenu_always_show_msg;
@@ -338,7 +336,6 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkObject *spinbtn_mark_as_read_delay_adj;
        GtkWidget *checkbtn_immedexec;
        GtkWidget *checkbtn_ask_mark_all_read;
-       GtkTooltips *immedexec_tooltip;
        GtkWidget *label, *label_fill;
        GtkListStore *menu;
        GtkTreeIter iter;
@@ -348,10 +345,7 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *button_edit_actions;
        GtkWidget *radio_mark_as_read_on_select;
        GtkWidget *radio_mark_as_read_on_new_win;
-
-       GtkTooltips *tooltips;
-
-       tooltips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -475,15 +469,12 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
                (vbox2, checkbtn_threadsubj,
                 _("Thread using subject in addition to standard headers"));
 
-       immedexec_tooltip = gtk_tooltips_new();
-
        PACK_CHECK_BUTTON
                (vbox2, checkbtn_immedexec,
                 _("Execute immediately when moving or deleting messages"));
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(immedexec_tooltip), checkbtn_immedexec,
+       CLAWS_SET_TIP(checkbtn_immedexec,
                             _("Defers moving, copying and deleting of messages"
-                              " until you choose 'Tools/Execute'"),
-                            NULL);
+                              " until you choose 'Tools/Execute'"));
 
        vbox3 = gtkut_get_options_frame(vbox2, NULL, _("Mark message as read"));
 
@@ -551,10 +542,8 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
        label_fill = gtk_label_new(" ");
        gtk_box_pack_start(GTK_BOX(hbox2), label_fill, TRUE, FALSE, 0);
        
-       tip_datefmt = gtk_tooltips_new();
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tip_datefmt),
-                            button_datefmt,
-                            _("Date format help"), NULL);
+       CLAWS_SET_TIP(button_datefmt,
+                            _("Date format help"));
                             
        hbox_dispitem = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox_dispitem);
@@ -576,9 +565,9 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
        PACK_CHECK_BUTTON
                (vbox1, checkbtn_transhdr,
                 _("Translate header names"));
-       gtk_tooltips_set_tip(tooltips, checkbtn_transhdr,
+       CLAWS_SET_TIP(checkbtn_transhdr,
                             _("The display of standard headers (such as 'From:', 'Subject:') "
-                            "will be translated into your language."), NULL);
+                            "will be translated into your language."));
        
        hbox2 = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox2);
index f427a3f..86d4e63 100644 (file)
@@ -180,7 +180,7 @@ static void prefs_template_window_create(void)
        GtkWidget         *ok_btn;
        static GdkGeometry geometry;
        gint i;
-       GtkTooltips *tooltips;
+       CLAWS_TIP_DECL();
 
        debug_print("Creating templates configuration window...\n");
 
@@ -219,7 +219,6 @@ static void prefs_template_window_create(void)
        gtk_widget_show(table);
        gtk_box_pack_start (GTK_BOX (vbox1), table, FALSE, FALSE, 0);
 
-       tooltips = gtk_tooltips_new();
 
        for (i=0; widgets_table[i].label; i++) {
 
@@ -237,8 +236,8 @@ static void prefs_template_window_create(void)
                gtk_table_attach(GTK_TABLE(table), *(widgets_table[i].entry), 1, 2, i, (i + 1),
                                (GtkAttachOptions) (GTK_EXPAND|GTK_SHRINK|GTK_FILL),
                                (GtkAttachOptions) 0, 0, 0);
-               gtk_tooltips_set_tip(tooltips, *(widgets_table[i].entry),
-                               widgets_table[i].tooltips, NULL);
+               CLAWS_SET_TIP(*(widgets_table[i].entry),
+                               widgets_table[i].tooltips);
 
                if (widgets_table[i].compl)
                        address_completion_register_entry(
@@ -301,8 +300,8 @@ static void prefs_template_window_create(void)
        gtk_box_pack_start(GTK_BOX(hbox3), reg_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (reg_btn), "clicked",
                         G_CALLBACK (prefs_template_register_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), reg_btn,
-                       _("Append the new template above to the list"), NULL);
+       CLAWS_SET_TIP(reg_btn,
+                       _("Append the new template above to the list"));
 
        subst_btn = gtkut_get_replace_btn(_("Replace"));
        gtk_widget_show(subst_btn);
@@ -310,24 +309,24 @@ static void prefs_template_window_create(void)
        g_signal_connect(G_OBJECT(subst_btn), "clicked",
                         G_CALLBACK(prefs_template_substitute_cb),
                         NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), subst_btn,
-                       _("Replace the selected template in list with the template above"), NULL);
+       CLAWS_SET_TIP(subst_btn,
+                       _("Replace the selected template in list with the template above"));
 
        del_btn = gtk_button_new_from_stock(GTK_STOCK_DELETE);
        gtk_widget_show(del_btn);
        gtk_box_pack_start(GTK_BOX(hbox3), del_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(del_btn), "clicked",
                         G_CALLBACK(prefs_template_delete_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), del_btn,
-                       _("Delete the selected template from the list"), NULL);
+       CLAWS_SET_TIP(del_btn,
+                       _("Delete the selected template from the list"));
 
        clear_btn = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
        gtk_widget_show (clear_btn);
        gtk_box_pack_start (GTK_BOX (hbox3), clear_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (clear_btn), "clicked",
                        G_CALLBACK(prefs_template_clear_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), clear_btn,
-                       _("Clear all the input fields in the dialog"), NULL);
+       CLAWS_SET_TIP(clear_btn,
+                       _("Clear all the input fields in the dialog"));
 
 #if GTK_CHECK_VERSION(2, 8, 0)
        desc_btn = gtk_button_new_from_stock(GTK_STOCK_INFO);
@@ -338,8 +337,8 @@ static void prefs_template_window_create(void)
        gtk_box_pack_end(GTK_BOX(hbox2), desc_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(desc_btn), "clicked",
                         G_CALLBACK(quote_fmt_quote_description), window);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), desc_btn,
-                       _("Show information on configuring templates"), NULL);
+       CLAWS_SET_TIP(desc_btn,
+                       _("Show information on configuring templates"));
 
        /* templates list */
        hbox4 = gtk_hbox_new(FALSE, 8);
@@ -362,8 +361,8 @@ static void prefs_template_window_create(void)
        gtk_box_pack_start(GTK_BOX(vbox3), top_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(top_btn), "clicked",
                         G_CALLBACK(prefs_template_top_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), top_btn,
-                       _("Move the selected template to the top"), NULL);
+       CLAWS_SET_TIP(top_btn,
+                       _("Move the selected template to the top"));
 
        PACK_VSPACER(vbox3, spc_vbox, VSPACING_NARROW_2);
 
@@ -372,16 +371,16 @@ static void prefs_template_window_create(void)
        gtk_box_pack_start (GTK_BOX(vbox3), up_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(up_btn), "clicked",
                         G_CALLBACK(prefs_template_up_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), up_btn,
-                       _("Move the selected template up"), NULL);
+       CLAWS_SET_TIP(up_btn,
+                       _("Move the selected template up"));
 
        down_btn = gtk_button_new_from_stock(GTK_STOCK_GO_DOWN);
        gtk_widget_show (down_btn);
        gtk_box_pack_start(GTK_BOX (vbox3), down_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (down_btn), "clicked",
                         G_CALLBACK(prefs_template_down_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), down_btn,
-                       _("Move the selected template down"), NULL);
+       CLAWS_SET_TIP(down_btn,
+                       _("Move the selected template down"));
 
        PACK_VSPACER(vbox3, spc_vbox, VSPACING_NARROW_2);
 
@@ -390,8 +389,8 @@ static void prefs_template_window_create(void)
        gtk_box_pack_start(GTK_BOX(vbox3), bottom_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(bottom_btn), "clicked",
                         G_CALLBACK(prefs_template_bottom_cb), NULL);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), bottom_btn,
-                       _("Move the selected template to the bottom"), NULL);
+       CLAWS_SET_TIP(bottom_btn,
+                       _("Move the selected template to the bottom"));
 
        list_view = prefs_template_list_view_create();
        gtk_widget_show(list_view);
index c4c8f08..a5be655 100644 (file)
@@ -324,8 +324,9 @@ static gboolean cb_preview(GtkPrintOperation        *operation,
   GtkToolItem *separator;
   static GdkGeometry geometry;
   GtkWidget *dialog = NULL;
-  GtkTooltips *toolbar_tips = gtk_tooltips_new();
   GtkWidget *statusbar = gtk_hbox_new(2, FALSE);
+  CLAWS_TIP_DECL();
+
   debug_print("Creating internal print preview\n");
 
   print_data = (PrintData*) data;
@@ -373,14 +374,25 @@ static gboolean cb_preview(GtkPrintOperation        *operation,
        
   gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
 
+#if !(GTK_CHECK_VERSION(2,12,0))
+#define CLAWS_SET_TOOL_ITEM_TIP(widget,tip) { \
+       gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(widget), GTK_TOOLTIPS(tips),                    \
+                       tip, NULL);                                                             \
+}
+#else
+#define CLAWS_SET_TOOL_ITEM_TIP(widget,tip) { \
+       gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(widget), tip);                             \
+}
+#endif 
+
 #define TOOLBAR_ITEM(item,text,tooltip,cb,cbdata) {                                                            \
        item = GTK_WIDGET(gtk_tool_button_new_from_stock(text));                                        \
        gtk_tool_item_set_homogeneous(GTK_TOOL_ITEM(item), FALSE);                                      \
        gtk_tool_item_set_is_important(GTK_TOOL_ITEM(item), TRUE);                                      \
        gtk_toolbar_insert(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(item), -1);                              \
        g_signal_connect (G_OBJECT(item), "clicked", G_CALLBACK(cb), cbdata);                           \
-       gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(item), GTK_TOOLTIPS(toolbar_tips),                      \
-                       tooltip, NULL);                                                                 \
+       CLAWS_SET_TOOL_ITEM_TIP(GTK_TOOL_ITEM(item),            \
+                       tooltip);                                                                       \
 }
 
   TOOLBAR_ITEM(preview_data->first, GTK_STOCK_GOTO_FIRST, _("First page"), cb_preview_go_first, preview_data);
index e653321..3ea117d 100644 (file)
@@ -156,6 +156,8 @@ void quotefmt_create_new_msg_fmt_widgets(GtkWindow *parent_window,
        gtk_container_set_border_width (GTK_CONTAINER (vbox_format), 8);
 
        if (override_from_format) {
+               CLAWS_TIP_DECL();
+
                hbox2_format = gtk_hbox_new (FALSE, 8);
                gtk_widget_show (hbox2_format);
                gtk_box_pack_start (GTK_BOX (vbox_format), hbox2_format, FALSE, FALSE, 0);
@@ -171,9 +173,8 @@ void quotefmt_create_new_msg_fmt_widgets(GtkWindow *parent_window,
                gtk_box_pack_start (GTK_BOX (hbox2_format), entry_from, TRUE, TRUE, 0);
                gtk_widget_set_size_request (entry_from, 100, -1);
 
-               gtk_tooltips_set_tip(gtk_tooltips_new(), entry_from,
-                               _("Override From header. This doesn't change the account used to compose the new message."),
-                               NULL);
+               CLAWS_SET_TIP(entry_from,
+                               _("Override From header. This doesn't change the account used to compose the new message."));
        }
 
        hbox_format = gtk_hbox_new (FALSE, 8);
@@ -283,6 +284,8 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
        gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
 
        if (override_from_format) {
+               CLAWS_TIP_DECL();
+
                hbox3 = gtk_hbox_new (FALSE, 8);
                gtk_widget_show (hbox3);
                gtk_box_pack_start (GTK_BOX (vbox_quote), hbox3, FALSE, FALSE, 0);
@@ -298,9 +301,8 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
                gtk_box_pack_start (GTK_BOX (hbox3), entry_from, TRUE, TRUE, 0);
                gtk_widget_set_size_request (entry_from, 100, -1);
 
-               gtk_tooltips_set_tip(gtk_tooltips_new(), entry_from,
-                               _("Override From header. This doesn't change the account used to reply."),
-                               NULL);
+               CLAWS_SET_TIP(entry_from,
+                               _("Override From header. This doesn't change the account used to reply."));
        }
 
        hbox1 = gtk_hbox_new (FALSE, 32);
@@ -414,6 +416,8 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
        gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
 
        if (override_from_format) {
+               CLAWS_TIP_DECL();
+
                hbox3 = gtk_hbox_new (FALSE, 8);
                gtk_widget_show (hbox3);
                gtk_box_pack_start (GTK_BOX (vbox_quote), hbox3, FALSE, FALSE, 0);
@@ -429,9 +433,8 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
                gtk_box_pack_start (GTK_BOX (hbox3), entry_from, TRUE, TRUE, 0);
                gtk_widget_set_size_request (entry_from, 100, -1);
 
-               gtk_tooltips_set_tip(gtk_tooltips_new(), entry_from,
-                               _("Override From header. This doesn't change the account used to forward."),
-                               NULL);
+               CLAWS_SET_TIP(entry_from,
+                               _("Override From header. This doesn't change the account used to forward."));
        }
 
        hbox1 = gtk_hbox_new (FALSE, 32);
index 0153f22..637ffc9 100644 (file)
@@ -222,9 +222,8 @@ static void summary_search_create(void)
        GtkWidget *next_btn;
        GtkWidget *close_btn;
        GtkWidget *stop_btn;
-       GtkTooltips *tooltip;
-
        gboolean is_searching = FALSE;
+       CLAWS_TIP_DECL();
 
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "summary_search");
        gtk_window_set_title(GTK_WINDOW (window), _("Search messages"));
@@ -349,9 +348,9 @@ static void summary_search_create(void)
                          GTK_FILL, 0, 0, 0);
        g_signal_connect(G_OBJECT (adv_condition_btn), "clicked",
                         G_CALLBACK(adv_condition_btn_clicked), search_window.window);
-       tooltip = gtk_tooltips_new();
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltip), adv_condition_btn,
-                            _("Edit search criteria"), NULL);
+
+       CLAWS_SET_TIP(adv_condition_btn,
+                            _("Edit search criteria"));
 
        from_label = gtk_label_new (_("From:"));
        gtk_widget_show (from_label);
index 458b0c8..4d75bfb 100644 (file)
@@ -629,11 +629,14 @@ SummaryView *summary_create(void)
        GtkItemFactory *popupfactory;
        gint n_entries;
        QuickSearch *quicksearch;
+       CLAWS_TIP_DECL();
 
        debug_print("Creating summary view...\n");
        summaryview = g_new0(SummaryView, 1);
 
-       summaryview->tips = gtk_tooltips_new();
+#if !(GTK_CHECK_VERSION(2,12,0))
+       summaryview->tips = tips;
+#endif
 #define SUMMARY_VBOX_SPACING 3
        vbox = gtk_vbox_new(FALSE, SUMMARY_VBOX_SPACING);
        
@@ -655,9 +658,7 @@ SummaryView *summary_create(void)
                                     prefs_common.show_searchbar);
        gtk_widget_show(toggle_search);
 
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(summaryview->tips),
-                            toggle_search,
-                            _("Toggle quick search bar"), NULL);
+       CLAWS_SET_TIP(toggle_search, _("Toggle quick search bar"));
        
        gtk_box_pack_start(GTK_BOX(hbox), toggle_search, FALSE, FALSE, 2);      
 
@@ -693,9 +694,8 @@ SummaryView *summary_create(void)
        multiple_sel_togbtn = gtk_toggle_button_new();
        gtk_widget_show(multiple_sel_togbtn);
        gtk_box_pack_end(GTK_BOX(hbox), multiple_sel_togbtn, FALSE, FALSE, 4);
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(summaryview->tips),
-                            multiple_sel_togbtn,
-                            _("Toggle multiple selection"), NULL);
+       CLAWS_SET_TIP(multiple_sel_togbtn,
+                            _("Toggle multiple selection"));
        g_signal_connect(G_OBJECT(multiple_sel_togbtn), "toggled",
                         G_CALLBACK(summary_toggle_multiple_pressed),
                         summaryview);
@@ -7525,13 +7525,15 @@ void summary_update_unread(SummaryView *summaryview, FolderItem *removed_item)
        guint new, unread, unreadmarked, marked, total;
        guint replied, forwarded, locked, ignored, watched;
        static gboolean tips_initialized = FALSE;
+#if !(GTK_CHECK_VERSION(2,12,0))
+       GtkTooltips *tips = summaryview->tips;
+#endif
 
        if (prefs_common.layout_mode != SMALL_LAYOUT) {
                if (tips_initialized) {
                        summary_set_folder_pixmap(summaryview, STOCK_PIXMAP_DIR_OPEN);
-                       gtk_tooltips_set_tip(GTK_TOOLTIPS(summaryview->tips),
-                            summaryview->folder_pixmap_eventbox,
-                            NULL, NULL);
+                       CLAWS_SET_TIP(summaryview->folder_pixmap_eventbox,
+                            NULL);
                        tips_initialized = FALSE;
                } 
                return;
@@ -7548,15 +7550,13 @@ void summary_update_unread(SummaryView *summaryview, FolderItem *removed_item)
        if (new > 0 || unread > 0) {
                tips_initialized = TRUE;
                summary_set_folder_pixmap(summaryview, STOCK_PIXMAP_DIR_OPEN_HRM);
-               gtk_tooltips_set_tip(GTK_TOOLTIPS(summaryview->tips),
-                            summaryview->folder_pixmap_eventbox,
-                            _("Go back to the folder list (You have unread messages)"), NULL);
+               CLAWS_SET_TIP(summaryview->folder_pixmap_eventbox,
+                            _("Go back to the folder list (You have unread messages)"));
        } else {
                tips_initialized = TRUE;
                summary_set_folder_pixmap(summaryview, STOCK_PIXMAP_DIR_OPEN);
-               gtk_tooltips_set_tip(GTK_TOOLTIPS(summaryview->tips),
-                            summaryview->folder_pixmap_eventbox,
-                            _("Go back to the folder list"), NULL);
+               CLAWS_SET_TIP(summaryview->folder_pixmap_eventbox,
+                            _("Go back to the folder list"));
        }
 }
 
index da0a841..3ff47cb 100644 (file)
@@ -874,10 +874,35 @@ static void toolbar_action_execute(GtkWidget    *widget,
                g_warning ("Error: did not find Claws Action to execute");
 }
 
+#if !(GTK_CHECK_VERSION(2,12,0))
+#define CLAWS_SET_TOOL_ITEM_TIP(widget,tip) { \
+       gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(widget), GTK_TOOLTIPS(toolbar_tips),    \
+                       tip, NULL);                                                             \
+}
+#else
+#define CLAWS_SET_TOOL_ITEM_TIP(widget,tip) { \
+       gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(widget), tip);                             \
+}
+#endif 
+
+#if !(GTK_CHECK_VERSION(2,12,0))
+#define CLAWS_SET_ARROW_TIP(widget,tip) { \
+       gtk_menu_tool_button_set_arrow_tooltip(GTK_MENU_TOOL_BUTTON(widget), GTK_TOOLTIPS(toolbar_tips),        \
+                       tip, NULL);                                                             \
+}
+#else
+#define CLAWS_SET_ARROW_TIP(widget,tip) { \
+       gtk_menu_tool_button_set_arrow_tooltip_text(GTK_MENU_TOOL_BUTTON(widget), tip);                         \
+}
+#endif 
+
 static void activate_compose_button (Toolbar           *toolbar,
                                     ToolbarStyle      style,
                                     ComposeButtonType type)
 {
+#if !(GTK_CHECK_VERSION(2,12,0))
+       GtkTooltips *toolbar_tips = toolbar->tooltips;
+#endif
        if ((!toolbar->compose_mail_btn))
                return;
 
@@ -886,8 +911,7 @@ static void activate_compose_button (Toolbar           *toolbar,
                        GTK_TOOL_BUTTON(toolbar->compose_mail_btn),
                        toolbar->compose_news_icon);
 #ifndef GENERIC_UMPC
-               gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(toolbar->compose_mail_btn), GTK_TOOLTIPS(toolbar->tooltips),
-                       _("Compose News message"), NULL);
+               CLAWS_SET_TOOL_ITEM_TIP(GTK_TOOL_ITEM(toolbar->compose_mail_btn), _("Compose News message"));
 #endif 
                gtk_widget_show(toolbar->compose_news_icon);
        } else {
@@ -895,8 +919,7 @@ static void activate_compose_button (Toolbar           *toolbar,
                        GTK_TOOL_BUTTON(toolbar->compose_mail_btn),
                        toolbar->compose_mail_icon);
 #ifndef GENERIC_UMPC
-               gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(toolbar->compose_mail_btn), GTK_TOOLTIPS(toolbar->tooltips),
-                       _("Compose Email"), NULL);
+               CLAWS_SET_TOOL_ITEM_TIP(GTK_TOOL_ITEM(toolbar->compose_mail_btn), _("Compose Email"));
 #endif 
                gtk_widget_show(toolbar->compose_mail_icon);
        }
@@ -916,6 +939,9 @@ static void activate_learn_button (Toolbar           *toolbar,
                                     ToolbarStyle      style,
                                     LearnButtonType type)
 {
+#if !(GTK_CHECK_VERSION(2,12,0))
+       GtkTooltips *toolbar_tips = toolbar->tooltips;
+#endif
        if ((!toolbar->learn_spam_btn))
                return;
 
@@ -927,8 +953,7 @@ static void activate_learn_button (Toolbar           *toolbar,
                        GTK_TOOL_BUTTON(toolbar->learn_spam_btn),
                        _("Spam"));
 #ifndef GENERIC_UMPC
-               gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(toolbar->learn_spam_btn), GTK_TOOLTIPS(toolbar->tooltips),
-                       _("Learn spam"), NULL); 
+               CLAWS_SET_TOOL_ITEM_TIP(GTK_TOOL_ITEM(toolbar->learn_spam_btn), _("Learn spam"));       
 #endif
                gtk_widget_show(toolbar->learn_spam_icon);
        } else {
@@ -939,8 +964,7 @@ static void activate_learn_button (Toolbar           *toolbar,
                        GTK_TOOL_BUTTON(toolbar->learn_spam_btn),
                        _("Ham"));
 #ifndef GENERIC_UMPC
-               gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(toolbar->learn_spam_btn), GTK_TOOLTIPS(toolbar->tooltips),
-                       _("Learn ham"), NULL);
+               CLAWS_SET_TOOL_ITEM_TIP(GTK_TOOL_ITEM(toolbar->learn_spam_btn), _("Learn ham"));
 #endif 
                gtk_widget_show(toolbar->learn_ham_icon);
        }
@@ -1738,8 +1762,8 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
        gtk_tool_item_set_is_important(GTK_TOOL_ITEM(item), TRUE);                                      \
        g_signal_connect (G_OBJECT(item), "clicked", G_CALLBACK(toolbar_buttons_cb), toolbar_item);     \
        gtk_toolbar_insert(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(item), -1);                              \
-       gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(item), GTK_TOOLTIPS(toolbar_tips),                      \
-                       tooltip, NULL);                                                                 \
+       CLAWS_SET_TOOL_ITEM_TIP(GTK_TOOL_ITEM(item),                                                    \
+                       tooltip);                                                                       \
 }
 
 #define TOOLBAR_MENUITEM(item,icon,text,tooltip,menutip) {                                             \
@@ -1750,10 +1774,9 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
        gtk_tool_item_set_is_important(GTK_TOOL_ITEM(item), TRUE);                                      \
        g_signal_connect (G_OBJECT(item), "clicked", G_CALLBACK(toolbar_buttons_cb), toolbar_item);     \
        gtk_toolbar_insert(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(item), -1);                              \
-       gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(item), GTK_TOOLTIPS(toolbar_tips),                      \
-                       tooltip, NULL);                                                                 \
-       gtk_menu_tool_button_set_arrow_tooltip(GTK_MENU_TOOL_BUTTON(item),                              \
-                               GTK_TOOLTIPS(toolbar_tips), menutip, NULL);                             \
+       CLAWS_SET_TOOL_ITEM_TIP(GTK_TOOL_ITEM(item),                                                    \
+                       tooltip);                                                                       \
+       CLAWS_SET_ARROW_TIP(GTK_MENU_TOOL_BUTTON(item), menutip);                                       \
        child = gtk_bin_get_child(GTK_BIN(item));                                                       \
        gchild = gtk_container_get_children(                                                            \
                        GTK_CONTAINER(child));                                                          \
@@ -1824,9 +1847,9 @@ Toolbar *toolbar_create(ToolbarType        type,
        GSList *toolbar_list;
        Toolbar *toolbar_data;
 #ifndef GENERIC_UMPC
-       GtkTooltips *toolbar_tips;
-       
-       toolbar_tips = gtk_tooltips_new();
+#if !(GTK_CHECK_VERSION(2,12,0))
+       GtkTooltips *toolbar_tips = gtk_tooltips_new();
+#endif
 #endif 
        toolbar_read_config_file(type);
        toolbar_list = toolbar_get_list(type);
@@ -2090,7 +2113,9 @@ Toolbar *toolbar_create(ToolbarType        type,
        }
        toolbar_data->toolbar = toolbar;
 #ifndef GENERIC_UMPC
+#if !(GTK_CHECK_VERSION(2,12,0))
        toolbar_data->tooltips = toolbar_tips;
+#endif
 #endif
        gtk_widget_show_all(toolbar);
 
index a135a5e..8fabff7 100644 (file)
@@ -1104,7 +1104,7 @@ static GtkWidget* mailbox_page (WizardWindow * wizard)
        gchar *uri, *mount_path;
 #endif
        GtkWidget *hbox;
-       GtkTooltips *tips = gtk_tooltips_new();
+       CLAWS_TIP_DECL();
 
        gtk_table_set_row_spacings(GTK_TABLE(table), 4);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8);
@@ -1126,10 +1126,8 @@ static GtkWidget* mailbox_page (WizardWindow * wizard)
 
        gtk_entry_set_text(GTK_ENTRY(wizard->mailbox_name), tmpl.mailbox?tmpl.mailbox:"");
 
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), wizard->mailbox_name,
-                            _("You can also specify an absolute path, for example: "
-                              "\"/home/john/Documents/Mail\""),
-                            NULL);
+       CLAWS_SET_TIP(wizard->mailbox_name, _("You can also specify an absolute path, for example: "
+                              "\"/home/john/Documents/Mail\""));
 
        gtk_box_pack_start(GTK_BOX(hbox), wizard->mailbox_label, FALSE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(hbox), wizard->mailbox_name, TRUE, TRUE, 0);
@@ -1238,8 +1236,8 @@ static GtkWidget* smtp_page (WizardWindow * wizard)
        GtkWidget *label;
        GtkWidget *button;
        GtkWidget *smtp_cert_table;
-       GtkTooltips *tips = gtk_tooltips_new();
        gchar *text;
+       CLAWS_TIP_DECL();
        
        gtk_table_set_row_spacings(GTK_TABLE(table), 4);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8);
@@ -1257,10 +1255,9 @@ static GtkWidget* smtp_page (WizardWindow * wizard)
        gtk_entry_set_text(GTK_ENTRY(wizard->smtp_server), text);
        g_free(text);
 
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), wizard->smtp_server,
+       CLAWS_SET_TIP(wizard->smtp_server,
                             _("You can specify the port number by appending it at the end: "
-                              "\"mail.example.com:25\""),
-                            NULL);
+                              "\"mail.example.com:25\""));
 
        PACK_BOX(hbox, _("<span weight=\"bold\">SMTP server address:</span>"),
                 wizard->smtp_server);
@@ -1472,7 +1469,6 @@ static void wizard_protocol_changed(GtkComboBox *combo, gpointer data)
 static GtkWidget* recv_page (WizardWindow * wizard)
 {
        GtkWidget *table = gtk_table_new(1,1, FALSE);
-       GtkTooltips *tips = gtk_tooltips_new();
        GtkWidget *vbox;
        GtkWidget *hbox;
        GtkWidget *label;
@@ -1482,6 +1478,7 @@ static GtkWidget* recv_page (WizardWindow * wizard)
        GtkTreeIter iter;
        gchar *text;
        gint index = 0;
+       CLAWS_TIP_DECL();
 
        gtk_table_set_row_spacings(GTK_TABLE(table), 4);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8);
@@ -1529,10 +1526,9 @@ static GtkWidget* recv_page (WizardWindow * wizard)
        gtk_entry_set_text(GTK_ENTRY(wizard->recv_server), text);
        g_free(text);
        
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), wizard->recv_server,
+       CLAWS_SET_TIP(wizard->recv_server,
                             _("You can specify the port number by appending it at the end: "
-                              "\"mail.example.com:110\""),
-                            NULL);
+                              "\"mail.example.com:110\""));
 
        wizard->recv_label = gtk_label_new(_("<span weight=\"bold\">Server address:</span>"));
        gtk_label_set_use_markup(GTK_LABEL(wizard->recv_label), TRUE);