[nemiver: 2/6] Give indication of activity in the 'open file' dia
- From: Jonathon Jongsma <jjongsma src gnome org>
- To: svn-commits-list gnome org
- Subject: [nemiver: 2/6] Give indication of activity in the 'open file' dia
- Date: Mon, 9 Mar 2009 23:09:36 -0400 (EDT)
commit 1fe354f7918b872c6b60abbbd2bc27999f7e39a0
Author: Jonathon Jongsma <jonathon jongsma collabora co uk>
Date: Fri Mar 6 00:12:47 2009 -0600
Give indication of activity in the 'open file' dialog (Closes #564294)
* src/persp/dbgperspective/nmv-file-list.cc: Add a loading status label to
the file list widget that simply displays a "loading files from target"
message when we start listing the source files. The label is hidden when
the list of files is actually received and set in the widget.
* src/persp/dbgperspective/nmv-open-file-dialog.cc: don't show_all() the
file list widget or otherwise we can't hide the loading status label
mentioned above
---
src/persp/dbgperspective/nmv-file-list.cc | 13 ++++++++++++-
src/persp/dbgperspective/nmv-open-file-dialog.cc | 4 ++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/persp/dbgperspective/nmv-file-list.cc b/src/persp/dbgperspective/nmv-file-list.cc
index 482be40..8f75962 100644
--- a/src/persp/dbgperspective/nmv-file-list.cc
+++ b/src/persp/dbgperspective/nmv-file-list.cc
@@ -395,6 +395,8 @@ FileListView::find_filename_recursive (const Gtk::TreeModel::iterator &a_iter,
struct FileList::Priv : public sigc::trackable {
public:
+ SafePtr<Gtk::VBox> vbox;
+ SafePtr<Gtk::Label> loading_label;
SafePtr<FileListView> tree_view;
Glib::RefPtr<Gtk::ActionGroup> file_list_action_group;
@@ -402,10 +404,15 @@ public:
UString start_path;
Priv (IDebuggerSafePtr &a_debugger, const UString &a_starting_path) :
+ vbox (new Gtk::VBox()),
+ loading_label (new Gtk::Label(_("Loading Files from target executable..."))),
debugger (a_debugger),
start_path (a_starting_path)
{
build_tree_view ();
+ vbox->pack_start (*loading_label, Gtk::PACK_SHRINK, 3 /*padding*/);
+ vbox->pack_start (*tree_view);
+ vbox->show ();
debugger->files_listed_signal ().connect(
sigc::mem_fun(*this, &FileList::Priv::on_files_listed_signal));
}
@@ -414,6 +421,7 @@ public:
{
if (tree_view) {return;}
tree_view.reset (new FileListView ());
+ tree_view->show ();
}
void on_files_listed_signal (const vector<UString> &a_files,
@@ -425,6 +433,7 @@ public:
THROW_IF_FAIL (tree_view);
+ loading_label->hide ();
tree_view->set_files (a_files);
// this signal should only be called once per dialog
// -- the first time
@@ -454,7 +463,7 @@ FileList::widget () const
{
THROW_IF_FAIL (m_priv);
THROW_IF_FAIL (m_priv->tree_view);
- return *m_priv->tree_view;
+ return *m_priv->vbox;
}
void
@@ -462,6 +471,8 @@ FileList::update_content ()
{
THROW_IF_FAIL (m_priv);
THROW_IF_FAIL (m_priv->debugger);
+ // set some placeholder text to indicate that we're loading files
+ m_priv->loading_label->show ();
m_priv->debugger->list_files ();
}
diff --git a/src/persp/dbgperspective/nmv-open-file-dialog.cc b/src/persp/dbgperspective/nmv-open-file-dialog.cc
index 9b34d0c..13f0c53 100644
--- a/src/persp/dbgperspective/nmv-open-file-dialog.cc
+++ b/src/persp/dbgperspective/nmv-open-file-dialog.cc
@@ -117,13 +117,13 @@ public:
// remove existing children of vbox_file_list
vbox_file_list->children ().clear();
vbox_file_list->pack_start (scrolled_window);
- scrolled_window.show_all ();
+ scrolled_window.show ();
} else if (radio_button_chooser->get_active ()) {
LOG_DD("file chooser is active");
// remove existing children of vbox_file_list
vbox_file_list->children ().clear();
vbox_file_list->pack_start (file_chooser);
- file_chooser.show_all ();
+ file_chooser.show ();
}
NEMIVER_CATCH
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]