forked from AuroraMiddleware/gtk
Merge branch 'assorted-menu-fixes' into 'master'
Assorted menu fixes See merge request GNOME/gtk!1704
This commit is contained in:
commit
7caed3a462
@ -1736,6 +1736,7 @@ activate (GApplication *app)
|
|||||||
gint i;
|
gint i;
|
||||||
GPermission *permission;
|
GPermission *permission;
|
||||||
GAction *action;
|
GAction *action;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
g_object_get (gtk_settings_get_default (),
|
g_object_get (gtk_settings_get_default (),
|
||||||
"gtk-theme-name", ¤t_theme,
|
"gtk-theme-name", ¤t_theme,
|
||||||
@ -1768,7 +1769,11 @@ activate (GApplication *app)
|
|||||||
NULL);
|
NULL);
|
||||||
gtk_builder_set_scope (builder, scope);
|
gtk_builder_set_scope (builder, scope);
|
||||||
g_object_unref (scope);
|
g_object_unref (scope);
|
||||||
gtk_builder_add_from_resource (builder, "/org/gtk/WidgetFactory4/widget-factory.ui", NULL);
|
if (!gtk_builder_add_from_resource (builder, "/org/gtk/WidgetFactory4/widget-factory.ui", &error))
|
||||||
|
{
|
||||||
|
g_critical ("%s", error->message);
|
||||||
|
g_clear_error (&error);
|
||||||
|
}
|
||||||
|
|
||||||
window = (GtkWindow *)gtk_builder_get_object (builder, "window");
|
window = (GtkWindow *)gtk_builder_get_object (builder, "window");
|
||||||
gtk_application_add_window (GTK_APPLICATION (app), window);
|
gtk_application_add_window (GTK_APPLICATION (app), window);
|
||||||
|
@ -2271,7 +2271,7 @@ microphone-sensitivity-medium-symbolic</property>
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkMenuButton">
|
<object class="GtkMenuButton">
|
||||||
<property name="icon-name">view-more-symbolic</property>
|
<property name="icon-name">view-more-symbolic</property>
|
||||||
<property name="popover">new_style_menu</property>
|
<property name="menu-model">new_style_menu_model</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
@ -572,6 +572,9 @@ update_visibility (GtkModelButton *self)
|
|||||||
gtk_widget_set_hexpand (self->label,
|
gtk_widget_set_hexpand (self->label,
|
||||||
gtk_widget_get_visible (self->label) && !has_icon);
|
gtk_widget_get_visible (self->label) && !has_icon);
|
||||||
|
|
||||||
|
if (self->accel_label)
|
||||||
|
gtk_widget_set_visible (self->accel_label, has_text && (!self->iconic || !has_icon));
|
||||||
|
|
||||||
if (self->image)
|
if (self->image)
|
||||||
{
|
{
|
||||||
gtk_widget_set_visible (self->image, has_icon && (self->iconic || !has_text));
|
gtk_widget_set_visible (self->image, has_icon && (self->iconic || !has_text));
|
||||||
@ -792,6 +795,7 @@ gtk_model_button_set_accel (GtkModelButton *button,
|
|||||||
g_free (button->accel);
|
g_free (button->accel);
|
||||||
button->accel = g_strdup (accel);
|
button->accel = g_strdup (accel);
|
||||||
update_accel (button, button->accel);
|
update_accel (button, button->accel);
|
||||||
|
update_visibility (button);
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (button), properties[PROP_ACCEL]);
|
g_object_notify_by_pspec (G_OBJECT (button), properties[PROP_ACCEL]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user