Re: Problem with reparent (Gtk+-2.12)
- From: "Andrew E. Makeev" <andrew solvo ru>
- To: Tor Lillqvist <tml iki fi>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: Problem with reparent (Gtk+-2.12)
- Date: Fri, 08 Feb 2008 14:14:22 +0300
В Птн, 08/02/2008 в 11:56 +0200, Tor Lillqvist пишет:
> > What version could you suggest to download then? Just latest unstable?
> >
> > Now we are using those: atk-1.20.0 glib-2.14.6 pango-1.18.4 gtk+-2.12.6
>
> Those are the latest stable ones, and your program works fine against
> them here... Are you using some theme?
if you mean gtkrc theme for Windows, yes, we do use WIMP theme.
So, should we chage something related with it?
>
> > Also, do you still see "inactive toolbutton" effect just after window
> > content docked (reparented) into notebook page?
> > Just push "dock/undock" button on new window and try to click (move
> > mouse pointer over) toolbutton.
>
> You mean the button with the "new document" icon (I think it is)? It
> works fine all the time as far as I can see. When you click it, you
> get a message like "Toolbar Item 00DD20F0 clicked" printed.
>
> --tml
You are right, I've left 2 lines in the code that fix the problem.
Look at this function, please:
void button_dock_cb( GtkWidget* widget, gpointer data )
{
GtkWidget* vbox = GTK_WIDGET( data );
UserData* ud = ( UserData* )g_object_get_data( G_OBJECT( vbox ),
"parent_info" );
if( ud->isDocked == TRUE )
{
ud->isDocked = FALSE;
GtkWidget* parent = vbox->parent;
gtk_widget_reparent( vbox, ud->oldParent );
gtk_notebook_remove_page( GTK_NOTEBOOK( gNotebook ),
gtk_notebook_page_num( GTK_NOTEBOOK
( gNotebook ), parent ) );
gtk_widget_show( ud->oldParent );
}
else
{
GtkWidget* frame = gtk_frame_new( NULL );
gtk_widget_show( frame );
ud->isDocked = TRUE;
gtk_notebook_append_page( GTK_NOTEBOOK( gNotebook ), frame,
NULL );
gtk_widget_reparent( vbox, frame );
// Comment those lines to see "inactive" toolbar element
gtk_widget_hide( vbox );
gtk_widget_show( vbox );
//======================================================
gtk_widget_hide( ud->oldParent );
}
}
That is not working on both Win32 and Linux OS. And, I guess, there
should be some issue in bugzilla about it.
Regards,
-andrew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]