summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSlagvi Public <JandotDarowskiattgmaildottcom>2013-07-02 15:37:42 +0000
committerSlagvi Public <JandotDarowskiattgmaildottcom>2013-07-02 15:37:42 +0000
commitfdb68963cec5ddbd3eef111f4c95b7e049aa839c (patch)
tree60c0d23f4f777ba5f5b030a80313b5c24beb265f /src
parentCoding style fixes (diff)
downloadinkscape-fdb68963cec5ddbd3eef111f4c95b7e049aa839c.tar.gz
inkscape-fdb68963cec5ddbd3eef111f4c95b7e049aa839c.zip
Adding NewFromTemplate to the Inkscape menu
(bzr r12379.2.5)
Diffstat (limited to 'src')
-rw-r--r--src/file.h1
-rw-r--r--src/menus-skeleton.h1
-rw-r--r--src/ui/dialog/Makefile_insert6
-rw-r--r--src/ui/dialog/new-from-template.cpp (renamed from src/templates/new-from-template.cpp)0
-rw-r--r--src/ui/dialog/new-from-template.h (renamed from src/templates/new-from-template.h)0
-rw-r--r--src/ui/dialog/static-template-load-tab.cpp (renamed from src/templates/static-template-load-tab.cpp)0
-rw-r--r--src/ui/dialog/static-template-load-tab.h (renamed from src/templates/static-template-load-tab.h)0
-rw-r--r--src/ui/dialog/template-load-tab.cpp (renamed from src/templates/template-load-tab.cpp)0
-rw-r--r--src/ui/dialog/template-load-tab.h (renamed from src/templates/template-load-tab.h)0
-rw-r--r--src/verbs.cpp6
-rw-r--r--src/verbs.h1
11 files changed, 15 insertions, 0 deletions
diff --git a/src/file.h b/src/file.h
index fe8ad9af3..acc6c5c7c 100644
--- a/src/file.h
+++ b/src/file.h
@@ -45,6 +45,7 @@ Glib::ustring sp_file_default_template_uri();
*/
SPDesktop* sp_file_new (const Glib::ustring &templ);
SPDesktop* sp_file_new_default (void);
+SPDesktop* sp_file_new_from_templatee ();
/*######################
## D E L E T E
diff --git a/src/menus-skeleton.h b/src/menus-skeleton.h
index 77e781763..7c412b605 100644
--- a/src/menus-skeleton.h
+++ b/src/menus-skeleton.h
@@ -17,6 +17,7 @@ static char const menus_skeleton[] =
" <submenu name=\"" N_("_New") "\">\n"
" <verb verb-id=\"FileNew\" />\n"
" <template-list/>\n"
+" <verb verb-id=\"FileTemplates\" />\n"
" </submenu>\n"
" <verb verb-id=\"FileOpen\" />\n"
" <recent-file-list/>\n"
diff --git a/src/ui/dialog/Makefile_insert b/src/ui/dialog/Makefile_insert
index 580b47522..4a34cc71c 100644
--- a/src/ui/dialog/Makefile_insert
+++ b/src/ui/dialog/Makefile_insert
@@ -70,6 +70,8 @@ ink_common_sources += \
ui/dialog/memory.h \
ui/dialog/messages.cpp \
ui/dialog/messages.h \
+ ui/dialog/new-from-template.cpp \
+ ui/dialog/new-from-template.h \
ui/dialog/ocaldialogs.cpp \
ui/dialog/ocaldialogs.h \
ui/dialog/object-attributes.cpp \
@@ -85,12 +87,16 @@ ink_common_sources += \
ui/dialog/scriptdialog.h \
ui/dialog/spellcheck.cpp \
ui/dialog/spellcheck.h \
+ ui/dialog/static-template-load-tab.cpp \
+ ui/dialog/static-template-load-tab.h \
ui/dialog/svg-fonts-dialog.cpp \
ui/dialog/svg-fonts-dialog.h \
ui/dialog/swatches.cpp \
ui/dialog/swatches.h \
ui/dialog/symbols.cpp \
ui/dialog/symbols.h \
+ ui/dialog/template-load-tab.cpp \
+ ui/dialog/template-load-tab.h \
ui/dialog/text-edit.cpp \
ui/dialog/text-edit.h \
ui/dialog/tile.cpp \
diff --git a/src/templates/new-from-template.cpp b/src/ui/dialog/new-from-template.cpp
index fc590d199..fc590d199 100644
--- a/src/templates/new-from-template.cpp
+++ b/src/ui/dialog/new-from-template.cpp
diff --git a/src/templates/new-from-template.h b/src/ui/dialog/new-from-template.h
index ef3cbce18..ef3cbce18 100644
--- a/src/templates/new-from-template.h
+++ b/src/ui/dialog/new-from-template.h
diff --git a/src/templates/static-template-load-tab.cpp b/src/ui/dialog/static-template-load-tab.cpp
index 83ff32e52..83ff32e52 100644
--- a/src/templates/static-template-load-tab.cpp
+++ b/src/ui/dialog/static-template-load-tab.cpp
diff --git a/src/templates/static-template-load-tab.h b/src/ui/dialog/static-template-load-tab.h
index 651f146a0..651f146a0 100644
--- a/src/templates/static-template-load-tab.h
+++ b/src/ui/dialog/static-template-load-tab.h
diff --git a/src/templates/template-load-tab.cpp b/src/ui/dialog/template-load-tab.cpp
index a7b5e63f3..a7b5e63f3 100644
--- a/src/templates/template-load-tab.cpp
+++ b/src/ui/dialog/template-load-tab.cpp
diff --git a/src/templates/template-load-tab.h b/src/ui/dialog/template-load-tab.h
index a9fa7c313..a9fa7c313 100644
--- a/src/templates/template-load-tab.h
+++ b/src/ui/dialog/template-load-tab.h
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 6f83b3dfb..a3d8b07a2 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -79,6 +79,7 @@
#include "ui/dialog/inkscape-preferences.h"
#include "ui/dialog/layer-properties.h"
#include "ui/dialog/layers.h"
+#include "ui/dialog/new-from-template.h"
#include "ui/dialog/object-properties.h"
#include "ui/dialog/swatches.h"
#include "ui/dialog/symbols.h"
@@ -860,6 +861,9 @@ void FileVerb::perform(SPAction *action, void *data)
case SP_VERB_FILE_QUIT:
sp_file_exit();
break;
+ case SP_VERB_FILE_TEMPLATES:
+ sp_file_new_from_templatee();
+ break;
default:
break;
}
@@ -2323,6 +2327,8 @@ Verb *Verb::_base_verbs[] = {
new FileVerb(SP_VERB_FILE_CLOSE_VIEW, "FileClose", N_("_Close"),
N_("Close this document window"), GTK_STOCK_CLOSE),
new FileVerb(SP_VERB_FILE_QUIT, "FileQuit", N_("_Quit"), N_("Quit Inkscape"), GTK_STOCK_QUIT),
+ new FileVerb(SP_VERB_FILE_TEMPLATES, "FileTemplates", N_("_Templates..."),
+ N_("Create new project from template"), INKSCAPE_ICON("dialog-templates")),
// Edit
new EditVerb(SP_VERB_EDIT_UNDO, "EditUndo", N_("_Undo"), N_("Undo last action"),
diff --git a/src/verbs.h b/src/verbs.h
index dab524d7a..3c1625c84 100644
--- a/src/verbs.h
+++ b/src/verbs.h
@@ -56,6 +56,7 @@ enum {
SP_VERB_FILE_PREV_DESKTOP,
SP_VERB_FILE_CLOSE_VIEW,
SP_VERB_FILE_QUIT,
+ SP_VERB_FILE_TEMPLATES,
/* Edit */
SP_VERB_EDIT_UNDO,
SP_VERB_EDIT_REDO,