paperbox r92 - in trunk: . src
- From: markoa svn gnome org
- To: svn-commits-list gnome org
- Subject: paperbox r92 - in trunk: . src
- Date: Thu, 17 Jan 2008 23:58:29 +0000 (GMT)
Author: markoa
Date: Thu Jan 17 23:58:29 2008
New Revision: 92
URL: http://svn.gnome.org/viewvc/paperbox?rev=92&view=rev
Log:
Fixed the bug of persistent tile expansions on navigation
Modified:
trunk/ChangeLog
trunk/src/document-tile-view.cc
trunk/src/document-tile-view.hh
trunk/src/document-tile.cc
trunk/src/document-tile.hh
trunk/src/main-window.cc
Modified: trunk/src/document-tile-view.cc
==============================================================================
--- trunk/src/document-tile-view.cc (original)
+++ trunk/src/document-tile-view.cc Thu Jan 17 23:58:29 2008
@@ -62,4 +62,26 @@
signal_tag_clicked_.emit(tag); // propagate further
}
+ void
+ DocumentTileView::on_show_request()
+ {
+ // The following shows all document tiles and *all* their children.
+ // The consequence is that eg after all have been packed,
+ // ie after first selection, a tag selection would make all
+ // these tiles appear completely expanded
+ TileView::on_show_request();
+
+ // but on each fresh show (tag selection, page navigation) we want
+ // to hide the widgets with additional document information:
+ for_each_tile(sigc::mem_fun(*this,
+ &DocumentTileView::extra_info_hider));
+ }
+
+ void
+ DocumentTileView::extra_info_hider(Gtk::Util::Tile& t)
+ {
+ DocumentTile* dt = static_cast<DocumentTile*>(&t);
+ dt->hide_extra_info();
+ }
+
} // namespace paperbox
Modified: trunk/src/document-tile-view.hh
==============================================================================
--- trunk/src/document-tile-view.hh (original)
+++ trunk/src/document-tile-view.hh Thu Jan 17 23:58:29 2008
@@ -44,6 +44,11 @@
SignalTagClicked& signal_tag_clicked() { return signal_tag_clicked_; }
protected:
+ // TileView override
+ virtual void on_show_request();
+
+ void extra_info_hider(Gtk::Util::Tile& t);
+
void connect_to_extra_signals(DocumentTile* tile);
// Handlers for additional signals that DocumentTile provides.
Modified: trunk/src/document-tile.cc
==============================================================================
--- trunk/src/document-tile.cc (original)
+++ trunk/src/document-tile.cc Thu Jan 17 23:58:29 2008
@@ -226,9 +226,9 @@
content_vbox.reorder_child(time_hbox_, 3);
tag_hbox_.reorder_child(tag_tools_hbox_, 0);
- extra_hbox_.show();
- time_hbox_.show();
- tag_tools_hbox_.show();
+ extra_hbox_.show_all();
+ time_hbox_.show_all();
+ tag_tools_hbox_.show_all();
get_image().set(thumbnail_large_);
}
@@ -303,4 +303,10 @@
pack_tag_links();
}
+ void
+ DocumentTile::hide_extra_info()
+ {
+ on_unselected();
+ }
+
} // namespace paperbox
Modified: trunk/src/document-tile.hh
==============================================================================
--- trunk/src/document-tile.hh (original)
+++ trunk/src/document-tile.hh Thu Jan 17 23:58:29 2008
@@ -60,6 +60,9 @@
// within the tile to the view (DocumentTileView).
SignalTagClicked& signal_tag_clicked();
+ // Hides additional containers and widgets.
+ void hide_extra_info();
+
protected:
virtual void connect_thumbnailer_signals(Thumbnailer& thumbnailer);
virtual void connect_signals();
Modified: trunk/src/main-window.cc
==============================================================================
--- trunk/src/main-window.cc (original)
+++ trunk/src/main-window.cc Thu Jan 17 23:58:29 2008
@@ -262,7 +262,8 @@
vector<shared_ptr<Document> > docs;
browser_->get_documents_for_tag(tag, docs);
- //g_debug("that's %d documents", (int) docs.size());
+
+ tile_view_->reset_selection();
render_new_tile_set(docs);
button_view_all_.set_sensitive(true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]