From e616db541984d688b30e15e8a90fe1818d95896b Mon Sep 17 00:00:00 2001 From: fgerlits Date: Wed, 18 Oct 2006 18:00:14 +0000 Subject: [PATCH] fixing #1860 --- .../products/gLiveSupport/src/LoginWindow.cxx | 1 + .../gLiveSupport/src/MasterPanelWindow.cxx | 38 +++++-------------- .../gLiveSupport/src/MasterPanelWindow.h | 16 +++++++- 3 files changed, 25 insertions(+), 30 deletions(-) diff --git a/livesupport/src/products/gLiveSupport/src/LoginWindow.cxx b/livesupport/src/products/gLiveSupport/src/LoginWindow.cxx index e43210d86..10906d874 100644 --- a/livesupport/src/products/gLiveSupport/src/LoginWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/LoginWindow.cxx @@ -202,6 +202,7 @@ LoginWindow :: LoginWindow (Ptr::Ref gLiveSupport, set_name("loginWindow"); set_modal(true); property_window_position().set_value(Gtk::WIN_POS_CENTER); + set_keep_above(true); set_resizable(false); property_destroy_with_parent().set_value(false); set_default(*okButton); diff --git a/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx b/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx index 7eed35ff8..c9382150d 100644 --- a/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -466,9 +466,7 @@ MasterPanelWindow :: updateLiveModeWindow(Ptr::Ref playable) liveModeWindow->addItem(playable); } - if (!liveModeWindow->is_visible()) { - liveModeWindow->show(); - } + liveModeWindow->present(); } @@ -476,7 +474,7 @@ MasterPanelWindow :: updateLiveModeWindow(Ptr::Ref playable) * The event when the upload file button has been clicked. *----------------------------------------------------------------------------*/ void -MasterPanelWindow :: onUploadFileButtonClicked(void) throw () +MasterPanelWindow :: updateUploadFileWindow(void) throw () { if (!uploadFileWindow.get()) { Ptr::Ref bundle; @@ -490,15 +488,9 @@ MasterPanelWindow :: onUploadFileButtonClicked(void) throw () uploadFileWindow.reset(new UploadFileWindow(gLiveSupport, bundle, uploadFileButton)); - uploadFileWindow->show(); - return; } - if (!uploadFileWindow->is_visible()) { - uploadFileWindow->show(); - } else { - uploadFileWindow->hide(); - } + uploadFileWindow->present(); } @@ -538,9 +530,7 @@ MasterPanelWindow :: updateScratchpadWindow(Ptr::Ref playable) scratchpadWindow->addItem(playable); } - if (!scratchpadWindow->is_visible()) { - scratchpadWindow->show(); - } + scratchpadWindow->present(); } @@ -567,9 +557,7 @@ MasterPanelWindow :: updateSimplePlaylistMgmtWindow(void) throw () simplePlaylistMgmtWindow->showContents(); - if (!simplePlaylistMgmtWindow->is_visible()) { - simplePlaylistMgmtWindow->show(); - } + simplePlaylistMgmtWindow->present(); } @@ -611,9 +599,7 @@ MasterPanelWindow :: updateSchedulerWindow( return; } - if (!schedulerWindow->is_visible()) { - schedulerWindow->show(); - } + schedulerWindow->present(); } @@ -637,9 +623,7 @@ MasterPanelWindow :: updateSearchWindow(void) throw () searchButton)); } - if (!searchWindow->is_visible()) { - searchWindow->show(); - } + searchWindow->present(); } @@ -667,9 +651,7 @@ MasterPanelWindow :: updateOptionsWindow(void) throw () } } - if (!optionsWindow->is_visible()) { - optionsWindow->show(); - } + optionsWindow->present(); } @@ -885,9 +867,7 @@ MasterPanelWindow :: uploadToHub(Ptr::Ref playable) bool success = searchWindow->uploadToHub(playable); - if (success && !searchWindow->is_visible()) { - searchWindow->show(); - } + searchWindow->present(); } diff --git a/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.h b/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.h index 1018e1b1e..ec591e8b2 100644 --- a/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.h +++ b/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.h @@ -291,7 +291,15 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject * pressed. */ virtual void - onUploadFileButtonClicked(void) throw (); + onUploadFileButtonClicked(void) throw () + { + if (!uploadFileWindow || + uploadFileWindow && !uploadFileWindow->is_visible()) { + updateUploadFileWindow(); + } else { + uploadFileWindow->hide(); + } + } /** * Function to catch the event of the live mode button being @@ -469,6 +477,12 @@ class MasterPanelWindow : public Gtk::Window, public LocalizedObject void createScratchpadWindow(void) throw (); + /** + * Update the Upload File window. + */ + void + updateUploadFileWindow(void) throw (); + /** * Update the Scratchpad window. */