mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
tests: Fix testdialogtest
Fix deprecations in UI files, add a missing expand.
This commit is contained in:
parent
9af4a420a3
commit
02b27775d8
@ -13,7 +13,6 @@
|
|||||||
<object class="GtkDialog" id="dialog">
|
<object class="GtkDialog" id="dialog">
|
||||||
<property name="modal">1</property>
|
<property name="modal">1</property>
|
||||||
<property name="destroy_with_parent">1</property>
|
<property name="destroy_with_parent">1</property>
|
||||||
<property name="type_hint">dialog</property>
|
|
||||||
<property name="default_width">500</property>
|
<property name="default_width">500</property>
|
||||||
<property name="use_header_bar">1</property>
|
<property name="use_header_bar">1</property>
|
||||||
<property name="title" translatable="yes">Join Chat Room</property>
|
<property name="title" translatable="yes">Join Chat Room</property>
|
||||||
@ -44,14 +43,13 @@
|
|||||||
<object class="GtkButton" id="confirm_button">
|
<object class="GtkButton" id="confirm_button">
|
||||||
<property name="label" translatable="yes">_Join</property>
|
<property name="label" translatable="yes">_Join</property>
|
||||||
<property name="can_focus">1</property>
|
<property name="can_focus">1</property>
|
||||||
<property name="has_default">1</property>
|
|
||||||
<property name="receives_default">1</property>
|
<property name="receives_default">1</property>
|
||||||
<property name="use_underline">1</property>
|
<property name="use_underline">1</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child internal-child="vbox">
|
<child internal-child="content_area">
|
||||||
<object class="GtkBox" id="dialog-vbox1">
|
<object class="GtkBox" id="dialog-vbox1">
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="spacing">2</property>
|
<property name="spacing">2</property>
|
||||||
@ -61,11 +59,10 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkStackPage">
|
<object class="GtkStackPage">
|
||||||
<property name="name">main</property>
|
<property name="name">main</property>
|
||||||
<property name="position">0</property>
|
|
||||||
<property name="child">
|
<property name="child">
|
||||||
<object class="GtkGrid" id="grid1">
|
<object class="GtkGrid" id="grid1">
|
||||||
<property name="margin_left">24</property>
|
<property name="margin_start">24</property>
|
||||||
<property name="margin_right">24</property>
|
<property name="margin_end">24</property>
|
||||||
<property name="margin_top">24</property>
|
<property name="margin_top">24</property>
|
||||||
<property name="margin_bottom">24</property>
|
<property name="margin_bottom">24</property>
|
||||||
<property name="row_spacing">12</property>
|
<property name="row_spacing">12</property>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<interface>
|
<interface>
|
||||||
<template class="MyDialog2" parent="GtkDialog">
|
<template class="MyDialog2" parent="GtkDialog">
|
||||||
<child internal-child="vbox">
|
<child internal-child="content_area">
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="content">
|
<object class="GtkLabel" id="content">
|
||||||
|
@ -99,6 +99,8 @@ add_content (GtkWidget *dialog)
|
|||||||
gtk_widget_set_margin_end (label, 50);
|
gtk_widget_set_margin_end (label, 50);
|
||||||
gtk_widget_set_margin_top (label, 50);
|
gtk_widget_set_margin_top (label, 50);
|
||||||
gtk_widget_set_margin_bottom (label, 50);
|
gtk_widget_set_margin_bottom (label, 50);
|
||||||
|
gtk_widget_set_hexpand (label, TRUE);
|
||||||
|
gtk_widget_set_vexpand (label, TRUE);
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), label);
|
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), label);
|
||||||
@ -183,8 +185,7 @@ show_dialog_with_header_buttons2 (GtkWindow *parent)
|
|||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
|
||||||
builder = gtk_builder_new ();
|
builder = gtk_builder_new_from_file ("dialog.ui");
|
||||||
gtk_builder_add_from_file (builder, "dialog.ui", NULL);
|
|
||||||
dialog = (GtkWidget *)gtk_builder_get_object (builder, "dialog");
|
dialog = (GtkWidget *)gtk_builder_get_object (builder, "dialog");
|
||||||
g_object_unref (builder);
|
g_object_unref (builder);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user