Merge branch 'child-properties' into 'master'

Remove some more child properties

See merge request GNOME/gtk!675
This commit is contained in:
Matthias Clasen 2019-03-28 02:04:42 +00:00
commit dec2cf49dd
20 changed files with 3195 additions and 9029 deletions

View File

@ -11,41 +11,36 @@
</style>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="label" translatable="yes">Normal</property>
<property name="use-underline">1</property>
<property name="is-important">1</property>
<property name="icon-name">edit-find</property>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="label" translatable="yes">Active</property>
<property name="use-underline">1</property>
<property name="is-important">1</property>
<property name="icon-name">edit-find</property>
<property name="active">1</property>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="sensitive">0</property>
<property name="label" translatable="yes">Insensitive</property>
<property name="use-underline">1</property>
<property name="is-important">1</property>
<property name="icon-name">edit-find</property>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="label" translatable="yes">Raised</property>
<property name="use-underline">1</property>
<property name="is-important">1</property>
@ -54,12 +49,10 @@
<class name="raised"/>
</style>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="label" translatable="yes">Raised Active</property>
<property name="use-underline">1</property>
<property name="is-important">1</property>
@ -69,12 +62,10 @@
<class name="raised"/>
</style>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="sensitive">0</property>
<property name="label" translatable="yes">Insensitive Active</property>
<property name="use-underline">1</property>
@ -82,9 +73,6 @@
<property name="is-important">1</property>
<property name="active">1</property>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToolItem">
@ -149,68 +137,56 @@
</style>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="label" translatable="yes">Normal</property>
<property name="use-underline">1</property>
<property name="icon-name">list-add-symbolic</property>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="label" translatable="yes">Normal</property>
<property name="use-underline">1</property>
<property name="icon-name">list-add-symbolic</property>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="label" translatable="yes">Active</property>
<property name="use-underline">1</property>
<property name="icon-name">list-remove-symbolic</property>
<property name="active">1</property>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="label" translatable="yes">Active</property>
<property name="use-underline">1</property>
<property name="icon-name">list-remove-symbolic</property>
<property name="active">1</property>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="sensitive">0</property>
<property name="label" translatable="yes">Insensitive</property>
<property name="use-underline">1</property>
<property name="icon-name">edit-find-symbolic</property>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton">
<property name="homogeneous">1</property>
<property name="sensitive">0</property>
<property name="label" translatable="yes">Insensitive Active</property>
<property name="use-underline">1</property>
<property name="icon-name">go-up-symbolic</property>
<property name="active">1</property>
</object>
<packing>
<property name="homogeneous">1</property>
</packing>
</child>
</object>
</child>

View File

@ -417,7 +417,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="menu-model">gear_menu</property>
<property name="icon-name">open-menu-symbolic</property>
</object>
<packing/>
</child>
</object>
</child>
@ -1593,7 +1592,6 @@ microphone-sensitivity-medium-symbolic</property>
<property name="valign">center</property>
<property name="icon-name">emblem-system-symbolic</property>
</object>
<packing/>
</child>
</object>
</child>
@ -2844,6 +2842,7 @@ microphone-sensitivity-medium-symbolic</property>
</child>
<child>
<object class="GtkToolItem">
<property name="expand-item">1</property>
<child>
<object class="GtkScale">
<property name="draw-value">0</property>
@ -2851,9 +2850,6 @@ microphone-sensitivity-medium-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">1</property>
</packing>
</child>
<child>
<object class="GtkToolItem">

View File

@ -6520,6 +6520,7 @@ gtk_popover_get_type
<TITLE>GtkPopoverMenu</TITLE>
GtkPopoverMenu
gtk_popover_menu_new
gtk_popover_menu_add_submenu
gtk_popover_menu_open_submenu
<SUBSECTION Standard>

View File

@ -164,6 +164,10 @@ enum {
PROP_MIN_POSITION,
PROP_MAX_POSITION,
PROP_WIDE_HANDLE,
PROP_RESIZE_CHILD1,
PROP_RESIZE_CHILD2,
PROP_SHRINK_CHILD1,
PROP_SHRINK_CHILD2,
LAST_PROP,
/* GtkOrientable */
@ -194,16 +198,6 @@ static void gtk_paned_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_paned_set_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_paned_get_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gtk_paned_finalize (GObject *object);
static void gtk_paned_measure (GtkWidget *widget,
GtkOrientation orientation,
@ -372,8 +366,6 @@ gtk_paned_class_init (GtkPanedClass *class)
container_class->forall = gtk_paned_forall;
container_class->child_type = gtk_paned_child_type;
container_class->set_focus_child = gtk_paned_set_focus_child;
container_class->set_child_property = gtk_paned_set_child_property;
container_class->get_child_property = gtk_paned_get_child_property;
paned_class->cycle_child_focus = gtk_paned_cycle_child_focus;
paned_class->toggle_handle_focus = gtk_paned_toggle_handle_focus;
@ -439,40 +431,60 @@ gtk_paned_class_init (GtkPanedClass *class)
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, LAST_PROP, paned_props);
g_object_class_override_property (object_class,
PROP_ORIENTATION,
"orientation");
/**
* GtkPaned:resize:
* GtkPaned:resize-child1:
*
* The "resize" child property determines whether the child expands and
* The "resize-child1" property determines whether the first child expands and
* shrinks along with the paned widget.
*/
gtk_container_class_install_child_property (container_class,
CHILD_PROP_RESIZE,
g_param_spec_boolean ("resize",
P_("Resize"),
P_("If TRUE, the child expands and shrinks along with the paned widget"),
TRUE,
GTK_PARAM_READWRITE));
paned_props[PROP_RESIZE_CHILD1] =
g_param_spec_boolean ("resize-child1",
P_("Resize first child"),
P_("If TRUE, the first child expands and shrinks along with the paned widget"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkPaned:shrink:
* GtkPaned:resize-child2:
*
* The "shrink" child property determines whether the child can be made
* The "resize-child2" property determines whether the second child expands and
* shrinks along with the paned widget.
*/
paned_props[PROP_RESIZE_CHILD2] =
g_param_spec_boolean ("resize-child2",
P_("Resize second child"),
P_("If TRUE, the second child expands and shrinks along with the paned widget"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkPaned:shrink-child1:
*
* The "shrink-child1" property determines whether the first child can be made
* smaller than its requisition.
*/
gtk_container_class_install_child_property (container_class,
CHILD_PROP_SHRINK,
g_param_spec_boolean ("shrink",
P_("Shrink"),
P_("If TRUE, the child can be made smaller than its requisition"),
TRUE,
GTK_PARAM_READWRITE));
paned_props[PROP_SHRINK_CHILD1] =
g_param_spec_boolean ("shrink-child1",
P_("Shrink first child"),
P_("If TRUE, the first child can be made smaller than its requisition"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkPaned:shrink-child2:
*
* The "shrink-child2" property determines whether the second child can be made
* smaller than its requisition.
*/
paned_props[PROP_SHRINK_CHILD2] =
g_param_spec_boolean ("shrink-child2",
P_("Shrink second child"),
P_("If TRUE, the second child can be made smaller than its requisition"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, LAST_PROP, paned_props);
g_object_class_override_property (object_class, PROP_ORIENTATION, "orientation");
/**
* GtkPaned::cycle-child-focus:
@ -847,6 +859,38 @@ gtk_paned_set_property (GObject *object,
case PROP_WIDE_HANDLE:
gtk_paned_set_wide_handle (paned, g_value_get_boolean (value));
break;
case PROP_RESIZE_CHILD1:
if (priv->child1_resize != g_value_get_boolean (value))
{
priv->child1_resize = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
gtk_widget_queue_resize (GTK_WIDGET (object));
}
break;
case PROP_RESIZE_CHILD2:
if (priv->child2_resize != g_value_get_boolean (value))
{
priv->child2_resize = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
gtk_widget_queue_resize (GTK_WIDGET (object));
}
break;
case PROP_SHRINK_CHILD1:
if (priv->child1_shrink != g_value_get_boolean (value))
{
priv->child1_shrink = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
gtk_widget_queue_resize (GTK_WIDGET (object));
}
break;
case PROP_SHRINK_CHILD2:
if (priv->child2_shrink != g_value_get_boolean (value))
{
priv->child2_shrink = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
gtk_widget_queue_resize (GTK_WIDGET (object));
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@ -882,95 +926,24 @@ gtk_paned_get_property (GObject *object,
case PROP_WIDE_HANDLE:
g_value_set_boolean (value, gtk_paned_get_wide_handle (paned));
break;
case PROP_RESIZE_CHILD1:
g_value_set_boolean (value, priv->child1_resize);
break;
case PROP_RESIZE_CHILD2:
g_value_set_boolean (value, priv->child2_resize);
break;
case PROP_SHRINK_CHILD1:
g_value_set_boolean (value, priv->child1_shrink);
break;
case PROP_SHRINK_CHILD2:
g_value_set_boolean (value, priv->child2_shrink);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_paned_set_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GtkPaned *paned = GTK_PANED (container);
GtkPanedPrivate *priv = gtk_paned_get_instance_private (paned);
gboolean old_value, new_value;
g_assert (child == priv->child1 || child == priv->child2);
new_value = g_value_get_boolean (value);
switch (property_id)
{
case CHILD_PROP_RESIZE:
if (child == priv->child1)
{
old_value = priv->child1_resize;
priv->child1_resize = new_value;
}
else
{
old_value = priv->child2_resize;
priv->child2_resize = new_value;
}
break;
case CHILD_PROP_SHRINK:
if (child == priv->child1)
{
old_value = priv->child1_shrink;
priv->child1_shrink = new_value;
}
else
{
old_value = priv->child2_shrink;
priv->child2_shrink = new_value;
}
break;
default:
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
old_value = -1; /* quiet gcc */
break;
}
if (old_value != new_value)
gtk_widget_queue_resize (GTK_WIDGET (container));
}
static void
gtk_paned_get_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GtkPaned *paned = GTK_PANED (container);
GtkPanedPrivate *priv = gtk_paned_get_instance_private (paned);
if (child != priv->child1 &&
child != priv->child2)
return;
switch (property_id)
{
case CHILD_PROP_RESIZE:
if (child == priv->child1)
g_value_set_boolean (value, priv->child1_resize);
else
g_value_set_boolean (value, priv->child2_resize);
break;
case CHILD_PROP_SHRINK:
if (child == priv->child1)
g_value_set_boolean (value, priv->child1_shrink);
else
g_value_set_boolean (value, priv->child2_shrink);
break;
default:
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
break;
}
}
static void
gtk_paned_finalize (GObject *object)
{
@ -1393,6 +1366,10 @@ gtk_paned_init (GtkPaned *paned)
priv->in_recursion = FALSE;
priv->original_position = -1;
priv->max_position = G_MAXINT;
priv->child1_resize = TRUE;
priv->child2_resize = TRUE;
priv->child1_shrink = TRUE;
priv->child2_shrink = TRUE;
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (paned));

View File

@ -35,10 +35,13 @@
* In this respect, GtkPopoverMenu is more flexible than popovers
* that are created from a #GMenuModel with gtk_popover_new_from_model().
*
* To add a child as a submenu, set the #GtkPopoverMenu:submenu
* child property to the name of the submenu. To let the user open
* this submenu, add a #GtkModelButton whose #GtkModelButton:menu-name
* property is set to the name you've given to the submenu.
* To add a child as a submenu, use gtk_popover_menu_add_submenu().
* To let the user open this submenu, add a #GtkModelButton whose
* #GtkModelButton:menu-name property is set to the name you've given
* to the submenu.
*
* To add a named submenu in a ui file, set the #GtkWidget:name property
* of the widget that you are adding as a child of the popover menu.
*
* By convention, the first child of a submenu should be a #GtkModelButton
* to switch back to the parent menu. Such a button should use the
@ -75,6 +78,7 @@
* <object class="GtkBox">
* <property name="visible">True</property>
* <property name="margin">10</property>
* <property name="name">more</property>
* <child>
* <object class="GtkModelButton">
* <property name="visible">True</property>
@ -90,9 +94,6 @@
* </object>
* </child>
* </object>
* <packing>
* <property name="submenu">more</property>
* </packing>
* </child>
* </object>
* ]|
@ -114,10 +115,6 @@ enum {
PROP_VISIBLE_SUBMENU = 1
};
enum {
CHILD_PROP_SUBMENU = 1,
};
G_DEFINE_TYPE (GtkPopoverMenu, gtk_popover_menu, GTK_TYPE_POPOVER)
static void
@ -176,12 +173,14 @@ gtk_popover_menu_add (GtkContainer *container,
{
const char *name;
if (gtk_stack_get_child_by_name (GTK_STACK (stack), "main"))
if (gtk_widget_get_name (child))
name = gtk_widget_get_name (child);
else if (gtk_stack_get_child_by_name (GTK_STACK (stack), "main"))
name = "submenu";
else
name = "main";
gtk_stack_add_named (GTK_STACK (stack), child, name);
gtk_popover_menu_add_submenu (GTK_POPOVER_MENU (container), child, name);
}
}
@ -199,66 +198,6 @@ gtk_popover_menu_remove (GtkContainer *container,
gtk_container_remove (GTK_CONTAINER (stack), child);
}
static void
gtk_popover_menu_get_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GtkWidget *stack;
stack = gtk_bin_get_child (GTK_BIN (container));
if (child == stack)
return;
switch (property_id)
{
case CHILD_PROP_SUBMENU:
{
gchar *name;
gtk_container_child_get (GTK_CONTAINER (stack), child, "name", &name, NULL);
g_value_set_string (value, name);
}
break;
default:
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
break;
}
}
static void
gtk_popover_menu_set_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GtkWidget *stack;
stack = gtk_bin_get_child (GTK_BIN (container));
if (child == stack)
return;
switch (property_id)
{
case CHILD_PROP_SUBMENU:
{
const gchar *name;
name = g_value_get_string (value);
gtk_container_child_set (GTK_CONTAINER (stack), child, "name", name, NULL);
}
break;
default:
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
break;
}
}
static void
gtk_popover_menu_get_property (GObject *object,
guint property_id,
@ -318,8 +257,6 @@ gtk_popover_menu_class_init (GtkPopoverMenuClass *klass)
container_class->add = gtk_popover_menu_add;
container_class->remove = gtk_popover_menu_remove;
container_class->set_child_property = gtk_popover_menu_set_child_property;
container_class->get_child_property = gtk_popover_menu_get_child_property;
g_object_class_install_property (object_class,
PROP_VISIBLE_SUBMENU,
@ -328,21 +265,6 @@ gtk_popover_menu_class_init (GtkPopoverMenuClass *klass)
P_("The name of the visible submenu"),
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GtkPopoverMenu:submenu:
*
* The submenu child property specifies the name of the submenu
* If it is %NULL or "main", the child is used as the main menu,
* which is shown initially when the popover is mapped.
*/
gtk_container_class_install_child_property (container_class,
CHILD_PROP_SUBMENU,
g_param_spec_string ("submenu",
P_("Submenu"),
P_("The name of the submenu"),
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
/**
@ -384,3 +306,23 @@ gtk_popover_menu_open_submenu (GtkPopoverMenu *popover,
stack = gtk_bin_get_child (GTK_BIN (popover));
gtk_stack_set_visible_child_name (GTK_STACK (stack), name);
}
/**
* gtk_popover_menu_add_submenu:
* @popover: a #GtkPopoverMenu
* @submenu: a widget to add as submenu
* @name: the name for the submenu
*
* Adds a submenu to the popover menu.
*/
void
gtk_popover_menu_add_submenu (GtkPopoverMenu *popover,
GtkWidget *submenu,
const char *name)
{
GtkWidget *stack;
stack = gtk_bin_get_child (GTK_BIN (popover));
gtk_stack_add_named (GTK_STACK (stack), submenu, name);
}

View File

@ -52,9 +52,13 @@ GType gtk_popover_menu_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_popover_menu_new (void);
GDK_AVAILABLE_IN_ALL
void gtk_popover_menu_add_submenu (GtkPopoverMenu *popover,
GtkWidget *menu,
const char *name);
GDK_AVAILABLE_IN_ALL
void gtk_popover_menu_open_submenu (GtkPopoverMenu *popover,
const gchar *name);
const char *name);
G_END_DECLS

View File

@ -76,7 +76,7 @@
* to the toolbar, add an instance of #GtkToolButton.
*
* Toolbar items can be visually grouped by adding instances of
* #GtkSeparatorToolItem to the toolbar. If the GtkToolbar child property
* #GtkSeparatorToolItem to the toolbar. If the GtkToolItem property
* expand is #TRUE and the property #GtkSeparatorToolItem:draw is set to
* #FALSE, the effect is to force all following items to the end of the toolbar.
*
@ -150,13 +150,6 @@ enum {
PROP_TOOLTIPS,
};
/* Child properties */
enum {
CHILD_PROP_0,
CHILD_PROP_EXPAND,
CHILD_PROP_HOMOGENEOUS
};
/* Signals */
enum {
ORIENTATION_CHANGED,
@ -195,16 +188,6 @@ static void gtk_toolbar_move_focus (GtkWidget *widget,
GtkDirectionType dir);
static void gtk_toolbar_display_changed (GtkWidget *widget,
GdkDisplay *previous_display);
static void gtk_toolbar_set_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_toolbar_get_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gtk_toolbar_finalize (GObject *object);
static void gtk_toolbar_dispose (GObject *object);
static void gtk_toolbar_add (GtkContainer *container,
@ -386,8 +369,6 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
container_class->remove = gtk_toolbar_remove;
container_class->forall = gtk_toolbar_forall;
container_class->child_type = gtk_toolbar_child_type;
container_class->get_child_property = gtk_toolbar_get_child_property;
container_class->set_child_property = gtk_toolbar_set_child_property;
klass->orientation_changed = gtk_toolbar_orientation_changed;
klass->style_changed = gtk_toolbar_real_style_changed;
@ -494,23 +475,6 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/* child properties */
gtk_container_class_install_child_property (container_class,
CHILD_PROP_EXPAND,
g_param_spec_boolean ("expand",
P_("Expand"),
P_("Whether the item should receive extra space when the toolbar grows"),
FALSE,
GTK_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_HOMOGENEOUS,
g_param_spec_boolean ("homogeneous",
P_("Homogeneous"),
P_("Whether the item should be the same size as other homogeneous items"),
FALSE,
GTK_PARAM_READWRITE));
binding_set = gtk_binding_set_by_class (klass);
add_arrow_bindings (binding_set, GDK_KEY_Left, GTK_DIR_LEFT);
@ -2002,54 +1966,6 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
gtk_toolbar_begin_sliding (toolbar);
}
static void
gtk_toolbar_get_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GtkToolItem *item = GTK_TOOL_ITEM (child);
switch (property_id)
{
case CHILD_PROP_HOMOGENEOUS:
g_value_set_boolean (value, gtk_tool_item_get_homogeneous (item));
break;
case CHILD_PROP_EXPAND:
g_value_set_boolean (value, gtk_tool_item_get_expand (item));
break;
default:
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
break;
}
}
static void
gtk_toolbar_set_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
switch (property_id)
{
case CHILD_PROP_HOMOGENEOUS:
gtk_tool_item_set_homogeneous (GTK_TOOL_ITEM (child), g_value_get_boolean (value));
break;
case CHILD_PROP_EXPAND:
gtk_tool_item_set_expand (GTK_TOOL_ITEM (child), g_value_get_boolean (value));
break;
default:
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
break;
}
}
static void
gtk_toolbar_add (GtkContainer *container,
GtkWidget *widget)

View File

@ -68,6 +68,8 @@ enum {
PROP_VISIBLE_HORIZONTAL,
PROP_VISIBLE_VERTICAL,
PROP_IS_IMPORTANT,
PROP_HOMOGENEOUS,
PROP_EXPAND_ITEM,
};
@ -144,6 +146,22 @@ gtk_tool_item_class_init (GtkToolItemClass *klass)
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_EXPAND_ITEM,
g_param_spec_boolean ("expand-item",
P_("Expand Item"),
P_("Whether the item should receive extra space when the toolbar grows"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_HOMOGENEOUS,
g_param_spec_boolean ("homogeneous",
P_("Homogeneous"),
P_("Whether the item should be the same size as other homogeneous items"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkToolItem::create-menu-proxy:
* @tool_item: the object the signal was emitted on
@ -261,6 +279,12 @@ gtk_tool_item_set_property (GObject *object,
case PROP_IS_IMPORTANT:
gtk_tool_item_set_is_important (toolitem, g_value_get_boolean (value));
break;
case PROP_EXPAND_ITEM:
gtk_tool_item_set_expand (toolitem, g_value_get_boolean (value));
break;
case PROP_HOMOGENEOUS:
gtk_tool_item_set_homogeneous (toolitem, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@ -286,6 +310,12 @@ gtk_tool_item_get_property (GObject *object,
case PROP_IS_IMPORTANT:
g_value_set_boolean (value, toolitem->priv->is_important);
break;
case PROP_EXPAND_ITEM:
g_value_set_boolean (value, toolitem->priv->expand);
break;
case PROP_HOMOGENEOUS:
g_value_set_boolean (value, toolitem->priv->homogeneous);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@ -508,7 +538,7 @@ gtk_tool_item_set_expand (GtkToolItem *tool_item,
if (tool_item->priv->expand != expand)
{
tool_item->priv->expand = expand;
gtk_widget_child_notify (GTK_WIDGET (tool_item), "expand");
g_object_notify (G_OBJECT (tool_item), "expand-item");
gtk_widget_queue_resize (GTK_WIDGET (tool_item));
}
}
@ -550,7 +580,7 @@ gtk_tool_item_set_homogeneous (GtkToolItem *tool_item,
if (tool_item->priv->homogeneous != homogeneous)
{
tool_item->priv->homogeneous = homogeneous;
gtk_widget_child_notify (GTK_WIDGET (tool_item), "homogeneous");
g_object_notify (G_OBJECT (tool_item), "homogeneous");
gtk_widget_queue_resize (GTK_WIDGET (tool_item));
}
}

View File

@ -183,6 +183,42 @@ needs_explicit_setting (GParamSpec *pspec,
return found;
}
static gboolean
keep_for_rewrite (const char *class_name,
const char *prop_name,
gboolean packing)
{
struct _Prop {
const char *class;
const char *property;
gboolean packing;
} props[] = {
{ "GtkActionBar", "pack-type", 1 },
{ "GtkHeaderBar", "pack-type", 1 },
{ "GtkPopoverMenu", "submenu", 1 },
{ "GtkToolbar", "expand", 1 },
{ "GtkToolbar", "homogeneous", 1 },
{ "GtkPaned", "resize", 1 },
{ "GtkPaned", "shrink", 1 },
};
gboolean found;
gint k;
found = FALSE;
for (k = 0; k < G_N_ELEMENTS (props); k++)
{
if (strcmp (class_name, props[k].class) == 0 &&
strcmp (prop_name, props[k].property) == 0 &&
packing == props[k].packing)
{
found = TRUE;
break;
}
}
return found;
}
static gboolean
is_pcdata_element (Element *element)
{
@ -323,6 +359,23 @@ value_is_default (MyParserData *data,
return ret;
}
static gboolean
has_attribute (Element *elt,
const char *name,
const char *value)
{
int i;
for (i = 0; elt->attribute_names[i]; i++)
{
if (strcmp (elt->attribute_names[i], name) == 0 &&
(value == NULL || strcmp (elt->attribute_values[i], value) == 0))
return TRUE;
}
return FALSE;
}
static const char *
get_attribute_value (Element *element,
const char *name)
@ -426,9 +479,7 @@ 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)
if (keep_for_rewrite (class_name, property_name, packing))
return FALSE; /* keep, will be rewritten */
if (translatable)
@ -646,23 +697,6 @@ rewrite_assistant (Element *element,
element->children = new_children;
}
static gboolean
has_attribute (Element *elt,
const char *name,
const char *value)
{
int i;
for (i = 0; elt->attribute_names[i]; i++)
{
if (strcmp (elt->attribute_names[i], name) == 0 &&
(value == NULL || strcmp (elt->attribute_values[i], value) == 0))
return TRUE;
}
return FALSE;
}
static Element *
rewrite_notebook_page (Element *child, Element *tab, MyParserData *data)
{
@ -792,10 +826,18 @@ rewrite_pack_type_child (Element *element,
{
pack_type = elt2;
elt->children = g_list_remove (elt->children, pack_type);
if (elt->children == NULL)
{
element->children = g_list_remove (element->children, elt);
free_element (elt);
}
break;
}
}
}
if (pack_type)
break;
}
if (pack_type)
@ -837,6 +879,195 @@ rewrite_pack_type (Element *element,
}
}
static void
rewrite_child_prop_to_prop_child (Element *element,
MyParserData *data,
const char *child_prop,
const char *prop)
{
Element *object = NULL;
Element *replaced = 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, "object"))
object = elt;
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", child_prop))
{
replaced = elt2;
elt->children = g_list_remove (elt->children, replaced);
if (elt->children == NULL)
{
element->children = g_list_remove (element->children, elt);
free_element (elt);
}
break;
}
}
}
if (replaced)
break;
}
if (replaced)
{
Element *elt;
elt = g_new0 (Element, 1);
elt->parent = element;
elt->element_name = g_strdup ("property");
elt->attribute_names = g_new0 (char *, 2);
elt->attribute_names[0] = g_strdup ("name");
elt->attribute_values = g_new0 (char *, 2);
elt->attribute_values[0] = g_strdup (prop);
elt->data = g_strdup (replaced->data);
object->children = g_list_prepend (object->children, elt);
free_element (replaced);
}
}
static void
rewrite_child_prop_to_prop (Element *element,
MyParserData *data,
const char *child_prop,
const char *prop)
{
GList *l;
for (l = element->children; l; l = l->next)
{
Element *elt = l->data;
if (g_str_equal (elt->element_name, "child"))
rewrite_child_prop_to_prop_child (elt, data, child_prop, prop);
}
}
static void
rewrite_paned_child (Element *element,
MyParserData *data,
Element *child,
const char *suffix)
{
Element *resize = NULL;
Element *shrink = NULL;
GList *l, *ll;
for (l = child->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", "resize"))
resize = elt2;
if (g_str_equal (elt2->element_name, "property") &&
has_attribute (elt2, "name", "shrink"))
shrink = elt2;
}
if (resize)
elt->children = g_list_remove (elt->children, resize);
if (shrink)
elt->children = g_list_remove (elt->children, shrink);
if (elt->children == NULL)
{
child->children = g_list_remove (child->children, elt);
free_element (elt);
}
}
if (resize || shrink)
break;
}
if (resize)
{
Element *elt;
elt = g_new0 (Element, 1);
elt->parent = element;
elt->element_name = g_strdup ("property");
elt->attribute_names = g_new0 (char *, 2);
elt->attribute_names[0] = g_strdup ("name");
elt->attribute_values = g_new0 (char *, 2);
elt->attribute_values[0] = g_strconcat ("resize-", suffix, NULL);
elt->data = g_strdup (resize->data);
element->children = g_list_prepend (element->children, elt);
free_element (resize);
}
if (shrink)
{
Element *elt;
elt = g_new0 (Element, 1);
elt->parent = element;
elt->element_name = g_strdup ("property");
elt->attribute_names = g_new0 (char *, 2);
elt->attribute_names[0] = g_strdup ("name");
elt->attribute_values = g_new0 (char *, 2);
elt->attribute_values[0] = g_strconcat ("shrink-", suffix, NULL);
elt->data = g_strdup (shrink->data);
element->children = g_list_prepend (element->children, elt);
free_element (shrink);
}
}
static void
rewrite_paned (Element *element,
MyParserData *data)
{
Element *child1 = NULL;
Element *child2 = NULL;
GList *l;
for (l = element->children; l; l = l->next)
{
Element *elt = l->data;
if (g_str_equal (elt->element_name, "child"))
{
if (child1 == NULL)
child1 = elt;
else if (child2 == NULL)
child2 = elt;
else
break;
}
}
if (child1)
rewrite_paned_child (element, data, child1, "child1");
if (child2)
rewrite_paned_child (element, data, child2, "child2");
}
static gboolean
simplify_element (Element *element,
MyParserData *data)
@ -892,6 +1123,22 @@ simplify_element (Element *element,
g_str_equal (get_class_name (element), "GtkHeaderBar")))
rewrite_pack_type (element, data);
if (g_str_equal (element->element_name, "object") &&
g_str_equal (get_class_name (element), "GtkPopoverMenu"))
rewrite_child_prop_to_prop (element, data, "submenu", "name");
if (g_str_equal (element->element_name, "object") &&
g_str_equal (get_class_name (element), "GtkToolbar"))
rewrite_child_prop_to_prop (element, data, "expand", "expand-item");
if (g_str_equal (element->element_name, "object") &&
g_str_equal (get_class_name (element), "GtkToolbar"))
rewrite_child_prop_to_prop (element, data, "homogeneous", "homogeneous");
if (g_str_equal (element->element_name, "object") &&
g_str_equal (get_class_name (element), "GtkPaned"))
rewrite_paned (element, data);
if (g_str_equal (element->element_name, "property") &&
property_has_been_removed (element, data))
return TRUE;

View File

@ -9,6 +9,9 @@
<property name="vexpand">1</property>
<child>
<object class="GtkPaned" id="browse_widgets_hpaned">
<property name="shrink-child2">0</property>
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="vexpand">1</property>
<child>
<object class="GtkPlacesSidebar" id="places_sidebar">
@ -22,10 +25,6 @@
<signal name="show-error-message" handler="places_sidebar_show_error_message_cb" swapped="no"/>
<signal name="show-other-locations-with-flags" handler="places_sidebar_show_other_locations_with_flags_cb" swapped="no"/>
</object>
<packing>
<property name="resize">0</property>
<property name="shrink">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
@ -332,9 +331,6 @@
</object>
</child>
</object>
<packing>
<property name="shrink">0</property>
</packing>
</child>
</object>
</child>
@ -361,7 +357,6 @@
</object>
</child>
</object>
<packing/>
</child>
</object>
</child>

View File

@ -1,13 +1,10 @@
<?xml version="1.0"?>
<interface>
<object class="GtkPopoverMenu" id="popover">
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
@ -15,7 +12,6 @@
<property name="margin-bottom">3</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="label">Edit</property>
<style>
@ -24,38 +20,30 @@
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
</object>
<object class="GtkSeparator"/>
</child>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.cut</property>
<property name="text">Cut</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.copy</property>
<property name="text">Copy</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.paste</property>
<property name="text">Paste</property>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">3</property>
@ -64,28 +52,24 @@
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">action1</property>
<property name="text">No action</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action2</property>
<property name="text">Toggle</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action2a</property>
<property name="text">Another Toggle</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
@ -93,7 +77,6 @@
<property name="margin-bottom">3</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="label">Middle Section</property>
<style>
@ -102,46 +85,38 @@
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
</object>
<object class="GtkSeparator"/>
</child>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action3</property>
<property name="action-target">'three'</property>
<property name="action-target">&apos;three&apos;</property>
<property name="text">Radio 1</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action3</property>
<property name="action-target">'four'</property>
<property name="action-target">&apos;four&apos;</property>
<property name="text">Radio 2</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Submenu 1</property>
<property name="menu-name">submenu1</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Submenu 2</property>
<property name="menu-name">submenu2</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
@ -149,7 +124,6 @@
<property name="margin-bottom">3</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="label">End Section</property>
<style>
@ -158,16 +132,12 @@
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
</object>
<object class="GtkSeparator"/>
</child>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action9</property>
<property name="text">Another Item 9</property>
<property name="icon">icon9</property>
@ -175,7 +145,6 @@
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action10</property>
<property name="text">Another Item 10</property>
</object>
@ -184,21 +153,19 @@
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="name">submenu1</property>
<property name="orientation">vertical</property>
<property name="margin">10</property>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Submenu 1</property>
<property name="inverted">True</property>
<property name="centered">True</property>
<property name="inverted">1</property>
<property name="centered">1</property>
<property name="menu-name">main</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
@ -206,7 +173,6 @@
<property name="margin-bottom">3</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="label">5555</property>
<style>
@ -215,62 +181,51 @@
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
</object>
<object class="GtkSeparator"/>
</child>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action5</property>
<property name="text">Item 5</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action5</property>
<property name="text">Item 5a</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action5</property>
<property name="text">Item 5b</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="halign">fill</property>
<property name="margin-top">10</property>
<style>
<class name="linked"/>
</style>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">List</property>
<property name="action-name">top.set-view</property>
<property name="action-target">'list'</property>
<property name="iconic">True</property>
<property name="centered">True</property>
<property name="action-target">&apos;list&apos;</property>
<property name="iconic">1</property>
<property name="centered">1</property>
<property name="icon">icon-list</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Grid</property>
<property name="action-name">top.set-view</property>
<property name="action-target">'grid'</property>
<property name="iconic">True</property>
<property name="centered">True</property>
<property name="action-target">&apos;grid&apos;</property>
<property name="iconic">1</property>
<property name="centered">1</property>
<property name="icon">icon-grid</property>
</object>
</child>
@ -278,21 +233,18 @@
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action5</property>
<property name="text">Item 5c</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action5</property>
<property name="text">Item 5d</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
@ -300,7 +252,6 @@
<property name="margin-bottom">3</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="label">Format</property>
<style>
@ -309,58 +260,48 @@
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
</object>
<object class="GtkSeparator"/>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="halign">fill</property>
<property name="margin-top">10</property>
<style>
<class name="linked"/>
</style>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Bold</property>
<property name="action-name">top.bold</property>
<property name="iconic">True</property>
<property name="centered">True</property>
<property name="iconic">1</property>
<property name="centered">1</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Italic</property>
<property name="action-name">top.italic</property>
<property name="iconic">True</property>
<property name="centered">True</property>
<property name="iconic">1</property>
<property name="centered">1</property>
<property name="icon">icon-italic</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Strikethrough</property>
<property name="action-name">top.strikethrough</property>
<property name="iconic">True</property>
<property name="centered">True</property>
<property name="iconic">1</property>
<property name="centered">1</property>
<property name="icon">icon-strikethrough</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Underline</property>
<property name="action-name">top.underline</property>
<property name="iconic">True</property>
<property name="centered">True</property>
<property name="iconic">1</property>
<property name="centered">1</property>
<property name="icon">icon-underline</property>
</object>
</child>
@ -368,7 +309,6 @@
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
@ -376,7 +316,6 @@
<property name="margin-bottom">3</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="label">6666</property>
<style>
@ -385,119 +324,97 @@
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
</object>
<object class="GtkSeparator"/>
</child>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action6</property>
<property name="text">Item 6</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action6</property>
<property name="text">Item 6a</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action6</property>
<property name="text">Item 6b</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action6</property>
<property name="text">Item 6c</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action6</property>
<property name="text">Item 6d</property>
</object>
</child>
</object>
<packing>
<property name="submenu">submenu1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="name">submenu2</property>
<property name="orientation">vertical</property>
<property name="margin">10</property>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Submenu 2</property>
<property name="inverted">True</property>
<property name="centered">True</property>
<property name="inverted">1</property>
<property name="centered">1</property>
<property name="menu-name">main</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action7</property>
<property name="text">Item 7</property>
</object>
</child>
<child>
<object class="GtkScale">
<property name="visible">True</property>
<property name="draw-value">False</property>
<property name="draw-value">0</property>
<property name="adjustment">adjustment</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Subsubmenu</property>
<property name="icon">icon9</property>
<property name="menu-name">subsubmenu</property>
</object>
</child>
</object>
<packing>
<property name="submenu">submenu2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="name">subsubmenu</property>
<property name="orientation">vertical</property>
<property name="margin">10</property>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text">Subsubmenu</property>
<property name="inverted">True</property>
<property name="centered">True</property>
<property name="inverted">1</property>
<property name="centered">1</property>
<property name="menu-name">submenu2</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">action8</property>
<property name="text">Item 8</property>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">3</property>
@ -506,22 +423,17 @@
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action9</property>
<property name="text">Item 9</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">top.action10</property>
<property name="text">Item 10</property>
</object>
</child>
</object>
<packing>
<property name="submenu">subsubmenu</property>
</packing>
</child>
</object>
<object class="GThemedIcon" id="icon9">
@ -543,7 +455,6 @@
<property name="name">format-text-underline-symbolic</property>
</object>
<object class="GtkAdjustment" id="adjustment">
<property name="lower">0</property>
<property name="upper">100</property>
<property name="value">50</property>
</object>

View File

@ -1,21 +1,16 @@
<?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="GtkPaned" id="paned1">
<child>
<object class="GtkLabel" id="label1">
<property name="label" translatable="yes">Left</property>
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="label" translatable="yes">Right</property>
<property name="visible">True</property>
</object>
</child>
</object>

View File

@ -1,22 +1,15 @@
<?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="GtkPaned">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">label1</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">label2</property>
</object>
</child>

View File

@ -1,22 +1,15 @@
<?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="GtkPaned">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">label1</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">label2</property>
</object>
</child>

View File

@ -1,176 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="height_request">500</property>
<property name="width_request">500</property>
<property name="can_focus">False</property>
<property name="type">popup</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkPaned" id="paned1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position_set">True</property>
<property name="shrink-child2">True</property>
<property name="resize-child2">True</property>
<property name="shrink-child1">False</property>
<property name="resize-child1">False</property>
<property name="can_focus">1</property>
<property name="position_set">1</property>
<child>
<object class="GtkCheckButton" id="checkbutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="can_focus">1</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hello
World</property>
</object>
</child>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkPaned" id="paned2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position_set">True</property>
<property name="shrink-child2">True</property>
<property name="resize-child2">True</property>
<property name="shrink-child1">False</property>
<property name="resize-child1">False</property>
<property name="can_focus">1</property>
<property name="position_set">1</property>
<child>
<object class="GtkRadioButton" id="radiobutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="can_focus">1</property>
<property name="active">1</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hello
World</property>
</object>
</child>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkPaned" id="paned3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position_set">True</property>
<property name="shrink-child2">True</property>
<property name="resize-child2">True</property>
<property name="shrink-child1">False</property>
<property name="resize-child1">False</property>
<property name="can_focus">1</property>
<property name="position_set">1</property>
<child>
<object class="GtkToggleButton" id="togglebutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hello
World</property>
</object>
</child>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkPaned" id="paned4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position_set">True</property>
<property name="shrink-child2">True</property>
<property name="resize-child2">True</property>
<property name="shrink-child1">False</property>
<property name="resize-child1">False</property>
<property name="can_focus">1</property>
<property name="position_set">1</property>
<child>
<object class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hello
World</property>
</object>
</child>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
</child>
</object>
</child>

View File

@ -1,176 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="height_request">500</property>
<property name="width_request">500</property>
<property name="can_focus">False</property>
<property name="type">popup</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkPaned" id="paned1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position_set">True</property>
<property name="shrink-child2">True</property>
<property name="resize-child2">True</property>
<property name="shrink-child1">False</property>
<property name="resize-child1">False</property>
<property name="can_focus">1</property>
<property name="position_set">1</property>
<child>
<object class="GtkCheckButton" id="checkbutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="can_focus">1</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hello World</property>
<property name="wrap">True</property>
<property name="wrap">1</property>
</object>
</child>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkPaned" id="paned2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position_set">True</property>
<property name="shrink-child2">True</property>
<property name="resize-child2">True</property>
<property name="shrink-child1">False</property>
<property name="resize-child1">False</property>
<property name="can_focus">1</property>
<property name="position_set">1</property>
<child>
<object class="GtkRadioButton" id="radiobutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="can_focus">1</property>
<property name="active">1</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hello World</property>
<property name="wrap">True</property>
<property name="wrap">1</property>
</object>
</child>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkPaned" id="paned3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position_set">True</property>
<property name="shrink-child2">True</property>
<property name="resize-child2">True</property>
<property name="shrink-child1">False</property>
<property name="resize-child1">False</property>
<property name="can_focus">1</property>
<property name="position_set">1</property>
<child>
<object class="GtkToggleButton" id="togglebutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hello World</property>
<property name="wrap">True</property>
<property name="wrap">1</property>
</object>
</child>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkPaned" id="paned4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position_set">True</property>
<property name="shrink-child2">True</property>
<property name="resize-child2">True</property>
<property name="shrink-child1">False</property>
<property name="resize-child1">False</property>
<property name="can_focus">1</property>
<property name="position_set">1</property>
<child>
<object class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hello World</property>
<property name="wrap">True</property>
<property name="wrap">1</property>
</object>
</child>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
</child>
</object>
</child>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +1,24 @@
<?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>
<property name="height_request">120</property>
<child>
<object class="GtkPaned" id="paned1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shrink-child2">True</property>
<property name="resize-child2">True</property>
<property name="shrink-child1">False</property>
<property name="resize-child1">False</property>
<property name="can_focus">1</property>
<property name="orientation">vertical</property>
<property name="position">10</property>
<child>
<object class="GtkBox" id="box1">
<property name="width_request">50</property>
<property name="height_request">10</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
<object class="GtkLabel" id="label1"/>
</child>
</object>
</child>

View File

@ -1,49 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="height_request">120</property>
<property name="can_focus">False</property>
<property name="type">popup</property>
<child>
<object class="GtkPaned" id="paned1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shrink-child2">True</property>
<property name="resize-child2">True</property>
<property name="shrink-child1">True</property>
<property name="resize-child1">False</property>
<property name="can_focus">1</property>
<property name="orientation">vertical</property>
<property name="position">10</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="box1">
<property name="width_request">50</property>
<property name="height_request">50</property>
<property name="visible">True</property>
<property name="can_focus">False</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>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">True</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
<object class="GtkLabel" id="label1"/>
</child>
</object>
</child>