From 370a3f5cc9e39352a081e5d5dd8c43676547a6e6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Oct 2012 11:45:44 +1000 Subject: code cleanup: add own includes to cpp files or make the functions static if they are not used elsewhere. (bzr r11735) --- src/inkscape.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 8548b398f..b1cc53b4e 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -1065,7 +1065,7 @@ inkscape_find_desktop_by_dkey (unsigned int dkey) -unsigned int +static unsigned int inkscape_maximum_dkey() { unsigned int dkey = 0; @@ -1081,7 +1081,7 @@ inkscape_maximum_dkey() -SPDesktop * +static SPDesktop * inkscape_next_desktop () { SPDesktop *d = NULL; @@ -1112,7 +1112,7 @@ inkscape_next_desktop () -SPDesktop * +static SPDesktop * inkscape_prev_desktop () { SPDesktop *d = NULL; -- cgit v1.2.3 From 900d1a05ba36f84df3a51188b938a6551a5201d2 Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 8 Oct 2012 21:00:57 +0900 Subject: Fix for 490338 : Try to create the autosave directory if that does not exists (bzr r11759) --- src/inkscape.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index b1cc53b4e..0a94d0742 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -309,8 +309,24 @@ static gint inkscape_autosave(gpointer) GDir *autosave_dir_ptr = g_dir_open(autosave_dir.c_str(), 0, NULL); if( !autosave_dir_ptr ){ - g_warning("Cannot open autosave directory!"); - return TRUE; + // Try to create the autosave directory if it doesn't exist + if (g_mkdir(autosave_dir.c_str(), 0755)) { + // the creation failed + Glib::ustring msg = Glib::ustring::format( + _("Autosave failed! Cannot create directory "), Glib::filename_to_utf8(autosave_dir)); + g_warning("%s", msg.c_str()); + SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::ERROR_MESSAGE, msg.c_str()); + return TRUE; + } + // Try to read dir again + autosave_dir_ptr = g_dir_open(autosave_dir.c_str(), 0, NULL); + if( !autosave_dir_ptr ){ + Glib::ustring msg = Glib::ustring::format( + _("Autosave failed! Cannot open directory "), Glib::filename_to_utf8(autosave_dir)); + g_warning("%s", msg.c_str()); + SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::ERROR_MESSAGE, msg.c_str()); + return TRUE; + } } time_t sptime = time(NULL); -- cgit v1.2.3 From fab4c86f1347c48c3e87d645343faf0b167ea635 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Tue, 9 Oct 2012 21:26:18 +0200 Subject: Fix translation issue of rev 11759. (bzr r11772) --- src/inkscape.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 0a94d0742..fc9a9783f 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -312,8 +312,8 @@ static gint inkscape_autosave(gpointer) // Try to create the autosave directory if it doesn't exist if (g_mkdir(autosave_dir.c_str(), 0755)) { // the creation failed - Glib::ustring msg = Glib::ustring::format( - _("Autosave failed! Cannot create directory "), Glib::filename_to_utf8(autosave_dir)); + Glib::ustring msg = Glib::ustring::compose( + _("Autosave failed! Cannot create directory %1."), Glib::filename_to_utf8(autosave_dir)); g_warning("%s", msg.c_str()); SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::ERROR_MESSAGE, msg.c_str()); return TRUE; @@ -321,8 +321,8 @@ static gint inkscape_autosave(gpointer) // Try to read dir again autosave_dir_ptr = g_dir_open(autosave_dir.c_str(), 0, NULL); if( !autosave_dir_ptr ){ - Glib::ustring msg = Glib::ustring::format( - _("Autosave failed! Cannot open directory "), Glib::filename_to_utf8(autosave_dir)); + Glib::ustring msg = Glib::ustring::compose( + _("Autosave failed! Cannot open directory %1."), Glib::filename_to_utf8(autosave_dir)); g_warning("%s", msg.c_str()); SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::ERROR_MESSAGE, msg.c_str()); return TRUE; -- cgit v1.2.3 From 32598fdd4d1e85228e46242d37f83c739591a078 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 29 Nov 2012 09:37:30 +0900 Subject: Fix for 1073128 : Command line PNG export fails if FeFlood filter primitive is present (bzr r11913) --- src/inkscape.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index fc9a9783f..fc823f8b7 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -1270,6 +1270,10 @@ inkscape_active_document (void) { if (SP_ACTIVE_DESKTOP) { return sp_desktop_document (SP_ACTIVE_DESKTOP); + } else if (!inkscape->document_set.empty()) { + // If called from the command line there will be no desktop + // So 'fall back' to take the first listed document in the Inkscape instance + return inkscape->document_set.begin()->first; } return NULL; -- cgit v1.2.3 From ea952687e7b1ae64c4c30c8eb66bd875d75fec2d Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 23 Feb 2013 13:57:26 +0000 Subject: Fix missing headers for Gtk+ 3 build Fixed bugs: - https://launchpad.net/bugs/1122816 (bzr r12145) --- src/inkscape.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index fc823f8b7..449220357 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include #include #include -- cgit v1.2.3 From 4c75974f2ac6bfe751e583fca37ffdd8b14ea84d Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 14 Mar 2013 23:24:17 +0000 Subject: Fix another load of forward declaration tags (bzr r12205) --- src/inkscape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 449220357..491acd73e 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -91,7 +91,7 @@ enum { ################################*/ namespace Inkscape { -class ApplicationClass; +struct ApplicationClass; } static void inkscape_class_init (Inkscape::ApplicationClass *klass); -- cgit v1.2.3 From 0cdd007ebf8dcfbd39c1d36ab53f43617eb692df Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 25 Mar 2013 17:42:31 +0000 Subject: Workaround usage of deprecated glib symbols in 3rd party libraries Fixed bugs: - https://launchpad.net/bugs/1122774 (bzr r12243) --- src/inkscape.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 491acd73e..ac419784f 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -19,6 +19,7 @@ #include #include +#include #include "debug/simple-event.h" #include "debug/event-tracker.h" @@ -35,11 +36,9 @@ #include #include -#include #include #include #include -#include #include #include #include -- cgit v1.2.3 From 3c213cec8c2aab1a53d0d5cb9d87659b584ac876 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Wed, 3 Apr 2013 22:47:48 +0200 Subject: Checking file presence before calling lstat (should fix Bug #785701 Inkscape freezes at opening) (bzr r12263) --- src/inkscape.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index ac419784f..eca19c4b9 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -364,15 +364,17 @@ static gint inkscape_autosave(gpointer) while( (filename = g_dir_read_name(autosave_dir_ptr)) != NULL ){ if ( strncmp(filename, baseName, strlen(baseName)) == 0 ){ gchar* full_path = g_build_filename( autosave_dir.c_str(), filename, NULL ); - if ( g_stat(full_path, &sb) != -1 ) { - if ( difftime(sb.st_ctime, min_time) < 0 || min_time == 0 ){ - min_time = sb.st_ctime; - if ( oldest_autosave ) { - g_free(oldest_autosave); + if (g_file_test (full_path, G_FILE_TEST_EXISTS)){ + if ( g_stat(full_path, &sb) != -1 ) { + if ( difftime(sb.st_ctime, min_time) < 0 || min_time == 0 ){ + min_time = sb.st_ctime; + if ( oldest_autosave ) { + g_free(oldest_autosave); + } + oldest_autosave = g_strdup(full_path); } - oldest_autosave = g_strdup(full_path); + count ++; } - count ++; } g_free(full_path); } -- cgit v1.2.3 From 3c82e8251460b21c8046a418a9fefb700db0a164 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 4 Jun 2013 01:52:40 -0700 Subject: Correct to compile against recent gtkmm, including updated macports versions. Fixes bug #1179338. Fixed bugs: - https://launchpad.net/bugs/1179338 (bzr r12346.1.1) --- src/inkscape.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index eca19c4b9..15720ade5 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -19,6 +19,9 @@ #include #include + +#include + #include #include "debug/simple-event.h" #include "debug/event-tracker.h" -- cgit v1.2.3 From 72d8e897c6b67e46b2a613c4743ef9c13de25059 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Thu, 6 Jun 2013 06:44:11 -0700 Subject: Added configure/ifdef guards to only bring in the needed #include if glibmm has it. (bzr r12353) --- src/inkscape.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 15720ade5..7e570deb7 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -20,7 +20,9 @@ #include +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H #include +#endif #include #include "debug/simple-event.h" -- cgit v1.2.3 From c3a160589a9cb41c70a56e5e7b66a65857a0d10e Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Mon, 1 Jul 2013 21:04:32 +0100 Subject: Factored layer model out into new Inkscape::LayerModel class. This allows Inkscape::Selection to use a LayerModel that is not associated with a UI. Changed the interface of verbs (SPAction) to use a new ActionContext rather than UI::View::View, again so that verbs may be used in a console mode. Modified boolean operation verbs to work in console-only mode. Fixed up DESKTOP_IS_ACTIVE macro to work in the case of no desktops. Modified main.cpp to process selections and verbs in no-GUI mode. Other changes are all consequences of the SPDesktop, Selection and LayerModel interface changes. (bzr r12387.1.1) --- src/inkscape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 7e570deb7..125a7176a 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -87,7 +87,7 @@ enum { LAST_SIGNAL }; -#define DESKTOP_IS_ACTIVE(d) ((d) == inkscape->desktops->data) +#define DESKTOP_IS_ACTIVE(d) (inkscape->desktops && ((d) == inkscape->desktops->data)) /*################################ -- cgit v1.2.3 From 09ce234c1fc367a2607936e6cf106cb24c60e94f Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Wed, 3 Jul 2013 20:06:11 +0100 Subject: Modified dbus interface so that it works in console mode (--dbus-listen) Modified action context setup so that in console mode, when a document is added to the main inkscape app instance, it gets a selection model and layer model automatically set up for it Made a couple more verbs work in console mode (bzr r12387.1.4) --- src/inkscape.cpp | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 125a7176a..2e60ee5ea 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -58,12 +58,14 @@ #include "extension/system.h" #include "inkscape-private.h" #include "io/sys.h" +#include "layer-model.h" #include "message-stack.h" #include "preferences.h" #include "resource-manager.h" #include "selection.h" #include "ui/dialog/debug.h" #include "xml/repr.h" +#include "helper/action-context.h" #include "helper/sp-marshal.h" static Inkscape::Application *inkscape = NULL; @@ -105,10 +107,27 @@ static void inkscape_dispose (GObject *object); static void inkscape_activate_desktop_private (Inkscape::Application *inkscape, SPDesktop *desktop); static void inkscape_deactivate_desktop_private (Inkscape::Application *inkscape, SPDesktop *desktop); +class AppSelectionModel { + Inkscape::LayerModel _layer_model; + Inkscape::Selection *_selection; + +public: + AppSelectionModel(SPDocument *doc) { + _layer_model.setDocument(doc); + // TODO: is this really how we should manage the lifetime of the selection? + // I just copied this from the initialization of the Selection in SPDesktop. + // When and how is it actually released? + _selection = Inkscape::GC::release(new Inkscape::Selection(&_layer_model, NULL)); + } + + Inkscape::Selection *getSelection() const { return _selection; } +}; + struct Inkscape::Application { GObject object; Inkscape::XML::Document *menus; std::map document_set; + std::map selection_models; GSList *desktops; gchar *argv0; gboolean dialogs_toggle; @@ -481,6 +500,7 @@ inkscape_init (SPObject * object) } new (&inkscape->document_set) std::map(); + new (&inkscape->selection_models) std::map(); inkscape->menus = sp_repr_read_mem (_(menus_skeleton), MENUS_SKELETON_SIZE, NULL); inkscape->desktops = NULL; @@ -504,6 +524,7 @@ inkscape_dispose (GObject *object) inkscape->menus = NULL; } + inkscape->selection_models.~map(); inkscape->document_set.~map(); G_OBJECT_CLASS (parent_class)->dispose (object); @@ -1234,6 +1255,14 @@ inkscape_add_document (SPDocument *document) iter->second ++; } } + } else { + // insert succeeded, this document is new. Do we need to create a + // selection model for it, i.e. are we running without a desktop? + if (!inkscape->use_gui) { + // Create layer model and selection model so we can run some verbs without a GUI + g_assert(inkscape->selection_models.find(document) == inkscape->selection_models.end()); + inkscape->selection_models[document] = new AppSelectionModel(document); + } } } @@ -1253,6 +1282,13 @@ inkscape_remove_document (SPDocument *document) if (iter->second < 1) { // this was the last one, remove the pair from list inkscape->document_set.erase (iter); + + // also remove the selection model + std::map::iterator sel_iter = inkscape->selection_models.find(document); + if (sel_iter != inkscape->selection_models.end()) { + inkscape->selection_models.erase(sel_iter); + } + return true; } else { return false; @@ -1312,6 +1348,24 @@ inkscape_active_event_context (void) return NULL; } +Inkscape::ActionContext +inkscape_active_action_context() +{ + if (SP_ACTIVE_DESKTOP) { + return Inkscape::ActionContext(SP_ACTIVE_DESKTOP); + } + + SPDocument *doc = inkscape_active_document(); + if (!doc) { + return Inkscape::ActionContext(); + } + + std::map::iterator sel_iter = inkscape->selection_models.find(doc); + if (sel_iter == inkscape->selection_models.end()) { + return Inkscape::ActionContext(); + } + return Inkscape::ActionContext(sel_iter->second->getSelection()); +} /*##################### -- cgit v1.2.3 From 036013caefc09f34ef9b418e1ca148a821c777d6 Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Thu, 4 Jul 2013 23:51:56 +0100 Subject: Further renaming of DBus variables (object -> app_interface/doc_interface and doc_context -> target) Fixes to application interface for document_new (now only works in console mode, and behaves as expected) (bzr r12387.1.8) --- src/inkscape.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 2e60ee5ea..a24bd2b8a 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -1359,7 +1359,22 @@ inkscape_active_action_context() if (!doc) { return Inkscape::ActionContext(); } - + + return inkscape_action_context_for_document(doc); +} + +Inkscape::ActionContext +inkscape_action_context_for_document(SPDocument *doc) +{ + // If there are desktops, check them first to see if the document is bound to one of them + for (GSList *iter = inkscape->desktops ; iter ; iter = iter->next) { + SPDesktop *desktop=static_cast(iter->data); + if (desktop->doc() == doc) { + return Inkscape::ActionContext(desktop); + } + } + + // Document is not associated with any desktops - maybe we're in command-line mode std::map::iterator sel_iter = inkscape->selection_models.find(doc); if (sel_iter == inkscape->selection_models.end()) { return Inkscape::ActionContext(); -- cgit v1.2.3 From b2dd3583e7372d23d18bbc6e861f4f645ec3dc37 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Tue, 30 Jul 2013 23:17:21 +0200 Subject: Further refactoring of EventContexts. (bzr r11608.1.109) --- src/inkscape.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index a24bd2b8a..e1cabd2d5 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -1013,7 +1013,7 @@ inkscape_add_desktop (SPDesktop * desktop) inkscape->desktops = g_slist_prepend (inkscape->desktops, desktop); g_signal_emit (G_OBJECT (inkscape), inkscape_signals[ACTIVATE_DESKTOP], 0, desktop); - g_signal_emit (G_OBJECT (inkscape), inkscape_signals[SET_EVENTCONTEXT], 0, sp_desktop_event_context (desktop)); + g_signal_emit (G_OBJECT (inkscape), inkscape_signals[SET_EVENTCONTEXT], 0, desktop->getEventContext()); g_signal_emit (G_OBJECT (inkscape), inkscape_signals[SET_SELECTION], 0, sp_desktop_selection (desktop)); g_signal_emit (G_OBJECT (inkscape), inkscape_signals[CHANGE_SELECTION], 0, sp_desktop_selection (desktop)); } @@ -1035,7 +1035,7 @@ inkscape_remove_desktop (SPDesktop * desktop) inkscape->desktops = g_slist_remove (inkscape->desktops, new_desktop); inkscape->desktops = g_slist_prepend (inkscape->desktops, new_desktop); g_signal_emit (G_OBJECT (inkscape), inkscape_signals[ACTIVATE_DESKTOP], 0, new_desktop); - g_signal_emit (G_OBJECT (inkscape), inkscape_signals[SET_EVENTCONTEXT], 0, sp_desktop_event_context (new_desktop)); + g_signal_emit (G_OBJECT (inkscape), inkscape_signals[SET_EVENTCONTEXT], 0, new_desktop->getEventContext()); g_signal_emit (G_OBJECT (inkscape), inkscape_signals[SET_SELECTION], 0, sp_desktop_selection (new_desktop)); g_signal_emit (G_OBJECT (inkscape), inkscape_signals[CHANGE_SELECTION], 0, sp_desktop_selection (new_desktop)); } else { @@ -1075,7 +1075,7 @@ inkscape_activate_desktop (SPDesktop * desktop) inkscape->desktops = g_slist_prepend (inkscape->desktops, desktop); g_signal_emit (G_OBJECT (inkscape), inkscape_signals[ACTIVATE_DESKTOP], 0, desktop); - g_signal_emit (G_OBJECT (inkscape), inkscape_signals[SET_EVENTCONTEXT], 0, sp_desktop_event_context (desktop)); + g_signal_emit (G_OBJECT (inkscape), inkscape_signals[SET_EVENTCONTEXT], 0, desktop->getEventContext()); g_signal_emit (G_OBJECT (inkscape), inkscape_signals[SET_SELECTION], 0, sp_desktop_selection (desktop)); g_signal_emit (G_OBJECT (inkscape), inkscape_signals[CHANGE_SELECTION], 0, sp_desktop_selection (desktop)); } @@ -1342,7 +1342,7 @@ SPEventContext * inkscape_active_event_context (void) { if (SP_ACTIVE_DESKTOP) { - return sp_desktop_event_context (SP_ACTIVE_DESKTOP); + return SP_ACTIVE_DESKTOP->getEventContext(); } return NULL; -- cgit v1.2.3 From f9a958922e109295c9f4f3c12e5716ebf07a6dad Mon Sep 17 00:00:00 2001 From: buliabyak <> Date: Sat, 28 Sep 2013 11:50:34 -0300 Subject: return value of g_utf16_to_utf8 was leaking here (bzr r12609) --- src/inkscape.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index e1cabd2d5..cce4ca5b9 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -1483,7 +1483,9 @@ profile_path(const char *filename) } if (prefdir) { - prefdir = g_build_filename(prefdir, INKSCAPE_PROFILE_DIR, NULL); + const char *prefdir_profile = g_build_filename(prefdir, INKSCAPE_PROFILE_DIR, NULL); + g_free((void *)prefdir); + prefdir = prefdir_profile; } } #endif -- cgit v1.2.3 From 6e867cb6aa8b44a3bb9f2dec4361c67cefc8ca8f Mon Sep 17 00:00:00 2001 From: buliabyak <> Date: Sat, 28 Sep 2013 16:20:27 -0300 Subject: effects don't need to merge into menus if we're running without gui; with this we can purge a redundant reading of menus skeleton, which leaked its xml tree (bzr r12616) --- src/inkscape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index cce4ca5b9..228841362 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -502,7 +502,7 @@ inkscape_init (SPObject * object) new (&inkscape->document_set) std::map(); new (&inkscape->selection_models) std::map(); - inkscape->menus = sp_repr_read_mem (_(menus_skeleton), MENUS_SKELETON_SIZE, NULL); + inkscape->menus = NULL; inkscape->desktops = NULL; inkscape->dialogs_toggle = TRUE; inkscape->mapalt = GDK_MOD1_MASK; -- cgit v1.2.3 From 55b451bf382e0c3d5ed8728e42fbb535acfa8a33 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Thu, 7 Nov 2013 21:44:00 +0100 Subject: First step of moving tools into appropriate namespaces. (bzr r12782) --- src/inkscape.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 228841362..8973c7b25 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -145,7 +145,7 @@ struct Inkscape::ApplicationClass { void (* change_subselection) (Inkscape::Application * inkscape, SPDesktop *desktop); void (* modify_selection) (Inkscape::Application * inkscape, Inkscape::Selection * selection, guint flags); void (* set_selection) (Inkscape::Application * inkscape, Inkscape::Selection * selection); - void (* set_eventcontext) (Inkscape::Application * inkscape, SPEventContext * eventcontext); + void (* set_eventcontext) (Inkscape::Application * inkscape, Inkscape::UI::Tools::ToolBase * eventcontext); void (* activate_desktop) (Inkscape::Application * inkscape, SPDesktop * desktop); void (* deactivate_desktop) (Inkscape::Application * inkscape, SPDesktop * desktop); void (* destroy_document) (Inkscape::Application *inkscape, SPDocument *doc); @@ -991,7 +991,7 @@ inkscape_selection_set (Inkscape::Selection * selection) void -inkscape_eventcontext_set (SPEventContext * eventcontext) +inkscape_eventcontext_set (Inkscape::UI::Tools::ToolBase * eventcontext) { g_return_if_fail (eventcontext != NULL); g_return_if_fail (SP_IS_EVENT_CONTEXT (eventcontext)); @@ -1338,7 +1338,7 @@ bool inkscape_is_sole_desktop_for_document(SPDesktop const &desktop) { return true; } -SPEventContext * +Inkscape::UI::Tools::ToolBase * inkscape_active_event_context (void) { if (SP_ACTIVE_DESKTOP) { -- cgit v1.2.3 From c04e30df241a3ee039077425bab9b9c37abe2854 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 9 Nov 2013 23:36:13 +0100 Subject: Moved and renamed some tool-related files. (bzr r12785) --- src/inkscape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 8973c7b25..8c4ba5695 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -51,7 +51,7 @@ #include "desktop-handles.h" #include "device-manager.h" #include "document.h" -#include "event-context.h" +#include "ui/tools/tool-base.h" #include "extension/db.h" #include "extension/init.h" #include "extension/output.h" -- cgit v1.2.3 From d8bca572c833841866ac4fd1cf1aef139a9b9fc0 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 23 Mar 2014 18:35:36 +0100 Subject: fix Windows build for newer gcc/libs (bzr r13190) --- src/inkscape.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 8c4ba5695..54451aba4 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -32,7 +32,10 @@ # define HAS_PROC_SELF_EXE //to get path of executable #else -#define _WIN32_IE 0x0400 +#if !defined(_WIN32_IE) || (_WIN32_IE < 0x0400) +# undef _WIN32_IE +# define _WIN32_IE 0x0400 +#endif //#define HAS_SHGetSpecialFolderPath #define HAS_SHGetSpecialFolderLocation #define HAS_GetModuleFileName -- cgit v1.2.3