mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-02 17:00:19 +00:00
Merge branch 'focus-test' into 'master'
Focus test See merge request GNOME/gtk!1622
This commit is contained in:
commit
bdb127e54c
36
testsuite/gtk/focus-chain/widget-factory.tab
Normal file
36
testsuite/gtk/focus-chain/widget-factory.tab
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
GtkEntry GtkText
|
||||||
|
GtkToggleButton
|
||||||
|
GtkEntry GtkText
|
||||||
|
GtkEntry GtkText
|
||||||
|
GtkButton
|
||||||
|
GtkToggleButton
|
||||||
|
GtkToggleButton
|
||||||
|
GtkToggleButton
|
||||||
|
GtkSpinButton GtkText
|
||||||
|
GtkCheckButton
|
||||||
|
GtkRadioButton
|
||||||
|
GtkCheckButton
|
||||||
|
GtkCheckButton
|
||||||
|
GtkToggleButton
|
||||||
|
GtkToggleButton
|
||||||
|
GtkToggleButton
|
||||||
|
GtkButton
|
||||||
|
GtkButton
|
||||||
|
GtkColorSwatch
|
||||||
|
GtkButton
|
||||||
|
GtkLinkButton
|
||||||
|
GtkSwitch
|
||||||
|
GtkScale
|
||||||
|
GtkScale
|
||||||
|
GtkScale
|
||||||
|
GtkTreeView
|
||||||
|
GtkTextView
|
||||||
|
GtkNotebook
|
||||||
|
GtkNotebook
|
||||||
|
GtkNotebook
|
||||||
|
GtkNotebook
|
||||||
|
GtkToggleButton
|
||||||
|
GtkToggleButton
|
||||||
|
GtkToggleButton
|
||||||
|
GtkToggleButton
|
||||||
|
WRAP
|
3810
testsuite/gtk/focus-chain/widget-factory.ui
Normal file
3810
testsuite/gtk/focus-chain/widget-factory.ui
Normal file
File diff suppressed because it is too large
Load Diff
@ -93,6 +93,7 @@ generate_focus_chain (GtkWidget *window,
|
|||||||
char *first = NULL;
|
char *first = NULL;
|
||||||
char *last = NULL;
|
char *last = NULL;
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
|
char *key = NULL;
|
||||||
GString *output = g_string_new ("");
|
GString *output = g_string_new ("");
|
||||||
GtkWidget *focus;
|
GtkWidget *focus;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
@ -119,17 +120,22 @@ generate_focus_chain (GtkWidget *window,
|
|||||||
gtk_widget_get_name (focus));
|
gtk_widget_get_name (focus));
|
||||||
else
|
else
|
||||||
name = g_strdup (gtk_widget_get_name (focus));
|
name = g_strdup (gtk_widget_get_name (focus));
|
||||||
|
|
||||||
|
key = g_strdup_printf ("%s %p", name, focus);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
name = g_strdup ("NONE");
|
{
|
||||||
|
name = g_strdup ("NONE");
|
||||||
|
key = g_strdup (key);
|
||||||
|
}
|
||||||
|
|
||||||
if (first && g_str_equal (name, first))
|
if (first && g_str_equal (key, first))
|
||||||
{
|
{
|
||||||
g_string_append (output, "WRAP\n");
|
g_string_append (output, "WRAP\n");
|
||||||
break; /* cycle completed */
|
break; /* cycle completed */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (last && g_str_equal (name, last))
|
if (last && g_str_equal (key, last))
|
||||||
{
|
{
|
||||||
g_string_append (output, "STOP\n");
|
g_string_append (output, "STOP\n");
|
||||||
break; /* dead end */
|
break; /* dead end */
|
||||||
@ -139,10 +145,10 @@ generate_focus_chain (GtkWidget *window,
|
|||||||
count++;
|
count++;
|
||||||
|
|
||||||
if (!first)
|
if (!first)
|
||||||
first = g_strdup (name);
|
first = g_strdup (key);
|
||||||
|
|
||||||
g_free (last);
|
g_free (last);
|
||||||
last = g_strdup (name);
|
last = key;
|
||||||
|
|
||||||
if (count == 100)
|
if (count == 100)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user