forked from AuroraMiddleware/gtk
Merge branch 'pack-type' into 'master'
Drop some more child properties See merge request GNOME/gtk!672
This commit is contained in:
commit
868d3cd609
@ -23,58 +23,46 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel">
|
||||
<property name="label">fps</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" bind-source="bowl" bind-property="framerate"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Icons, </property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" bind-source="bowl" bind-property="count"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="changes_allow">
|
||||
<property name="visible" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean"/>
|
||||
<property name="icon-name">changes-allow</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="changes_prevent">
|
||||
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean">1</property>
|
||||
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean">0</property>
|
||||
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean"/>
|
||||
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean"/>
|
||||
<property name="icon-name">changes-prevent</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@ -82,7 +70,7 @@
|
||||
<object class="GtkFishbowl" id="bowl">
|
||||
<property name="visible">True</property>
|
||||
<property name="animating">True</property>
|
||||
<property name="benchmark" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">1</property>
|
||||
<property name="benchmark" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -35,7 +35,7 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="search">
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
@ -46,9 +46,7 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -411,15 +411,13 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="stack">toplevel_stack</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gear_menu_button">
|
||||
<property name="valign">center</property>
|
||||
<property name="menu-model">gear_menu</property>
|
||||
<property name="icon-name">open-menu-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@ -1588,16 +1586,14 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="halign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton">
|
||||
<property name="menu-model">dinner_menu</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">emblem-system-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -340,12 +340,22 @@
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Adapt to GtkHeaderBar API changes</title>
|
||||
<title>Adapt to GtkHeaderBar and GtkActionBar API changes</title>
|
||||
<para>
|
||||
The gtk_header_bar_set_show_close_button() function has been renamed to
|
||||
the more accurate name gtk_header_bar_set_show_title_buttons(). The corresponding
|
||||
getter and the property itself have also been renamed.
|
||||
</para>
|
||||
<para>
|
||||
The ::pack-type child properties of GtkHeaderBar and GtkActionBar have
|
||||
been removed. If you need to programmatically place children, use the
|
||||
pack_start() and pack_end() APIs. In ui files, use the type attribute
|
||||
on the child element.
|
||||
</para>
|
||||
<para>
|
||||
gtk4-builder-tool can help with this conversion, with the --3to4 option
|
||||
of the simplify command.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
@ -22,25 +22,21 @@
|
||||
<property name="stack">stack</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="search">
|
||||
<property name="sensitive">0</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gears">
|
||||
<property name="direction">none</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -13,14 +13,12 @@
|
||||
<property name="stack">stack</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="search">
|
||||
<property name="sensitive">0</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -13,25 +13,21 @@
|
||||
<property name="stack">stack</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="search">
|
||||
<property name="sensitive">0</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gears">
|
||||
<property name="direction">none</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -24,25 +24,21 @@
|
||||
<property name="stack">stack</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="search">
|
||||
<property name="sensitive">0</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gears">
|
||||
<property name="direction">none</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -61,11 +61,6 @@ struct _GtkActionBarPrivate
|
||||
GtkWidget *revealer;
|
||||
};
|
||||
|
||||
enum {
|
||||
CHILD_PROP_0,
|
||||
CHILD_PROP_PACK_TYPE,
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_REVEALED,
|
||||
@ -139,78 +134,6 @@ gtk_action_bar_child_type (GtkContainer *container)
|
||||
return GTK_TYPE_WIDGET;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_action_bar_get_child_property (GtkContainer *container,
|
||||
GtkWidget *child,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (GTK_ACTION_BAR (container));
|
||||
|
||||
switch (property_id)
|
||||
{
|
||||
case CHILD_PROP_PACK_TYPE:
|
||||
if (gtk_widget_get_parent (child) == priv->start_box)
|
||||
g_value_set_enum (value, GTK_PACK_START);
|
||||
else if (gtk_widget_get_parent (child) == priv->end_box)
|
||||
g_value_set_enum (value, GTK_PACK_END);
|
||||
else /* Center widget */
|
||||
g_value_set_enum (value, GTK_PACK_START);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_action_bar_set_child_property (GtkContainer *container,
|
||||
GtkWidget *child,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (GTK_ACTION_BAR (container));
|
||||
|
||||
switch (property_id)
|
||||
{
|
||||
case CHILD_PROP_PACK_TYPE:
|
||||
if (gtk_widget_get_parent (child) == priv->start_box)
|
||||
{
|
||||
if (g_value_get_enum (value) == GTK_PACK_END)
|
||||
{
|
||||
g_object_ref (child);
|
||||
gtk_container_remove (GTK_CONTAINER (priv->start_box), child);
|
||||
gtk_box_insert_child_after (GTK_BOX (priv->end_box), child, NULL);
|
||||
g_object_unref (child);
|
||||
}
|
||||
}
|
||||
else if (gtk_widget_get_parent (child) == priv->end_box)
|
||||
{
|
||||
if (g_value_get_enum (value) == GTK_PACK_START)
|
||||
{
|
||||
g_object_ref (child);
|
||||
gtk_container_remove (GTK_CONTAINER (priv->end_box), child);
|
||||
gtk_container_add (GTK_CONTAINER (priv->start_box), child);
|
||||
g_object_unref (child);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Ignore the center widget */
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_action_bar_size_allocate (GtkWidget *widget,
|
||||
int width,
|
||||
@ -322,16 +245,6 @@ gtk_action_bar_class_init (GtkActionBarClass *klass)
|
||||
container_class->remove = gtk_action_bar_remove;
|
||||
container_class->forall = gtk_action_bar_forall;
|
||||
container_class->child_type = gtk_action_bar_child_type;
|
||||
container_class->set_child_property = gtk_action_bar_set_child_property;
|
||||
container_class->get_child_property = gtk_action_bar_get_child_property;
|
||||
|
||||
gtk_container_class_install_child_property (container_class,
|
||||
CHILD_PROP_PACK_TYPE,
|
||||
g_param_spec_enum ("pack-type",
|
||||
P_("Pack type"),
|
||||
P_("A GtkPackType indicating whether the child is packed with reference to the start or end of the parent"),
|
||||
GTK_TYPE_PACK_TYPE, GTK_PACK_START,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
props[PROP_REVEALED] =
|
||||
g_param_spec_boolean ("revealed",
|
||||
@ -380,8 +293,12 @@ gtk_action_bar_buildable_add_child (GtkBuildable *buildable,
|
||||
{
|
||||
GtkActionBar *action_bar = GTK_ACTION_BAR (buildable);
|
||||
|
||||
if (type && strcmp (type, "center") == 0)
|
||||
if (g_strcmp0 (type, "center") == 0)
|
||||
gtk_action_bar_set_center_widget (action_bar, GTK_WIDGET (child));
|
||||
else if (g_strcmp0 (type, "start") == 0)
|
||||
gtk_action_bar_pack_start (action_bar, GTK_WIDGET (child));
|
||||
else if (g_strcmp0 (type, "end") == 0)
|
||||
gtk_action_bar_pack_end (action_bar, GTK_WIDGET (child));
|
||||
else
|
||||
parent_buildable_iface->add_child (buildable, builder, child, type);
|
||||
}
|
||||
|
@ -343,29 +343,6 @@ add_response_data (GtkDialog *dialog,
|
||||
g_warning ("Only 'activatable' widgets can be packed into the action area of a GtkDialog");
|
||||
}
|
||||
|
||||
static void
|
||||
apply_response_for_header_bar (GtkDialog *dialog,
|
||||
GtkWidget *child,
|
||||
gint response_id)
|
||||
{
|
||||
GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog);
|
||||
GtkPackType pack;
|
||||
|
||||
g_assert (gtk_widget_get_parent (child) == priv->headerbar);
|
||||
|
||||
if (response_id == GTK_RESPONSE_CANCEL || response_id == GTK_RESPONSE_HELP)
|
||||
pack = GTK_PACK_START;
|
||||
else
|
||||
pack = GTK_PACK_END;
|
||||
|
||||
gtk_container_child_set (GTK_CONTAINER (priv->headerbar), child,
|
||||
"pack-type", pack,
|
||||
NULL);
|
||||
|
||||
if (response_id == GTK_RESPONSE_CANCEL || response_id == GTK_RESPONSE_CLOSE)
|
||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (priv->headerbar), FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
add_to_header_bar (GtkDialog *dialog,
|
||||
GtkWidget *child,
|
||||
@ -374,10 +351,16 @@ add_to_header_bar (GtkDialog *dialog,
|
||||
GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog);
|
||||
|
||||
gtk_widget_set_valign (child, GTK_ALIGN_CENTER);
|
||||
gtk_container_add (GTK_CONTAINER (priv->headerbar), child);
|
||||
gtk_size_group_add_widget (priv->size_group, child);
|
||||
apply_response_for_header_bar (dialog, child, response_id);
|
||||
|
||||
if (response_id == GTK_RESPONSE_CANCEL || response_id == GTK_RESPONSE_HELP)
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->headerbar), child);
|
||||
else
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->headerbar), child);
|
||||
|
||||
gtk_size_group_add_widget (priv->size_group, child);
|
||||
|
||||
if (response_id == GTK_RESPONSE_CANCEL || response_id == GTK_RESPONSE_CLOSE)
|
||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (priv->headerbar), FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1536,7 +1519,12 @@ gtk_dialog_buildable_custom_finished (GtkBuildable *buildable,
|
||||
else if (gtk_widget_get_parent (GTK_WIDGET (object)) == priv->headerbar)
|
||||
{
|
||||
if (is_action)
|
||||
apply_response_for_header_bar (dialog, GTK_WIDGET (object), ad->response_id);
|
||||
{
|
||||
g_object_ref (object);
|
||||
gtk_container_remove (GTK_CONTAINER (priv->headerbar), GTK_WIDGET (object));
|
||||
add_to_header_bar (dialog, GTK_WIDGET (object), ad->response_id);
|
||||
g_object_unref (object);
|
||||
}
|
||||
}
|
||||
|
||||
if (item->is_default)
|
||||
|
@ -119,11 +119,6 @@ enum {
|
||||
LAST_PROP
|
||||
};
|
||||
|
||||
enum {
|
||||
CHILD_PROP_0,
|
||||
CHILD_PROP_PACK_TYPE
|
||||
};
|
||||
|
||||
static GParamSpec *header_bar_props[LAST_PROP] = { NULL, };
|
||||
|
||||
static void gtk_header_bar_buildable_init (GtkBuildableIface *iface);
|
||||
@ -1537,12 +1532,9 @@ gtk_header_bar_pack (GtkHeaderBar *bar,
|
||||
|
||||
priv->children = g_list_append (priv->children, child);
|
||||
|
||||
gtk_widget_freeze_child_notify (widget);
|
||||
gtk_header_bar_reorder_css_node (bar, GTK_PACK_START, widget);
|
||||
gtk_widget_set_parent (widget, GTK_WIDGET (bar));
|
||||
g_signal_connect (widget, "notify::visible", G_CALLBACK (notify_child_cb), bar);
|
||||
gtk_widget_child_notify (widget, "pack-type");
|
||||
gtk_widget_thaw_child_notify (widget);
|
||||
|
||||
_gtk_header_bar_update_separator_visibility (bar);
|
||||
}
|
||||
@ -1638,69 +1630,6 @@ gtk_header_bar_child_type (GtkContainer *container)
|
||||
return GTK_TYPE_WIDGET;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_header_bar_get_child_property (GtkContainer *container,
|
||||
GtkWidget *widget,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkHeaderBar *bar = GTK_HEADER_BAR (container);
|
||||
GList *l;
|
||||
Child *child;
|
||||
|
||||
l = find_child_link (bar, widget, NULL);
|
||||
if (l == NULL)
|
||||
{
|
||||
g_param_value_set_default (pspec, value);
|
||||
return;
|
||||
}
|
||||
|
||||
child = l->data;
|
||||
|
||||
switch (property_id)
|
||||
{
|
||||
case CHILD_PROP_PACK_TYPE:
|
||||
g_value_set_enum (value, child->pack_type);
|
||||
break;
|
||||
|
||||
default:
|
||||
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_header_bar_set_child_property (GtkContainer *container,
|
||||
GtkWidget *widget,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkHeaderBar *bar = GTK_HEADER_BAR (container);
|
||||
GList *l;
|
||||
Child *child;
|
||||
|
||||
l = find_child_link (bar, widget, NULL);
|
||||
if (l == NULL)
|
||||
return;
|
||||
|
||||
child = l->data;
|
||||
|
||||
switch (property_id)
|
||||
{
|
||||
case CHILD_PROP_PACK_TYPE:
|
||||
child->pack_type = g_value_get_enum (value);
|
||||
_gtk_header_bar_update_separator_visibility (bar);
|
||||
gtk_widget_queue_resize (widget);
|
||||
break;
|
||||
|
||||
default:
|
||||
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void surface_state_changed (GtkWidget *widget);
|
||||
|
||||
static void
|
||||
@ -1786,16 +1715,6 @@ gtk_header_bar_class_init (GtkHeaderBarClass *class)
|
||||
container_class->remove = gtk_header_bar_remove;
|
||||
container_class->forall = gtk_header_bar_forall;
|
||||
container_class->child_type = gtk_header_bar_child_type;
|
||||
container_class->set_child_property = gtk_header_bar_set_child_property;
|
||||
container_class->get_child_property = gtk_header_bar_get_child_property;
|
||||
|
||||
gtk_container_class_install_child_property (container_class,
|
||||
CHILD_PROP_PACK_TYPE,
|
||||
g_param_spec_enum ("pack-type",
|
||||
P_("Pack type"),
|
||||
P_("A GtkPackType indicating whether the child is packed with reference to the start or end of the parent"),
|
||||
GTK_TYPE_PACK_TYPE, GTK_PACK_START,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
header_bar_props[PROP_TITLE] =
|
||||
g_param_spec_string ("title",
|
||||
@ -1923,8 +1842,12 @@ gtk_header_bar_buildable_add_child (GtkBuildable *buildable,
|
||||
GObject *child,
|
||||
const gchar *type)
|
||||
{
|
||||
if (type && strcmp (type, "title") == 0)
|
||||
if (g_strcmp0 (type, "title") == 0)
|
||||
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (buildable), GTK_WIDGET (child));
|
||||
else if (g_strcmp0 (type, "start") == 0)
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (buildable), GTK_WIDGET (child));
|
||||
else if (g_strcmp0 (type, "end") == 0)
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (buildable), GTK_WIDGET (child));
|
||||
else
|
||||
parent_buildable_iface->add_child (buildable, builder, child, type);
|
||||
}
|
||||
|
@ -323,11 +323,25 @@ value_is_default (MyParserData *data,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_attribute_value (Element *element,
|
||||
const char *name)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; element->attribute_names[i]; i++)
|
||||
{
|
||||
if (g_str_equal (element->attribute_names[i], name))
|
||||
return element->attribute_values[i];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_class_name (Element *element)
|
||||
{
|
||||
Element *parent = element->parent;
|
||||
int i;
|
||||
|
||||
if (g_str_equal (element->element_name, "object"))
|
||||
parent = element;
|
||||
@ -337,19 +351,11 @@ get_class_name (Element *element)
|
||||
|
||||
if (g_str_equal (parent->element_name, "object"))
|
||||
{
|
||||
for (i = 0; parent->attribute_names[i]; i++)
|
||||
{
|
||||
if (g_str_equal (parent->attribute_names[i], "class"))
|
||||
return parent->attribute_values[i];
|
||||
}
|
||||
return get_attribute_value (parent, "class");
|
||||
}
|
||||
else if (g_str_equal (parent->element_name, "template"))
|
||||
{
|
||||
for (i = 0; parent->attribute_names[i]; i++)
|
||||
{
|
||||
if (g_str_equal (parent->attribute_names[i], "parent"))
|
||||
return parent->attribute_values[i];
|
||||
}
|
||||
return get_attribute_value (parent, "parent");
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -420,6 +426,11 @@ property_can_be_omitted (Element *element,
|
||||
property_name = (const gchar *)element->attribute_values[i];
|
||||
}
|
||||
|
||||
if ((strcmp (class_name, "GtkActionBar") == 0 ||
|
||||
strcmp (class_name, "GtkHeaderBar") == 0) &&
|
||||
strcmp (property_name, "pack-type") == 0)
|
||||
return FALSE; /* keep, will be rewritten */
|
||||
|
||||
if (translatable)
|
||||
return FALSE;
|
||||
|
||||
@ -460,8 +471,8 @@ property_has_been_removed (Element *element,
|
||||
{ "GtkActionBar", "position", 1 },
|
||||
{ "GtkButtonBox", "secondary", 1 },
|
||||
{ "GtkButtonBox", "non-homogeneous", 1 },
|
||||
{ "GtkBox", "pack-type", 1 },
|
||||
{ "GtkBox", "position", 1 },
|
||||
{ "GtkBox", "pack-type", 1 },
|
||||
{ "GtkHeaderBar", "position", 1 },
|
||||
{ "GtkPopoverMenu", "position", 1 },
|
||||
{ "GtkMenu", "left-attach", 1 },
|
||||
@ -645,7 +656,7 @@ has_attribute (Element *elt,
|
||||
for (i = 0; elt->attribute_names[i]; i++)
|
||||
{
|
||||
if (strcmp (elt->attribute_names[i], name) == 0 &&
|
||||
strcmp (elt->attribute_values[i], value) == 0)
|
||||
(value == NULL || strcmp (elt->attribute_values[i], value) == 0))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -756,6 +767,76 @@ rewrite_notebook (Element *element,
|
||||
element->children = new_children;
|
||||
}
|
||||
|
||||
static void
|
||||
rewrite_pack_type_child (Element *element,
|
||||
MyParserData *data)
|
||||
{
|
||||
Element *pack_type = NULL;
|
||||
GList *l, *ll;
|
||||
|
||||
if (!g_str_equal (element->element_name, "child"))
|
||||
return;
|
||||
|
||||
for (l = element->children; l; l = l->next)
|
||||
{
|
||||
Element *elt = l->data;
|
||||
|
||||
if (g_str_equal (elt->element_name, "packing"))
|
||||
{
|
||||
for (ll = elt->children; ll; ll = ll->next)
|
||||
{
|
||||
Element *elt2 = ll->data;
|
||||
|
||||
if (g_str_equal (elt2->element_name, "property") &&
|
||||
has_attribute (elt2, "name", "pack-type"))
|
||||
{
|
||||
pack_type = elt2;
|
||||
elt->children = g_list_remove (elt->children, pack_type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pack_type)
|
||||
{
|
||||
char **attnames = g_new0 (char *, g_strv_length (element->attribute_names) + 2);
|
||||
char **attvalues = g_new0 (char *, g_strv_length (element->attribute_names) + 2);
|
||||
int i;
|
||||
|
||||
for (i = 0; element->attribute_names[i]; i++)
|
||||
{
|
||||
attnames[i] = g_strdup (element->attribute_names[i]);
|
||||
attvalues[i] = g_strdup (element->attribute_values[i]);
|
||||
}
|
||||
|
||||
attnames[i] = g_strdup ("type");
|
||||
attvalues[i] = g_strdup (pack_type->data);
|
||||
|
||||
g_strfreev (element->attribute_names);
|
||||
g_strfreev (element->attribute_values);
|
||||
|
||||
element->attribute_names = attnames;
|
||||
element->attribute_values = attvalues;
|
||||
|
||||
free_element (pack_type);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
rewrite_pack_type (Element *element,
|
||||
MyParserData *data)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = element->children; l; l = l->next)
|
||||
{
|
||||
Element *elt = l->data;
|
||||
if (g_str_equal (elt->element_name, "child"))
|
||||
rewrite_pack_type_child (elt, data);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
simplify_element (Element *element,
|
||||
MyParserData *data)
|
||||
@ -806,6 +887,11 @@ simplify_element (Element *element,
|
||||
g_str_equal (get_class_name (element), "GtkNotebook"))
|
||||
rewrite_notebook (element, data);
|
||||
|
||||
if (g_str_equal (element->element_name, "object") &&
|
||||
(g_str_equal (get_class_name (element), "GtkActionBar") ||
|
||||
g_str_equal (get_class_name (element), "GtkHeaderBar")))
|
||||
rewrite_pack_type (element, data);
|
||||
|
||||
if (g_str_equal (element->element_name, "property") &&
|
||||
property_has_been_removed (element, data))
|
||||
return TRUE;
|
||||
|
@ -144,7 +144,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGestureLongPress">
|
||||
<property name="touch-only">True</property>
|
||||
<property name="touch-only">1</property>
|
||||
<signal name="pressed" handler="long_press_cb" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
@ -258,7 +258,7 @@
|
||||
<property name="name">other_locations</property>
|
||||
<property name="child">
|
||||
<object class="GtkPlacesView" id="places_view">
|
||||
<property name="local-only" bind-source="GtkFileChooserWidget" bind-property="local-only" bind-flags="default|sync-create"></property>
|
||||
<property name="local-only" bind-source="GtkFileChooserWidget" bind-property="local-only" bind-flags="default|sync-create"/>
|
||||
<signal name="open-location" handler="places_sidebar_open_location_cb" swapped="no"/>
|
||||
<signal name="show-error-message" handler="places_sidebar_show_error_message_cb" swapped="no"/>
|
||||
</object>
|
||||
@ -348,7 +348,7 @@
|
||||
<property name="spacing">12</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkBox" id="filter_combo_hbox">
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="filter_combo">
|
||||
@ -361,9 +361,7 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -261,7 +261,7 @@
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkButton" id="connect_button">
|
||||
<property name="label" translatable="yes">Con_nect</property>
|
||||
<property name="use-underline">1</property>
|
||||
@ -271,11 +271,9 @@
|
||||
<property name="valign">center</property>
|
||||
<signal name="clicked" handler="on_connect_button_clicked" object="GtkPlacesView" swapped="yes"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkBox">
|
||||
<property name="hexpand">1</property>
|
||||
<child>
|
||||
@ -311,9 +309,7 @@
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
309
tests/dialog.ui
309
tests/dialog.ui
@ -1,235 +1,190 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.10 -->
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
<columns>
|
||||
<!-- column-name name -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkEntryCompletion" id="name_completion">
|
||||
<property name="model">liststore1</property>
|
||||
<property name="text_column">0</property>
|
||||
<property name="inline_completion">True</property>
|
||||
<property name="inline_completion">1</property>
|
||||
</object>
|
||||
<object class="GtkDialog" id="dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="modal">1</property>
|
||||
<property name="destroy_with_parent">1</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="default_width">500</property>
|
||||
<property name="use_header_bar">1</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="titlebar">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Join Chat Room</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="back_button">
|
||||
<property name="visible">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="visible">0</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="valign">center</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage" id="back_icon">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="back_icon"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="label" translatable="yes">_Cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="use_underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkButton" id="confirm_button">
|
||||
<property name="label" translatable="yes">_Join</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can_default">1</property>
|
||||
<property name="has_default">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="use_underline">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition_type">slide-left-right</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">24</property>
|
||||
<property name="margin_right">24</property>
|
||||
<property name="margin_top">24</property>
|
||||
<property name="margin_bottom">24</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="margin">
|
||||
<property name="visible">True</property>
|
||||
<property name="width_request">24</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="password_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="visibility">False</property>
|
||||
<property name="activates_default">True</property>
|
||||
<property name="placeholder_text" translatable="yes">optional</property>
|
||||
<property name="input_purpose">password</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">2</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">main</property>
|
||||
<property name="position">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="margin_left">24</property>
|
||||
<property name="margin_right">24</property>
|
||||
<property name="margin_top">24</property>
|
||||
<property name="activates_default">True</property>
|
||||
<property name="completion">name_completion</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">2</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="add_connection_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="margin_bottom">24</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<object class="GtkLabel" id="margin">
|
||||
<property name="width_request">24</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="password_entry">
|
||||
<property name="can_focus">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="visibility">0</property>
|
||||
<property name="activates_default">1</property>
|
||||
<property name="placeholder_text" translatable="yes">optional</property>
|
||||
<property name="input_purpose">password</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="can_focus">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="margin_top">24</property>
|
||||
<property name="activates_default">1</property>
|
||||
<property name="completion">name_completion</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="add_connection_button">
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">list-add-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">_Add Connection</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">add_connection_button</property>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="icon_name">list-add-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="label" translatable="yes">_Add Connection</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="mnemonic_widget">add_connection_button</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="connection_combo">
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="connection_label">
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes">C_onnection</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="mnemonic_widget">connection_combo</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="name_label">
|
||||
<property name="halign">end</property>
|
||||
<property name="margin_top">24</property>
|
||||
<property name="label" translatable="yes">Room _Name</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="mnemonic_widget">name_entry</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="password_label">
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes">_Password</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="mnemonic_widget">password_entry</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="connection_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="connection_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes">C_onnection</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">connection_combo</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="name_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="margin_top">24</property>
|
||||
<property name="label" translatable="yes">Room _Name</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">name_entry</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="password_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes">_Password</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">password_entry</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">main</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -16,105 +16,87 @@
|
||||
<property name="default-height">480</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="header">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<child type="start">
|
||||
<object class="GtkButton" id="headerbutton">
|
||||
<property name="visible">True</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">emblem-system-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="title">
|
||||
<object class="GtkStack" id="titlestack">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Docker Docker Docker</property>
|
||||
<property name="ellipsize">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">title</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Docker Docker Docker</property>
|
||||
<property name="ellipsize">end</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="menu-model">selectionmenu</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">4</property>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">selection</property>
|
||||
<property name="child">
|
||||
<object class="GtkMenuButton">
|
||||
<property name="menu-model">selectionmenu</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Click on items to select them</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">pan-down-symbolic</property>
|
||||
<object class="GtkBox">
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Click on items to select them</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">pan-down-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">selection</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkButton" id="select-button">
|
||||
<property name="visible">True</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">object-select-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkButton" id="cancel-button">
|
||||
<property name="visible">0</property>
|
||||
<property name="label">Cancel</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="vscrollbar-policy">automatic</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="list">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="activate-on-single-click">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -5,57 +5,43 @@
|
||||
<property name="icon-name">preferences-desktop-font</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkHeaderBar" id="sidebar-header">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkCheckButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHeaderBar" id="main-header">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<property name="hexpand">1</property>
|
||||
<child type="start">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label"><</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">></property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@ -63,36 +49,29 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="sidebar-content">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Bla</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Bla bla</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Bla bla bla</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Bla bla bla bla</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
@ -101,20 +80,17 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="main-content">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="hscrollbar-policy">always</property>
|
||||
<property name="vscrollbar-policy">always</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Layout</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -124,7 +100,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="layout-entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="width-chars">25</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -134,7 +109,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Decorations</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -143,9 +117,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="decorations">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<object class="GtkCheckButton" id="decorations"/>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
@ -159,14 +131,12 @@
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkSizeGroup">
|
||||
<property name="mode">horizontal</property>
|
||||
<widgets>
|
||||
<widget name="sidebar-header"/>
|
||||
<widget name="sidebar-content"/>
|
||||
</widgets>
|
||||
</object>
|
||||
<object class="GtkSizeGroup">
|
||||
<property name="mode">horizontal</property>
|
||||
<widgets>
|
||||
<widget name="main-header"/>
|
||||
<widget name="main-content"/>
|
||||
|
@ -5,117 +5,110 @@
|
||||
<property name="icon-name">preferences-desktop-font</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkStack" id="header_stack">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">New</property>
|
||||
<property name="valign">center</property>
|
||||
<signal name="clicked" handler="go_to_secondary"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="title">
|
||||
<object class="GtkStackSwitcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="stack">page_stack</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">main</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkHeaderBar">
|
||||
<child type="start">
|
||||
<object class="GtkButton">
|
||||
<property name="label">New</property>
|
||||
<property name="valign">center</property>
|
||||
<signal name="clicked" handler="go_to_secondary"/>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="title">
|
||||
<object class="GtkStackSwitcher">
|
||||
<property name="stack">page_stack</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label"><</property>
|
||||
<property name="valign">center</property>
|
||||
<signal name="clicked" handler="back_to_main"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">secondary</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkHeaderBar">
|
||||
<child type="start">
|
||||
<object class="GtkButton">
|
||||
<property name="label"><</property>
|
||||
<property name="valign">center</property>
|
||||
<signal name="clicked" handler="back_to_main"/>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="page_stack">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="hscrollbar-policy">always</property>
|
||||
<property name="vscrollbar-policy">always</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">Page 1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">page1</property>
|
||||
<property name="title">Page 1</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="hscrollbar-policy">always</property>
|
||||
<property name="vscrollbar-policy">always</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">Page 1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="hscrollbar-policy">always</property>
|
||||
<property name="vscrollbar-policy">always</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">Page 2</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">page2</property>
|
||||
<property name="title">Page 2</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="hscrollbar-policy">always</property>
|
||||
<property name="vscrollbar-policy">always</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">Page 2</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="hscrollbar-policy">always</property>
|
||||
<property name="vscrollbar-policy">always</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">Secondary</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">secondary</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="hscrollbar-policy">always</property>
|
||||
<property name="vscrollbar-policy">always</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">Secondary</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -1,51 +1,34 @@
|
||||
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="type">popup</property>
|
||||
<child>
|
||||
<object class="GtkActionBar" id="actionbar">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<child type="start">
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Start 1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="start">
|
||||
<object class="GtkButton" id="button2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Start 2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkButton" id="button3">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">End 1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkButton" id="button4">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">End 2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="center">
|
||||
<object class="GtkButton" id="button5">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Center</property>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -1,31 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="type">popup</property>
|
||||
<child>
|
||||
<object class="GtkHeaderBar" id="headerbar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="title">Title</property>
|
||||
<property name="subtitle">Subtitle</property>
|
||||
<child>
|
||||
<child type="start">
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label" translatable="yes">Yes</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkButton" id="page2">
|
||||
<property name="label" translatable="yes">No</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -1,55 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="type">popup</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Center</property>
|
||||
</object>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -1,54 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="type">popup</property>
|
||||
<child>
|
||||
<object class="GtkActionBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<child type="start">
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="start">
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
</packing>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="center">
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Center</property>
|
||||
</object>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
Loading…
Reference in New Issue
Block a user