From 69ae98cb453849c6d32a1c7ea8bc057fb13deea3 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 25 Jun 2014 11:32:51 -0400 Subject: 1. make it compile (bzr r13341.5.1) --- src/inkview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/inkview.cpp') diff --git a/src/inkview.cpp b/src/inkview.cpp index 82bd08e34..df2661968 100644 --- a/src/inkview.cpp +++ b/src/inkview.cpp @@ -60,7 +60,7 @@ #include "io/inkjar.h" #endif -#include "inkscape-private.h" +#include "inkscape.h" Inkscape::Application *inkscape; @@ -232,7 +232,7 @@ main (int argc, const char **argv) ss.view = NULL; ss.fullscreen = false; - inkscape = (Inkscape::Application *)g_object_new (SP_TYPE_INKSCAPE, NULL); + inkscape = new Inkscape::Application;//(Inkscape::Application *)g_object_new (SP_TYPE_INKSCAPE, NULL); // starting at where the commandline options stopped parsing because // we want all the files to be in the list -- cgit v1.2.3 From cdc7587062b42c39a23451e5c9ec7da06dd6fdb3 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 25 Jun 2014 21:45:01 -0400 Subject: 3. remove dead code, refactor existing code. Connect overlooked signals. (bzr r13341.5.3) --- src/inkview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inkview.cpp') diff --git a/src/inkview.cpp b/src/inkview.cpp index df2661968..f1be398f7 100644 --- a/src/inkview.cpp +++ b/src/inkview.cpp @@ -232,7 +232,7 @@ main (int argc, const char **argv) ss.view = NULL; ss.fullscreen = false; - inkscape = new Inkscape::Application;//(Inkscape::Application *)g_object_new (SP_TYPE_INKSCAPE, NULL); + inkscape = new Inkscape::Application(argv[0], true); // starting at where the commandline options stopped parsing because // we want all the files to be in the list -- cgit v1.2.3 From 6dfb9b4eade77ac55d11f05669c2192352b9b8fa Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Thu, 26 Jun 2014 13:49:17 -0400 Subject: 4. further refactor Application class; create proper singleton, encapsulate members, simplify signals (bzr r13341.5.6) --- src/inkview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/inkview.cpp') diff --git a/src/inkview.cpp b/src/inkview.cpp index f1be398f7..1ec8393ba 100644 --- a/src/inkview.cpp +++ b/src/inkview.cpp @@ -232,7 +232,8 @@ main (int argc, const char **argv) ss.view = NULL; ss.fullscreen = false; - inkscape = new Inkscape::Application(argv[0], true); + Inkscape::Application::init(argv[0], true); + inkscape = Inkscape::Application::instance(); // starting at where the commandline options stopped parsing because // we want all the files to be in the list -- cgit v1.2.3 From a65c95ff4739e2803e28d64b2a3b3774dd1f45aa Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Thu, 26 Jun 2014 21:40:01 -0400 Subject: Move constructor/destructor into private section, remove protected section. Rename init(). Add to-do list. (bzr r13341.5.8) --- src/inkview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inkview.cpp') diff --git a/src/inkview.cpp b/src/inkview.cpp index 1ec8393ba..721b4784f 100644 --- a/src/inkview.cpp +++ b/src/inkview.cpp @@ -232,7 +232,7 @@ main (int argc, const char **argv) ss.view = NULL; ss.fullscreen = false; - Inkscape::Application::init(argv[0], true); + Inkscape::Application::create(argv[0], true); inkscape = Inkscape::Application::instance(); // starting at where the commandline options stopped parsing because -- cgit v1.2.3 From 45f373f3319b598d8e0222fb48e9d3a4760b2044 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Fri, 27 Jun 2014 15:23:06 -0400 Subject: 5. Refactoring of Application class: make copy/assignment operators private, disallow pointers to Application (bzr r13341.5.9) --- src/inkview.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/inkview.cpp') diff --git a/src/inkview.cpp b/src/inkview.cpp index 721b4784f..a44d755eb 100644 --- a/src/inkview.cpp +++ b/src/inkview.cpp @@ -62,8 +62,6 @@ #include "inkscape.h" -Inkscape::Application *inkscape; - #include #ifndef HAVE_BIND_TEXTDOMAIN_CODESET @@ -233,7 +231,7 @@ main (int argc, const char **argv) ss.fullscreen = false; Inkscape::Application::create(argv[0], true); - inkscape = Inkscape::Application::instance(); + //Inkscape::Application &inkscape = Inkscape::Application::instance(); // starting at where the commandline options stopped parsing because // we want all the files to be in the list @@ -571,7 +569,7 @@ static void usage() exit(1); } -#ifdef XXX +#if 0 /* TODO !!! make this temporary stub unnecessary */ Inkscape::Application *inkscape_get_instance() { return NULL; } void inkscape_ref (void) {} -- cgit v1.2.3 From fa9bd6393f316dab9303569b28f6b5d179fedd61 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sat, 27 Sep 2014 10:17:45 -0400 Subject: Update to experimental r13565 (bzr r13341.5.16) --- src/inkview.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/inkview.cpp') diff --git a/src/inkview.cpp b/src/inkview.cpp index a44d755eb..0b7b4d35c 100644 --- a/src/inkview.cpp +++ b/src/inkview.cpp @@ -569,16 +569,6 @@ static void usage() exit(1); } -#if 0 -/* TODO !!! make this temporary stub unnecessary */ -Inkscape::Application *inkscape_get_instance() { return NULL; } -void inkscape_ref (void) {} -void inkscape_unref (void) {} -void inkscape_add_document (SPDocument *document) {} -void inkscape_remove_document (SPDocument *document) {} -#endif - - /* Local Variables: mode:c++ -- cgit v1.2.3