App::Chart::Gtk2::JobsRunningDialog -- query user about running jobs before quitting
use App::Chart::Gtk2::JobsRunningDialog; App::Chart::Gtk2::JobsRunningDialog->query_and_quit ($main_window);
App::Chart::Gtk2::JobsRunningDialog is a subclass of
Gtk2::Widget Gtk2::Container Gtk2::Bin Gtk2::Window Gtk2::Dialog Gtk2::MessageDialog App::Chart::Gtk2::JobsRunningDialog
App::Chart::Gtk2::JobsRunningDialog asks the user whether to kill running jobs before quitting. Cancel means don't quit, ok means kill the jobs.
Gtk2::Windowwhich is the application main window. If there's any running or pending Download or Vacuum jobs in the
App::Chart::Gtk2::JobQueuethen popup a JobsRunningDialog asking the user whether to kill them and quit, or cancel to not quit.
If the user chooses to kill then
$main_windowshould be set up to exit the main loop if destroyed and the jobs will be stopped or discarded in the usual way when garbage collected.
If there's no running or pending jobs then
$main_window->destroy()is called immediately, without any dialog. Intraday image downloads and latest quote downloads are ignored for quit query purposes since they're only for immediate display, they're not user initiated database updates.
Copyright 2009, 2010, 2011, 2013 Kevin Ryde
Chart is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Chart is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Chart; see the file COPYING. Failing that, see http://www.gnu.org/licenses/.