GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Mon Nov 24, 2014 9:25 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: menubar appearance and z-order
PostPosted: Wed Apr 30, 2008 7:59 am 
Offline
Familiar Face

Joined: Thu Apr 10, 2008 1:43 pm
Posts: 19
I'm developing under windows xp and have a menubar on top of my window.

With default xp theme, I don't see any border around menubar, but, with classical theme there is a border around menubar and I don't know how to hide it.
Image


I have another "problem" too and regards to gtk_message_dialog_new.
When I run a message dialog and minimize my app (to hidden all windows' app), when I restore my app again the message dialog stays behind main window! And 'cause I created it as modal, main windows doesn't responds and seems like application is broken, but it is not but waiting to close message dialog.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 3:57 am 
Offline
Familiar Face

Joined: Wed Apr 02, 2008 10:53 pm
Posts: 28
Hi Clinisbut

I don't know about your menubar problem
(where did you get the winxp theme?)


For your second problem:
I did that on linux and it worked well:

Code:
gtk_window_set_transient_for((GtkWindow*) window_dialog, (GtkWindow*)window_main);


Let me know if it solves your problem

Cofcof


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 07, 2008 1:29 pm 
Offline
Familiar Face

Joined: Thu Apr 10, 2008 1:43 pm
Posts: 19
Quote:
I don't know about your menubar problem
(where did you get the winxp theme?)


The winxp theme comes bundled with winxp itself.

gtk_window_set_transient_for() seems to not solve my problem.
This is how I used:
Code:
GtkWidget* advise;
   advise = gtk_message_dialog_new( GTK_WINDOW(this->window), flags, type, button, string );
        gtk_window_set_transient_for( (GtkWindow*)advise, (GtkWindow*)this->window );


gtk_window_set_title( GTK_WINDOW(advise), "Information");
gtk_dialog_run( GTK_DIALOG(advise) );


But after minimize all and restore app window, main windows is showing upon dialog.[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 08, 2008 4:16 am 
Offline
Familiar Face

Joined: Wed Apr 02, 2008 10:53 pm
Posts: 28
Hi again

Try to modify the type hint of your dialog:

Quote:
Code:
void                gtk_window_set_type_hint            (GtkWindow *window,
                                                         GdkWindowTypeHint hint);


By setting the type hint for the window, you allow the window manager to decorate and handle the window in a way which is suitable to the function of the window in your application.

This function should be called before the window becomes visible.

gtk_dialog_new_with_buttons() and other convenience functions in GTK+ will sometimes call gtk_window_set_type_hint() on your behalf.

I use as hint:
GDK_WINDOW_TYPE_HINT_NOTIFICATION
but I beleive that's a mistake and I (you) should use
GDK_WINDOW_TYPE_HINT_DIALOG


Also did you put your main windows as modal? or your dialog as modal
If your main windows is modal, I guess it migth be the problem and you should remove the modal (at least during the life time of your dialog window)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group