Merge branch 'nbpage' into 'master'

Notebook child metas

See merge request GNOME/gtk!594
This commit is contained in:
Matthias Clasen 2019-02-21 05:50:05 +00:00
commit f95ed63b88
26 changed files with 2247 additions and 1964 deletions

View File

@ -1224,48 +1224,47 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<object class="GtkNotebook" id="notebook1">
<property name="can-focus">1</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkBox" id="box6">
<property name="orientation">vertical</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label5">
<property name="label" translatable="yes">page 1</property>
</object>
<packing>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkBox" id="box7">
<property name="orientation">vertical</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label6">
<property name="label" translatable="yes">page 2</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">2</property>
<property name="child">
<object class="GtkBox" id="box8">
<property name="orientation">vertical</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label7">
<property name="label" translatable="yes">page 3</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
</object>
</child>
@ -1274,51 +1273,48 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="can-focus">1</property>
<property name="tab-pos">right</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkBox" id="box9">
<property name="orientation">vertical</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label8">
<property name="label" translatable="yes">page 1</property>
</object>
<packing>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">1</property>
<property name="child">
<object class="GtkBox" id="box10">
<property name="orientation">vertical</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label9">
<property name="label" translatable="yes">page 2</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">2</property>
<property name="child">
<object class="GtkBox" id="box11">
<property name="orientation">vertical</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label10">
<property name="label" translatable="yes">page 3</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
</object>
</child>
@ -1327,51 +1323,48 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="can-focus">1</property>
<property name="tab-pos">bottom</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkBox" id="box12">
<property name="orientation">vertical</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label11">
<property name="label" translatable="yes">page 1</property>
</object>
<packing>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">1</property>
<property name="child">
<object class="GtkBox" id="box13">
<property name="orientation">vertical</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label12">
<property name="label" translatable="yes">page 2</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">2</property>
<property name="child">
<object class="GtkBox" id="box14">
<property name="orientation">vertical</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label13">
<property name="label" translatable="yes">page 3</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
</object>
</child>
@ -1380,51 +1373,48 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="can-focus">1</property>
<property name="tab-pos">left</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkBox" id="box15">
<property name="orientation">vertical</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label14">
<property name="label" translatable="yes">page 1</property>
</object>
<packing>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">1</property>
<property name="child">
<object class="GtkBox" id="box16">
<property name="orientation">vertical</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label15">
<property name="label" translatable="yes">page 2</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">2</property>
<property name="child">
<object class="GtkBox" id="box17">
<property name="orientation">vertical</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label16">
<property name="label" translatable="yes">page 3</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
</object>
</child>
@ -2892,14 +2882,14 @@ microphone-sensitivity-medium-symbolic</property>
<object class="GtkNotebook">
<property name="show-border">0</property>
<child>
<object class="GtkNotebookPage">
<property name="tab-expand">1</property>
<property name="child">
<object class="GtkBox" id="closable_page_1">
<property name="height-request">120</property>
</object>
<packing>
<property name="tab-expand">1</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkBox">
<child>
<object class="GtkLabel">
@ -2920,16 +2910,18 @@ microphone-sensitivity-medium-symbolic</property>
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="tab-expand">1</property>
<property name="child">
<object class="GtkBox" id="closable_page_2">
<property name="vexpand">1</property>
</object>
<packing>
<property name="tab-expand">1</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkBox">
<child>
<object class="GtkLabel">
@ -2950,6 +2942,8 @@ microphone-sensitivity-medium-symbolic</property>
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</child>
@ -2957,14 +2951,18 @@ microphone-sensitivity-medium-symbolic</property>
<object class="GtkNotebook">
<property name="show-border">0</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkBox">
<property name="vexpand">1</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="label" translatable="yes">Page 3</property>
</object>
</property>
</object>
</child>
</object>
</child>
@ -3028,63 +3026,73 @@ microphone-sensitivity-medium-symbolic</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="tab-expand">1</property>
<property name="child">
<object class="GtkBox">
<property name="height-request">120</property>
</object>
<packing>
<property name="tab-expand">1</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="label" translatable="yes">Page 1</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="tab-expand">1</property>
<property name="child">
<object class="GtkBox">
<property name="height-request">40</property>
</object>
<packing>
<property name="tab-expand">1</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="label" translatable="yes">Page 2</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkBox"/>
<packing>
<object class="GtkNotebookPage">
<property name="tab-expand">1</property>
</packing>
</child>
<child type="tab">
<property name="child">
<object class="GtkBox"/>
</property>
<property name="tab">
<object class="GtkLabel">
<property name="label" translatable="yes">Page 3</property>
</object>
</child>
<child>
<object class="GtkBox"/>
<packing>
<property name="tab-expand">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="label" translatable="yes">Page 4</property>
</property>
</object>
</child>
<child>
<object class="GtkBox"/>
<packing>
<object class="GtkNotebookPage">
<property name="tab-expand">1</property>
</packing>
<property name="child">
<object class="GtkBox"/>
</property>
<property name="tab">
<object class="GtkLabel">
<property name="label" translatable="yes">Page 4</property>
</object>
</property>
</object>
</child>
<child type="tab">
<child>
<object class="GtkNotebookPage">
<property name="tab-expand">1</property>
<property name="child">
<object class="GtkBox"/>
</property>
<property name="tab">
<object class="GtkLabel">
<property name="label" translatable="yes">Page 5</property>
</object>
</property>
</object>
</child>
</object>
</child>

View File

@ -470,6 +470,18 @@ escape_cb (GtkAssistant *assistant)
g_signal_stop_emission (assistant, signals[ESCAPE], 0);
}
static void
gtk_assistant_finalize (GObject *object)
{
GtkAssistant *assistant = GTK_ASSISTANT (object);
GtkAssistantPrivate *priv = assistant->priv;
if (priv->model)
g_object_remove_weak_pointer (G_OBJECT (priv->model), (gpointer *)&priv->model);
G_OBJECT_CLASS (gtk_assistant_parent_class)->finalize (object);
}
static void
gtk_assistant_class_init (GtkAssistantClass *class)
{
@ -484,6 +496,7 @@ gtk_assistant_class_init (GtkAssistantClass *class)
container_class = (GtkContainerClass *) class;
window_class = (GtkWindowClass *) class;
gobject_class->finalize = gtk_assistant_finalize;
gobject_class->constructed = gtk_assistant_constructed;
gobject_class->set_property = gtk_assistant_set_property;
gobject_class->get_property = gtk_assistant_get_property;

File diff suppressed because it is too large Load Diff

View File

@ -43,6 +43,16 @@ G_BEGIN_DECLS
#define GTK_IS_NOTEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_NOTEBOOK))
#define GTK_NOTEBOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_NOTEBOOK, GtkNotebookClass))
#define GTK_TYPE_NOTEBOOK_PAGE (gtk_notebook_page_get_type ())
#define GTK_NOTEBOOK_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_NOTEBOOK_PAGE, GtkNotebookPage))
#define GTK_NOTEBOOK_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_NOTEBOOK_PAGE, GtkNotebookPageClass))
#define GTK_IS_NOTEBOOK_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_NOTEBOOK_PAGE))
#define GTK_IS_NOTEBOOK_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_NOTEBOOK_PAGE))
#define GTK_NOTEBOOK_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_NOTEBOOK_PAGE, GtkNotebookPageClass))
typedef struct _GtkNotebookPage GtkNotebookPage;
typedef struct _GtkNotebookPageClass GtkNotebookPageClass;
typedef enum
{
@ -289,6 +299,17 @@ void gtk_notebook_set_action_widget (GtkNotebook *notebook,
GtkWidget *widget,
GtkPackType pack_type);
GDK_AVAILABLE_IN_ALL
GType gtk_notebook_page_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GtkNotebookPage *gtk_notebook_get_page (GtkNotebook *notebook,
GtkWidget *child);
GDK_AVAILABLE_IN_ALL
GtkWidget *gtk_notebook_page_get_child (GtkNotebookPage *page);
GDK_AVAILABLE_IN_ALL
GListModel *gtk_notebook_get_pages (GtkNotebook *notebook);
G_END_DECLS
#endif /* __GTK_NOTEBOOK_H__ */

View File

@ -707,5 +707,5 @@ gtk_search_entry_get_text_widget (GtkSearchEntry *entry)
{
GtkSearchEntryPrivate *priv = gtk_search_entry_get_instance_private (entry);
return priv->entry;
return GTK_TEXT (priv->entry);
}

View File

@ -253,7 +253,6 @@ enum {
PROP_0,
PROP_BUFFER,
PROP_MAX_LENGTH,
PROP_HAS_FRAME,
PROP_VISIBILITY,
PROP_INVISIBLE_CHAR,
PROP_INVISIBLE_CHAR_SET,
@ -721,13 +720,6 @@ gtk_text_class_init (GtkTextClass *class)
0,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
text_props[PROP_HAS_FRAME] =
g_param_spec_boolean ("has-frame",
P_("Has Frame"),
P_("FALSE removes outside bevel from self"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
text_props[PROP_INVISIBLE_CHAR] =
g_param_spec_unichar ("invisible-char",
P_("Invisible character"),

View File

@ -42,13 +42,9 @@ G_BEGIN_DECLS
#define GTK_TYPE_TEXT (gtk_text_get_type ())
#define GTK_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TEXT, GtkText))
#define GTK_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TEXT, GtkTextClass))
#define GTK_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TEXT))
#define GTK_IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TEXT))
#define GTK_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TEXT, GtkTextClass))
typedef struct _GtkText GtkText;
typedef struct _GtkTextClass GtkTextClass;
struct _GtkText
{
@ -56,80 +52,6 @@ struct _GtkText
GtkWidget parent_instance;
};
/**
* GtkTextClass:
* @parent_class: The parent class.
* @populate_popup: Class handler for the #GtkText::populate-popup signal. If
* non-%NULL, this will be called to add additional entries to the context
* menu when it is displayed.
* @activate: Class handler for the #GtkText::activate signal. The default
* implementation calls gtk_window_activate_default() on the entrys top-level
* window.
* @move_cursor: Class handler for the #GtkText::move-cursor signal. The
* default implementation specifies the standard #GtkText cursor movement
* behavior.
* @insert_at_cursor: Class handler for the #GtkText::insert-at-cursor signal.
* The default implementation inserts text at the cursor.
* @delete_from_cursor: Class handler for the #GtkText::delete-from-cursor
* signal. The default implementation deletes the selection or the specified
* number of characters or words.
* @backspace: Class handler for the #GtkText::backspace signal. The default
* implementation deletes the selection or a single character or word.
* @cut_clipboard: Class handler for the #GtkText::cut-clipboard signal. The
* default implementation cuts the selection, if one exists.
* @copy_clipboard: Class handler for the #GtkText::copy-clipboard signal. The
* default implementation copies the selection, if one exists.
* @paste_clipboard: Class handler for the #GtkText::paste-clipboard signal.
* The default implementation pastes at the current cursor position or over
* the current selection if one exists.
* @toggle_overwrite: Class handler for the #GtkText::toggle-overwrite signal.
* The default implementation toggles overwrite mode and blinks the cursor.
* @insert_emoji: Class handler for the #GtkText::insert-emoji signal.
*
* Class structure for #GtkText. All virtual functions have a default
* implementation. Derived classes may set the virtual function pointers for the
* signal handlers to %NULL, but must keep @get_text_area_size and
* @get_frame_size non-%NULL; either use the default implementation, or provide
* a custom one.
*/
struct _GtkTextClass
{
GtkWidgetClass parent_class;
/* Hook to customize right-click popup */
void (* populate_popup) (GtkText *self,
GtkWidget *popup);
/* Action signals
*/
void (* activate) (GtkText *self);
void (* move_cursor) (GtkText *self,
GtkMovementStep step,
gint count,
gboolean extend);
void (* insert_at_cursor) (GtkText *self,
const gchar *str);
void (* delete_from_cursor) (GtkText *self,
GtkDeleteType type,
gint count);
void (* backspace) (GtkText *self);
void (* cut_clipboard) (GtkText *self);
void (* copy_clipboard) (GtkText *self);
void (* paste_clipboard) (GtkText *self);
void (* toggle_overwrite) (GtkText *self);
void (* insert_emoji) (GtkText *self);
/*< private >*/
/* Padding for future expansion */
void (*_gtk_reserved1) (void);
void (*_gtk_reserved2) (void);
void (*_gtk_reserved3) (void);
void (*_gtk_reserved4) (void);
void (*_gtk_reserved5) (void);
void (*_gtk_reserved6) (void);
};
GDK_AVAILABLE_IN_ALL
GType gtk_text_get_type (void) G_GNUC_CONST;

View File

@ -25,6 +25,76 @@
G_BEGIN_DECLS
#define GTK_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TEXT, GtkTextClass))
#define GTK_IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TEXT))
#define GTK_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TEXT, GtkTextClass))
typedef struct _GtkTextClass GtkTextClass;
/*<private>
* GtkTextClass:
* @parent_class: The parent class.
* @populate_popup: Class handler for the #GtkText::populate-popup signal. If
* non-%NULL, this will be called to add additional entries to the context
* menu when it is displayed.
* @activate: Class handler for the #GtkText::activate signal. The default
* implementation calls gtk_window_activate_default() on the entrys top-level
* window.
* @move_cursor: Class handler for the #GtkText::move-cursor signal. The
* default implementation specifies the standard #GtkText cursor movement
* behavior.
* @insert_at_cursor: Class handler for the #GtkText::insert-at-cursor signal.
* The default implementation inserts text at the cursor.
* @delete_from_cursor: Class handler for the #GtkText::delete-from-cursor
* signal. The default implementation deletes the selection or the specified
* number of characters or words.
* @backspace: Class handler for the #GtkText::backspace signal. The default
* implementation deletes the selection or a single character or word.
* @cut_clipboard: Class handler for the #GtkText::cut-clipboard signal. The
* default implementation cuts the selection, if one exists.
* @copy_clipboard: Class handler for the #GtkText::copy-clipboard signal. The
* default implementation copies the selection, if one exists.
* @paste_clipboard: Class handler for the #GtkText::paste-clipboard signal.
* The default implementation pastes at the current cursor position or over
* the current selection if one exists.
* @toggle_overwrite: Class handler for the #GtkText::toggle-overwrite signal.
* The default implementation toggles overwrite mode and blinks the cursor.
* @insert_emoji: Class handler for the #GtkText::insert-emoji signal.
*
* Class structure for #GtkText. All virtual functions have a default
* implementation. Derived classes may set the virtual function pointers for the
* signal handlers to %NULL, but must keep @get_text_area_size and
* @get_frame_size non-%NULL; either use the default implementation, or provide
* a custom one.
*/
struct _GtkTextClass
{
GtkWidgetClass parent_class;
/* Hook to customize right-click popup */
void (* populate_popup) (GtkText *self,
GtkWidget *popup);
/* Action signals
*/
void (* activate) (GtkText *self);
void (* move_cursor) (GtkText *self,
GtkMovementStep step,
gint count,
gboolean extend);
void (* insert_at_cursor) (GtkText *self,
const gchar *str);
void (* delete_from_cursor) (GtkText *self,
GtkDeleteType type,
gint count);
void (* backspace) (GtkText *self);
void (* cut_clipboard) (GtkText *self);
void (* copy_clipboard) (GtkText *self);
void (* paste_clipboard) (GtkText *self);
void (* toggle_overwrite) (GtkText *self);
void (* insert_emoji) (GtkText *self);
};
char * gtk_text_get_display_text (GtkText *entry,
int start_pos,
int end_pos);

View File

@ -635,6 +635,127 @@ 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 &&
strcmp (elt->attribute_values[i], value) == 0)
return TRUE;
}
return FALSE;
}
static Element *
rewrite_notebook_page (Element *child, Element *tab, MyParserData *data)
{
Element *object = NULL;
Element *tab_obj = NULL;
Element *packing = NULL;
Element *new_object;
Element *prop;
GList *l;
if (!g_str_equal (child->element_name, "child"))
return child;
if (has_attribute (child, "type", "tab") ||
has_attribute (child, "type", "action-start") ||
has_attribute (child, "type", "action-end"))
return child;
for (l = child->children; l; l = l->next)
{
Element *elt = l->data;
if (g_str_equal (elt->element_name, "object"))
object = elt;
else if (g_str_equal (elt->element_name, "packing"))
packing = elt;
}
if (!packing && !tab)
return child;
if (tab)
{
for (l = tab->children; l; l = l->next)
{
Element *elt = l->data;
if (g_str_equal (elt->element_name, "object"))
tab_obj = elt;
}
}
new_object = g_new0 (Element, 1);
new_object->element_name = g_strdup ("object");
new_object->attribute_names = g_new0 (char *, 2);
new_object->attribute_names[0] = g_strdup ("class");
new_object->attribute_values = g_new0 (char *, 2);
new_object->attribute_values[0] = g_strdup ("GtkNotebookPage");
if (packing)
{
new_object->children = packing->children;
packing->children = NULL;
}
prop = g_new0 (Element, 1);
prop->element_name = g_strdup ("property");
prop->attribute_names = g_new0 (char *, 2);
prop->attribute_names[0] = g_strdup ("name");
prop->attribute_values = g_new0 (char *, 2);
prop->attribute_values[0] = g_strdup ("child");
prop->children = g_list_append (prop->children, object);
new_object->children = g_list_append (new_object->children, prop);
if (tab_obj)
{
prop = g_new0 (Element, 1);
prop->element_name = g_strdup ("property");
prop->attribute_names = g_new0 (char *, 2);
prop->attribute_names[0] = g_strdup ("name");
prop->attribute_values = g_new0 (char *, 2);
prop->attribute_values[0] = g_strdup ("tab");
prop->children = g_list_append (prop->children, tab_obj);
new_object->children = g_list_append (new_object->children, prop);
}
g_list_free (child->children);
child->children = g_list_append (NULL, new_object);
return child;
}
static void
rewrite_notebook (Element *element,
MyParserData *data)
{
GList *l, *new_children;
new_children = NULL;
for (l = element->children; l; l = l->next)
{
Element *child = l->data;
Element *tab = l->next ? l->next->data : NULL;
if (tab && has_attribute (tab, "type", "tab"))
{
new_children = g_list_append (new_children, rewrite_notebook_page (child, tab, data));
l = l->next; /* skip the tab */
}
else
new_children = g_list_append (new_children, rewrite_notebook_page (child, NULL, data));
}
g_list_free (element->children);
element->children = new_children;
}
static gboolean
simplify_element (Element *element,
MyParserData *data)
@ -681,6 +802,10 @@ simplify_element (Element *element,
g_str_equal (get_class_name (element), "GtkAssistant"))
rewrite_assistant (element, data);
if (g_str_equal (element->element_name, "object") &&
g_str_equal (get_class_name (element), "GtkNotebook"))
rewrite_notebook (element, data);
if (g_str_equal (element->element_name, "property") &&
property_has_been_removed (element, data))
return TRUE;

View File

@ -55,6 +55,8 @@
<property name="can-focus">1</property>
<property name="show-border">0</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkBox" id="general_main_box">
<property name="orientation">vertical</property>
<property name="spacing">18</property>
@ -167,7 +169,6 @@
<property name="can-focus">1</property>
<property name="use-underline">1</property>
<property name="active">1</property>
<property name="draw-indicator">1</property>
</object>
<packing>
<property name="left-attach">0</property>
@ -182,7 +183,6 @@
<property name="can-focus">1</property>
<property name="use-underline">1</property>
<property name="active">1</property>
<property name="draw-indicator">1</property>
<property name="group">all_pages_radio</property>
</object>
<packing>
@ -198,7 +198,6 @@
<property name="can-focus">1</property>
<property name="use-underline">1</property>
<property name="active">1</property>
<property name="draw-indicator">1</property>
<property name="group">all_pages_radio</property>
</object>
<packing>
@ -215,7 +214,6 @@
e.g. 13, 7, 11</property>
<property name="use-underline">1</property>
<property name="active">1</property>
<property name="draw-indicator">1</property>
<property name="group">all_pages_radio</property>
<signal name="toggled" handler="update_page_range_entry_sensitivity" swapped="no"/>
</object>
@ -345,13 +343,17 @@
</object>
</child>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label1">
<property name="label" translatable="yes">General</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkBox" id="page_setup_main_box">
<property name="orientation">vertical</property>
<property name="spacing">18</property>
@ -694,17 +696,17 @@
</object>
</child>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label2">
<property name="label" translatable="yes">Page Setup</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkGrid" id="job_page">
<property name="row-spacing">18</property>
<property name="column-spacing">18</property>
@ -810,7 +812,6 @@
<property name="can-focus">1</property>
<property name="use-underline">1</property>
<property name="active">1</property>
<property name="draw-indicator">1</property>
<signal name="toggled" handler="update_print_at_option" object="GtkPrintUnixDialog" swapped="yes"/>
</object>
<packing>
@ -829,7 +830,6 @@
<property name="tooltip-text" translatable="yes" comments="Ability to parse the am/pm format depends on actual locale. You can remove the am/pm values below for your locale if they are not supported.">Specify the time of print,
e.g. 1530, 235 pm, 141520, 114630 am, 4 pm</property>
<property name="use-underline">1</property>
<property name="draw-indicator">1</property>
<property name="group">print_now_radio</property>
<signal name="toggled" handler="update_print_at_entry_sensitivity" swapped="no"/>
<signal name="toggled" handler="update_print_at_option" object="GtkPrintUnixDialog" swapped="yes"/>
@ -870,7 +870,6 @@
<property name="tooltip-markup" translatable="yes">Hold the job until it is explicitly released</property>
<property name="tooltip-text" translatable="yes">Hold the job until it is explicitly released</property>
<property name="use-underline">1</property>
<property name="draw-indicator">1</property>
<property name="group">print_now_radio</property>
<signal name="toggled" handler="update_print_at_option" object="GtkPrintUnixDialog" swapped="yes"/>
</object>
@ -965,17 +964,18 @@
</packing>
</child>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label3">
<property name="label" translatable="yes">Job</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">3</property>
<property name="child">
<object class="GtkScrolledWindow" id="image_quality_page">
<property name="can-focus">1</property>
<property name="hscrollbar-policy">never</property>
@ -993,20 +993,18 @@
</object>
</child>
</object>
<packing>
<property name="position">3</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label20">
<property name="label" translatable="yes" comments="This will appear as a tab label in the print dialog.">Image Quality</property>
</object>
<packing>
<property name="position">3</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">4</property>
<property name="child">
<object class="GtkScrolledWindow" id="color_page">
<property name="can-focus">1</property>
<property name="hscrollbar-policy">never</property>
@ -1023,20 +1021,18 @@
</object>
</child>
</object>
<packing>
<property name="position">4</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label21">
<property name="label" translatable="yes" comments="This will appear as a tab label in the print dialog.">Color</property>
</object>
<packing>
<property name="position">4</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">5</property>
<property name="child">
<object class="GtkScrolledWindow" id="finishing_page">
<property name="can-focus">1</property>
<property name="hscrollbar-policy">never</property>
@ -1053,20 +1049,18 @@
</object>
</child>
</object>
<packing>
<property name="position">5</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label22">
<property name="label" translatable="yes" comments="This will appear as a tab label in the print dialog. It&apos;s a typographical term, as in &quot;Binding and finishing&quot;">Finishing</property>
</object>
<packing>
<property name="position">5</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">6</property>
<property name="child">
<object class="GtkScrolledWindow" id="advanced_page">
<property name="can-focus">1</property>
<property name="hscrollbar-policy">never</property>
@ -1083,18 +1077,13 @@
</object>
</child>
</object>
<packing>
<property name="position">6</property>
</packing>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="label23">
<property name="label" translatable="yes">Advanced</property>
</object>
<packing>
<property name="position">6</property>
<property name="tab-fill">0</property>
</packing>
</property>
</object>
</child>
</object>
</child>

View File

@ -1,34 +1,34 @@
<?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="GtkNotebook" id="notebook1">
<property name="visible">True</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton" id="page1">
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab1">
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton" id="page2">
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
</object>

View File

@ -21,7 +21,7 @@
combobox:dir(ltr)
box.linked.horizontal:dir(ltr)
entry.combo:dir(ltr)
text.flat:dir(ltr)
text:dir(ltr)
undershoot.left:dir(ltr)
undershoot.right:dir(ltr)
button.combo:dir(ltr)

View File

@ -5,25 +5,25 @@
label:dir(ltr)
label:dir(ltr)
entry:dir(ltr)
text.flat:dir(ltr)
text:dir(ltr)
undershoot.left:dir(ltr)
undershoot.right:dir(ltr)
progress.horizontal:dir(ltr)
trough:dir(ltr)
progress.left:dir(ltr)
entry:dir(ltr)
text.flat:dir(ltr)
text:dir(ltr)
undershoot.left:dir(ltr)
undershoot.right:dir(ltr)
entry:dir(ltr)
image.left:dir(ltr)
text.flat:dir(ltr)
text:dir(ltr)
undershoot.left:dir(ltr)
undershoot.right:dir(ltr)
image.right:dir(ltr)
spinbutton.horizontal:dir(ltr)
box.horizontal:dir(ltr)
text.flat:dir(ltr)
text:dir(ltr)
undershoot.left:dir(ltr)
undershoot.right:dir(ltr)
button.image-button.down:dir(ltr)

View File

@ -1,39 +1,39 @@
<?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="GtkNotebook">
<property name="visible">True</property>
<property name="scrollable">True</property>
<property name="scrollable">1</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page1</property>
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="name">tab1</property>
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page2</property>
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="name">tab2</property>
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
</object>

View File

@ -1,42 +1,40 @@
<?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="GtkNotebook">
<property name="visible">True</property>
<property name="scrollable">True</property>
<property name="scrollable">1</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page1</property>
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="name">tab1</property>
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page2</property>
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="name">tab2</property>
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<property name="page">-1</property>
</object>
</child>
</object>

View File

@ -1,53 +1,51 @@
<?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="GtkNotebook">
<property name="visible">True</property>
<property name="tab-pos">bottom</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page1</property>
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="name">tab1</property>
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page2</property>
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="name">tab2</property>
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child type="action-start">
<object class="GtkButton">
<property name="name">start</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
<child type="action-end">
<object class="GtkButton">
<property name="name">end</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
</object>

View File

@ -1,53 +1,51 @@
<?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="GtkNotebook">
<property name="visible">True</property>
<property name="tab-pos">bottom</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page1</property>
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="name">tab1</property>
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page2</property>
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="name">tab2</property>
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child type="action-start">
<object class="GtkButton">
<property name="name">start</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
<child type="action-end">
<object class="GtkButton">
<property name="name">end</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
</object>

View File

@ -1,53 +1,51 @@
<?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="GtkNotebook">
<property name="visible">True</property>
<property name="tab-pos">left</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page1</property>
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="name">tab1</property>
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page2</property>
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="name">tab2</property>
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child type="action-start">
<object class="GtkButton">
<property name="name">start</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
<child type="action-end">
<object class="GtkButton">
<property name="name">end</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
</object>

View File

@ -1,53 +1,51 @@
<?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="GtkNotebook">
<property name="visible">True</property>
<property name="tab-pos">left</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page1</property>
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="name">tab1</property>
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page2</property>
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="name">tab2</property>
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child type="action-start">
<object class="GtkButton">
<property name="name">start</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
<child type="action-end">
<object class="GtkButton">
<property name="name">end</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
</object>

View File

@ -1,53 +1,51 @@
<?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="GtkNotebook">
<property name="visible">True</property>
<property name="tab-pos">right</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page1</property>
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="name">tab1</property>
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page2</property>
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="name">tab2</property>
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child type="action-start">
<object class="GtkButton">
<property name="name">start</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
<child type="action-end">
<object class="GtkButton">
<property name="name">end</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
</object>

View File

@ -1,53 +1,51 @@
<?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="GtkNotebook">
<property name="visible">True</property>
<property name="tab-pos">right</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page1</property>
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="name">tab1</property>
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page2</property>
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="name">tab2</property>
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child type="action-start">
<object class="GtkButton">
<property name="name">start</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
<child type="action-end">
<object class="GtkButton">
<property name="name">end</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
</object>

View File

@ -1,52 +1,50 @@
<?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="GtkNotebook">
<property name="visible">True</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page1</property>
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="name">tab1</property>
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page2</property>
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="name">tab2</property>
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child type="action-start">
<object class="GtkButton">
<property name="name">start</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
<child type="action-end">
<object class="GtkButton">
<property name="name">end</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
</object>

View File

@ -1,52 +1,50 @@
<?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="GtkNotebook">
<property name="visible">True</property>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page1</property>
<property name="label" translatable="yes">Yes</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel">
<property name="name">tab1</property>
<property name="label" translatable="yes">Tab 1</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkNotebookPage">
<property name="child">
<object class="GtkButton">
<property name="name">page2</property>
<property name="label" translatable="yes">No</property>
<property name="visible">True</property>
</object>
</child>
<child type="tab">
</property>
<property name="tab">
<object class="GtkLabel" id="tab2">
<property name="name">tab2</property>
<property name="label" translatable="yes">Tab 2</property>
<property name="visible">True</property>
</object>
</property>
</object>
</child>
<child type="action-start">
<object class="GtkButton">
<property name="name">start</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
<child type="action-end">
<object class="GtkButton">
<property name="name">end</property>
<property name="label" translatable="yes">Action</property>
<property name="visible">True</property>
</object>
</child>
</object>

View File

@ -772,24 +772,32 @@ test_notebook (void)
"<interface>"
" <object class=\"GtkNotebook\" id=\"notebook1\">"
" <child>"
" <object class=\"GtkNotebookPage\">"
" <property name=\"child\">"
" <object class=\"GtkLabel\" id=\"label1\">"
" <property name=\"label\">label1</property>"
" </object>"
" </child>"
" <child type=\"tab\">"
" </property>"
" <property name=\"tab\">"
" <object class=\"GtkLabel\" id=\"tablabel1\">"
" <property name=\"label\">tab_label1</property>"
" </object>"
" </property>"
" </object>"
" </child>"
" <child>"
" <object class=\"GtkNotebookPage\">"
" <property name=\"child\">"
" <object class=\"GtkLabel\" id=\"label2\">"
" <property name=\"label\">label2</property>"
" </object>"
" </child>"
" <child type=\"tab\">"
" </property>"
" <property name=\"tab\">"
" <object class=\"GtkLabel\" id=\"tablabel2\">"
" <property name=\"label\">tab_label2</property>"
" </object>"
" </property>"
" </object>"
" </child>"
" </object>"
"</interface>";

View File

@ -165,6 +165,10 @@ test_type (gconstpointer data)
(strcmp (pspec->name, "pages") == 0)) /* pages always gets a non-NULL value */
continue;
if (g_type_is_a (type, GTK_TYPE_NOTEBOOK) &&
(strcmp (pspec->name, "pages") == 0)) /* pages always gets a non-NULL value */
continue;
if (g_type_is_a (type, GTK_TYPE_POPOVER) &&
(strcmp (pspec->name, "pointing-to") == 0))
continue;

View File

@ -617,6 +617,11 @@ test_type (gconstpointer data)
g_str_equal (pspec->name, "selected-item")))
continue;
/* can't set position without a notebook */
if (g_type_is_a (type, GTK_TYPE_NOTEBOOK_PAGE) &&
g_str_equal (pspec->name, "position"))
continue;
if (g_test_verbose ())
g_print ("Property %s.%s\n", g_type_name (pspec->owner_type), pspec->name);