paperbox r215 - in trunk: . src
- From: markoa svn gnome org
- To: svn-commits-list gnome org
- Subject: paperbox r215 - in trunk: . src
- Date: Mon, 10 Nov 2008 21:23:04 +0000 (UTC)
Author: markoa
Date: Mon Nov 10 21:23:04 2008
New Revision: 215
URL: http://svn.gnome.org/viewvc/paperbox?rev=215&view=rev
Log:
Document open action
Modified:
trunk/ChangeLog
trunk/src/main-window.cc
trunk/src/main-window.hh
Modified: trunk/src/main-window.cc
==============================================================================
--- trunk/src/main-window.cc (original)
+++ trunk/src/main-window.cc Mon Nov 10 21:23:04 2008
@@ -235,6 +235,10 @@
action_group_->add(Gtk::Action::create("DocumentMenu", "_Document"));
action_group_->add(
+ Gtk::Action::create("DocumentOpen", Gtk::Stock::OPEN),
+ sigc::mem_fun(*this, &MainWindow::on_menu_document_open));
+
+ action_group_->add(
Gtk::Action::create("DocumentTag", Gtk::Stock::ADD, "Add _Tag"),
Gtk::AccelKey("<control>T"),
sigc::mem_fun(*this, &MainWindow::on_menu_document_tag));
@@ -258,6 +262,7 @@
"<ui>"
" <menubar name='MenuBar'>"
" <menu action='DocumentMenu'>"
+ " <menuitem action='DocumentOpen'/>"
" <menuitem action='DocumentTag'/>"
" <separator/>"
" <menuitem action='DocumentQuit'/>"
@@ -329,6 +334,16 @@
}
void
+ MainWindow::on_menu_document_open()
+ {
+ DocumentTile* tile =
+ dynamic_cast<DocumentTile*>(tile_view_->get_selection());
+ if (! tile) return;
+
+ on_document_tile_selected(*tile);
+ }
+
+ void
MainWindow::on_menu_document_tag()
{
DocumentTile* tile =
Modified: trunk/src/main-window.hh
==============================================================================
--- trunk/src/main-window.hh (original)
+++ trunk/src/main-window.hh Mon Nov 10 21:23:04 2008
@@ -76,6 +76,7 @@
const std::vector<boost::shared_ptr<Document> > docs);
/*** Signal handlers ***/
+ void on_menu_document_open();
void on_menu_document_tag();
void on_menu_document_quit();
void on_menu_about();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]