Do not respond to children visiblity changes during construction of toplevel widget
This commit is contained in:
parent
37d30fd988
commit
de4fa8b90b
24
moo.kdevelop
24
moo.kdevelop
@ -24,7 +24,7 @@
|
||||
</ignoreparts>
|
||||
<projectdirectory>.</projectdirectory>
|
||||
<absoluteprojectpath>false</absoluteprojectpath>
|
||||
<description></description>
|
||||
<description/>
|
||||
<secondaryLanguages>
|
||||
<language>C</language>
|
||||
</secondaryLanguages>
|
||||
@ -39,7 +39,7 @@
|
||||
<mainprogram>./medit</mainprogram>
|
||||
<directoryradio>executable</directoryradio>
|
||||
<customdirectory>/</customdirectory>
|
||||
<programargs></programargs>
|
||||
<programargs/>
|
||||
<terminal>false</terminal>
|
||||
<autocompile>false</autocompile>
|
||||
<envvars/>
|
||||
@ -216,15 +216,15 @@
|
||||
</kdevautoproject>
|
||||
<kdevdebugger>
|
||||
<general>
|
||||
<dbgshell></dbgshell>
|
||||
<dbgshell/>
|
||||
<programargs>--g-fatal-warnings</programargs>
|
||||
<breakonloadinglibs>true</breakonloadinglibs>
|
||||
<separatetty>false</separatetty>
|
||||
<floatingtoolbar>true</floatingtoolbar>
|
||||
<gdbpath></gdbpath>
|
||||
<configGdbScript></configGdbScript>
|
||||
<runShellScript></runShellScript>
|
||||
<runGdbScript></runGdbScript>
|
||||
<gdbpath/>
|
||||
<configGdbScript/>
|
||||
<runShellScript/>
|
||||
<runGdbScript/>
|
||||
</general>
|
||||
<display>
|
||||
<staticmembers>true</staticmembers>
|
||||
@ -286,16 +286,16 @@
|
||||
</kdevdoctreeview>
|
||||
<kdevfilecreate>
|
||||
<filetypes>
|
||||
<type icon="source" ext="g" create="template" name="GAP source" >
|
||||
<type icon="source" ext="g" name="GAP source" create="template" >
|
||||
<descr>A new empty GAP source file</descr>
|
||||
</type>
|
||||
<type icon="source_cpp" ext="cpp" create="template" name="C++ Source" >
|
||||
<type icon="source_cpp" ext="cpp" name="C++ Source" create="template" >
|
||||
<descr>A new empty C++ file.</descr>
|
||||
</type>
|
||||
<type icon="source_h" ext="h" create="template" name="C/C++ Header" >
|
||||
<type icon="source_h" ext="h" name="C/C++ Header" create="template" >
|
||||
<descr>A new empty header file for C/C++.</descr>
|
||||
</type>
|
||||
<type icon="source_c" ext="c" create="template" name="C Source" >
|
||||
<type icon="source_c" ext="c" name="C Source" create="template" >
|
||||
<descr>A new empty C file.</descr>
|
||||
</type>
|
||||
</filetypes>
|
||||
@ -322,7 +322,7 @@
|
||||
</codecompletion>
|
||||
<references/>
|
||||
<creategettersetter>
|
||||
<prefixGet></prefixGet>
|
||||
<prefixGet/>
|
||||
<prefixSet>set</prefixSet>
|
||||
<prefixVariable>m_,_</prefixVariable>
|
||||
<parameterName>theValue</parameterName>
|
||||
|
@ -61,6 +61,7 @@ typedef struct {
|
||||
GHashTable *children; /* Node* -> GtkWidget* */
|
||||
MooActionGroup *actions;
|
||||
GtkAccelGroup *accel_group;
|
||||
gboolean in_creation;
|
||||
} Toplevel;
|
||||
|
||||
typedef struct {
|
||||
@ -1456,6 +1457,9 @@ visibility_notify (GtkWidget *widget,
|
||||
toplevel = g_object_get_qdata (G_OBJECT (widget), TOPLEVEL_QUARK);
|
||||
g_return_if_fail (toplevel != NULL);
|
||||
|
||||
if (toplevel->in_creation)
|
||||
return;
|
||||
|
||||
node = g_object_get_qdata (G_OBJECT (widget), NODE_QUARK);
|
||||
g_return_if_fail (node != NULL && node->parent != NULL);
|
||||
g_return_if_fail (node->type == ITEM);
|
||||
@ -1852,6 +1856,9 @@ check_separators (Node *parent,
|
||||
gboolean has_children = FALSE;
|
||||
GtkWidget *widget;
|
||||
|
||||
if (!toplevel_get_widget (toplevel, parent))
|
||||
return;
|
||||
|
||||
children = node_list_children (parent);
|
||||
|
||||
for (l = children; l != NULL; l = l->next)
|
||||
@ -2196,6 +2203,8 @@ moo_ui_xml_create_widget (MooUIXML *xml,
|
||||
}
|
||||
|
||||
toplevel = toplevel_new (node, actions, accel_group);
|
||||
toplevel->in_creation = TRUE;
|
||||
|
||||
xml->priv->toplevels = g_slist_append (xml->priv->toplevels, toplevel);
|
||||
|
||||
switch (type)
|
||||
@ -2211,6 +2220,8 @@ moo_ui_xml_create_widget (MooUIXML *xml,
|
||||
break;
|
||||
}
|
||||
|
||||
toplevel->in_creation = FALSE;
|
||||
|
||||
if (!result)
|
||||
{
|
||||
xml_delete_toplevel (xml, toplevel);
|
||||
|
Loading…
x
Reference in New Issue
Block a user