mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 14:50:06 +00:00
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master Closes #3245 See merge request GNOME/gtk!2702
This commit is contained in:
commit
916ef485d1
@ -591,8 +591,8 @@ easter_egg_callback (GtkWidget *button,
|
||||
g_object_unref (buffer);
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_transient_for (window, GTK_WINDOW (gtk_widget_get_root (button)));
|
||||
gtk_window_set_modal (window, TRUE);
|
||||
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (gtk_widget_get_root (button)));
|
||||
gtk_window_set_modal (GTK_WINDOW (window), TRUE);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
|
@ -224,7 +224,8 @@ gtk_action_muxer_append_group_actions (const char *prefix,
|
||||
}
|
||||
|
||||
char **
|
||||
gtk_action_muxer_list_actions (GtkActionMuxer *muxer)
|
||||
gtk_action_muxer_list_actions (GtkActionMuxer *muxer,
|
||||
gboolean local_only)
|
||||
{
|
||||
GHashTable *actions;
|
||||
char **keys;
|
||||
@ -253,6 +254,9 @@ gtk_action_muxer_list_actions (GtkActionMuxer *muxer)
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&prefix, (gpointer *)&group))
|
||||
gtk_action_muxer_append_group_actions (prefix, group, actions);
|
||||
}
|
||||
|
||||
if (local_only)
|
||||
break;
|
||||
}
|
||||
|
||||
keys = (char **)g_hash_table_get_keys_as_array (actions, NULL);
|
||||
|
@ -81,7 +81,8 @@ void gtk_action_muxer_change_action_state (GtkActi
|
||||
GVariant *state);
|
||||
gboolean gtk_action_muxer_has_action (GtkActionMuxer *muxer,
|
||||
const char *action_name);
|
||||
char ** gtk_action_muxer_list_actions (GtkActionMuxer *muxer);
|
||||
char ** gtk_action_muxer_list_actions (GtkActionMuxer *muxer,
|
||||
gboolean local_only);
|
||||
|
||||
/* api for class actions */
|
||||
void gtk_action_muxer_action_enabled_changed (GtkActionMuxer *muxer,
|
||||
|
@ -115,7 +115,8 @@ next:
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (g_unichar_isalnum (g_utf8_get_char (p)) || *p == '_' || *p == ' ');
|
||||
while (p > text &&
|
||||
(g_unichar_isalnum (g_utf8_get_char (p)) || *p == '_' || *p == ' '));
|
||||
|
||||
if (found_candidate)
|
||||
n_matches = populate_completion (completion, p, 0);
|
||||
|
@ -984,7 +984,10 @@ gtk_spin_button_init (GtkSpinButton *spin_button)
|
||||
g_signal_connect (spin_button->entry, "activate", G_CALLBACK (gtk_spin_button_activate), spin_button);
|
||||
gtk_widget_set_parent (spin_button->entry, GTK_WIDGET (spin_button));
|
||||
|
||||
spin_button->down_button = gtk_button_new_from_icon_name ("value-decrease-symbolic");
|
||||
spin_button->down_button = g_object_new (GTK_TYPE_BUTTON,
|
||||
"accessible-role", GTK_ACCESSIBLE_ROLE_NONE,
|
||||
"icon-name", "value-decrease-symbolic",
|
||||
NULL);
|
||||
gtk_widget_add_css_class (spin_button->down_button, "down");
|
||||
gtk_widget_set_can_focus (spin_button->down_button, FALSE);
|
||||
gtk_widget_set_parent (spin_button->down_button, GTK_WIDGET (spin_button));
|
||||
@ -998,10 +1001,12 @@ gtk_spin_button_init (GtkSpinButton *spin_button)
|
||||
g_signal_connect (gesture, "released", G_CALLBACK (button_released_cb), spin_button);
|
||||
g_signal_connect (gesture, "cancel", G_CALLBACK (button_cancel_cb), spin_button);
|
||||
gtk_widget_add_controller (GTK_WIDGET (spin_button->down_button), GTK_EVENT_CONTROLLER (gesture));
|
||||
gtk_gesture_group (gtk_button_get_gesture (GTK_BUTTON (spin_button->down_button)),
|
||||
gesture);
|
||||
gtk_gesture_group (gtk_button_get_gesture (GTK_BUTTON (spin_button->down_button)), gesture);
|
||||
|
||||
spin_button->up_button = gtk_button_new_from_icon_name ("value-increase-symbolic");
|
||||
spin_button->up_button = g_object_new (GTK_TYPE_BUTTON,
|
||||
"accessible-role", GTK_ACCESSIBLE_ROLE_NONE,
|
||||
"icon-name", "value-increase-symbolic",
|
||||
NULL);
|
||||
gtk_widget_add_css_class (spin_button->up_button, "up");
|
||||
gtk_widget_set_can_focus (spin_button->up_button, FALSE);
|
||||
gtk_widget_set_parent (spin_button->up_button, GTK_WIDGET (spin_button));
|
||||
|
@ -275,7 +275,7 @@ add_muxer (GtkInspectorActions *sl,
|
||||
int i;
|
||||
char **names;
|
||||
|
||||
names = gtk_action_muxer_list_actions (muxer);
|
||||
names = gtk_action_muxer_list_actions (muxer, FALSE);
|
||||
for (i = 0; names[i]; i++)
|
||||
action_added (G_OBJECT (muxer), names[i], sl);
|
||||
g_strfreev (names);
|
||||
|
Loading…
Reference in New Issue
Block a user