forked from AuroraMiddleware/gtk
Merge from 2.4:
2004-05-05 Matthias Clasen <mclasen@redhat.com> Merge from 2.4: * gtk/gtkuimanager.c (print_node): Make the output parseable. (#141929, Sven Neumann)
This commit is contained in:
parent
25f3824e61
commit
37374c6245
@ -1,3 +1,10 @@
|
|||||||
|
2004-05-05 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Merge from 2.4:
|
||||||
|
|
||||||
|
* gtk/gtkuimanager.c (print_node): Make the output
|
||||||
|
parseable. (#141929, Sven Neumann)
|
||||||
|
|
||||||
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2004-05-05 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Merge from 2.4:
|
||||||
|
|
||||||
|
* gtk/gtkuimanager.c (print_node): Make the output
|
||||||
|
parseable. (#141929, Sven Neumann)
|
||||||
|
|
||||||
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2004-05-05 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Merge from 2.4:
|
||||||
|
|
||||||
|
* gtk/gtkuimanager.c (print_node): Make the output
|
||||||
|
parseable. (#141929, Sven Neumann)
|
||||||
|
|
||||||
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2004-05-05 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Merge from 2.4:
|
||||||
|
|
||||||
|
* gtk/gtkuimanager.c (print_node): Make the output
|
||||||
|
parseable. (#141929, Sven Neumann)
|
||||||
|
|
||||||
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
2004-05-05 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window_for_screen): Add
|
||||||
|
@ -2560,7 +2560,7 @@ gtk_ui_manager_ensure_update (GtkUIManager *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
dirty_traverse_func (GNode *node,
|
dirty_traverse_func (GNode *node,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
NODE_INFO (node)->dirty = TRUE;
|
NODE_INFO (node)->dirty = TRUE;
|
||||||
@ -2570,25 +2570,25 @@ dirty_traverse_func (GNode *node,
|
|||||||
static void
|
static void
|
||||||
dirty_all_nodes (GtkUIManager *self)
|
dirty_all_nodes (GtkUIManager *self)
|
||||||
{
|
{
|
||||||
g_node_traverse (self->private_data->root_node,
|
g_node_traverse (self->private_data->root_node,
|
||||||
G_PRE_ORDER, G_TRAVERSE_ALL, -1,
|
G_PRE_ORDER, G_TRAVERSE_ALL, -1,
|
||||||
dirty_traverse_func, NULL);
|
dirty_traverse_func, NULL);
|
||||||
queue_update (self);
|
queue_update (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const gchar *open_tag_format[] = {
|
static const gchar *open_tag_format[] = {
|
||||||
"%*s<UNDECIDED>\n",
|
"%*s<UNDECIDED",
|
||||||
"%*s<ui>\n",
|
"%*s<ui",
|
||||||
"%*s<menubar name=\"%s\">\n",
|
"%*s<menubar",
|
||||||
"%*s<menu name=\"%s\" action=\"%s\">\n",
|
"%*s<menu",
|
||||||
"%*s<toolbar name=\"%s\">\n",
|
"%*s<toolbar",
|
||||||
"%*s<placeholder name=\"%s\">\n",
|
"%*s<placeholder",
|
||||||
"%*s<placeholder name=\"%s\">\n",
|
"%*s<placeholder",
|
||||||
"%*s<popup name=\"%s\">\n",
|
"%*s<popup",
|
||||||
"%*s<menuitem name=\"%s\" action=\"%s\"/>\n",
|
"%*s<menuitem",
|
||||||
"%*s<toolitem name=\"%s\" action=\"%s\"/>\n",
|
"%*s<toolitem",
|
||||||
"%*s<separator name=\"%s\"/>\n",
|
"%*s<separator",
|
||||||
"%*s<accelerator name=\"%s\" action=\"%s\"/>\n",
|
"%*s<accelerator"
|
||||||
};
|
};
|
||||||
|
|
||||||
static const gchar *close_tag_format[] = {
|
static const gchar *close_tag_format[] = {
|
||||||
@ -2600,34 +2600,42 @@ static const gchar *close_tag_format[] = {
|
|||||||
"%*s</placeholder>\n",
|
"%*s</placeholder>\n",
|
||||||
"%*s</placeholder>\n",
|
"%*s</placeholder>\n",
|
||||||
"%*s</popup>\n",
|
"%*s</popup>\n",
|
||||||
"",
|
NULL,
|
||||||
"",
|
NULL,
|
||||||
"",
|
NULL,
|
||||||
"",
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_node (GtkUIManager *self,
|
print_node (GtkUIManager *self,
|
||||||
GNode *node,
|
GNode *node,
|
||||||
gint indent_level,
|
gint indent_level,
|
||||||
GString *buffer)
|
GString *buffer)
|
||||||
{
|
{
|
||||||
Node *mnode;
|
Node *mnode;
|
||||||
GNode *child;
|
GNode *child;
|
||||||
|
|
||||||
mnode = node->data;
|
mnode = node->data;
|
||||||
|
|
||||||
g_string_append_printf (buffer, open_tag_format[mnode->type],
|
g_string_append_printf (buffer, open_tag_format[mnode->type],
|
||||||
indent_level, "",
|
|
||||||
mnode->name,
|
|
||||||
g_quark_to_string (mnode->action_name));
|
|
||||||
|
|
||||||
for (child = node->children; child != NULL; child = child->next)
|
|
||||||
print_node (self, child, indent_level + 2, buffer);
|
|
||||||
|
|
||||||
g_string_append_printf (buffer, close_tag_format[mnode->type],
|
|
||||||
indent_level, "");
|
indent_level, "");
|
||||||
|
|
||||||
|
if (mnode->name)
|
||||||
|
g_string_append_printf (buffer, " name=\"%s\"", mnode->name);
|
||||||
|
|
||||||
|
if (mnode->action_name)
|
||||||
|
g_string_append_printf (buffer, " action=\"%s\"",
|
||||||
|
g_quark_to_string (mnode->action_name));
|
||||||
|
|
||||||
|
g_string_append (buffer,
|
||||||
|
close_tag_format[mnode->type] ? ">\n" : "/>\n");
|
||||||
|
|
||||||
|
for (child = node->children; child != NULL; child = child->next)
|
||||||
|
print_node (self, child, indent_level + 2, buffer);
|
||||||
|
|
||||||
|
if (close_tag_format[mnode->type])
|
||||||
|
g_string_append_printf (buffer, close_tag_format[mnode->type],
|
||||||
|
indent_level, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user