}
int ShowVWindow::handle_event()
{
- mwindow->gui->unlock_window();
- mwindow->show_vwindow(1);
- mwindow->gui->lock_window("ShowVWindow::handle_event");
+ if( mwindow->session->current_operation == NO_OPERATION ) {
+ mwindow->gui->unlock_window();
+ if( !mwindow->session->show_vwindow )
+ mwindow->show_vwindow(1);
+ else
+ mwindow->hide_vwindow();
+ mwindow->gui->lock_window("ShowVWindow::handle_event");
+ set_checked(mwindow->session->show_vwindow);
+ }
return 1;
}
}
int ShowAWindow::handle_event()
{
- mwindow->gui->unlock_window();
- mwindow->show_awindow();
- mwindow->gui->lock_window("ShowAWindow::handle_event");
+ if( mwindow->session->current_operation == NO_OPERATION ) {
+ mwindow->gui->unlock_window();
+ if( !mwindow->session->show_awindow )
+ mwindow->show_awindow();
+ else
+ mwindow->hide_awindow();
+ mwindow->gui->lock_window("ShowAWindow::handle_event");
+ set_checked(mwindow->session->show_awindow);
+
+ }
return 1;
}
}
int ShowCWindow::handle_event()
{
- mwindow->gui->unlock_window();
- mwindow->show_cwindow();
- mwindow->gui->lock_window("ShowCWindow::handle_event");
+ if( mwindow->session->current_operation == NO_OPERATION ) {
+ mwindow->gui->unlock_window();
+ if( !mwindow->session->show_cwindow )
+ mwindow->show_cwindow();
+ else
+ mwindow->hide_cwindow();
+ mwindow->gui->lock_window("ShowCWindow::handle_event");
+ set_checked(mwindow->session->show_cwindow);
+ }
return 1;
}
}
int ShowLWindow::handle_event()
{
- mwindow->gui->unlock_window();
- mwindow->show_lwindow();
- mwindow->gui->lock_window("ShowLWindow::handle_event");
+ if( mwindow->session->current_operation == NO_OPERATION ) {
+
+ mwindow->gui->unlock_window();
+ if( !mwindow->session->show_lwindow )
+ mwindow->show_lwindow();
+ else
+ mwindow->hide_lwindow();
+ mwindow->gui->lock_window("ShowLWindow::handle_event");
+ set_checked(mwindow->session->show_lwindow);
+ }
return 1;
}
gui->mainmenu->show_vwindow->set_checked(1);
}
+
+void MWindow::hide_vwindow()
+{
+ session->show_vwindow = 0;
+ int total_running = 0;
+
+ for(int j = 0; j < vwindows.size(); j++) {
+ VWindow *vwindow = vwindows[j];
+ if( !vwindow->is_running() ) continue;
+ total_running++;
+ if( !raise && !vwindow->gui->is_hidden() ) continue;
+ vwindow->gui->lock_window("MWindow::show_vwindow");
+ vwindow->gui->hide_window(0);
+ vwindow->gui->unlock_window();
+ }
+ gui->mainmenu->show_vwindow->set_checked(0);
+}
+
+
void MWindow::show_awindow()
{
session->show_awindow = 1;
gui->mainmenu->show_awindow->set_checked(1);
}
+void MWindow::hide_awindow()
+{
+ session->show_awindow = 0;
+
+ awindow->gui->lock_window("MWindow::show_awindow");
+ awindow->gui->hide_window();
+ awindow->gui->unlock_window();
+ gui->mainmenu->show_awindow->set_checked(0);
+}
+
+
char *MWindow::get_cwindow_display()
{
char *x11_host = screens < 2 || session->window_config == 0 ?
gui->mainmenu->show_cwindow->set_checked(1);
}
+
+void MWindow::hide_cwindow()
+{
+ session->show_cwindow = 0;
+
+ cwindow->gui->lock_window("MWindow::show_cwindow");
+ cwindow->gui->hide_window();
+ cwindow->gui->unlock_window();
+ gui->mainmenu->show_cwindow->set_checked(0);
+}
+
+
void MWindow::show_gwindow()
{
session->show_gwindow = 1;
gui->mainmenu->show_gwindow->set_checked(1);
}
+
void MWindow::hide_gwindow()
{
session->show_gwindow = 0;
gwindow->gui->lock_window("MWindow::show_gwindow");
gwindow->gui->hide_window();
gwindow->gui->unlock_window();
+ gui->mainmenu->show_gwindow->set_checked(0);
}
void MWindow::show_lwindow()
gui->mainmenu->show_lwindow->set_checked(1);
}
+void MWindow::hide_lwindow()
+{
+ session->show_lwindow = 0;
+
+ lwindow->gui->lock_window("MWindow::show_lwindow");
+ lwindow->gui->hide_window();
+ lwindow->gui->unlock_window();
+ gui->mainmenu->show_lwindow->set_checked(0);
+}
+
+
void MWindow::restore_windows()
{
gui->unlock_window();