Re: A Patch for Partially Blocked Plugin Messages in EVMSGUI
Luciano Chavez <[email protected]> Mon, 09 Apr 2007 10:03:50 -0500
| Newsgroups | gmane.linux.evms.devel |
|---|---|
| Organization | IBM |
| Message-ID | <1176131030.7868.10.camel@localhost> |
On Thu, 2007-04-05 at 16:31 -0600, Changju Gao wrote: > 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. Hi Changju, Thank you for the patch! You found a GUI bug that apparently has been there a long time! I'm not sure why I never considered the case where an alert comes in during the startup window because I am sure I saw some in the past. I made one slight stylistic change to your patch and so can you apply the attached patch and verify it still works as before? If it does, I will commit the changes to CVS. Also, I looked at the ncurses UI code and I think it is OK but if you haven't tried the same scenario with evmsn, can you and report if it works as expected or not? Thanks again! -- Luciano Chavez <[email protected]> IBM ------------------------------------------------------------------------- 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/x-patch, 1.7 KB)
Index: ui/gtk/main.c
===================================================================
RCS file: /cvsroot/evms/evms2/engine/ui/gtk/main.c,v
retrieving revision 1.16
diff -u -r1.16 main.c
--- ui/gtk/main.c 4 Aug 2004 21:05:06 -0000 1.16
+++ ui/gtk/main.c 9 Apr 2007 14:27:14 -0000
@@ -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);
Index: ui/gtk/main.h
===================================================================
RCS file: /cvsroot/evms/evms2/engine/ui/gtk/main.h,v
retrieving revision 1.12
diff -u -r1.12 main.h
--- ui/gtk/main.h 27 Jul 2004 16:15:07 -0000 1.12
+++ ui/gtk/main.h 9 Apr 2007 14:27:14 -0000
@@ -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);
Index: ui/gtk/message.c
===================================================================
RCS file: /cvsroot/evms/evms2/engine/ui/gtk/message.c,v
retrieving revision 1.7
diff -u -r1.7 message.c
--- ui/gtk/message.c 1 Apr 2004 23:08:04 -0000 1.7
+++ ui/gtk/message.c 9 Apr 2007 14:27:14 -0000
@@ -797,6 +797,9 @@
GtkWidget *main_window;
main_window = get_main_window_id();
+ if (main_window == NULL)
+ 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);