A Patch for Partially Blocked Plugin Messages in EVMSGUI

"Changju Gao" <[email protected]> Thu, 05 Apr 2007 16:31:02 -0600
Newsgroups gmane.linux.evms.devel
Message-ID <[email protected]>
When starting EVMS engine, EVMSUI uses a "startup_window" 
to display status, like "Discovering segments". In the meantime, if 
a plugin sends back a question, EVMSGUI uses a message 
window to display the question and wait for responses. 

However, the message window is placed behind the startup window. 
And the message is partially blocked. Users cannot move the message
to the front.

The message does attempt to make itself on top of the main window, 
but the problem is that the main window doesn't exist yet. 

So I added code to make the message window a transient of the startup
window, if the main window is not there. This essentially puts the message
window at the very top. 


Created a patch for 2.5.5 and tested on my SLES10 box.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Evms-devel mailing list
[email protected]
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel
blocked_plugin_msg.patch (text/plain, 1.2 KB)
--- ui/gtk/main.c	2004-08-04 15:05:06.000000000 -0600
+++ ui/gtk/main.c	2007-04-05 15:54:42.000000000 -0600
@@ -46,6 +46,11 @@
 static GtkWidget *startup_window = NULL;
 static GtkWidget *startup_label = NULL;
 
+inline GtkWidget *get_startup_window_id(void)
+{
+	return startup_window;
+}
+
 static void show_help(char **argv)
 {
 	printf("\nEnterprise Volume Management System %s\n", VERSION);


--- ui/gtk/main.h	2004-07-27 10:15:07.000000000 -0600
+++ ui/gtk/main.h	2007-04-05 16:03:10.000000000 -0600
@@ -24,6 +24,7 @@
 #define REQUIRED_ENGINE_VER_PATCHLEVEL  0
 
 inline gboolean is_main_event_loop_thread(void);
+inline GtkWidget *get_startup_window_id(void);
 engine_mode_t get_open_mode(void);
 debug_level_t get_debug_level(void);
 gchar *get_log_name(void);


--- ui/gtk/message.c	2004-04-01 16:08:04.000000000 -0700
+++ ui/gtk/message.c	2007-04-05 15:57:45.000000000 -0600
@@ -796,7 +796,11 @@
 {
 	GtkWidget *main_window;
 
-	main_window = get_main_window_id();
+	if( NULL == (main_window = get_main_window_id()))
+	{
+		main_window = get_startup_window_id();
+	}
+
 	if (main_window != NULL)
 		gtk_window_set_transient_for(GTK_WINDOW(window), GTK_WINDOW(main_window));
 	gdk_window_raise(window->window);