Drop old unsupported GTK+ conditionals too
authorColin Leroy <colin@colino.net>
Tue, 10 Jun 2014 09:18:48 +0000 (11:18 +0200)
committerColin Leroy <colin@colino.net>
Tue, 10 Jun 2014 09:18:48 +0000 (11:18 +0200)
23 files changed:
src/compose.c
src/compose.h
src/gtk/filesel.c
src/gtk/gtksctree.c
src/gtk/gtksctree.h
src/message_search.c
src/mimeview.c
src/mimeview.h
src/noticeview.c
src/noticeview.h
src/plugins/notification/notification_trayicon.c
src/plugins/pdf_viewer/poppler_viewer.c
src/plugins/pdf_viewer/poppler_viewer.h
src/plugins/vcalendar/day-view.c
src/plugins/vcalendar/month-view.c
src/plugins/vcalendar/vcal_meeting_gtk.c
src/prefs_summaries.c
src/printing.c
src/summary_search.c
src/summaryview.c
src/summaryview.h
src/toolbar.c
src/toolbar.h

index e1323f2adc60cbba837b72d6f154a4b0ad106904..cfdda3fda6bff7eb291e3f5e8e16f7d6b442ddbf 100644 (file)
@@ -6828,9 +6828,6 @@ static void compose_create_header_entry(Compose *compose)
        gboolean standard_header = FALSE;
        GtkListStore *model;
        GtkTreeIter iter;
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = compose->tooltips;
-#endif
        
        headerentry = g_new0(ComposeHeaderEntry, 1);
 
@@ -7457,10 +7454,6 @@ static Compose *compose_create(PrefsAccount *account,
        compose->mutex = cm_mutex_new();
        compose->set_cursor_pos = -1;
 
-#if !(GTK_CHECK_VERSION(2,12,0))
-       compose->tooltips = tips;
-#endif
-
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "compose");
 
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
@@ -8054,9 +8047,6 @@ 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;
        
index 51d0e7e020d01d218639616eeec1f96d469ce743..114ee89786494ee4bbcc1cb2f2b073254a8b5580 100644 (file)
@@ -136,9 +136,6 @@ struct _Compose
        GtkWidget *scrolledwin;
        GtkWidget *text;
        GtkWidget *from_name;
-#if !GTK_CHECK_VERSION(2,12,0)
-       GtkTooltips *tooltips;
-#endif
 
        GtkWidget *focused_editable;
 
index cced6ec2b80d0ca2b14d6812a8633c0914eafc7a..4b2b2f287c5f2051778b8889281379913e6b4200 100644 (file)
@@ -82,19 +82,11 @@ static GList *filesel_create(const gchar *title, const gchar *path,
                                               GTK_FILE_CHOOSER_ACTION_SAVE);
                        
        gchar * action_btn = (open == TRUE) ? GTK_STOCK_OPEN:GTK_STOCK_SAVE;
-#if !GTK_CHECK_VERSION(2,14,0)
-       GtkWidget *chooser = gtk_file_chooser_dialog_new_with_backend
-                               (title, NULL, action, "gtk+",
-                               GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                               action_btn, GTK_RESPONSE_ACCEPT, 
-                               NULL);
-#else
        GtkWidget *chooser = gtk_file_chooser_dialog_new
                                (title, NULL, action, 
                                GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                                action_btn, GTK_RESPONSE_ACCEPT, 
                                NULL);
-#endif
 
        gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(chooser), FALSE);
 
index 560ab422a70a0402ab7e9d49bd36a9ad717c810f..4e75b08299ec9bac04c24a80df0c94444510c292 100644 (file)
@@ -2043,13 +2043,6 @@ void gtk_sctree_set_column_tooltip           (GtkSCTree          *sctree,
                                             int                 column,
                                             const gchar        *tip)
 {
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips;
-       if (!sctree->tooltips)
-               sctree->tooltips = gtk_tooltips_new();
-       tips = sctree->tooltips;
-#endif
-
        CLAWS_SET_TIP(GTK_CMCLIST(sctree)->column[column].button,
                        tip);
 }
index 84ad2c25b3c36db9ed07931ccb1dd2ecba402b37..b310f96768e48c86a7aabb62ef0a3f8c7fa54e3e 100644 (file)
@@ -37,9 +37,6 @@ struct _GtkSCTree {
 
        /* (dis)allow fancy color stripes */
        gboolean show_stripes;
-#if !GTK_CHECK_VERSION(2,12,0)
-       GtkTooltips *tooltips;
-#endif
        gboolean always_expand_recursively;
        gboolean force_additive_sel;
        gboolean *use_markup;
index 9c076c7cdab5053463ce8c6bff7b1791498ac813..9866d7cfea4bef08158e8473c9b503f4dac72729 100644 (file)
@@ -81,21 +81,9 @@ static gboolean key_pressed          (GtkWidget      *widget,
                                         gpointer        data);
 
 
-#if !GTK_CHECK_VERSION(2,14,0)
-/* Work around http://bugzilla.gnome.org/show_bug.cgi?id=56070 */
 #define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) {                                   \
-       gboolean in_btn = FALSE;                                                        \
-       if (GTK_IS_BUTTON(widget))                                                      \
-               in_btn = GTK_BUTTON(widget)->in_button;                                 \
        gtk_widget_set_sensitive(widget, sensitive);                                    \
-       if (GTK_IS_BUTTON(widget))                                                      \
-               GTK_BUTTON(widget)->in_button = in_btn;                                 \
 }
-#else
-#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) {                                   \
-       gtk_widget_set_sensitive(widget, sensitive);                                    \
-}
-#endif
 
 static void message_show_stop_button(void)
 {
index 088ad292e0e033963cd68fff3a88e7997fe47337..f63a5222e0a9e64d3ca52c0f6dca4440a916c38c 100644 (file)
@@ -458,9 +458,6 @@ MimeView *mimeview_create(MainWindow *mainwin)
        mimeview->icon_mainbox  = icon_mainbox;
        mimeview->icon_count    = 0;
        mimeview->mainwin       = mainwin;
-#if !(GTK_CHECK_VERSION(2,12,0))
-       mimeview->tooltips      = tips;
-#endif
        mimeview->mime_toggle   = mime_toggle;
        mimeview->siginfoview   = siginfoview;
        mimeview->scrollbutton  = scrollbutton;
@@ -2413,9 +2410,6 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
 #ifdef GENERIC_UMPC
        GtkRequisition r;
 #endif
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = mimeview->tooltips;
-#endif
        
        if (!prefs_common.show_inline_attachments && mimeinfo->id)
                return;
index 3819f570df35482e8dc3b098dbac0cd2575bf9c4..e520d55e4fb6367dc392dff8e0ad44688da85e3c 100644 (file)
@@ -92,9 +92,6 @@ struct _MimeView
 
        gint icon_count;
        MainWindow *mainwin;
-#if !GTK_CHECK_VERSION(2,12,0)
-       GtkTooltips *tooltips;
-#endif
 
        NoticeView *siginfoview;
        MimeInfo *siginfo;
index d71621bcdc095c43f922288a57f7eeffe1d7a318..fdb3daf7e576b470d5cc8613b06ae967674a9bd6 100644 (file)
@@ -132,9 +132,6 @@ NoticeView *noticeview_create(MainWindow *mainwin)
        noticeview->button2= widget2;
        noticeview->evtbox = evtbox;
        noticeview->visible= TRUE;
-#if !(GTK_CHECK_VERSION(2,12,0))
-       noticeview->tooltips = tips;
-#endif
        return noticeview;
 }
 
@@ -282,9 +279,6 @@ void noticeview_set_icon_clickable(NoticeView *noticeview, gboolean setting)
 
 void noticeview_set_tooltip (NoticeView *noticeview, const gchar *text)
 {
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = noticeview->tooltips;
-#endif
        CLAWS_SET_TIP(noticeview->evtbox,
                        text);
 
index 72742ce604bf9f05d7ff394edc4870eeea04d30f..bc380e7db08ea985ed77d661af8a2318ae19c7a3 100644 (file)
@@ -40,9 +40,6 @@ struct _NoticeView
        void            (*press2) (NoticeView *, gpointer user_data);
        gboolean         icon_clickable;
        GtkWidget       *evtbox;
-#if !GTK_CHECK_VERSION(2,12,0)
-       GtkTooltips *tooltips;
-#endif
 };
 
 NoticeView     *noticeview_create      (MainWindow     *mainwin);
index 584d5153c63fd2ac4a9a4756abc2de7af9df2ede..3fc9a7649a7c751255f74e95574f797f6fabbdce 100644 (file)
@@ -269,11 +269,8 @@ void notification_update_trayicon()
   buf = g_strdup_printf(_("New %d, Unread: %d, Total: %d"),
                        count.new_msgs, count.unread_msgs,
                        count.total_msgs);
-#if GTK_CHECK_VERSION(2,16,0)
   gtk_status_icon_set_tooltip_text(trayicon, buf);
-#else
-  gtk_status_icon_set_tooltip(trayicon, buf);
-#endif
+
   g_free(buf);
 
   /* Pixmap */
index 81202374efee817adeaf7bafaedfb9699b555164..df66fa5d508a29a1297e59072beac09ca96686e9 100644 (file)
@@ -1594,7 +1594,7 @@ static void pdf_viewer_scroll_one_line(MimeViewer *_viewer, gboolean up)
        gtk_table_set_col_spacing(GTK_TABLE(viewer->widgets_table), col, 3*BUTTON_H_PADDING); \
        col++;
 
-#if GTK_CHECK_VERSION(2,10,0) && POPPLER_HAS_CAIRO && !USE_LIBGNOMEPRINT
+#if POPPLER_HAS_CAIRO
 static PangoContext *pdf_viewer_get_pango_context(gpointer data)
 {
        return NULL;
@@ -1687,7 +1687,7 @@ static MimeViewer *pdf_viewer_create(void)
        viewer->mimeviewer.text_search = pdf_viewer_text_search;
        viewer->mimeviewer.scroll_page = pdf_viewer_scroll_page;
        viewer->mimeviewer.scroll_one_line = pdf_viewer_scroll_one_line;
-#if GTK_CHECK_VERSION(2,10,0) && POPPLER_HAS_CAIRO && !USE_LIBGNOMEPRINT
+#if POPPLER_HAS_CAIRO
        viewer->mimeviewer.print = pdf_viewer_print;
 #endif
        viewer->scrollwin = gtk_scrolled_window_new(NULL, NULL);
@@ -1721,10 +1721,6 @@ static MimeViewer *pdf_viewer_create(void)
        gtk_widget_set_size_request(viewer->frame_index, 18, -1);
        gtk_frame_set_label(GTK_FRAME(viewer->frame_index), _("Document Index"));
 
-#if !(GTK_CHECK_VERSION(2,12,0))
-       viewer->button_bar_tips = tips;
-#endif
-
        ADD_SEP_TO_TABLE
        ADD_BUTTON_TO_TABLE(viewer->first_page, GTK_STOCK_GOTO_FIRST)
        ADD_BUTTON_TO_TABLE(viewer->prev_page, GTK_STOCK_GO_BACK)
index 457b31c0abd62dc558454505026bb977b84d94b8..39818637548527314ce84a09b2aa8c81ea32b896 100644 (file)
@@ -91,9 +91,7 @@ struct _PdfViewer
        GtkWidget                       *doc_index;
        /* end GtkButtons */
        GtkTable                        *table_doc_info;
-#if !GTK_CHECK_VERSION(2,12,0)
-       GtkTooltips                     *button_bar_tips;
-#endif
+
        PopplerDocument         *pdf_doc;
        PopplerPage                     *pdf_page;
        PopplerIndexIter        *pdf_index;
index 53cc7cb520ef7ffe37ddaf1d62809b3aa3f9e284..46dc7983c95d621c31dc7536335549b9b0a9f9da 100644 (file)
@@ -53,9 +53,7 @@
 struct _day_win
 {
     GtkAccelGroup *accel_group;
-#if !GTK_CHECK_VERSION(2,12,0)
-    GtkTooltips   *Tooltips;
-#endif
+
     GtkWidget *Window;
     GtkWidget *Vbox;
 
@@ -147,9 +145,6 @@ void dw_close_window(day_win *dw)
 {
     vcal_view_set_summary_page(dw->Vbox, dw->selsig);
 
-#if !(GTK_CHECK_VERSION(2,12,0))
-    gtk_object_destroy(G_OBJECT(dw->Tooltips));
-#endif
     g_free(dw);
     dw = NULL;
 }
@@ -365,9 +360,6 @@ static void add_row(day_win *dw, VCalEvent *event, gint days)
     GtkWidget *ev, *lab, *hb;
     time_t t_start, t_end;
     struct tm tm_first, tm_start, tm_end;
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = dw->Tooltips;
-#endif
 
     /* First clarify timings */
     t_start = icaltime_as_timet(icaltime_from_string(event->dtstart));
@@ -749,9 +741,6 @@ static void build_day_view_table(day_win *dw)
     GtkWidget *arrow;
     gchar *tip;
     gint first_col_day = -1;
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = dw->Tooltips;
-#endif
 
 #ifdef G_OS_WIN32
        if (t < 0)
@@ -896,9 +885,7 @@ day_win *create_day_win(FolderItem *item, struct tm tmdate)
     /* initialisation + main window + base vbox */
     dw = g_new0(day_win, 1);
     dw->scroll_pos = -1; /* not set */
-#if !(GTK_CHECK_VERSION(2,12,0))
-    dw->Tooltips = tips;
-#endif
+
     dw->accel_group = gtk_accel_group_new();
     
     while (tmdate.tm_wday != 1)
index 93c504b613c9ee1311eb20f2e6d9c23fefe1d47a..ba59a2d93cb31287744d96e1225af8f0010122ee 100644 (file)
@@ -53,9 +53,7 @@
 struct _month_win
 {
     GtkAccelGroup *accel_group;
-#if !GTK_CHECK_VERSION(2,12,0)
-    GtkTooltips   *Tooltips;
-#endif
+
     GtkWidget *Window;
     GtkWidget *Vbox;
 
@@ -142,9 +140,7 @@ void mw_close_window(month_win *mw)
 {
     vcal_view_set_summary_page(mw->Vbox, mw->selsig);
     
-#if !(GTK_CHECK_VERSION(2,12,0))
-    gtk_object_destroy(G_OBJECT(mw->Tooltips));
-#endif
+
     g_free(mw);
     mw = NULL;
 }
@@ -353,10 +349,6 @@ static void add_row(month_win *mw, VCalEvent *event, gint days)
     struct tm tm_today;
     gboolean start_prev_mon = FALSE;
 
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = mw->Tooltips;
-#endif
-
     localtime_r(&now, &tm_today);
 
     tm_today.tm_year += 1900;
@@ -495,14 +487,10 @@ static void add_row(month_win *mw, VCalEvent *event, gint days)
        CLAWS_SET_TIP(ev, tip);
         gtk_box_pack_start(GTK_BOX(hb), ev, TRUE, TRUE, 0);
     } else {
-#if !GTK_CHECK_VERSION(2,12,0)
-        GtkTooltipsData *tdata = gtk_tooltips_data_get(ev);
-       gchar *new = g_strdup_printf("%s\n\n%s", tdata?tdata->tip_text:"", tip);
-#else
        gchar *old = gtk_widget_get_tooltip_text(ev);
        gchar *new = g_strdup_printf("%s\n\n%s", old?old:"", tip);
        g_free(old);
-#endif
+
        CLAWS_SET_TIP(ev, new);
        g_free(new);
     }
@@ -584,10 +572,6 @@ static void fill_days(month_win *mw, gint days, FolderItem *item)
     int weekoffset = -1;
     time_t now = time(NULL);
     struct tm tm_today;
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = mw->Tooltips;
-#endif
-
     
     localtime_r(&now, &tm_today);
 
@@ -799,9 +783,6 @@ static void build_month_view_colours(month_win *mw)
 static void fill_hour(month_win *mw, gint col, gint row, char *text)
 {
     GtkWidget *name, *ev;
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = mw->Tooltips;
-#endif
 
     ev = gtk_event_box_new();
     name = gtk_label_new(text);
@@ -833,9 +814,6 @@ static void build_month_view_table(month_win *mw)
     int weekoffset = -1;
     GDate *date;
     int first_week=0;
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = mw->Tooltips;
-#endif
 
     if (mainwindow_get_mainwindow()) {
         GtkAllocation allocation;
@@ -990,9 +968,7 @@ month_win *create_month_win(FolderItem *item, struct tm tmdate)
     /* initialisation + main window + base vbox */
     mw = g_new0(month_win, 1);
     mw->scroll_pos = -1; /* not set */
-#if !(GTK_CHECK_VERSION(2,12,0))
-    mw->Tooltips = tips;
-#endif
+
     mw->accel_group = gtk_accel_group_new();
 
     while (tmdate.tm_mday != 1)
index c5cf89e9587e6c48ef8ee85e0f3d4cfb23cb3c34..5dd32ad88ca315cce48966bdda6f8110cfbd3ba5 100644 (file)
@@ -88,9 +88,6 @@ struct _VCalMeeting
        GtkWidget *total_avail_msg;
        PrefsAccount *account;
        gboolean visible;
-#if !GTK_CHECK_VERSION(2,12,0)
-       GtkTooltips *tips;
-#endif
 };
 
 struct _VCalAttendee {
@@ -278,9 +275,6 @@ VCalAttendee *attendee_add(VCalMeeting *meet, gchar *address, gchar *name, gchar
 {
        GtkWidget *att_hbox = gtk_hbox_new(FALSE, 6);
        VCalAttendee *attendee  = g_new0(VCalAttendee, 1);
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = meet->tips;
-#endif
 
        attendee->address       = gtk_entry_new();
        attendee->cutype        = gtk_combo_box_new_text();
@@ -714,9 +708,6 @@ static void meeting_end_changed(GtkWidget *widget, gpointer data)
 static void att_update_icon(VCalMeeting *meet, VCalAttendee *attendee, gint avail, gchar *text)
 {
        const gchar *icon = GTK_STOCK_DIALOG_INFO;
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = meet->tips;
-#endif
 
        switch (avail) {
                case 0:  icon = GTK_STOCK_DIALOG_WARNING;       break;
@@ -867,9 +858,6 @@ static gboolean find_availability(const gchar *dtstart, const gchar *dtend, GSLi
        GHashTable *avail_table_avail = g_hash_table_new(NULL, g_direct_equal);
        GHashTable *avail_table_before = g_hash_table_new(NULL, g_direct_equal);
        GHashTable *avail_table_after = g_hash_table_new(NULL, g_direct_equal);
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = meet->tips;
-#endif
        
        for (cur = attendees; cur; cur = cur->next) {
                VCalAttendee *attendee = (VCalAttendee *)cur->data;
@@ -1015,9 +1003,6 @@ static gboolean check_attendees_availability(VCalMeeting *meet, gboolean tell_if
                                "internal.ifb", NULL);
        gboolean local_only = FALSE;
        GSList *attlist;
-#if !(GTK_CHECK_VERSION(2,12,0))
-       GtkTooltips *tips = meet->tips;
-#endif
 
        if (vcalprefs.freebusy_get_url == NULL
        ||  *vcalprefs.freebusy_get_url == '\0') {
@@ -1405,9 +1390,6 @@ static VCalMeeting *vcal_meeting_create_real(VCalEvent *event, gboolean visible)
        if (!watch_cursor)
                watch_cursor = gdk_cursor_new(GDK_WATCH);
 
-#if !(GTK_CHECK_VERSION(2,12,0))
-       meet->tips = tips;
-#endif
        meet->visible = visible;
 
        meet->window            = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "vcal_meeting_gtk");
index d9a3108befbdd3d8f4768f90c2cbcec6abb30305..495110166d38bace7f5e98683f6b2cb5da961ed9 100644 (file)
@@ -512,9 +512,6 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
                (vbox2, checkbtn_show_tooltips,
                 _("Show tooltips"));
 
-#if !GTK_CHECK_VERSION(2,12,0) && !GENERIC_UMPC
-       gtk_widget_hide(checkbtn_show_tooltips);
-#endif
        hbox2 = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox2);
        gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, TRUE, 0);
index e4cb1f1d4e0f57af1787e8870adf7ce76f23760d..064623694d63929b4ae7484b30efe0a60d44eae2 100644 (file)
@@ -441,11 +441,8 @@ static gboolean cb_preview(GtkPrintOperation        *operation,
   
        /* toolbar */
        toolbar = gtk_toolbar_new();
-#if (GTK_CHECK_VERSION(2,16,0))
        gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar), GTK_ORIENTATION_HORIZONTAL);
-#else
-       gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL);
-#endif
+
        switch (prefs_common.toolbar_style) {
                case TOOLBAR_ICON:
                        gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);
@@ -464,16 +461,9 @@ 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));                                        \
index ac14f317574bfc1bdd0256dfbe030a2b4af7d241..97adcd40a27b6ea94f46a92b305fabd4fffda16f 100644 (file)
@@ -149,21 +149,9 @@ static gboolean key_pressed                (GtkWidget      *widget,
                                         GdkEventKey    *event,
                                         gpointer        data);
 
-#if !GTK_CHECK_VERSION(2,14,0)
-/* Work around http://bugzilla.gnome.org/show_bug.cgi?id=56070 */
 #define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) {                                   \
-       gboolean in_btn = FALSE;                                                        \
-       if (GTK_IS_BUTTON(widget))                                                      \
-               in_btn = GTK_BUTTON(widget)->in_button;                                 \
        gtk_widget_set_sensitive(widget, sensitive);                                    \
-       if (GTK_IS_BUTTON(widget))                                                      \
-               GTK_BUTTON(widget)->in_button = in_btn;                                 \
 }
-#else
-#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) {                                   \
-       gtk_widget_set_sensitive(widget, sensitive);                                    \
-}
-#endif
 
 static gchar* add_history_get(GtkWidget *from, GList **history)
 {
index bb1358c4c0445f3fbd9fe8ab66e0bead3ad6703f..05c40b68e40bec7b0193385e20434e5ddbbabdeb 100644 (file)
@@ -525,9 +525,6 @@ SummaryView *summary_create(MainWindow *mainwin)
        debug_print("Creating summary view...\n");
        summaryview = g_new0(SummaryView, 1);
 
-#if !(GTK_CHECK_VERSION(2,12,0))
-       summaryview->tooltips = tips;
-#endif
 #define SUMMARY_VBOX_SPACING 3
        vbox = gtk_vbox_new(FALSE, SUMMARY_VBOX_SPACING);
        
@@ -8008,9 +8005,6 @@ 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->tooltips;
-#endif
 
        if (prefs_common.layout_mode != SMALL_LAYOUT) {
                if (tips_initialized) {
index 205e2a14ab7b6d59dc1de1343dbeb028fbda8dd2..140c410b70cff6b7e106e59626768db447182092 100644 (file)
@@ -172,9 +172,6 @@ private:
        FolderItem *search_root_folder;
 
        guint mark_as_read_timeout_tag;
-#if !GTK_CHECK_VERSION(2,12,0)
-       GtkTooltips *tooltips;
-#endif
 };
 
 SummaryView    *summary_create(MainWindow *mainwin);
index 0f797808512fd313f6d29c84057157b18b6c694a..ee04e8062316e14d57cb2db18ceff979393d896f 100644 (file)
@@ -874,35 +874,18 @@ gboolean toolbar_check_action_btns(ToolbarType type)
        return modified;
 }
 
-#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;
 
@@ -939,9 +922,6 @@ 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;
 
@@ -1907,11 +1887,6 @@ Toolbar *toolbar_create(ToolbarType       type,
        GSList *toolbar_list;
        Toolbar *toolbar_data;
        GtkWidget *menu;
-#ifndef GENERIC_UMPC
-#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);
 
@@ -1919,11 +1894,8 @@ Toolbar *toolbar_create(ToolbarType       type,
 
        toolbar = gtk_toolbar_new();
 
-#if (GTK_CHECK_VERSION(2,16,0))
        gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar), GTK_ORIENTATION_HORIZONTAL);
-#else
-       gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL);
-#endif
+
        gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_BOTH);
        gtk_toolbar_set_show_arrow(GTK_TOOLBAR(toolbar), TRUE);
        
@@ -2211,11 +2183,7 @@ 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);
 
        if (type == TOOLBAR_MAIN) {
@@ -2324,61 +2292,9 @@ void toolbar_update(ToolbarType type, gpointer data)
        }
 }
 
-#if !GTK_CHECK_VERSION(2,14,0)
-/* Work around http://bugzilla.gnome.org/show_bug.cgi?id=56070 */
 #define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) {           \
-       gboolean in_btn1 = FALSE, in_btn2 = FALSE;              \
-       if (GTK_IS_BUTTON(widget))                              \
-               in_btn1 = GTK_BUTTON(widget)->in_button;        \
-       else if (GTK_IS_MENU_TOOL_BUTTON(widget)) {             \
-               GtkWidget *child = gtk_bin_get_child(           \
-                       GTK_BIN(widget));                       \
-               GList *gchild = gtk_container_get_children(     \
-                       GTK_CONTAINER(child));                  \
-               GtkWidget *btn = (GtkWidget *)gchild->data;     \
-               GtkWidget *arr = (GtkWidget *)                  \
-                       (gchild->next?gchild->next->data:NULL); \
-               g_list_free(gchild);                            \
-               if (GTK_IS_BUTTON(btn))                         \
-                       in_btn1 = GTK_BUTTON(btn)->in_button;   \
-               if (GTK_IS_BUTTON(arr))                         \
-                       in_btn2 = GTK_BUTTON(arr)->in_button;   \
-       }                                                       \
-       else if (GTK_IS_TOOL_ITEM(widget)) {                    \
-               GtkWidget *child = gtk_bin_get_child(           \
-                       GTK_BIN(widget));                       \
-               if (GTK_IS_BUTTON(child))                       \
-                       in_btn1 = GTK_BUTTON(child)->in_button; \
-       }                                                       \
        gtk_widget_set_sensitive(widget, sensitive);            \
-       if (GTK_IS_BUTTON(widget))                              \
-               GTK_BUTTON(widget)->in_button = in_btn1;        \
-       else if (GTK_IS_MENU_TOOL_BUTTON(widget)) {             \
-               GtkWidget *child = gtk_bin_get_child(           \
-                       GTK_BIN(widget));                       \
-               GList *gchild = gtk_container_get_children(     \
-                       GTK_CONTAINER(child));                  \
-               GtkWidget *btn = (GtkWidget *)gchild->data;     \
-               GtkWidget *arr = (GtkWidget *)                  \
-                       (gchild->next?gchild->next->data:NULL); \
-               g_list_free(gchild);                            \
-               if (GTK_IS_BUTTON(btn))                         \
-                       GTK_BUTTON(btn)->in_button = in_btn1;   \
-               if (GTK_IS_BUTTON(arr))                         \
-                       GTK_BUTTON(arr)->in_button = in_btn2;   \
-       }                                                       \
-       else if (GTK_IS_TOOL_ITEM(widget)) {                    \
-               GtkWidget *child = gtk_bin_get_child(           \
-                       GTK_BIN(widget));                       \
-               if (GTK_IS_BUTTON(child))                       \
-                       GTK_BUTTON(child)->in_button = in_btn1; \
-       }                                                       \
 }
-#else
-#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) {           \
-       gtk_widget_set_sensitive(widget, sensitive);            \
-}
-#endif
 
 void toolbar_main_set_sensitive(gpointer data)
 {
@@ -2625,9 +2541,6 @@ static void toolbar_init(Toolbar * toolbar)
 #ifdef USE_ENCHANT
        toolbar->spellcheck_btn    = NULL;
 #endif
-#if !GTK_CHECK_VERSION(2,12,0)
-       toolbar->tooltips          = NULL;
-#endif
 
        toolbar_destroy(toolbar);
 }
index c51204c9df3ec1d96b3b89d19be0961b8b0b7a56..f8b1f21d54c38f6c42f4dfcfc0e4c5c39a8612b2 100644 (file)
@@ -108,9 +108,6 @@ struct _Toolbar {
 #ifdef USE_ENCHANT
        GtkWidget *spellcheck_btn;
 #endif
-#if !GTK_CHECK_VERSION(2,12,0)
-       GtkTooltips *tooltips;
-#endif
 };
 
 struct _ToolbarItem {