A few instances of combobox manipulation still used the old API.
authorAndrej Kacian <ticho@claws-mail.org>
Tue, 6 Feb 2018 13:25:01 +0000 (14:25 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Tue, 6 Feb 2018 13:25:01 +0000 (14:25 +0100)
Patch by Ralph Sennhauser.

AUTHORS
src/addrgather.c
src/editaddress_other_attributes_ldap.c
src/gtk/authors.h
src/gtk/combobox.c
src/gtk/gtkutils.c
src/plugins/notification/notification_prefs.c
src/plugins/vcalendar/vcal_meeting_gtk.c
src/plugins/vcalendar/vcalendar.c

diff --git a/AUTHORS b/AUTHORS
index 85462c2..752d83a 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -320,3 +320,4 @@ contributors (in addition to the above; based on Changelog)
        Thomas Orgis
        Olaf Hering
        Michael Gmelin
+       Ralph Sennhauser
index 03ab8e3..907c3c7 100644 (file)
@@ -366,17 +366,17 @@ static void addrgather_page_fields(gint pageNum, gchar *pageLbl)
        entryBook = gtk_entry_new();
 #else
         books = addressbook_dbus_get_books(&error);
-        entryBook = gtk_combo_box_new_text();
+        entryBook = gtk_combo_box_text_new();
         if (books) {
             for (cur = books; cur; cur = g_slist_next(cur)) {
                 gchar* book = (gchar *) cur->data;
-                gtk_combo_box_prepend_text(GTK_COMBO_BOX(entryBook), book);
+                gtk_combo_box_text_prepend_text(GTK_COMBO_BOX_TEXT(entryBook), book);
                 g_free(book);
             }
             g_slist_free(books);
                }
         else
-            gtk_combo_box_prepend_text(GTK_COMBO_BOX(entryBook), "");
+            gtk_combo_box_text_prepend_text(GTK_COMBO_BOX_TEXT(entryBook), "");
         gtk_combo_box_set_active(GTK_COMBO_BOX(entryBook), 0);
 #endif
        gtk_table_attach( GTK_TABLE(table), entryBook, 1, 2, top, (top + 1),
index 3a499aa..00602fc 100644 (file)
@@ -353,14 +353,14 @@ void addressbook_edit_person_page_attrib_ldap(PersonEditDlg *dialog, gint pageNu
 
        gchar **attribute = (gchar **) ATTRIBUTE;
 
-       combo_box = gtk_combo_box_new_text();
+       combo_box = gtk_combo_box_text_new();
 
        while (*attribute) {
                if (!strcmp(*attribute, "jpegPhoto")) {
                        attribute++;
                        continue;
                }
-               gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), *attribute++);
+               gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), *attribute++);
        }
        gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), 0);
 
index 77a8ba6..c485273 100644 (file)
@@ -274,6 +274,7 @@ static char *CONTRIBS_LIST[] = {
 "Simon 'corecode' Schubert",
 "Kim Schulz",
 "Markus Schwarzenberg",
+"Ralph Sennhauser",
 "Setoh",
 "Michael Shell",
 "shigeri",
index c44858a..11e0c65 100644 (file)
@@ -230,7 +230,7 @@ void combobox_set_popdown_strings(GtkComboBoxText *combobox,
 gboolean combobox_set_value_from_arrow_key(GtkComboBox *combobox,
                                 guint keyval)
 /* used from key_press events upon gtk_combo_box_entry with one text column 
-   (gtk_combo_box_new_text() and with GtkComboBoxEntry's for instance),
+   (gtk_combo_box_text_new() and with GtkComboBoxEntry's for instance),
    make sure that up and down arrow keys behave the same as old with old
    gtk_combo widgets:
     when pressing Up:
index 23b19a6..04cccf7 100644 (file)
@@ -1487,7 +1487,7 @@ gboolean gtkut_tree_model_text_iter_prev(GtkTreeModel *model,
                                 GtkTreeIter *iter,
                                 const gchar* text)
 /* do the same as gtk_tree_model_iter_next, but _prev instead.
-   to use with widgets with one text column (gtk_combo_box_new_text()
+   to use with widgets with one text column (gtk_combo_box_text_new()
    and with GtkComboBoxEntry's for instance),
 */
 {
index 8d5561e..a384ced 100644 (file)
@@ -761,12 +761,12 @@ static void notify_create_banner_page(PrefsPage *page, GtkWindow *window,
        label = gtk_label_new(_("Show banner"));
        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
        gtk_widget_show(label);
-       combo = gtk_combo_box_new_text();
-       gtk_combo_box_insert_text(GTK_COMBO_BOX(combo), NOTIFY_BANNER_SHOW_NEVER,
+       combo = gtk_combo_box_text_new();
+       gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(combo), NOTIFY_BANNER_SHOW_NEVER,
                        _("Never"));
-       gtk_combo_box_insert_text(GTK_COMBO_BOX(combo), NOTIFY_BANNER_SHOW_ALWAYS,
+       gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(combo), NOTIFY_BANNER_SHOW_ALWAYS,
                        _("Always"));
-       gtk_combo_box_insert_text(GTK_COMBO_BOX(combo), NOTIFY_BANNER_SHOW_NONEMPTY,
+       gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(combo), NOTIFY_BANNER_SHOW_NONEMPTY,
                        _("Only when not empty"));
        gtk_combo_box_set_active(GTK_COMBO_BOX(combo), notify_config.banner_show);
        gtk_box_pack_start(GTK_BOX(hbox), combo, FALSE, FALSE, 0);
index b5871e7..6f58e7d 100644 (file)
@@ -277,7 +277,7 @@ VCalAttendee *attendee_add(VCalMeeting *meet, gchar *address, gchar *name, gchar
        VCalAttendee *attendee  = g_new0(VCalAttendee, 1);
 
        attendee->address       = gtk_entry_new();
-       attendee->cutype        = gtk_combo_box_new_text();
+       attendee->cutype        = gtk_combo_box_text_new();
        attendee->avail_evtbox  = gtk_event_box_new();
        attendee->avail_img     = gtk_image_new_from_stock
                         (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_SMALL_TOOLBAR);
@@ -304,10 +304,10 @@ VCalAttendee *attendee_add(VCalMeeting *meet, gchar *address, gchar *name, gchar
        if (partstat)
                attendee->status = g_strdup(partstat);
 
-       gtk_combo_box_append_text(GTK_COMBO_BOX(attendee->cutype), _("Individual"));
-       gtk_combo_box_append_text(GTK_COMBO_BOX(attendee->cutype), _("Group"));
-       gtk_combo_box_append_text(GTK_COMBO_BOX(attendee->cutype), _("Resource"));
-       gtk_combo_box_append_text(GTK_COMBO_BOX(attendee->cutype), _("Room"));
+       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(attendee->cutype), _("Individual"));
+       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(attendee->cutype), _("Group"));
+       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(attendee->cutype), _("Resource"));
+       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(attendee->cutype), _("Room"));
        
        gtk_combo_box_set_active(GTK_COMBO_BOX(attendee->cutype), 0);
        
@@ -1399,7 +1399,7 @@ static VCalMeeting *vcal_meeting_create_real(VCalEvent *event, gboolean visible)
        meet->table1            = gtk_table_new(4, 2, FALSE);
        meet->table2            = gtk_table_new(2, 2, FALSE);
 #endif
-       meet->who               = gtk_combo_box_new_text();
+       meet->who               = gtk_combo_box_text_new();
        
        meet->start_c           = gtk_calendar_new();
        meet->end_c             = gtk_calendar_new();
@@ -1687,7 +1687,7 @@ static VCalMeeting *vcal_meeting_create_real(VCalEvent *event, gboolean visible)
                        s = g_strdup_printf("%s: %s",
                                               ac->account_name, ac->address);
 
-               gtk_combo_box_append_text(GTK_COMBO_BOX(meet->who), s);
+               gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(meet->who), s);
                g_free(s);
                i++;
        }
index 0b6bf69..2884060 100644 (file)
@@ -362,7 +362,7 @@ static void vcalviewer_answer_set_choices(VCalViewer *vcalviewer, VCalEvent *eve
        gtk_widget_hide(vcalviewer->button);
 
        for (i = 0; i < 3; i++) 
-               gtk_combo_box_remove_text(GTK_COMBO_BOX(vcalviewer->answer), 0);
+               gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(vcalviewer->answer), 0);
        
        vcalviewer_show_unavailable(vcalviewer, FALSE);
 
@@ -380,20 +380,20 @@ static void vcalviewer_answer_set_choices(VCalViewer *vcalviewer, VCalEvent *eve
                                        ICAL_CUTYPE_INDIVIDUAL);
                }
                if (account) {
-                       gtk_combo_box_append_text(GTK_COMBO_BOX(vcalviewer->answer), _("Accept"));
-                       gtk_combo_box_append_text(GTK_COMBO_BOX(vcalviewer->answer), _("Tentatively accept"));
-                       gtk_combo_box_append_text(GTK_COMBO_BOX(vcalviewer->answer), _("Decline"));
+                       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(vcalviewer->answer), _("Accept"));
+                       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(vcalviewer->answer), _("Tentatively accept"));
+                       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(vcalviewer->answer), _("Decline"));
                        gtk_widget_set_sensitive(vcalviewer->answer, TRUE);
                        gtk_widget_set_sensitive(vcalviewer->button, TRUE);
                        gtk_widget_show(vcalviewer->answer);
                        gtk_widget_show(vcalviewer->button);
                } else {
-                       gtk_combo_box_append_text(GTK_COMBO_BOX(vcalviewer->answer), "-");
+                       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(vcalviewer->answer), "-");
                        gtk_widget_set_sensitive(vcalviewer->answer, FALSE);
                        gtk_widget_set_sensitive(vcalviewer->button, FALSE);
                }
        } else {
-               gtk_combo_box_append_text(GTK_COMBO_BOX(vcalviewer->answer), "-");
+               gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(vcalviewer->answer), "-");
                gtk_widget_set_sensitive(vcalviewer->answer, FALSE);
                gtk_widget_set_sensitive(vcalviewer->button, FALSE);
        }
@@ -1210,7 +1210,7 @@ MimeViewer *vcal_viewer_create(void)
        vcalviewer->description = gtk_label_new("description");
        vcalviewer->attendees = gtk_label_new("attendees");
 
-       vcalviewer->answer = gtk_combo_box_new_text();
+       vcalviewer->answer = gtk_combo_box_text_new();
        vcalviewer->url = NULL;
        vcalviewer->button = gtk_button_new_with_label(_("Answer"));
        vcalviewer->reedit = gtk_button_new_with_label(_("Edit meeting..."));