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




commit 2b7dd6bb10cddfc3496716b07168b35d4eec800d
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             |  6 ++++++
 src/preferences/clear-data-view.c               |  4 ++++
 src/preferences/prefs-general-page.c            |  2 ++
 src/preferences/webapp-additional-urls-dialog.c |  8 ++++++++
 src/synced-tabs-dialog.c                        |  4 ++++
 src/window-commands.c                           | 10 ++++++++++
 7 files changed, 36 insertions(+)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index a9d69f7a4..b42d23288 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -3931,6 +3931,7 @@ ephy_web_view_finalize (GObject *object)
   G_OBJECT_CLASS (ephy_web_view_parent_class)->finalize (object);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 ephy_web_view_constructed (GObject *object)
 {
@@ -3961,6 +3962,7 @@ ephy_web_view_constructed (GObject *object)
   cors_allowlist[1] = NULL;
   webkit_web_view_set_cors_allowlist (WEBKIT_WEB_VIEW (web_view), (const char * const *)cors_allowlist);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 ephy_web_view_init (EphyWebView *web_view)
diff --git a/lib/widgets/ephy-security-popover.c b/lib/widgets/ephy-security-popover.c
index a10ae9fe7..40ba69b5e 100644
--- a/lib/widgets/ephy-security-popover.c
+++ b/lib/widgets/ephy-security-popover.c
@@ -73,6 +73,7 @@ struct _EphySecurityPopover {
 
 G_DEFINE_TYPE (EphySecurityPopover, ephy_security_popover, GTK_TYPE_POPOVER)
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 set_permission_ads_combobox_state (EphyPermissionsManager *permissions_manager,
                                    gint                    permission_id,
@@ -124,6 +125,7 @@ set_permission_combobox_state (EphyPermissionsManager *permissions_manager,
       break;
   }
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 ephy_security_popover_set_address (EphySecurityPopover *popover,
@@ -367,6 +369,7 @@ ephy_security_popover_class_init (EphySecurityPopoverClass *klass)
   g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static gboolean
 on_ad_combobox_changed (GtkComboBox         *widget,
                         EphySecurityPopover *popover)
@@ -394,6 +397,7 @@ on_ad_combobox_changed (GtkComboBox         *widget,
 
   return FALSE;
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 handle_permission_combobox_changed (EphySecurityPopover *popover,
@@ -429,6 +433,7 @@ handle_permission_combobox_changed (EphySecurityPopover *popover,
                                            permission);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 on_notification_combobox_changed (GtkComboBox         *box,
                                   EphySecurityPopover *popover)
@@ -506,6 +511,7 @@ add_permission_combobox (EphySecurityPopover *popover,
 
   return widget;
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 ephy_security_popover_init (EphySecurityPopover *popover)
diff --git a/src/preferences/clear-data-view.c b/src/preferences/clear-data-view.c
index 4449944fe..830494ae3 100644
--- a/src/preferences/clear-data-view.c
+++ b/src/preferences/clear-data-view.c
@@ -87,6 +87,7 @@ get_website_data_manger (void)
   return webkit_web_context_get_website_data_manager (web_context);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 website_data_fetched_cb (WebKitWebsiteDataManager *manager,
                          GAsyncResult             *result,
@@ -392,6 +393,7 @@ row_visible_func (GtkTreeModel  *model,
 
   return visible;
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 clear_data_view_dispose (GObject *object)
@@ -427,6 +429,7 @@ clear_data_view_class_init (ClearDataViewClass *klass)
   gtk_widget_class_bind_template_callback (widget_class, search_text_changed_cb);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 clear_data_view_init (ClearDataView *clear_data_view)
 {
@@ -447,3 +450,4 @@ clear_data_view_init (ClearDataView *clear_data_view)
                                      (GAsyncReadyCallback)website_data_fetched_cb,
                                      clear_data_view);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/src/preferences/prefs-general-page.c b/src/preferences/prefs-general-page.c
index 92c94f65f..113ce2622 100644
--- a/src/preferences/prefs-general-page.c
+++ b/src/preferences/prefs-general-page.c
@@ -287,6 +287,7 @@ language_editor_add (PrefsGeneralPage *general_page,
   gtk_list_box_insert (GTK_LIST_BOX (general_page->lang_listbox), row, len - 1);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 add_lang_dialog_response_cb (GtkWidget        *widget,
                              int               response,
@@ -470,6 +471,7 @@ setup_add_language_dialog (PrefsGeneralPage *general_page)
 
   return GTK_DIALOG (ad);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static char *
 language_for_locale (const char *locale)
diff --git a/src/preferences/webapp-additional-urls-dialog.c b/src/preferences/webapp-additional-urls-dialog.c
index 8cae4d005..6807ffcb9 100644
--- a/src/preferences/webapp-additional-urls-dialog.c
+++ b/src/preferences/webapp-additional-urls-dialog.c
@@ -36,6 +36,7 @@ struct _EphyWebappAdditionalURLsDialog {
 
 G_DEFINE_TYPE (EphyWebappAdditionalURLsDialog, ephy_webapp_additional_urls_dialog, GTK_TYPE_DIALOG)
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static gboolean
 add_to_builder (GtkTreeModel    *model,
                 GtkTreePath     *path,
@@ -85,6 +86,7 @@ on_cell_edited (GtkCellRendererText            *cell,
 
   ephy_webapp_additional_urls_update_settings (dialog);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 update_selection_actions (GActionMap *action_map,
@@ -96,6 +98,7 @@ update_selection_actions (GActionMap *action_map,
   g_simple_action_set_enabled (G_SIMPLE_ACTION (action), has_selection);
 }
 
+G_GNUC_END_IGNORE_DEPRECATIONS
 static void
 on_treeview_selection_changed (GtkTreeSelection               *selection,
                                EphyWebappAdditionalURLsDialog *dialog)
@@ -103,6 +106,7 @@ on_treeview_selection_changed (GtkTreeSelection               *selection,
   update_selection_actions (G_ACTION_MAP (dialog->action_group),
                             gtk_tree_selection_count_selected_rows (selection) > 0);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 ephy_webapp_additional_urls_dialog_class_init (EphyWebappAdditionalURLsDialogClass *klass)
@@ -121,6 +125,7 @@ ephy_webapp_additional_urls_dialog_class_init (EphyWebappAdditionalURLsDialogCla
   gtk_widget_class_bind_template_callback (widget_class, on_cell_edited);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 add_new (GSimpleAction *action,
          GVariant      *parameter,
@@ -213,6 +218,7 @@ forget_all (GSimpleAction *action,
   gtk_list_store_clear (GTK_LIST_STORE (dialog->liststore));
   g_settings_set_strv (EPHY_SETTINGS_WEB_APP, EPHY_PREFS_WEB_APP_ADDITIONAL_URLS, NULL);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static GActionGroup *
 create_action_group (EphyWebappAdditionalURLsDialog *dialog)
@@ -230,6 +236,7 @@ create_action_group (EphyWebappAdditionalURLsDialog *dialog)
   return G_ACTION_GROUP (group);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 show_dialog_cb (GtkWidget *widget,
                 gpointer   user_data)
@@ -246,6 +253,7 @@ show_dialog_cb (GtkWidget *widget,
   }
   g_strfreev (urls);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 ephy_webapp_additional_urls_dialog_init (EphyWebappAdditionalURLsDialog *dialog)
diff --git a/src/synced-tabs-dialog.c b/src/synced-tabs-dialog.c
index ae8b17dc3..51aab1477 100644
--- a/src/synced-tabs-dialog.c
+++ b/src/synced-tabs-dialog.c
@@ -89,6 +89,7 @@ populate_row_async_data_free (PopulateRowAsyncData *data)
   g_free (data);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 treeview_row_activated_cb (GtkTreeView       *view,
                            GtkTreePath       *path,
@@ -213,6 +214,7 @@ synced_tabs_dialog_populate_from_record (SyncedTabsDialog   *dialog,
                                          data);
   }
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 synced_tabs_dialog_populate_model (SyncedTabsDialog *dialog)
@@ -317,6 +319,7 @@ synced_tabs_dialog_class_init (SyncedTabsDialogClass *klass)
   gtk_widget_class_bind_template_callback (widget_class, treeview_row_activated_cb);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 synced_tabs_dialog_init (SyncedTabsDialog *dialog)
 {
@@ -329,6 +332,7 @@ synced_tabs_dialog_init (SyncedTabsDialog *dialog)
   context = ephy_embed_shell_get_web_context (ephy_embed_shell_get_default ());
   dialog->database = webkit_web_context_get_favicon_database (context);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 SyncedTabsDialog *
 synced_tabs_dialog_new (EphyOpenTabsManager *manager)
diff --git a/src/window-commands.c b/src/window-commands.c
index 623788553..ff1010b3c 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -123,6 +123,7 @@ static struct import_option import_options[] = {
   { N_("Chromium"), IMPORT_TYPE_IMPORT, IMPORT_FROM_CHROMIUM_ID, chromium_exists }
 };
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 combo_box_changed_cb (GtkComboBox *combo_box,
                       GtkButton   *button)
@@ -138,6 +139,7 @@ combo_box_changed_cb (GtkComboBox *combo_box,
   else if (import_options[active].type == IMPORT_TYPE_IMPORT)
     gtk_button_set_label (button, _("I_mport"));
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static GSList *
 get_firefox_profiles (void)
@@ -216,6 +218,7 @@ chromium_exists (void)
   return g_file_test (filename, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static GtkTreeModel *
 create_tree_model (int *out_id_column)
 {
@@ -243,6 +246,7 @@ create_tree_model (int *out_id_column)
 
   return GTK_TREE_MODEL (list_store);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 show_import_export_result (GtkWindow  *parent,
@@ -505,6 +509,7 @@ dialog_bookmarks_import_from_chromium (GtkWindow *parent)
                              _("Bookmarks successfully imported!"));
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 dialog_bookmarks_import_cb (GtkDialog       *dialog,
                             GtkResponseType  response,
@@ -600,6 +605,7 @@ window_cmd_import_bookmarks (GSimpleAction *action,
 
   gtk_window_present (GTK_WINDOW (dialog));
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 bookmarks_export_cb (GObject      *source_object,
@@ -698,6 +704,7 @@ static struct import_option import_passwords_options[] = {
   { N_("Chromium"), IMPORT_TYPE_IMPORT, IMPORT_FROM_CHROMIUM_ID, chromium_passwords_exists }
 };
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static GtkTreeModel *
 create_import_passwords_tree_model (int *out_id_column)
 {
@@ -725,6 +732,7 @@ create_import_passwords_tree_model (int *out_id_column)
 
   return GTK_TREE_MODEL (list_store);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 dialog_password_import_cb (GObject      *source_object,
@@ -739,6 +747,7 @@ dialog_password_import_cb (GObject      *source_object,
                              _("Passwords successfully imported!"));
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 dialog_passwords_import_cb (GtkDialog   *dialog,
                             int          response,
@@ -853,6 +862,7 @@ window_cmd_import_passwords (GSimpleAction *action,
 
   gtk_window_present (GTK_WINDOW (dialog));
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 void
 window_cmd_show_history (GSimpleAction *action,


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