[epiphany/wip/exalm/gtk4-cleanups-2: 8/11] Stop referencing style class constants
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/gtk4-cleanups-2: 8/11] Stop referencing style class constants
- Date: Tue, 30 Nov 2021 00:40:25 +0000 (UTC)
commit 0a8954c32183daadb315880c704a684fd2f4c3b2
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Nov 30 02:56:48 2021 +0500
Stop referencing style class constants
They are gone in GTK4.
embed/contrib/gd-tagged-entry.c | 2 +-
embed/ephy-embed.c | 3 +--
embed/ephy-find-toolbar.c | 3 +--
src/ephy-web-extension-dialog.c | 4 ++--
src/preferences/passwords-view.c | 2 +-
src/window-commands.c | 2 +-
6 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/embed/contrib/gd-tagged-entry.c b/embed/contrib/gd-tagged-entry.c
index 5db139e8c..1c00740d6 100644
--- a/embed/contrib/gd-tagged-entry.c
+++ b/embed/contrib/gd-tagged-entry.c
@@ -491,7 +491,7 @@ gd_tagged_entry_tag_draw (GdTaggedEntryTag *tag,
if (!entry->priv->button_visible || !tag->priv->has_close_button)
goto done;
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_BUTTON);
+ gtk_style_context_add_class (context, "button");
state = gd_tagged_entry_tag_get_button_state (tag, entry);
gtk_style_context_set_state (context, state);
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index b6c61d205..334baf589 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -747,8 +747,7 @@ ephy_embed_constructed (GObject *object)
if (embed->progress_bar_enabled) {
embed->progress = gtk_progress_bar_new ();
- gtk_style_context_add_class (gtk_widget_get_style_context (embed->progress),
- GTK_STYLE_CLASS_OSD);
+ gtk_style_context_add_class (gtk_widget_get_style_context (embed->progress), "osd");
gtk_widget_set_halign (embed->progress, GTK_ALIGN_FILL);
gtk_widget_set_valign (embed->progress, GTK_ALIGN_START);
gtk_overlay_add_overlay (GTK_OVERLAY (embed->overlay), embed->progress);
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index f03aea04e..45a71b8e0 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -383,8 +383,7 @@ ephy_find_toolbar_init (EphyFindToolbar *toolbar)
gtk_container_add (GTK_CONTAINER (toolbar->search_bar), clamp);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_style_context_add_class (gtk_widget_get_style_context (box),
- GTK_STYLE_CLASS_LINKED);
+ gtk_style_context_add_class (gtk_widget_get_style_context (box), "linked");
gtk_container_add (GTK_CONTAINER (clamp), box);
toolbar->entry = gd_tagged_entry_new ();
diff --git a/src/ephy-web-extension-dialog.c b/src/ephy-web-extension-dialog.c
index b742dd49e..710952950 100644
--- a/src/ephy-web-extension-dialog.c
+++ b/src/ephy-web-extension-dialog.c
@@ -79,7 +79,7 @@ on_remove_button_clicked (GtkButton *button,
NULL);
widget = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
- gtk_style_context_add_class (gtk_widget_get_style_context (widget), GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
+ gtk_style_context_add_class (gtk_widget_get_style_context (widget), "destructive-action");
res = gtk_dialog_run (GTK_DIALOG (dialog));
if (res == GTK_RESPONSE_OK) {
@@ -195,7 +195,7 @@ create_row (EphyWebExtensionDialog *self,
button = gtk_button_new_with_mnemonic (_("_Remove"));
gtk_widget_set_valign (GTK_WIDGET (button), GTK_ALIGN_CENTER);
- dzl_gtk_widget_add_style_class (button, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
+ dzl_gtk_widget_add_style_class (button, "destructive-action");
g_signal_connect (button, "clicked", G_CALLBACK (on_remove_button_clicked), self);
gtk_widget_set_tooltip_text (button, _("Remove selected WebExtension"));
gtk_container_add (GTK_CONTAINER (sub_row), button);
diff --git a/src/preferences/passwords-view.c b/src/preferences/passwords-view.c
index 66d0fe2d4..f4969f7d6 100644
--- a/src/preferences/passwords-view.c
+++ b/src/preferences/passwords-view.c
@@ -331,7 +331,7 @@ populate_model_cb (GList *records,
button = gtk_button_new_with_label (_("Remove Password"));
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
- dzl_gtk_widget_add_style_class (button, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
+ dzl_gtk_widget_add_style_class (button, "destructive-action");
g_signal_connect (button, "clicked", G_CALLBACK (forget_clicked), record);
gtk_container_add (GTK_CONTAINER (sub_row), button);
diff --git a/src/window-commands.c b/src/window-commands.c
index a6bc16b6b..efa6577bc 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -283,7 +283,7 @@ show_profile_selector (GtkWidget *parent,
suggested = gtk_dialog_get_widget_for_response (GTK_DIALOG (selector), GTK_RESPONSE_OK);
gtk_style_context_add_class (gtk_widget_get_style_context (suggested),
- GTK_STYLE_CLASS_SUGGESTED_ACTION);
+ "suggested-action");
content_area = gtk_dialog_get_content_area (GTK_DIALOG (selector));
gtk_container_set_border_width (GTK_CONTAINER (content_area), 5);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]