[epiphany/wip/exalm/gtk4] Silence deprecation warnings for tree view and style context calls




commit 68ddc65b4883a6140f75aca03b154446b2d7ba8b
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sun Oct 16 01:20:46 2022 +0400

    Silence deprecation warnings for tree view and style context calls
    
    We'll need to port all of that, but separately.

 embed/ephy-web-view.c                           |  2 ++
 lib/widgets/ephy-security-popover.c             | 20 ++++++++++++++++++++
 src/preferences/clear-data-view.c               | 16 ++++++++++++++++
 src/preferences/prefs-general-page.c            | 12 ++++++++++++
 src/preferences/webapp-additional-urls-dialog.c | 16 ++++++++++++++++
 src/synced-tabs-dialog.c                        |  8 ++++++++
 src/window-commands.c                           | 16 ++++++++++++++++
 7 files changed, 90 insertions(+)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index a9d69f7a4..fcab75d88 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -3952,9 +3952,11 @@ ephy_web_view_constructed (GObject *object)
    * dark mode. Note that we have to later reset this to white before
    * loading any non-Epiphany page.
    */
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   context = gtk_widget_get_style_context (GTK_WIDGET (web_view));
   if (gtk_style_context_lookup_color (context, "theme_base_color", &color))
     webkit_web_view_set_background_color (WEBKIT_WEB_VIEW (web_view), &color);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   cors_allowlist = g_new (char *, 2);
   cors_allowlist[0] = g_strdup ("ephy-resource://*/*");
diff --git a/lib/widgets/ephy-security-popover.c b/lib/widgets/ephy-security-popover.c
index a10ae9fe7..ea1acb0dd 100644
--- a/lib/widgets/ephy-security-popover.c
+++ b/lib/widgets/ephy-security-popover.c
@@ -86,6 +86,7 @@ set_permission_ads_combobox_state (EphyPermissionsManager *permissions_manager,
                                                         permission_id,
                                                         origin);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   switch (permission) {
     case EPHY_PERMISSION_UNDECIDED:
       gtk_combo_box_set_active (GTK_COMBO_BOX (widget),
@@ -98,6 +99,7 @@ set_permission_ads_combobox_state (EphyPermissionsManager *permissions_manager,
       gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
       break;
   }
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
@@ -112,6 +114,7 @@ set_permission_combobox_state (EphyPermissionsManager *permissions_manager,
                                                         permission_id,
                                                         origin);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   switch (permission) {
     case EPHY_PERMISSION_PERMIT:
       gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
@@ -123,6 +126,7 @@ set_permission_combobox_state (EphyPermissionsManager *permissions_manager,
       gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2);
       break;
   }
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
@@ -376,7 +380,9 @@ on_ad_combobox_changed (GtkComboBox         *widget,
   EphyPermission permission = EPHY_PERMISSION_UNDECIDED;
   gboolean global_flag = g_settings_get_boolean (web_settings, EPHY_PREFS_WEB_ENABLE_ADBLOCK);
   g_autofree gchar *origin = NULL;
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gboolean state = gtk_combo_box_get_active (widget) == 1;
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   origin = ephy_uri_to_security_origin (popover->address);
   if (!origin)
@@ -433,42 +439,54 @@ static void
 on_notification_combobox_changed (GtkComboBox         *box,
                                   EphySecurityPopover *popover)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   handle_permission_combobox_changed (popover, gtk_combo_box_get_active (box), 
EPHY_PERMISSION_TYPE_SHOW_NOTIFICATIONS);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
 on_save_password_combobox_changed (GtkComboBox         *box,
                                    EphySecurityPopover *popover)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   handle_permission_combobox_changed (popover, gtk_combo_box_get_active (box), 
EPHY_PERMISSION_TYPE_SAVE_PASSWORD);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
 on_access_location_combobox_changed (GtkComboBox         *box,
                                      EphySecurityPopover *popover)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   handle_permission_combobox_changed (popover, gtk_combo_box_get_active (box), 
EPHY_PERMISSION_TYPE_ACCESS_LOCATION);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
 on_access_microphone_combobox_changed (GtkComboBox         *box,
                                        EphySecurityPopover *popover)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   handle_permission_combobox_changed (popover, gtk_combo_box_get_active (box), 
EPHY_PERMISSION_TYPE_ACCESS_MICROPHONE);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
 on_access_webcam_combobox_changed (GtkComboBox         *box,
                                    EphySecurityPopover *popover)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   handle_permission_combobox_changed (popover, gtk_combo_box_get_active (box), 
EPHY_PERMISSION_TYPE_ACCESS_WEBCAM);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
 on_autoplay_policy_combobox_changed (GtkComboBox         *box,
                                      EphySecurityPopover *popover)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   handle_permission_combobox_changed (popover, gtk_combo_box_get_active (box), 
EPHY_PERMISSION_TYPE_AUTOPLAY_POLICY);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static GtkWidget *
@@ -491,6 +509,7 @@ add_permission_combobox (EphySecurityPopover *popover,
   gtk_widget_set_hexpand (tmp, TRUE);
   gtk_box_append (GTK_BOX (hbox), tmp);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   widget = gtk_combo_box_text_new ();
   gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), _("Allow"));
   gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), _("Deny"));
@@ -499,6 +518,7 @@ add_permission_combobox (EphySecurityPopover *popover,
     const gchar *name = third_option_name == NULL ? _("Ask") : third_option_name;
     gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), _(name));
   }
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   gtk_box_append (GTK_BOX (hbox), widget);
   g_signal_connect (widget, "changed", G_CALLBACK (callback), popover);
diff --git a/src/preferences/clear-data-view.c b/src/preferences/clear-data-view.c
index 4449944fe..737c3463d 100644
--- a/src/preferences/clear-data-view.c
+++ b/src/preferences/clear-data-view.c
@@ -116,6 +116,7 @@ website_data_fetched_cb (WebKitWebsiteDataManager *manager,
   ephy_data_view_set_has_data (EPHY_DATA_VIEW (clear_data_view), TRUE);
   active_items = g_settings_get_int (EPHY_SETTINGS_MAIN, EPHY_PREFS_ACTIVE_CLEAR_DATA_ITEMS);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   treestore = GTK_TREE_STORE (clear_data_view->treestore);
   for (guint i = 0; i < G_N_ELEMENTS (data_entries); i++) {
     GtkTreeIter parent_iter;
@@ -147,6 +148,7 @@ website_data_fetched_cb (WebKitWebsiteDataManager *manager,
     if (empty)
       gtk_tree_store_remove (treestore, &parent_iter);
   }
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   g_list_free_full (data_list, (GDestroyNotify)webkit_website_data_unref);
 }
@@ -158,8 +160,10 @@ all_children_visible (GtkTreeModel       *model,
 {
   GtkTreeIter filter_iter;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_tree_model_filter_convert_child_iter_to_iter (filter, &filter_iter, child_iter);
   return gtk_tree_model_iter_n_children (model, child_iter) == gtk_tree_model_iter_n_children 
(GTK_TREE_MODEL (filter), &filter_iter);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
@@ -170,6 +174,7 @@ on_clear_button_clicked (ClearDataView *clear_data_view)
   GList *data_to_remove = NULL;
   WebKitWebsiteDataTypes types_to_remove = 0;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (!gtk_tree_model_get_iter_first (clear_data_view->treestore, &top_iter))
     return;
 
@@ -232,6 +237,7 @@ on_clear_button_clicked (ClearDataView *clear_data_view)
                                      clear_data_view->cancellable,
                                      (GAsyncReadyCallback)website_data_fetched_cb,
                                      clear_data_view);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static gboolean
@@ -239,6 +245,7 @@ any_item_checked (ClearDataView *self)
 {
   GtkTreeIter top_iter;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (!gtk_tree_model_get_iter_first (self->treestore, &top_iter))
     return FALSE;
 
@@ -263,6 +270,7 @@ any_item_checked (ClearDataView *self)
       } while (gtk_tree_model_iter_next (self->treestore, &child_iter));
     }
   } while (gtk_tree_model_iter_next (self->treestore, &top_iter));
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   return FALSE;
 }
@@ -272,6 +280,7 @@ item_toggled_cb (GtkCellRendererToggle *renderer,
                  const char            *path_str,
                  ClearDataView         *clear_data_view)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   GtkTreePath *path = gtk_tree_path_new_from_string (path_str);
   GtkTreeIter filter_iter, iter;
   gboolean active;
@@ -347,6 +356,7 @@ item_toggled_cb (GtkCellRendererToggle *renderer,
   }
 
   gtk_tree_path_free (path);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   ephy_data_view_set_can_clear (EPHY_DATA_VIEW (clear_data_view), any_item_checked (clear_data_view));
 }
@@ -354,7 +364,9 @@ item_toggled_cb (GtkCellRendererToggle *renderer,
 static void
 search_text_changed_cb (ClearDataView *clear_data_view)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_tree_model_filter_refilter (clear_data_view->treemodelfilter);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static gboolean
@@ -366,6 +378,7 @@ row_visible_func (GtkTreeModel  *model,
   char *name;
   gboolean visible;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (gtk_tree_model_iter_has_child (model, iter))
     return TRUE;
 
@@ -389,6 +402,7 @@ row_visible_func (GtkTreeModel  *model,
     gtk_tree_view_expand_row (GTK_TREE_VIEW (clear_data_view->treeview), path, FALSE);
     gtk_tree_path_free (path);
   }
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   return visible;
 }
@@ -432,10 +446,12 @@ clear_data_view_init (ClearDataView *clear_data_view)
 {
   gtk_widget_init_template (GTK_WIDGET (clear_data_view));
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_tree_model_filter_set_visible_func (clear_data_view->treemodelfilter,
                                           (GtkTreeModelFilterVisibleFunc)row_visible_func,
                                           clear_data_view,
                                           NULL);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   ephy_data_view_set_is_loading (EPHY_DATA_VIEW (clear_data_view), TRUE);
 
diff --git a/src/preferences/prefs-general-page.c b/src/preferences/prefs-general-page.c
index 92c94f65f..9141888d3 100644
--- a/src/preferences/prefs-general-page.c
+++ b/src/preferences/prefs-general-page.c
@@ -301,6 +301,7 @@ add_lang_dialog_response_cb (GtkWidget        *widget,
   g_assert (dialog != NULL);
 
   if (response == GTK_RESPONSE_ACCEPT) {
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS
     selection = gtk_tree_view_get_selection (general_page->add_lang_treeview);
 
     rows = gtk_tree_selection_get_selected_rows (selection, &model);
@@ -325,6 +326,7 @@ add_lang_dialog_response_cb (GtkWidget        *widget,
 
     g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL);
     g_list_free (rows);
+    G_GNUC_END_IGNORE_DEPRECATIONS
 
     language_editor_update_pref (general_page);
     language_editor_update_state (general_page);
@@ -340,7 +342,9 @@ add_lang_dialog_selection_changed (GtkTreeSelection *selection,
 {
   int n_selected;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   n_selected = gtk_tree_selection_count_selected_rows (selection);
+  G_GNUC_END_IGNORE_DEPRECATIONS
   gtk_widget_set_sensitive (button, n_selected > 0);
 }
 
@@ -361,11 +365,13 @@ add_language_add_system_language_entry (GtkListStore *store)
            (ngettext ("System language (%s)",
                       "System languages (%s)", n_sys_langs), system);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_list_store_append (store, &iter);
   gtk_list_store_set (store, &iter,
                       COL_LANG_NAME, text,
                       COL_LANG_CODE, "system",
                       -1);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   g_strfreev (sys_langs);
   g_free (system);
@@ -396,7 +402,9 @@ setup_add_language_dialog (PrefsGeneralPage *general_page)
   treeview = GTK_TREE_VIEW (gtk_builder_get_object (builder, "languages_treeview"));
   general_page->add_lang_treeview = treeview;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   locales = gnome_get_all_locales ();
   n = g_strv_length (locales);
@@ -421,15 +429,18 @@ setup_add_language_dialog (PrefsGeneralPage *general_page)
     else
       shortened_locale = g_strdup (language_code);
 
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS
     gtk_list_store_append (store, &iter);
     gtk_list_store_set (store, &iter,
                         COL_LANG_NAME, language_name,
                         COL_LANG_CODE, shortened_locale,
                         -1);
+    G_GNUC_END_IGNORE_DEPRECATIONS
   }
 
   add_language_add_system_language_entry (store);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   sortmodel = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (store));
   gtk_tree_sortable_set_sort_column_id
     (GTK_TREE_SORTABLE (sortmodel), COL_LANG_NAME, GTK_SORT_ASCENDING);
@@ -457,6 +468,7 @@ setup_add_language_dialog (PrefsGeneralPage *general_page)
 
   selection = gtk_tree_view_get_selection (treeview);
   gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   add_lang_dialog_selection_changed (GTK_TREE_SELECTION (selection), add_button);
   g_signal_connect (selection, "changed",
diff --git a/src/preferences/webapp-additional-urls-dialog.c b/src/preferences/webapp-additional-urls-dialog.c
index 8cae4d005..60c6960da 100644
--- a/src/preferences/webapp-additional-urls-dialog.c
+++ b/src/preferences/webapp-additional-urls-dialog.c
@@ -44,7 +44,9 @@ add_to_builder (GtkTreeModel    *model,
 {
   char *url;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_tree_model_get (model, iter, 0, &url, -1);
+  G_GNUC_END_IGNORE_DEPRECATIONS
   if (url && url[0] != '\0')
     g_variant_builder_add (builder, "s", url);
   g_free (url);
@@ -58,9 +60,11 @@ ephy_webapp_additional_urls_update_settings (EphyWebappAdditionalURLsDialog *dia
   GVariantBuilder builder;
 
   g_variant_builder_init (&builder, G_VARIANT_TYPE_STRING_ARRAY);
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_tree_model_foreach (dialog->liststore,
                           (GtkTreeModelForeachFunc)add_to_builder,
                           &builder);
+  G_GNUC_END_IGNORE_DEPRECATIONS
   g_settings_set (EPHY_SETTINGS_WEB_APP,
                   EPHY_PREFS_WEB_APP_ADDITIONAL_URLS,
                   "as", &builder);
@@ -72,6 +76,7 @@ on_cell_edited (GtkCellRendererText            *cell,
                 const gchar                    *new_text,
                 EphyWebappAdditionalURLsDialog *dialog)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
   GtkTreeIter iter;
 
@@ -82,6 +87,7 @@ on_cell_edited (GtkCellRendererText            *cell,
     gtk_list_store_remove (GTK_LIST_STORE (dialog->liststore), &iter);
   else
     gtk_list_store_set (GTK_LIST_STORE (dialog->liststore), &iter, 0, new_text, -1);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   ephy_webapp_additional_urls_update_settings (dialog);
 }
@@ -100,8 +106,10 @@ static void
 on_treeview_selection_changed (GtkTreeSelection               *selection,
                                EphyWebappAdditionalURLsDialog *dialog)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   update_selection_actions (G_ACTION_MAP (dialog->action_group),
                             gtk_tree_selection_count_selected_rows (selection) > 0);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
@@ -130,12 +138,14 @@ add_new (GSimpleAction *action,
   GtkTreeIter iter;
   GtkTreePath *path;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_list_store_insert_with_values (GTK_LIST_STORE (dialog->liststore), &iter, 0,
                                      0, "",
                                      -1);
   path = gtk_tree_model_get_path (dialog->liststore, &iter);
   gtk_tree_view_set_cursor (GTK_TREE_VIEW (dialog->treeview), path, dialog->url_column, TRUE);
   gtk_tree_path_free (path);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
@@ -150,6 +160,7 @@ forget (GSimpleAction *action,
   GtkTreeIter iter, iter2;
   GtkTreeRowReference *row_ref = NULL;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   llist = gtk_tree_selection_get_selected_rows (dialog->tree_selection, &model);
   if (llist == NULL)
     return;
@@ -201,6 +212,7 @@ forget (GSimpleAction *action,
 
     gtk_tree_row_reference_free (row_ref);
   }
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
@@ -210,7 +222,9 @@ forget_all (GSimpleAction *action,
 {
   EphyWebappAdditionalURLsDialog *dialog = EPHY_WEBAPP_ADDITIONAL_URLS_DIALOG (user_data);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_list_store_clear (GTK_LIST_STORE (dialog->liststore));
+  G_GNUC_END_IGNORE_DEPRECATIONS
   g_settings_set_strv (EPHY_SETTINGS_WEB_APP, EPHY_PREFS_WEB_APP_ADDITIONAL_URLS, NULL);
 }
 
@@ -240,9 +254,11 @@ show_dialog_cb (GtkWidget *widget,
 
   urls = g_settings_get_strv (EPHY_SETTINGS_WEB_APP, EPHY_PREFS_WEB_APP_ADDITIONAL_URLS);
   for (i = 0; urls[i]; i++) {
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS
     gtk_list_store_insert_with_values (GTK_LIST_STORE (dialog->liststore), NULL, -1,
                                        0, urls[i],
                                        -1);
+    G_GNUC_END_IGNORE_DEPRECATIONS
   }
   g_strfreev (urls);
 }
diff --git a/src/synced-tabs-dialog.c b/src/synced-tabs-dialog.c
index ae8b17dc3..8e518a4f9 100644
--- a/src/synced-tabs-dialog.c
+++ b/src/synced-tabs-dialog.c
@@ -103,6 +103,7 @@ treeview_row_activated_cb (GtkTreeView       *view,
   char *url;
   char *path_str;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   /* No action on top-level rows. */
   if (gtk_tree_path_get_depth (path) == 1)
     return;
@@ -115,6 +116,7 @@ treeview_row_activated_cb (GtkTreeView       *view,
   model = gtk_tree_view_get_model (view);
   gtk_tree_model_get_iter (model, &iter, path);
   gtk_tree_model_get (model, &iter, URL_COLUMN, &url, -1);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   shell = ephy_shell_get_default ();
   window = gtk_application_get_active_window (GTK_APPLICATION (shell));
@@ -145,6 +147,7 @@ synced_tabs_dialog_favicon_loaded_cb (GObject      *source,
     cairo_surface_destroy (surface);
   }
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_tree_model_get_iter_first (data->dialog->treestore, &parent_iter);
   for (guint i = 0; i < data->parent_index; i++)
     gtk_tree_model_iter_next (data->dialog->treestore, &parent_iter);
@@ -165,6 +168,7 @@ synced_tabs_dialog_favicon_loaded_cb (GObject      *source,
                                      TITLE_COLUMN, data->title,
                                      URL_COLUMN, escaped_url,
                                      -1);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   g_free (escaped_url);
   populate_row_async_data_free (data);
@@ -193,6 +197,7 @@ synced_tabs_dialog_populate_from_record (SyncedTabsDialog   *dialog,
 
   icon = g_themed_icon_new ("computer-symbolic");
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   /* Insert top-level row. */
   gtk_tree_store_insert_with_values (GTK_TREE_STORE (dialog->treestore),
                                      NULL, NULL, -1,
@@ -200,6 +205,7 @@ synced_tabs_dialog_populate_from_record (SyncedTabsDialog   *dialog,
                                      TITLE_COLUMN, title,
                                      URL_COLUMN, NULL,
                                      -1);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   tabs = ephy_open_tabs_record_get_tabs (record);
   for (GList *l = tabs; l && l->data; l = l->next) {
@@ -324,7 +330,9 @@ synced_tabs_dialog_init (SyncedTabsDialog *dialog)
 
   gtk_widget_init_template (GTK_WIDGET (dialog));
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_tree_view_set_tooltip_column (GTK_TREE_VIEW (dialog->treeview), URL_COLUMN);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   context = ephy_embed_shell_get_web_context (ephy_embed_shell_get_default ());
   dialog->database = webkit_web_context_get_favicon_database (context);
diff --git a/src/window-commands.c b/src/window-commands.c
index 623788553..b85ac56c8 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -132,7 +132,9 @@ combo_box_changed_cb (GtkComboBox *combo_box,
   g_assert (GTK_IS_COMBO_BOX (combo_box));
   g_assert (GTK_IS_BUTTON (button));
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   active = gtk_combo_box_get_active (combo_box);
+  G_GNUC_END_IGNORE_DEPRECATIONS
   if (import_options[active].type == IMPORT_TYPE_CHOOSE)
     gtk_button_set_label (button, _("Ch_oose File"));
   else if (import_options[active].type == IMPORT_TYPE_IMPORT)
@@ -229,6 +231,7 @@ create_tree_model (int *out_id_column)
 
   *out_id_column = ID_COL;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
   for (i = G_N_ELEMENTS (import_options) - 1; i >= 0; i--) {
     if (import_options[i].exists && !import_options[i].exists ())
@@ -240,6 +243,7 @@ create_tree_model (int *out_id_column)
                         ID_COL, import_options[i].id,
                         -1);
   }
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   return GTK_TREE_MODEL (list_store);
 }
@@ -514,7 +518,9 @@ dialog_bookmarks_import_cb (GtkDialog       *dialog,
   const char *active;
 
   if (response == GTK_RESPONSE_OK) {
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS
     active = gtk_combo_box_get_active_id (combo_box);
+    G_GNUC_END_IGNORE_DEPRECATIONS
     if (strcmp (active, IMPORT_FROM_GVDB_ID) == 0)
       dialog_bookmarks_import (window);
     else if (strcmp (active, IMPORT_FROM_HTML_ID) == 0)
@@ -574,6 +580,7 @@ window_cmd_import_bookmarks (GSimpleAction *action,
   label = gtk_label_new (_("From:"));
   gtk_box_append (GTK_BOX (hbox), label);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   tree_model = create_tree_model (&id_column);
   combo_box = gtk_combo_box_new_with_model (GTK_TREE_MODEL (tree_model));
   gtk_widget_set_hexpand (combo_box, TRUE);
@@ -589,6 +596,7 @@ window_cmd_import_bookmarks (GSimpleAction *action,
   gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), cell_renderer, TRUE);
   gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), cell_renderer,
                                   "text", 0, NULL);
+  G_GNUC_END_IGNORE_DEPRECATIONS
   gtk_box_append (GTK_BOX (hbox), combo_box);
 
   gtk_box_append (GTK_BOX (content_area), hbox);
@@ -711,6 +719,7 @@ create_import_passwords_tree_model (int *out_id_column)
 
   *out_id_column = ID_COL;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
   for (i = G_N_ELEMENTS (import_passwords_options) - 1; i >= 0; i--) {
     if (import_passwords_options[i].exists && !import_passwords_options[i].exists ())
@@ -722,6 +731,7 @@ create_import_passwords_tree_model (int *out_id_column)
                         ID_COL, import_passwords_options[i].id,
                         -1);
   }
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   return GTK_TREE_MODEL (list_store);
 }
@@ -749,7 +759,9 @@ dialog_passwords_import_cb (GtkDialog   *dialog,
     const char *active;
 
     manager = ephy_embed_shell_get_password_manager (EPHY_EMBED_SHELL (ephy_shell_get_default ()));
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS
     active = gtk_combo_box_get_active_id (combo_box);
+    G_GNUC_END_IGNORE_DEPRECATIONS
 
     if (strcmp (active, IMPORT_FROM_CHROME_ID) == 0)
       ephy_password_import_from_chrome_async (manager, CHROME, dialog_password_import_cb, dialog);
@@ -771,7 +783,9 @@ passwords_combo_box_changed_cb (GtkComboBox *combo_box,
   g_assert (GTK_IS_COMBO_BOX (combo_box));
   g_assert (GTK_IS_BUTTON (button));
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   active = gtk_combo_box_get_active (combo_box);
+  G_GNUC_END_IGNORE_DEPRECATIONS
   if (import_passwords_options[active].type == IMPORT_TYPE_CHOOSE)
     gtk_button_set_label (button, _("Ch_oose File"));
   else if (import_passwords_options[active].type == IMPORT_TYPE_IMPORT)
@@ -820,6 +834,7 @@ window_cmd_import_passwords (GSimpleAction *action,
   label = gtk_label_new (_("From:"));
   gtk_box_append (GTK_BOX (hbox), label);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   tree_model = create_import_passwords_tree_model (&id_column);
 
   if (gtk_tree_model_iter_n_children (tree_model, NULL))
@@ -842,6 +857,7 @@ window_cmd_import_passwords (GSimpleAction *action,
   gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), cell_renderer, TRUE);
   gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), cell_renderer,
                                   "text", 0, NULL);
+  G_GNUC_END_IGNORE_DEPRECATIONS
   gtk_box_append (GTK_BOX (hbox), combo_box);
 
   gtk_box_append (GTK_BOX (content_area), hbox);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]