summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2007-03-01 07:21:46 +0000
committergouldtj <gouldtj@users.sourceforge.net>2007-03-01 07:21:46 +0000
commite79ab720b434aaf98af06e502c3e2c47e267348f (patch)
treea6531c65fb95f687bfc784328b72e08a82e169fd /src
parent(bzr r2482) (diff)
downloadinkscape-e79ab720b434aaf98af06e502c3e2c47e267348f.tar.gz
inkscape-e79ab720b434aaf98af06e502c3e2c47e267348f.zip
r14649@tres: ted | 2007-02-28 23:21:44 -0800
Somehow that didn't get deleted. (bzr r2483)
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp86
1 files changed, 0 insertions, 86 deletions
diff --git a/src/main.cpp b/src/main.cpp
index dbca3f74c..d3433756c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -389,92 +389,6 @@ struct poptOption options[] = {
POPT_AUTOHELP POPT_TABLEEND
};
-#include <ui/view/view.h>
-#include <desktop.h>
-#include <desktop-handles.h>
-#include <helper/action.h>
-#include <selection.h>
-
-class CmdLineAction {
- gint _type;
- gchar * _arg;
-
- static std::list <CmdLineAction *> _list;
-
-public:
- CmdLineAction (gint type, gchar const * arg) : _type(type), _arg(NULL) {
- if (arg != NULL) {
- _arg = g_strdup(arg);
- }
-
- _list.insert(_list.end(), this);
-
- return;
- }
-
- ~CmdLineAction () {
- if (_arg != NULL) {
- g_free(_arg);
- }
- }
-
- void doIt (Inkscape::UI::View::View * view) {
- //printf("Doing: %s\n", _arg);
- switch (_type) {
- case SP_ARG_VERB: {
- Inkscape::Verb * verb = Inkscape::Verb::getbyid(_arg);
- if (verb == NULL) {
- printf(_("Unable to find verb ID '%s' specified on the command line.\n"), _arg);
- break;
- }
- SPAction * action = verb->get_action(view);
- sp_action_perform(action, NULL);
- break;
- }
- case SP_ARG_SELECT: {
- SPDesktop * desktop = dynamic_cast<SPDesktop *>(view);
- if (desktop == NULL) { break; }
-
- SPDocument * doc = view->doc();
- SPObject * obj = doc->getObjectById(_arg);
- if (obj == NULL) {
- printf("Unable to find node ID: '%s'\n", _arg);
- break;
- }
-
- Inkscape::Selection * selection = sp_desktop_selection(desktop);
- selection->add(obj, false);
- break;
- }
- }
- }
-
- static void doList (Inkscape::UI::View::View * view) {
- for (std::list<CmdLineAction *>::iterator i = _list.begin();
- i != _list.end(); i++) {
- CmdLineAction * entry = *i;
- entry->doIt(view);
- }
- }
-
- static bool idle (void) {
- std::list<SPDesktop *> desktops;
- inkscape_get_all_desktops(desktops);
-
- // We're going to assume one desktop per document, because no one
- // should have had time to make more at this point.
- for (std::list<SPDesktop *>::iterator i = desktops.begin();
- i != desktops.end(); i++) {
- SPDesktop * desktop = *i;
- //Inkscape::UI::View::View * view = dynamic_cast<Inkscape::UI::View::View *>(desktop);
- doList(desktop);
- }
- return false;
- }
-};
-std::list <CmdLineAction *> CmdLineAction::_list;
-
-
static bool needToRecodeParams = true;
gchar* blankParam = "";