summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
commitd2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch)
treee2703384779e83312c456399999997fcc289c5cf /src/ui/dialog
parentMerge branch 'master' into powerpencil (diff)
parentchange assignment to equality (diff)
downloadinkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz
inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/clonetiler.cpp15
-rw-r--r--src/ui/dialog/dialog.cpp2
-rw-r--r--src/ui/dialog/export.cpp10
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp50
-rw-r--r--src/ui/dialog/filedialogimpl-win32.cpp1
-rw-r--r--src/ui/dialog/grid-arrange-tab.cpp12
-rw-r--r--src/ui/dialog/icon-preview.cpp1
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp143
-rw-r--r--src/ui/dialog/inkscape-preferences.h3
-rw-r--r--src/ui/dialog/knot-properties.cpp2
-rw-r--r--src/ui/dialog/layer-properties.cpp2
-rw-r--r--src/ui/dialog/layers.cpp6
-rw-r--r--src/ui/dialog/livepatheffect-editor.cpp10
-rw-r--r--src/ui/dialog/lpe-powerstroke-properties.cpp2
-rw-r--r--src/ui/dialog/makefile.in17
-rw-r--r--src/ui/dialog/objects.cpp6
-rw-r--r--src/ui/dialog/objects.h3
-rw-r--r--src/ui/dialog/polar-arrange-tab.cpp2
-rw-r--r--src/ui/dialog/print.cpp3
-rw-r--r--src/ui/dialog/prototype.cpp2
-rw-r--r--src/ui/dialog/spellcheck.cpp87
-rw-r--r--src/ui/dialog/spellcheck.h11
-rw-r--r--src/ui/dialog/styledialog.cpp12
-rw-r--r--src/ui/dialog/symbols.cpp46
-rw-r--r--src/ui/dialog/symbols.h12
-rw-r--r--src/ui/dialog/tags.cpp14
-rw-r--r--src/ui/dialog/transformation.cpp2
-rw-r--r--src/ui/dialog/xml-tree.cpp2
28 files changed, 191 insertions, 287 deletions
diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp
index ad13ed8c4..71edcf259 100644
--- a/src/ui/dialog/clonetiler.cpp
+++ b/src/ui/dialog/clonetiler.cpp
@@ -1993,18 +1993,16 @@ void CloneTiler::remove(bool do_undo/* = true*/)
SPObject *parent = obj->parent;
// remove old tiling
- GSList *to_delete = NULL;
+ std::vector<SPObject *> to_delete;
for (auto& child: parent->children) {
if (is_a_clone_of (&child, obj)) {
- to_delete = g_slist_prepend (to_delete, &child);
+ to_delete.push_back(&child);
}
}
- for (GSList *i = to_delete; i; i = i->next) {
- SPObject *obj = reinterpret_cast<SPObject *>(i->data);
+ for (auto obj:to_delete) {
g_assert(obj != NULL);
obj->deleteObject();
}
- g_slist_free (to_delete);
change_selection (selection);
@@ -2639,11 +2637,10 @@ void CloneTiler::reset_recursive(GtkWidget *w)
}
if (GTK_IS_CONTAINER(w)) {
- GList *ch = gtk_container_get_children (GTK_CONTAINER(w));
- for (GList *i = ch; i != NULL; i = i->next) {
- reset_recursive (GTK_WIDGET(i->data));
+ std::vector<Gtk::Widget*> c = Glib::wrap(GTK_CONTAINER(w))->get_children();
+ for ( auto i : c ) {
+ reset_recursive(i->gobj());
}
- g_list_free (ch);
}
}
diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp
index 9037e8377..e50824c7b 100644
--- a/src/ui/dialog/dialog.cpp
+++ b/src/ui/dialog/dialog.cpp
@@ -257,7 +257,7 @@ bool Dialog::_onEvent(GdkEvent *event)
switch (event->type) {
case GDK_KEY_PRESS: {
- switch (Inkscape::UI::Tools::get_group0_keyval (&event->key)) {
+ switch (Inkscape::UI::Tools::get_latin_keyval (&event->key)) {
case GDK_KEY_Escape: {
_defocus();
ret = true;
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 56f3a29c0..d878b50a4 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -27,10 +27,6 @@
#include <gtkmm/grid.h>
#include <gtkmm/spinbutton.h>
-#ifdef WITH_GNOME_VFS
-# include <libgnomevfs/gnome-vfs-init.h> // gnome_vfs_initialized
-#endif
-
#include <glibmm/i18n.h>
#include <glibmm/miscutils.h>
@@ -1300,11 +1296,7 @@ void Export::onBrowse ()
_("_Save"), GTK_RESPONSE_ACCEPT,
NULL );
-#ifdef WITH_GNOME_VFS
- if (gnome_vfs_initialized()) {
- gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(fs), false);
- }
-#endif
+ gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(fs), false);
sp_transientize (fs);
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index b69e9ce97..64f6c98c6 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -31,10 +31,6 @@
#include "path-prefix.h"
#include "preferences.h"
-#ifdef WITH_GNOME_VFS
-#include <libgnomevfs/gnome-vfs.h>
-#endif
-
#include <gtkmm/expander.h>
#include <glibmm/convert.h>
@@ -663,11 +659,9 @@ void FileDialogBaseGtk::_updatePreviewCallback()
Glib::ustring fileName = get_preview_filename();
bool enabled = previewCheckbox.get_active();
-#ifdef WITH_GNOME_VFS
- if (fileName.empty() && gnome_vfs_initialized()) {
+ if (fileName.empty()) {
fileName = get_preview_uri();
}
-#endif
if (enabled && !fileName.empty()) {
svgPreview.set(fileName, _dialogType);
@@ -698,11 +692,7 @@ FileOpenDialogImplGtk::FileOpenDialogImplGtk(Gtk::Window &parentWindow, const Gl
set_select_multiple(true);
}
-#ifdef WITH_GNOME_VFS
- if (gnome_vfs_initialized()) {
- set_local_only(false);
- }
-#endif
+ set_local_only(false);
/* Initalize to Autodetect */
extension = NULL;
@@ -883,10 +873,11 @@ bool FileOpenDialogImplGtk::show()
extension = extensionMap[gtk_file_filter_get_name(filter)];
}
myFilename = get_filename();
-#ifdef WITH_GNOME_VFS
- if (myFilename.empty() && gnome_vfs_initialized())
+
+ if (myFilename.empty()) {
myFilename = get_uri();
-#endif
+ }
+
cleanup(true);
return true;
} else {
@@ -928,10 +919,10 @@ std::vector<Glib::ustring> FileOpenDialogImplGtk::getFilenames()
for (auto it : result_tmp)
result.push_back(it);
-#ifdef WITH_GNOME_VFS
- if (result.empty() && gnome_vfs_initialized())
+ if (result.empty()) {
result = get_uris();
-#endif
+ }
+
return result;
}
@@ -963,11 +954,7 @@ FileSaveDialogImplGtk::FileSaveDialogImplGtk(Gtk::Window &parentWindow, const Gl
/* One file at a time */
set_select_multiple(false);
-#ifdef WITH_GNOME_VFS
- if (gnome_vfs_initialized()) {
- set_local_only(false);
- }
-#endif
+ set_local_only(false);
/* Initalize to Autodetect */
extension = NULL;
@@ -1310,11 +1297,11 @@ void FileSaveDialogImplGtk::updateNameAndExtension()
{
// Pick up any changes the user has typed in.
Glib::ustring tmp = get_filename();
-#ifdef WITH_GNOME_VFS
- if (tmp.empty() && gnome_vfs_initialized()) {
+
+ if (tmp.empty()) {
tmp = get_uri();
}
-#endif
+
if (!tmp.empty()) {
myFilename = tmp;
}
@@ -1449,11 +1436,7 @@ FileExportDialogImpl::FileExportDialogImpl(Gtk::Window &parentWindow, const Glib
/* One file at a time */
set_select_multiple(false);
-#ifdef WITH_GNOME_VFS
- if (gnome_vfs_initialized()) {
- set_local_only(false);
- }
-#endif
+ set_local_only(false);
/* Initalize to Autodetect */
extension = NULL;
@@ -1634,11 +1617,10 @@ bool FileExportDialogImpl::show()
extension = type.extension;
}
myFilename = get_filename();
-#ifdef WITH_GNOME_VFS
- if (myFilename.empty() && gnome_vfs_initialized()) {
+
+ if (myFilename.empty()) {
myFilename = get_uri();
}
-#endif
/*
diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index 4fb8089ee..7f0bf58c5 100644
--- a/src/ui/dialog/filedialogimpl-win32.cpp
+++ b/src/ui/dialog/filedialogimpl-win32.cpp
@@ -1781,6 +1781,7 @@ void FileSaveDialogImplWin32::GetSaveFileName_thread()
ofn.lpstrFilter = _filter;
ofn.nFilterIndex = _filter_index;
ofn.lpfnHook = GetSaveFileName_hookproc;
+ ofn.lpstrDefExt = L"svg\0";
ofn.lCustData = (LPARAM)this;
_result = GetSaveFileNameW(&ofn) != 0;
diff --git a/src/ui/dialog/grid-arrange-tab.cpp b/src/ui/dialog/grid-arrange-tab.cpp
index 3cbc1b6e9..c16e60c5f 100644
--- a/src/ui/dialog/grid-arrange-tab.cpp
+++ b/src/ui/dialog/grid-arrange-tab.cpp
@@ -298,15 +298,14 @@ g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_h
std::vector<SPItem*>::iterator it = sorted.begin();
for (row_cnt=0; ((it != sorted.end()) && (row_cnt<NoOfRows)); ++row_cnt) {
- GSList *current_row = NULL;
+ std::vector<SPItem *> current_row;
col_cnt = 0;
for(;it!=sorted.end()&&col_cnt<NoOfCols;++it) {
- current_row = g_slist_append (current_row, *it);
+ current_row.push_back(*it);
col_cnt++;
}
- for (; current_row != NULL; current_row = current_row->next) {
- SPItem *item=SP_ITEM(current_row->data);
+ for (auto item:current_row) {
Inkscape::XML::Node *repr = item->getRepr();
Geom::OptRect b = item->documentVisualBounds();
Geom::Point min;
@@ -329,11 +328,10 @@ g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_h
Geom::Point move = Geom::Point(new_x - min[Geom::X], min[Geom::Y] - new_y);
Geom::Affine const affine = Geom::Affine(Geom::Translate(move));
item->set_i2d_affine(item->i2dt_affine() * affine);
- item->doWriteTransform(repr, item->transform, NULL);
- SP_OBJECT (current_row->data)->updateRepr();
+ item->doWriteTransform(item->transform);
+ item->updateRepr();
cnt +=1;
}
- g_slist_free (current_row);
}
DocumentUndo::done(desktop->getDocument(), SP_VERB_SELECTION_ARRANGE,
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index 991139aa8..f9cd8929a 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -18,7 +18,6 @@
#endif
#include <gtkmm/buttonbox.h>
-#include <boost/scoped_ptr.hpp>
#include <glibmm/i18n.h>
#include <glibmm/timer.h>
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index 2ccffd7bc..4aaa0cbe4 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -22,6 +22,8 @@
#include <glibmm/miscutils.h>
#include <glibmm/markup.h>
#include <gtkmm/main.h>
+#include <gtkmm/recentmanager.h>
+#include <gtkmm/recentinfo.h>
#include "preferences.h"
#include "verbs.h"
@@ -498,11 +500,20 @@ void InkscapePreferences::initPageTools()
_page_text.add_group_header( _("Text units"));
_font_unit_type.init( "/options/font/unitType", sizeLabels, sizeValues, G_N_ELEMENTS(sizeLabels), SP_CSS_UNIT_PT );
- _page_text.add_line( false, _("Text size unit type:"), _font_unit_type, "",
+ _page_text.add_line( true, _("Text size unit type:"), _font_unit_type, "",
_("Set the type of unit used in the text toolbar and text dialogs"), false);
_font_output_px.init ( _("Always output text size in pixels (px)"), "/options/font/textOutputPx", true);
// _page_text.add_line( false, "", _font_output_px, "", _("Always convert the text size units above into pixels (px) before saving to file"));
+ _page_text.add_group_header( _("Font directories"));
+ _font_fontsdir_system.init( _("Use Inkscape's fonts directory"), "/options/font/use_fontsdir_system", true);
+ _page_text.add_line( true, "", _font_fontsdir_system, "", _("Load additional fonts from \"fonts\" directory located in Inkscape's global \"share\" directory"));
+ _font_fontsdir_user.init( _("Use user's fonts directory"), "/options/font/use_fontsdir_user", true);
+ _page_text.add_line( true, "", _font_fontsdir_user, "", _("Load additional fonts from \"fonts\" directory located in Inkscape's user configuration directory"));
+ _font_fontdirs_custom.init("/options/font/custom_fontdirs", 50);
+ _page_text.add_line(true, _("Additional font directories"), _font_fontdirs_custom, "", _("Load additional fonts from custom locations (one path per line)"), true);
+
+
this->AddNewObjectsStyle(_page_text, "/tools/text");
//Spray
@@ -1959,12 +1970,7 @@ void InkscapePreferences::initPageSpellcheck()
static void appendList( Glib::ustring& tmp, const gchar* const*listing )
{
- bool first = true;
for (const gchar* const* ptr = listing; *ptr; ptr++) {
- if (!first) {
- tmp += " ";
- }
- first = false;
tmp += *ptr;
tmp += "\n";
}
@@ -1980,77 +1986,64 @@ void InkscapePreferences::initPageSystem()
_page_system.add_line( false, "", _misc_namedicon_delay, "",
_("When on, named icons will be rendered before displaying the ui. This is for working around bugs in GTK+ named icon notification"), true);
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- {
- // TRANSLATORS: following strings are paths in Inkscape preferences - Misc - System info
-
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-
- _page_system.add_group_header( _("System info"));
-
- _sys_user_config.set_text((char const *)Inkscape::IO::Resource::profile_path(""));
- _sys_user_config.set_editable(false);
- _page_system.add_line(true, _("User config: "), _sys_user_config, "", _("Location of users configuration"), true);
-
- _sys_user_prefs.set_text(prefs->getPrefsFilename());
- _sys_user_prefs.set_editable(false);
- _page_system.add_line(true, _("User preferences: "), _sys_user_prefs, "", _("Location of the users preferences file"), true);
+ _page_system.add_group_header( _("System info"));
- _sys_user_extension_dir.set_text((char const *)IO::Resource::get_path(IO::Resource::USER, IO::Resource::EXTENSIONS, ""));
- _sys_user_extension_dir.set_editable(false);
- _page_system.add_line(true, _("User extensions: "), _sys_user_extension_dir, "", _("Location of the users extensions"), true);
+ _sys_user_config.set_text((char const *)Inkscape::IO::Resource::profile_path(""));
+ _sys_user_config.set_editable(false);
+ _page_system.add_line(true, _("User config: "), _sys_user_config, "", _("Location of users configuration"), true);
- _sys_user_cache.set_text(g_get_user_cache_dir());
- _sys_user_cache.set_editable(false);
- _page_system.add_line(true, _("User cache: "), _sys_user_cache, "", _("Location of users cache"), true);
+ _sys_user_prefs.set_text(prefs->getPrefsFilename());
+ _sys_user_prefs.set_editable(false);
+ _page_system.add_line(true, _("User preferences: "), _sys_user_prefs, "", _("Location of the users preferences file"), true);
- Glib::ustring tmp_dir = prefs->getString("/options/autosave/path");
- if (tmp_dir.empty()) {
- tmp_dir = Glib::get_tmp_dir();
- }
- _sys_tmp_files.set_text(tmp_dir);
- _sys_tmp_files.set_editable(false);
- _page_system.add_line(true, _("Temporary files: "), _sys_tmp_files, "", _("Location of the temporary files used for autosave"), true);
-
- _sys_data.set_text( INKSCAPE_DATADIR );
- _sys_data.set_editable(false);
- _page_system.add_line(true, _("Inkscape data: "), _sys_data, "", _("Location of Inkscape data"), true);
-
- _sys_extension_dir.set_text(INKSCAPE_EXTENSIONDIR);
- _sys_extension_dir.set_editable(false);
- _page_system.add_line(true, _("Inkscape extensions: "), _sys_extension_dir, "", _("Location of the Inkscape extensions"), true);
-
- Glib::ustring tmp;
- appendList( tmp, g_get_system_data_dirs() );
- _sys_systemdata.get_buffer()->insert(_sys_systemdata.get_buffer()->end(), tmp);
- _sys_systemdata.set_editable(false);
- _sys_systemdata_scroll.add(_sys_systemdata);
- _sys_systemdata_scroll.set_size_request(0, 80);
- _sys_systemdata_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
- _page_system.add_line(true, _("System data: "), _sys_systemdata_scroll, "", _("Locations of system data"), true);
+ _sys_user_extension_dir.set_text((char const *)IO::Resource::get_path(IO::Resource::USER, IO::Resource::EXTENSIONS, ""));
+ _sys_user_extension_dir.set_editable(false);
+ _page_system.add_line(true, _("User extensions: "), _sys_user_extension_dir, "", _("Location of the users extensions"), true);
- {
- tmp = "";
- gchar** paths = 0;
- gint count = 0;
- gtk_icon_theme_get_search_path(gtk_icon_theme_get_default(), &paths, &count);
- if (count > 0) {
- tmp += paths[0];
- tmp += "\n";
- for (int i = 1; i < count; i++) {
- tmp += " ";
- tmp += paths[i];
- tmp += "\n";
- }
- }
- }
+ _sys_user_cache.set_text(g_get_user_cache_dir());
+ _sys_user_cache.set_editable(false);
+ _page_system.add_line(true, _("User cache: "), _sys_user_cache, "", _("Location of users cache"), true);
- _sys_icon.get_buffer()->insert(_sys_icon.get_buffer()->end(), tmp);
+ Glib::ustring tmp_dir = prefs->getString("/options/autosave/path");
+ if (tmp_dir.empty()) {
+ tmp_dir = Glib::get_tmp_dir();
}
+ _sys_tmp_files.set_text(tmp_dir);
+ _sys_tmp_files.set_editable(false);
+ _page_system.add_line(true, _("Temporary files: "), _sys_tmp_files, "", _("Location of the temporary files used for autosave"), true);
+
+ _sys_data.set_text( INKSCAPE_DATADIR );
+ _sys_data.set_editable(false);
+ _page_system.add_line(true, _("Inkscape data: "), _sys_data, "", _("Location of Inkscape data"), true);
+
+ _sys_extension_dir.set_text(INKSCAPE_EXTENSIONDIR);
+ _sys_extension_dir.set_editable(false);
+ _page_system.add_line(true, _("Inkscape extensions: "), _sys_extension_dir, "", _("Location of the Inkscape extensions"), true);
+
+ Glib::ustring tmp;
+ appendList( tmp, g_get_system_data_dirs() );
+ _sys_systemdata.get_buffer()->insert(_sys_systemdata.get_buffer()->end(), tmp);
+ _sys_systemdata.set_editable(false);
+ _sys_systemdata_scroll.add(_sys_systemdata);
+ _sys_systemdata_scroll.set_size_request(100, 80);
+ _sys_systemdata_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
+ _sys_systemdata_scroll.set_shadow_type(Gtk::SHADOW_IN);
+ _page_system.add_line(true, _("System data: "), _sys_systemdata_scroll, "", _("Locations of system data"), true);
+
+ tmp = "";
+ gchar** paths = 0;
+ gint count = 0;
+ gtk_icon_theme_get_search_path(gtk_icon_theme_get_default(), &paths, &count);
+ appendList( tmp, paths );
+ g_strfreev(paths);
+ _sys_icon.get_buffer()->insert(_sys_icon.get_buffer()->end(), tmp);
_sys_icon.set_editable(false);
_sys_icon_scroll.add(_sys_icon);
- _sys_icon_scroll.set_size_request(0, 80);
+ _sys_icon_scroll.set_size_request(100, 80);
_sys_icon_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
+ _sys_icon_scroll.set_shadow_type(Gtk::SHADOW_IN);
_page_system.add_line(true, _("Icon theme: "), _sys_icon_scroll, "", _("Locations of icon themes"), true);
this->AddPage(_page_system, _("System"), PREFS_PAGE_SYSTEM);
@@ -2097,21 +2090,15 @@ bool InkscapePreferences::PresentPage(const Gtk::TreeModel::iterator& iter)
void InkscapePreferences::on_reset_open_recent_clicked()
{
- GtkRecentManager* manager = gtk_recent_manager_get_default();
- GList* recent_list = gtk_recent_manager_get_items(manager);
- GList* element;
- GError* error;
+ Glib::RefPtr<Gtk::RecentManager> manager = Gtk::RecentManager::get_default();
+ std::vector< Glib::RefPtr< Gtk::RecentInfo > > recent_list = manager->get_items();
//Remove only elements that were added by Inkscape
- for (element = g_list_first(recent_list); element; element = g_list_next(element)){
- error = NULL;
- GtkRecentInfo* info = (GtkRecentInfo*) element->data;
- if (gtk_recent_info_has_application(info, g_get_prgname())){
- gtk_recent_manager_remove_item(manager, gtk_recent_info_get_uri(info), &error);
+ for (auto e : recent_list) {
+ if (e->has_application(g_get_prgname())) {
+ manager->remove_item(e->get_uri());
}
- gtk_recent_info_unref (info);
}
- g_list_free(recent_list);
}
void InkscapePreferences::on_pagelist_selection_changed()
diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h
index 50465a9ec..a197a8e65 100644
--- a/src/ui/dialog/inkscape-preferences.h
+++ b/src/ui/dialog/inkscape-preferences.h
@@ -328,6 +328,9 @@ protected:
UI::Widget::PrefCheckButton _font_dialog;
UI::Widget::PrefCombo _font_unit_type;
UI::Widget::PrefCheckButton _font_output_px;
+ UI::Widget::PrefCheckButton _font_fontsdir_system;
+ UI::Widget::PrefCheckButton _font_fontsdir_user;
+ UI::Widget::PrefMultiEntry _font_fontdirs_custom;
UI::Widget::PrefCheckButton _misc_comment;
UI::Widget::PrefCheckButton _misc_default_metadata;
diff --git a/src/ui/dialog/knot-properties.cpp b/src/ui/dialog/knot-properties.cpp
index b094dc0e7..29e1cb2bb 100644
--- a/src/ui/dialog/knot-properties.cpp
+++ b/src/ui/dialog/knot-properties.cpp
@@ -151,7 +151,7 @@ KnotPropertiesDialog::_close()
bool KnotPropertiesDialog::_handleKeyEvent(GdkEventKey * /*event*/)
{
- /*switch (get_group0_keyval(event)) {
+ /*switch (get_latin_keyval(event)) {
case GDK_KEY_Return:
case GDK_KEY_KP_Enter: {
_apply();
diff --git a/src/ui/dialog/layer-properties.cpp b/src/ui/dialog/layer-properties.cpp
index 562484022..4ab6e130e 100644
--- a/src/ui/dialog/layer-properties.cpp
+++ b/src/ui/dialog/layer-properties.cpp
@@ -290,7 +290,7 @@ SPObject* LayerPropertiesDialog::_selectedLayer()
bool LayerPropertiesDialog::_handleKeyEvent(GdkEventKey *event)
{
- switch (Inkscape::UI::Tools::get_group0_keyval(event)) {
+ switch (Inkscape::UI::Tools::get_latin_keyval(event)) {
case GDK_KEY_Return:
case GDK_KEY_KP_Enter: {
_strategy->perform(*this);
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp
index 3c99d1461..6223bd627 100644
--- a/src/ui/dialog/layers.cpp
+++ b/src/ui/dialog/layers.cpp
@@ -542,7 +542,7 @@ void LayersPanel::_toggled( Glib::ustring const& str, int targetCol )
bool LayersPanel::_handleKeyEvent(GdkEventKey *event)
{
- switch (Inkscape::UI::Tools::get_group0_keyval(event)) {
+ switch (Inkscape::UI::Tools::get_latin_keyval(event)) {
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_F2: {
@@ -713,12 +713,12 @@ void LayersPanel::_doTreeMove( )
{
if (_dnd_source && _dnd_source->getRepr() ) {
if(!_dnd_target){
- _dnd_source->doWriteTransform(_dnd_source->getRepr(), _dnd_source->i2doc_affine() * _dnd_source->document->getRoot()->i2doc_affine().inverse());
+ _dnd_source->doWriteTransform(_dnd_source->i2doc_affine() * _dnd_source->document->getRoot()->i2doc_affine().inverse());
}else{
SPItem* parent = _dnd_into ? _dnd_target : dynamic_cast<SPItem*>(_dnd_target->parent);
if(parent){
Geom::Affine move = _dnd_source->i2doc_affine() * parent->i2doc_affine().inverse();
- _dnd_source->doWriteTransform(_dnd_source->getRepr(), move);
+ _dnd_source->doWriteTransform(move);
}
}
_dnd_source->moveTo(_dnd_target, _dnd_into);
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index 98789f7b2..28a42929b 100644
--- a/src/ui/dialog/livepatheffect-editor.cpp
+++ b/src/ui/dialog/livepatheffect-editor.cpp
@@ -206,9 +206,11 @@ LivePathEffectEditor::showParams(LivePathEffect::Effect& effect)
if (defaultswidget) {
Gtk::Expander * expander = NULL;
std::vector<Gtk::Widget *> childs = dynamic_cast<Gtk::Box *> (effectwidget)->get_children();
- std::vector<Gtk::Widget *> childs_default = dynamic_cast<Gtk::Box *> (childs[childs.size()-1])->get_children();
- if ((expander = dynamic_cast<Gtk::Expander *>(childs_default[childs_default.size()-1]))){
- expanderopen = expander->get_expanded();
+ if (childs.size()) {
+ std::vector<Gtk::Widget *> childs_default = dynamic_cast<Gtk::Box *> (childs[childs.size()-1])->get_children();
+ if ((expander = dynamic_cast<Gtk::Expander *>(childs_default[childs_default.size()-1]))){
+ expanderopen = expander->get_expanded();
+ }
}
}
effectcontrol_vbox.remove(*effectwidget);
@@ -473,7 +475,7 @@ LivePathEffectEditor::onAdd()
item = NULL;
// run sp_selection_clone_original_path_lpe
- sel->cloneOriginalPathLPE();
+ sel->cloneOriginalPathLPE(true);
SPItem *new_item = sel->singleItem();
// Check that the cloning was successful. We don't want to change the ID of the original referenced path!
diff --git a/src/ui/dialog/lpe-powerstroke-properties.cpp b/src/ui/dialog/lpe-powerstroke-properties.cpp
index 9bd98c7c0..e66229dcd 100644
--- a/src/ui/dialog/lpe-powerstroke-properties.cpp
+++ b/src/ui/dialog/lpe-powerstroke-properties.cpp
@@ -146,7 +146,7 @@ PowerstrokePropertiesDialog::_close()
bool PowerstrokePropertiesDialog::_handleKeyEvent(GdkEventKey * /*event*/)
{
- /*switch (get_group0_keyval(event)) {
+ /*switch (get_latin_keyval(event)) {
case GDK_KEY_Return:
case GDK_KEY_KP_Enter: {
_apply();
diff --git a/src/ui/dialog/makefile.in b/src/ui/dialog/makefile.in
deleted file mode 100644
index 805c48aef..000000000
--- a/src/ui/dialog/makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Convenience stub makefile to call the real Makefile.
-
-@SET_MAKE@
-
-OBJEXT = @OBJEXT@
-
-# Explicit so that it's the default rule.
-all:
- cd ../.. && $(MAKE) ui/dialog/all
-
-clean %.a %.$(OBJEXT):
- cd ../.. && $(MAKE) ui/dialog/$@
-
-.PHONY: all clean
-
-.SUFFIXES:
-.SUFFIXES: .a .$(OBJEXT)
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp
index 1e0ab9604..b50d68239 100644
--- a/src/ui/dialog/objects.cpp
+++ b/src/ui/dialog/objects.cpp
@@ -148,8 +148,8 @@ public:
_pnl->_objectsChanged( _obj );
}
}
- virtual void notifyContentChanged( Node &/*node*/, Util::ptr_shared<char> /*old_content*/, Util::ptr_shared<char> /*new_content*/ ) {}
- virtual void notifyAttributeChanged( Node &/*node*/, GQuark name, Util::ptr_shared<char> /*old_value*/, Util::ptr_shared<char> /*new_value*/ ) {
+ virtual void notifyContentChanged( Node &/*node*/, Util::ptr_shared /*old_content*/, Util::ptr_shared /*new_content*/ ) {}
+ virtual void notifyAttributeChanged( Node &/*node*/, GQuark name, Util::ptr_shared /*old_value*/, Util::ptr_shared /*new_value*/ ) {
if ( _pnl && _obj ) {
if ( name == _lockedAttr || name == _labelAttr || name == _highlightAttr || name == _groupAttr || name == _styleAttr || name == _clipAttr || name == _maskAttr ) {
_pnl->_updateObject(_obj, name == _highlightAttr);
@@ -735,7 +735,7 @@ bool ObjectsPanel::_handleKeyEvent(GdkEventKey *event)
// handle events for the treeview
bool empty = _desktop->selection->isEmpty();
- switch (Inkscape::UI::Tools::get_group0_keyval(event)) {
+ switch (Inkscape::UI::Tools::get_latin_keyval(event)) {
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
{
diff --git a/src/ui/dialog/objects.h b/src/ui/dialog/objects.h
index b7fd1b4f8..8ad1b15ef 100644
--- a/src/ui/dialog/objects.h
+++ b/src/ui/dialog/objects.h
@@ -16,7 +16,6 @@
# include <config.h>
#endif
-#include <boost/scoped_ptr.hpp>
#include <gtkmm/box.h>
#include <gtkmm/treeview.h>
#include <gtkmm/treestore.h>
@@ -168,7 +167,7 @@ private:
Gtk::Box _blur_vbox;
Gtk::Dialog _colorSelectorDialog;
- boost::scoped_ptr<Inkscape::UI::SelectedColor> _selectedColor;
+ std::unique_ptr<Inkscape::UI::SelectedColor> _selectedColor;
//Methods:
diff --git a/src/ui/dialog/polar-arrange-tab.cpp b/src/ui/dialog/polar-arrange-tab.cpp
index 2b4550d20..75e1a56b8 100644
--- a/src/ui/dialog/polar-arrange-tab.cpp
+++ b/src/ui/dialog/polar-arrange-tab.cpp
@@ -140,7 +140,7 @@ static void rotateAround(SPItem *item, Geom::Point center, Geom::Rotate const &r
center = item->getCenter();
item->set_i2d_affine(item->i2dt_affine() * affine);
- item->doWriteTransform(item->getRepr(), item->transform);
+ item->doWriteTransform(item->transform);
if(item->isCenterSet())
{
diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp
index 4d248fd09..532a8c364 100644
--- a/src/ui/dialog/print.cpp
+++ b/src/ui/dialog/print.cpp
@@ -26,7 +26,6 @@
#include "util/units.h"
#include "helper/png-write.h"
#include "svg/svg-color.h"
-#include "io/sys.h"
#include <glibmm/i18n.h>
@@ -52,7 +51,7 @@ static void draw_page(GtkPrintOperation *,
std::string tmp_base = "inkscape-print-png-XXXXXX";
int tmp_fd;
- if ( (tmp_fd = Inkscape::IO::file_open_tmp (tmp_png, tmp_base)) >= 0) {
+ if ( (tmp_fd = Glib::file_open_tmp(tmp_png, tmp_base)) >= 0) {
close(tmp_fd);
guint32 bgcolor = 0x00000000;
diff --git a/src/ui/dialog/prototype.cpp b/src/ui/dialog/prototype.cpp
index b3bf60aab..b7c9f7abf 100644
--- a/src/ui/dialog/prototype.cpp
+++ b/src/ui/dialog/prototype.cpp
@@ -22,6 +22,8 @@ namespace Inkscape {
namespace UI {
namespace Dialog {
+// Note that in order for a dialog to be restored, it must be listed in SPDesktop::show_dialogs().
+
Prototype::Prototype() :
// UI::Widget::Panel("Prototype Label", "/dialogs/prototype", SP_VERB_DIALOG_PROTOTYPE,
// "Prototype Apply Label", true),
diff --git a/src/ui/dialog/spellcheck.cpp b/src/ui/dialog/spellcheck.cpp
index 4f7657f4f..3318b5e6b 100644
--- a/src/ui/dialog/spellcheck.cpp
+++ b/src/ui/dialog/spellcheck.cpp
@@ -50,8 +50,6 @@ namespace Dialog {
SpellCheck::SpellCheck (void) :
UI::Widget::Panel ("", "/dialogs/spellcheck/", SP_VERB_DIALOG_SPELLCHECK),
- _rects(NULL),
- _seen_objects(NULL),
_text(NULL),
_layout(NULL),
_stops(0),
@@ -196,12 +194,11 @@ void SpellCheck::setTargetDesktop(SPDesktop *desktop)
void SpellCheck::clearRects()
{
- for (GSList *it = _rects; it; it = it->next) {
- sp_canvas_item_hide(SP_CANVAS_ITEM(it->data));
- sp_canvas_item_destroy(SP_CANVAS_ITEM(it->data));
+ for(auto t : _rects) {
+ sp_canvas_item_hide(t);
+ sp_canvas_item_destroy(t);
}
- g_slist_free(_rects);
- _rects = NULL;
+ _rects.clear();
}
void SpellCheck::disconnect()
@@ -214,47 +211,39 @@ void SpellCheck::disconnect()
}
}
-GSList *SpellCheck::allTextItems (SPObject *r, GSList *l, bool hidden, bool locked)
+void SpellCheck::allTextItems (SPObject *r, std::vector<SPItem *> &l, bool hidden, bool locked)
{
if (!desktop)
- return l; // no desktop to check
+ return; // no desktop to check
if (SP_IS_DEFS(r))
- return l; // we're not interested in items in defs
+ return; // we're not interested in items in defs
if (!strcmp(r->getRepr()->name(), "svg:metadata")) {
- return l; // we're not interested in metadata
+ return; // we're not interested in metadata
}
for (auto& child: r->children) {
if (SP_IS_ITEM (&child) && !child.cloned && !desktop->isLayer(SP_ITEM(&child))) {
if ((hidden || !desktop->itemIsHidden(SP_ITEM(&child))) && (locked || !SP_ITEM(&child)->isLocked())) {
if (SP_IS_TEXT(&child) || SP_IS_FLOWTEXT(&child))
- l = g_slist_prepend (l, &child);
+ l.push_back(static_cast<SPItem*>(&child));
}
}
- l = allTextItems (&child, l, hidden, locked);
+ allTextItems (&child, l, hidden, locked);
}
- return l;
+ return;
}
bool
SpellCheck::textIsValid (SPObject *root, SPItem *text)
{
- GSList *l = NULL;
- l = allTextItems (root, l, false, true);
- for (GSList *i = l; i; i = i->next) {
- SPItem *item = static_cast<SPItem *>(i->data);
- if (item == text) {
- g_slist_free (l);
- return true;
- }
- }
- g_slist_free (l);
- return false;
+ std::vector<SPItem*> l;
+ allTextItems (root, l, false, true);
+ return (std::find(l.begin(), l.end(), text) != l.end());
}
-gint SpellCheck::compareTextBboxes (gconstpointer a, gconstpointer b)
+bool SpellCheck::compareTextBboxes (gconstpointer a, gconstpointer b)//returns a<b
{
SPItem *i1 = SP_ITEM(a);
SPItem *i2 = SP_ITEM(b);
@@ -262,41 +251,28 @@ gint SpellCheck::compareTextBboxes (gconstpointer a, gconstpointer b)
Geom::OptRect bbox1 = i1->desktopVisualBounds();
Geom::OptRect bbox2 = i2->desktopVisualBounds();
if (!bbox1 || !bbox2) {
- return 0;
+ return false;
}
// vector between top left corners
Geom::Point diff = Geom::Point(bbox2->min()[Geom::X], bbox2->max()[Geom::Y]) -
Geom::Point(bbox1->min()[Geom::X], bbox1->max()[Geom::Y]);
- // sort top to bottom, left to right, but:
- // if i2 is higher only 0.2 or less times it is righter than i1, put i1 first
- if (diff[Geom::Y] > 0.2 * diff[Geom::X])
- return 1;
- else
- return -1;
-
- return 0;
+ return diff[Geom::Y] == 0 ? (diff[Geom::X] < 0) : (diff[Geom::Y] < 0);
}
// We regenerate and resort the list every time, because user could have changed it while the
// dialog was waiting
SPItem *SpellCheck::getText (SPObject *root)
{
- GSList *l = NULL;
- l = allTextItems (root, l, false, true);
- l = g_slist_sort(l, (GCompareFunc)SpellCheck::compareTextBboxes);
-
- for (GSList *i = l; i; i = i->next) {
- SPItem *item = static_cast<SPItem *>(i->data);
- if (!g_slist_find (_seen_objects, item)) {
- _seen_objects = g_slist_prepend(_seen_objects, item);
- g_slist_free(l);
+ std::vector<SPItem*> l;
+ allTextItems (root, l, false, true);
+ std::sort(l.begin(),l.end(),SpellCheck::compareTextBboxes);
+
+ for (auto item:l) {
+ if(_seen_objects.insert(item).second)
return item;
- }
}
-
- g_slist_free(l);
return NULL;
}
@@ -402,8 +378,7 @@ SpellCheck::init(SPDesktop *d)
_root = desktop->getDocument()->getRoot();
// empty the list of objects we've checked
- g_slist_free (_seen_objects);
- _seen_objects = NULL;
+ _seen_objects.clear();
// grab first text
nextText();
@@ -456,8 +431,7 @@ SpellCheck::finished ()
g_free(label);
}
- g_slist_free(_seen_objects);
- _seen_objects = NULL;
+ _seen_objects.clear();
desktop = NULL;
_root = NULL;
@@ -615,7 +589,7 @@ SpellCheck::nextWord()
curve->lineto(area.corner(0));
sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(rect), curve);
sp_canvas_item_show(rect);
- _rects = g_slist_prepend(_rects, rect);
+ _rects.push_back(rect);
// scroll to make it all visible
Geom::Point const center = desktop->get_display_area().midpoint();
@@ -707,10 +681,10 @@ SpellCheck::nextWord()
void
SpellCheck::deleteLastRect ()
{
- if (_rects) {
- sp_canvas_item_hide(SP_CANVAS_ITEM(_rects->data));
- sp_canvas_item_destroy(SP_CANVAS_ITEM(_rects->data));
- _rects = _rects->next; // pop latest-prepended rect
+ if (!_rects.empty()) {
+ sp_canvas_item_hide(_rects.back());
+ sp_canvas_item_destroy(_rects.back());
+ _rects.pop_back(); // pop latest-prepended rect
}
}
@@ -861,7 +835,6 @@ SpellCheck::onStart ()
}
}
-
/*
Local Variables:
mode:c++
diff --git a/src/ui/dialog/spellcheck.h b/src/ui/dialog/spellcheck.h
index 834f23c24..e7563ad1e 100644
--- a/src/ui/dialog/spellcheck.h
+++ b/src/ui/dialog/spellcheck.h
@@ -16,6 +16,9 @@
# include <config.h>
#endif
+#include <vector>
+#include <set>
+
#include <gtkmm/box.h>
#include <gtkmm/button.h>
#include <gtkmm/buttonbox.h>
@@ -68,7 +71,7 @@ private:
/**
* Returns a list of all the text items in the SPObject
*/
- GSList *allTextItems (SPObject *r, GSList *l, bool hidden, bool locked);
+ void allTextItems (SPObject *r, std::vector<SPItem *> &l, bool hidden, bool locked);
/**
* Is text inside the SPOject's tree
@@ -78,7 +81,7 @@ private:
/**
* Compare the visual bounds of 2 SPItems referred to by a and b
*/
- static gint compareTextBboxes (gconstpointer a, gconstpointer b);
+ static bool compareTextBboxes (gconstpointer a, gconstpointer b);
SPItem *getText (SPObject *root);
void nextText ();
@@ -165,12 +168,12 @@ private:
/**
* list of canvasitems (currently just rects) that mark misspelled things on canvas
*/
- GSList *_rects;
+ std::vector<SPCanvasItem *> _rects;
/**
* list of text objects we have already checked in this session
*/
- GSList *_seen_objects;
+ std::set<SPItem *> _seen_objects;
/**
* the object currently being checked
diff --git a/src/ui/dialog/styledialog.cpp b/src/ui/dialog/styledialog.cpp
index aa453e8e8..60138fa89 100644
--- a/src/ui/dialog/styledialog.cpp
+++ b/src/ui/dialog/styledialog.cpp
@@ -56,8 +56,8 @@ public:
};
virtual void notifyContentChanged(Inkscape::XML::Node &node,
- Inkscape::Util::ptr_shared<char> old_content,
- Inkscape::Util::ptr_shared<char> new_content);
+ Inkscape::Util::ptr_shared old_content,
+ Inkscape::Util::ptr_shared new_content);
StyleDialog * _styleDialog;
};
@@ -66,8 +66,8 @@ public:
void
StyleDialog::NodeObserver::notifyContentChanged(
Inkscape::XML::Node &/*node*/,
- Inkscape::Util::ptr_shared<char> /*old_content*/,
- Inkscape::Util::ptr_shared<char> /*new_content*/ ) {
+ Inkscape::Util::ptr_shared /*old_content*/,
+ Inkscape::Util::ptr_shared /*new_content*/ ) {
#ifdef DEBUG_STYLEDIALOG
std::cout << "StyleDialog::NodeObserver::notifyContentChanged" << std::endl;
@@ -111,8 +111,8 @@ public:
virtual void notifyAttributeChanged( Inkscape::XML::Node &node,
GQuark qname,
- Util::ptr_shared<char> /*old_value*/,
- Util::ptr_shared<char> /*new_value*/ ) {
+ Util::ptr_shared /*old_value*/,
+ Util::ptr_shared /*new_value*/ ) {
if ( _styleDialog && _repr ) {
// For the moment only care about attributes that are directly used in selectors.
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index b876fa98c..558b0b19e 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -617,52 +617,48 @@ void SymbolsDialog::get_symbols() {
}
}
-GSList* SymbolsDialog::symbols_in_doc_recursive (SPObject *r, GSList *l)
+void SymbolsDialog::symbols_in_doc_recursive (SPObject *r, std::vector<SPSymbol*> &l)
{
- g_return_val_if_fail(r != NULL, l);
+ if(!r) return;
// Stop multiple counting of same symbol
if ( dynamic_cast<SPUse *>(r) ) {
- return l;
+ return;
}
if ( dynamic_cast<SPSymbol *>(r) ) {
- l = g_slist_prepend (l, r);
+ l.push_back(dynamic_cast<SPSymbol *>(r));
}
for (auto& child: r->children) {
- l = symbols_in_doc_recursive( &child, l );
+ symbols_in_doc_recursive( &child, l );
}
-
- return l;
}
-GSList* SymbolsDialog::symbols_in_doc( SPDocument* symbolDocument ) {
+std::vector<SPSymbol*> SymbolsDialog::symbols_in_doc( SPDocument* symbolDocument )
+{
- GSList *l = NULL;
- l = symbols_in_doc_recursive (symbolDocument->getRoot(), l );
- l = g_slist_reverse( l );
+ std::vector<SPSymbol*> l;
+ symbols_in_doc_recursive (symbolDocument->getRoot(), l );
return l;
}
-GSList* SymbolsDialog::use_in_doc_recursive (SPObject *r, GSList *l)
+void SymbolsDialog::use_in_doc_recursive (SPObject *r, std::vector<SPUse*> &l)
{
if ( dynamic_cast<SPUse *>(r) ) {
- l = g_slist_prepend (l, r);
+ l.push_back(dynamic_cast<SPUse *>(r));
}
for (auto& child: r->children) {
- l = use_in_doc_recursive( &child, l );
+ use_in_doc_recursive( &child, l );
}
-
- return l;
}
-GSList* SymbolsDialog::use_in_doc( SPDocument* useDocument ) {
+std::vector<SPUse*> SymbolsDialog::use_in_doc( SPDocument* useDocument ) {
- GSList *l = NULL;
- l = use_in_doc_recursive (useDocument->getRoot(), l );
+ std::vector<SPUse*> l;
+ use_in_doc_recursive (useDocument->getRoot(), l);
return l;
}
@@ -671,10 +667,8 @@ GSList* SymbolsDialog::use_in_doc( SPDocument* useDocument ) {
gchar const* SymbolsDialog::style_from_use( gchar const* id, SPDocument* document) {
gchar const* style = 0;
- GSList* l = use_in_doc( document );
- for( ; l != NULL; l = l->next ) {
- SPObject *obj = reinterpret_cast<SPObject *>(l->data);
- SPUse *use = dynamic_cast<SPUse *>(obj);
+ std::vector<SPUse*> l = use_in_doc( document );
+ for( auto use:l ) {
if ( use ) {
gchar const *href = use->getRepr()->attribute("xlink:href");
if( href ) {
@@ -693,10 +687,8 @@ gchar const* SymbolsDialog::style_from_use( gchar const* id, SPDocument* documen
void SymbolsDialog::add_symbols( SPDocument* symbolDocument ) {
- GSList* l = symbols_in_doc( symbolDocument );
- for( ; l != NULL; l = l->next ) {
- SPObject *obj = reinterpret_cast<SPObject *>(l->data);
- SPSymbol *symbol = dynamic_cast<SPSymbol *>(obj);
+ std::vector<SPSymbol*> l = symbols_in_doc( symbolDocument );
+ for(auto symbol:l) {
if (symbol) {
add_symbol( symbol );
}
diff --git a/src/ui/dialog/symbols.h b/src/ui/dialog/symbols.h
index 5dc1e3cad..747e5c6c9 100644
--- a/src/ui/dialog/symbols.h
+++ b/src/ui/dialog/symbols.h
@@ -14,10 +14,10 @@
#define INKSCAPE_UI_DIALOG_SYMBOLS_H
#include "display/drawing.h"
-
#include "ui/dialog/desktop-tracker.h"
-
#include "ui/widget/panel.h"
+#include "sp-symbol.h"
+#include "sp-use.h"
#include <vector>
@@ -85,10 +85,10 @@ private:
void add_symbol( SPObject* symbol_document );
SPDocument* symbols_preview_doc();
- GSList* symbols_in_doc_recursive(SPObject *r, GSList *l);
- GSList* symbols_in_doc( SPDocument* document );
- GSList* use_in_doc_recursive(SPObject *r, GSList *l);
- GSList* use_in_doc( SPDocument* document );
+ void symbols_in_doc_recursive(SPObject *r, std::vector<SPSymbol*> &l);
+ std::vector<SPSymbol*> symbols_in_doc( SPDocument* document );
+ void use_in_doc_recursive(SPObject *r, std::vector<SPUse*> &l);
+ std::vector<SPUse*> use_in_doc( SPDocument* document );
gchar const* style_from_use( gchar const* id, SPDocument* document);
Glib::RefPtr<Gdk::Pixbuf> draw_symbol(SPObject *symbol);
diff --git a/src/ui/dialog/tags.cpp b/src/ui/dialog/tags.cpp
index 176719995..ae45654a7 100644
--- a/src/ui/dialog/tags.cpp
+++ b/src/ui/dialog/tags.cpp
@@ -106,8 +106,8 @@ public:
_pnl->_objectsChanged( _obj );
}
}
- virtual void notifyContentChanged( Node &/*node*/, Util::ptr_shared<char> /*old_content*/, Util::ptr_shared<char> /*new_content*/ ) {}
- virtual void notifyAttributeChanged( Node &/*node*/, GQuark name, Util::ptr_shared<char> /*old_value*/, Util::ptr_shared<char> /*new_value*/ ) {
+ virtual void notifyContentChanged( Node &/*node*/, Util::ptr_shared /*old_content*/, Util::ptr_shared /*new_content*/ ) {}
+ virtual void notifyAttributeChanged( Node &/*node*/, GQuark name, Util::ptr_shared /*old_value*/, Util::ptr_shared /*new_value*/ ) {
if ( _pnl && _obj ) {
if ( name == _labelAttr ) {
_pnl->_updateObject( _obj);
@@ -522,7 +522,7 @@ void TagsPanel::_checkTreeSelection()
bool TagsPanel::_handleKeyEvent(GdkEventKey *event)
{
- switch (Inkscape::UI::Tools::get_group0_keyval(event)) {
+ switch (Inkscape::UI::Tools::get_latin_keyval(event)) {
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_F2: {
@@ -1103,14 +1103,6 @@ void TagsPanel::setDesktop( SPDesktop* desktop )
setDocument(_desktop, _desktop->doc());
}
}
-/*
- GSList const *layers = _desktop->doc()->getResourceList( "layer" );
- g_message( "layers list starts at %p", layers );
- for ( GSList const *iter=layers ; iter ; iter = iter->next ) {
- SPObject *layer=static_cast<SPObject *>(iter->data);
- g_message(" {%s} [%s]", layer->id, layer->label() );
- }
-*/
deskTrack.setBase(desktop);
}
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index 5ad1b9ec5..8713e6ddc 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -727,7 +727,7 @@ void Transformation::applyPageScale(Inkscape::Selection *selection)
Geom::Affine scaler = get_scale_transform_for_variable_stroke (*bbox_pref, *bbox_geom, transform_stroke, preserve, x0, y0, x1, y1);
item->set_i2d_affine(item->i2dt_affine() * scaler);
- item->doWriteTransform(item->getRepr(), item->transform);
+ item->doWriteTransform(item->transform);
}
}
} else {
diff --git a/src/ui/dialog/xml-tree.cpp b/src/ui/dialog/xml-tree.cpp
index 83c0de45b..c245890bc 100644
--- a/src/ui/dialog/xml-tree.cpp
+++ b/src/ui/dialog/xml-tree.cpp
@@ -856,7 +856,7 @@ void XmlTree::on_document_uri_set(gchar const * /*uri*/, SPDocument * /*document
gboolean XmlTree::quit_on_esc (GtkWidget *w, GdkEventKey *event, GObject */*tbl*/)
{
- switch (Inkscape::UI::Tools::get_group0_keyval (event)) {
+ switch (Inkscape::UI::Tools::get_latin_keyval (event)) {
case GDK_KEY_Escape: // defocus
gtk_widget_destroy(w);
return TRUE;