double view for a node?



Hi.

I've finally found the way to get appricate node's widget.
here lines of code: (from fullscreen.c:661 of gThumb)
        if (! GTK_IS_WIDGET (
                        gtk_bin_get_child (GTK_BIN (fullscreen->toolbar))
        )) {
                BonoboUIEngine *engine;
                BonoboUINode *node;
                GtkWidget *widget;

                engine = bonobo_window_get_ui_engine
                                        (BONOBO_WINDOW (window->app));
                /* I filed bug 88741 for name of this API */
                node = bonobo_ui_engine_get_path (engine, "/Toolbar");
                widget = bonobo_ui_engine_node_get_widget (engine, node);

                /* test below */

                /* this get_parent() is dirty hack.
                 * without this line, toolbar does not reparented even.
                 */
                widget = gtk_widget_get_parent (widget);
                g_print ("%s\n", gtk_widget_get_name (widget));

                gtk_widget_reparent (widget, fullscreen->toolbar);
        }

"/Toolbar" is the node that I wanna work on.
the fullscreen->toolbar is initialized to GtkWindow,
as transient for the fullscreen->(GtkWindow *)window.
(visibility of toolbar change whether y axis of pointer 0 or not.)

I want to make a toolbar for the fullscreen, not just for main window.
so as another common widget does, I tried gtk_widget_reparent().
and failed with bunch lines of error.

the "/Toolbar" get updated when fullscreen state change.
the change code point "/Toolbar" directly.
but there's no widget to be updated after reparenting.

how can I overcome this problem?
how can I make it both work main window and fullscreen->toolbar?

here's the screenshot:
http://gnome.or.kr/gallery/view_photo.php?full=1&set_albumName=gnome-apps&id=abj
you see the rightest toolitem. it's toggle button for fullscreen.
it's not activated so it prove that this widget is not updated.
and you may not know, that widget does not react to mouse pointer,
no prelight, no click, etc.

I need your help.
thanks.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]