[gtk/menubutton-no-button: 3/3] Update all users for menubutton changes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/menubutton-no-button: 3/3] Update all users for menubutton changes
- Date: Sat, 18 May 2019 04:59:57 +0000 (UTC)
commit 41c997a495430b0fce54fd49032efb2ab067cfb9
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 18 04:58:46 2019 +0000
Update all users for menubutton changes
demos/widget-factory/widget-factory.ui | 6 +++---
gtk/gtkshortcutswindow.c | 21 ++-------------------
gtk/inspector/misc-info.c | 2 +-
gtk/ui/gtkfilechooserwidget.ui | 1 -
gtk/ui/gtkplacesview.ui | 6 +-----
5 files changed, 7 insertions(+), 29 deletions(-)
---
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index d974ba6f21..f6c41ce8c2 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -2885,8 +2885,8 @@ microphone-sensitivity-medium-symbolic</property>
<property name="valign">center</property>
<property name="popover">notebook_info_popover2</property>
<property name="icon-name">emblem-important-symbolic</property>
- <property name="relief">none</property>
<style>
+ <class name="flat"/>
<class name="circular"/>
</style>
</object>
@@ -3029,8 +3029,8 @@ microphone-sensitivity-medium-symbolic</property>
<property name="valign">center</property>
<property name="popover">notebook_info_popover</property>
<property name="icon-name">emblem-important-symbolic</property>
- <property name="relief">none</property>
<style>
+ <class name="flat"/>
<class name="circular"/>
</style>
</object>
@@ -3515,8 +3515,8 @@ bad things might happen.</property>
<property name="valign">center</property>
<property name="popover">notebook_info_popover3</property>
<property name="icon-name">emblem-important-symbolic</property>
- <property name="relief">none</property>
<style>
+ <class name="flat"/>
<class name="circular"/>
</style>
</object>
diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c
index fac3f98677..db8f359a98 100644
--- a/gtk/gtkshortcutswindow.c
+++ b/gtk/gtkshortcutswindow.c
@@ -104,7 +104,6 @@ typedef struct
GtkStack *stack;
GtkStack *title_stack;
GtkMenuButton *menu_button;
- GtkLabel *menu_label;
GtkSearchBar *search_bar;
GtkSearchEntry *search_entry;
GtkHeaderBar *header_bar;
@@ -177,7 +176,7 @@ update_title_stack (GtkShortcutsWindow *self)
gtk_stack_set_visible_child_name (priv->title_stack, "sections");
g_object_get (visible_child, "title", &title, NULL);
- gtk_label_set_label (priv->menu_label, title);
+ gtk_menu_button_set_label (priv->menu_button, title);
g_free (title);
}
else
@@ -858,9 +857,7 @@ gtk_shortcuts_window_init (GtkShortcutsWindow *self)
{
GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self);
GtkWidget *search_button;
- GtkBox *menu_box;
GtkBox *box;
- GtkWidget *arrow;
GtkWidget *scroller;
GtkWidget *label;
GtkWidget *empty;
@@ -922,24 +919,10 @@ gtk_shortcuts_window_init (GtkShortcutsWindow *self)
priv->menu_button = g_object_new (GTK_TYPE_MENU_BUTTON,
"focus-on-click", FALSE,
- "relief", GTK_RELIEF_NONE,
NULL);
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (priv->menu_button)), "flat");
gtk_stack_add_named (priv->title_stack, GTK_WIDGET (priv->menu_button), "sections");
- menu_box = g_object_new (GTK_TYPE_BOX,
- "orientation", GTK_ORIENTATION_HORIZONTAL,
- "spacing", 6,
- "visible", TRUE,
- NULL);
- gtk_container_add (GTK_CONTAINER (priv->menu_button), GTK_WIDGET (menu_box));
-
- priv->menu_label = g_object_new (GTK_TYPE_LABEL,
- NULL);
- gtk_container_add (GTK_CONTAINER (menu_box), GTK_WIDGET (priv->menu_label));
-
- arrow = gtk_image_new_from_icon_name ("pan-down-symbolic");
- gtk_container_add (GTK_CONTAINER (menu_box), GTK_WIDGET (arrow));
-
priv->popover = g_object_new (GTK_TYPE_POPOVER,
"relative-to", priv->menu_button,
"position", GTK_POS_BOTTOM,
diff --git a/gtk/inspector/misc-info.c b/gtk/inspector/misc-info.c
index 799838e8cb..5e42657a8e 100644
--- a/gtk/inspector/misc-info.c
+++ b/gtk/inspector/misc-info.c
@@ -237,7 +237,7 @@ update_info (gpointer data)
gtype = G_TYPE_FROM_INSTANCE (sl->priv->object);
- gtk_button_set_label (GTK_BUTTON (sl->priv->type), g_type_name (gtype));
+ gtk_menu_button_set_label (GTK_MENU_BUTTON (sl->priv->type), g_type_name (gtype));
gtk_inspector_type_popover_set_gtype (GTK_INSPECTOR_TYPE_POPOVER (sl->priv->type_popover),
gtype);
diff --git a/gtk/ui/gtkfilechooserwidget.ui b/gtk/ui/gtkfilechooserwidget.ui
index 613b7db827..63657aa325 100644
--- a/gtk/ui/gtkfilechooserwidget.ui
+++ b/gtk/ui/gtkfilechooserwidget.ui
@@ -60,7 +60,6 @@
<child>
<object class="GtkMenuButton" id="browse_new_folder_button">
<property name="tooltip-text" translatable="yes">Create
Folder</property>
- <property name="use-underline">1</property>
<property name="popover">new_folder_popover</property>
<property name="icon-name">folder-new-symbolic</property>
<signal name="notify::active"
handler="new_folder_popover_active"/>
diff --git a/gtk/ui/gtkplacesview.ui b/gtk/ui/gtkplacesview.ui
index 010612b90f..559e05d75b 100644
--- a/gtk/ui/gtkplacesview.ui
+++ b/gtk/ui/gtkplacesview.ui
@@ -295,14 +295,10 @@
<property name="receives-default">1</property>
<property name="direction">up</property>
<property name="popover">recent_servers_popover</property>
+ <property name="icon-name">pan-down-symbolic</property>
<style>
<class name="server-list-button"/>
</style>
- <child>
- <object class="GtkImage">
- <property name="icon-name">pan-down-symbolic</property>
- </object>
- </child>
</object>
</child>
<style>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]