Commit 63293414 authored by Murray Cumming's avatar Murray Cumming
Browse files

Progress InfoBar: Block user input during progress.

	* glom/application.cc: set_progress_message(): Set the main UI elements to
	insensitive(), because all our current uses of the progess message should
	block user input, like a modal dialog.
	* ui/operator/window_main.glade: Move the InfoBar out of the frame, because
	it should not have the border, and so we can make the frame insensitive
	without making the InfoBar insensitive.
parent 600828fe
2011-10-24 Murray Cumming <murrayc@murrayc.com>
Progress InfoBar: Block user input during progress.
* glom/application.cc: set_progress_message(): Set the main UI elements to
insensitive(), because all our current uses of the progess message should
block user input, like a modal dialog.
* ui/operator/window_main.glade: Move the InfoBar out of the frame, because
it should not have the border, and so we can make the frame insensitive
without making the InfoBar insensitive.
2011-10-24 Murray Cumming <murrayc@murrayc.com>
ShowProgressMessage: Move to its own source files.
......
......@@ -2924,7 +2924,12 @@ void Application::set_progress_message(const Glib::ustring& message)
// Pulse the progress bar regardless of whether the message is new or not.
m_infobar_progress->pulse();
// TODO: Block interaction with the rest of the UI.
//Block interaction with the rest of the UI.
Gtk::MenuBar* pMenuBar = static_cast<Gtk::MenuBar*>(m_refUIManager->get_widget("/Bakery_MainMenu"));
if(pMenuBar)
pMenuBar->set_sensitive(false);
m_pFrame->set_sensitive(false);
}
void Application::pulse_progress_message()
......@@ -2936,6 +2941,11 @@ void Application::clear_progress_message()
{
m_progress_collate_key.clear();
m_infobar_progress->hide();
Gtk::MenuBar* pMenuBar = static_cast<Gtk::MenuBar*>(m_refUIManager->get_widget("/Bakery_MainMenu"));
if(pMenuBar)
pMenuBar->set_sensitive();
m_pFrame->set_sensitive();
}
} //namespace Glom
......@@ -75,15 +75,15 @@ void helper_get_glade_widget_derived_with_warning(const std::string& filename, c
}
catch(const Gtk::BuilderError& ex)
{
std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
std::cerr << G_STRFUNC << ": BuilderError Exception: " << ex.what() << std::endl;
}
catch(const Glib::MarkupError& ex)
{
std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
std::cerr << G_STRFUNC << ": MarkupError exception:" << ex.what() << std::endl;
}
catch(const Glib::FileError& ex)
{
std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
std::cerr << G_STRFUNC << ": FileError: exception" << ex.what() << std::endl;
}
catch(const Glib::Error& ex)
{
......
......@@ -11,16 +11,82 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkVBox" id="vbox_frame">
<object class="GtkVBox" id="vbox_top">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="spacing">6</property>
<child>
<object class="GtkVBox" id="vbox_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="spacing">6</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkVBox" id="vbox_quickfind">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="vbox_main">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkVBox" id="sidebar_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox_mode">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkInfoBar" id="infobar_progress">
<property name="app_paintable">True</property>
<property name="can_focus">False</property>
<child internal-child="content_area">
<object class="GtkBox" id="infobar-content_area1">
<object class="GtkBox" id="infobar-content_area">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
......@@ -54,69 +120,24 @@
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox_quickfind">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="vbox_main">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkVBox" id="sidebar_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox_mode">
<property name="visible">True</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="infobar-action_area">
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
<property name="pack_type">end</property>
</packing>
</child>
</object>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment