mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master See merge request GNOME/gtk!1593
This commit is contained in:
commit
298218b1d2
@ -975,17 +975,25 @@ test_children (void)
|
||||
}
|
||||
|
||||
static void
|
||||
test_child_properties (void)
|
||||
test_layout_properties (void)
|
||||
{
|
||||
GtkBuilder * builder;
|
||||
const gchar buffer1[] =
|
||||
"<interface>"
|
||||
" <object class=\"GtkBox\" id=\"vbox1\">"
|
||||
" <object class=\"GtkGrid\" id=\"grid1\">"
|
||||
" <child>"
|
||||
" <object class=\"GtkLabel\" id=\"label1\"/>"
|
||||
" <object class=\"GtkLabel\" id=\"label1\">"
|
||||
" <layout>"
|
||||
" <property name=\"left-attach\">1</property>"
|
||||
" </layout>"
|
||||
" </object>"
|
||||
" </child>"
|
||||
" <child>"
|
||||
" <object class=\"GtkLabel\" id=\"label2\"/>"
|
||||
" <object class=\"GtkLabel\" id=\"label2\">"
|
||||
" <layout>"
|
||||
" <property name=\"left-attach\">0</property>"
|
||||
" </layout>"
|
||||
" </object>"
|
||||
" </child>"
|
||||
" </object>"
|
||||
"</interface>";
|
||||
@ -993,8 +1001,8 @@ test_child_properties (void)
|
||||
GObject *label, *vbox;
|
||||
|
||||
builder = builder_new_from_string (buffer1, -1, NULL);
|
||||
vbox = gtk_builder_get_object (builder, "vbox1");
|
||||
g_assert (GTK_IS_BOX (vbox));
|
||||
vbox = gtk_builder_get_object (builder, "grid1");
|
||||
g_assert (GTK_IS_GRID (vbox));
|
||||
|
||||
label = gtk_builder_get_object (builder, "label1");
|
||||
g_assert (GTK_IS_LABEL (label));
|
||||
@ -2447,6 +2455,45 @@ test_shortcuts (void)
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
static void
|
||||
test_transforms (void)
|
||||
{
|
||||
GtkBuilder * builder;
|
||||
const gchar buffer1[] =
|
||||
"<interface>"
|
||||
" <object class=\"GtkFixed\" id=\"fixed1\">"
|
||||
" <child>"
|
||||
" <object class=\"GtkLabel\" id=\"label1\">"
|
||||
" <layout>"
|
||||
" <property name=\"transform\">rotateX(45.0)</property>"
|
||||
" </layout>"
|
||||
" </object>"
|
||||
" </child>"
|
||||
" <child>"
|
||||
" <object class=\"GtkLabel\" id=\"label2\">"
|
||||
" <layout>"
|
||||
" <property name=\"transform\">scale3d(1,2,3)translate3d(2,3,0)</property>"
|
||||
" </layout>"
|
||||
" </object>"
|
||||
" </child>"
|
||||
" </object>"
|
||||
"</interface>";
|
||||
|
||||
GObject *label, *vbox;
|
||||
|
||||
builder = builder_new_from_string (buffer1, -1, NULL);
|
||||
vbox = gtk_builder_get_object (builder, "fixed1");
|
||||
g_assert (GTK_IS_FIXED (vbox));
|
||||
|
||||
label = gtk_builder_get_object (builder, "label1");
|
||||
g_assert (GTK_IS_LABEL (label));
|
||||
|
||||
label = gtk_builder_get_object (builder, "label2");
|
||||
g_assert (GTK_IS_LABEL (label));
|
||||
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@ -2457,7 +2504,7 @@ main (int argc, char **argv)
|
||||
g_test_add_func ("/Builder/Types", test_types);
|
||||
g_test_add_func ("/Builder/Construct-Only Properties", test_construct_only_property);
|
||||
g_test_add_func ("/Builder/Children", test_children);
|
||||
g_test_add_func ("/Builder/Child Properties", test_child_properties);
|
||||
g_test_add_func ("/Builder/Layout Properties", test_layout_properties);
|
||||
g_test_add_func ("/Builder/Object Properties", test_object_properties);
|
||||
g_test_add_func ("/Builder/Notebook", test_notebook);
|
||||
g_test_add_func ("/Builder/Domain", test_domain);
|
||||
@ -2492,6 +2539,7 @@ main (int argc, char **argv)
|
||||
g_test_add_func ("/Builder/anaconda-signal", test_anaconda_signal);
|
||||
g_test_add_func ("/Builder/FileFilter", test_file_filter);
|
||||
g_test_add_func ("/Builder/Shortcuts", test_shortcuts);
|
||||
g_test_add_func ("/Builder/Transforms", test_transforms);
|
||||
|
||||
return g_test_run();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user