diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-20 18:45:52 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-20 18:45:52 +0000 |
| commit | 10af9131e03df0227458285b59ed1425d15b52b5 (patch) | |
| tree | 835b89f653c157ba1f176e7b02aabeb0498d49f2 /src | |
| parent | Removed author on request (diff) | |
| parent | Drop obsolete wrapper around Glib::file_open_tmp (diff) | |
| download | inkscape-10af9131e03df0227458285b59ed1425d15b52b5.tar.gz inkscape-10af9131e03df0227458285b59ed1425d15b52b5.zip | |
Merge branch 'cleanups' of gitlab.com:stfacc/inkscape
Diffstat (limited to 'src')
51 files changed, 37 insertions, 1117 deletions
diff --git a/src/2geom/makefile.in b/src/2geom/makefile.in deleted file mode 100644 index ca7943377..000000000 --- a/src/2geom/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) 2geom/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) 2geom/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 09d6d25d4..72d984845 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -325,7 +325,6 @@ set(inkscape_SRC guide-snapper.h help.h helper-fns.h - icon-size.h id-clash.h inkscape-version.h inkscape.h diff --git a/src/check-header-compile.in b/src/check-header-compile.in deleted file mode 100755 index 2295dcf91..000000000 --- a/src/check-header-compile.in +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/sh -# Check that each .h file has all the includes it needs. - -# Probably requires gnu find (for -printf '%P\n'). - -# This script hereby placed into the public domain. - -set -e -mydir=`dirname "$0"` -cd "$mydir" -srcdir="@srcdir@" -CXX="@CXX@" -INCLUDES="@GNOME_VFS_CFLAGS@ @POPPLER_GLIB_CFLAGS@ @INKSCAPE_CFLAGS@" -OBJEXT="@OBJEXT@" -config_h_dir=.. - -check_compile () { - (echo "#include <config.h>"; echo "#include <$1>"; echo "int header_tst_dummy;") > header-tst.cpp - $CXX -c -I. -I"$srcdir" -I$config_h_dir $INCLUDES header-tst.cpp -} - -if [ $# = 0 ]; then - for i in `find "$srcdir" \ - -name bonobo -prune \ - -o -name dom -prune \ - -o -name ecma -prune \ - -o -name render -prune \ - -o -name xpath -prune \ - -o -name '*.h' \ - \! -name gnome.h \! -name nr-type-gnome.h \! -name Livarot.h \! -name radial.h \ - \! -name '*-test.h' \ - \! -name test-helpers.h \ - \! -name PylogFormatter.h \ - \! -name TRPIFormatter.h \ - \! -name win32.h \ - \! -name '*-w32.h' \ - \! -name '*-win32.h' \ - -printf '%P\n'` - do - check_compile "$i" - done -else - for i in "$@"; do - check_compile "$i" - done -fi -rm header-tst.cpp header-tst.$OBJEXT diff --git a/src/debug/makefile.in b/src/debug/makefile.in deleted file mode 100644 index 542f3a999..000000000 --- a/src/debug/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) debug/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) debug/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/display/makefile.in b/src/display/makefile.in deleted file mode 100644 index 747f18e11..000000000 --- a/src/display/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) display/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) display/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/extension/implementation/makefile.in b/src/extension/implementation/makefile.in deleted file mode 100644 index d54ea1d3a..000000000 --- a/src/extension/implementation/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) extension/implementation/all - -clean %.a %.$(OBJEXT): - cd ../.. && $(MAKE) extension/implementation/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index 8da56fecd..2901655f1 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -32,7 +32,6 @@ #include "extension/input.h" #include "extension/db.h" #include "inkscape.h" -#include "io/sys.h" #include "io/resource.h" #include "preferences.h" #include "script.h" @@ -398,7 +397,7 @@ ScriptDocCache::ScriptDocCache (Inkscape::UI::View::View * view) : _tempfd(0) { try { - _tempfd = Inkscape::IO::file_open_tmp(_filename, "ink_ext_XXXXXX.svg"); + _tempfd = Glib::file_open_tmp(_filename, "ink_ext_XXXXXX.svg"); } catch (...) { /// \todo Popup dialog here return; @@ -462,7 +461,7 @@ Gtk::Widget *Script::prefs_output(Inkscape::Extension::Output *module) \param filename File to open. First things first, this function needs a temporary file name. To - create on of those the function g_file_open_tmp is used with + create on of those the function Glib::file_open_tmp is used with the header of ink_ext_. The extension is then executed using the 'execute' function @@ -483,7 +482,7 @@ SPDocument *Script::open(Inkscape::Extension::Input *module, std::string tempfilename_out; int tempfd_out = 0; try { - tempfd_out = Inkscape::IO::file_open_tmp(tempfilename_out, "ink_ext_XXXXXX.svg"); + tempfd_out = Glib::file_open_tmp(tempfilename_out, "ink_ext_XXXXXX.svg"); } catch (...) { /// \todo Popup dialog here return NULL; @@ -513,7 +512,7 @@ SPDocument *Script::open(Inkscape::Extension::Input *module, mydoc->changeUriAndHrefs(filenameArg); } - // make sure we don't leak file descriptors from g_file_open_tmp + // make sure we don't leak file descriptors from Glib::file_open_tmp close(tempfd_out); unlink(tempfilename_out.c_str()); @@ -539,7 +538,7 @@ SPDocument *Script::open(Inkscape::Extension::Input *module, do that eh? First things first, the document is saved to a temporary file that - is an SVG file. To get the temporary filename g_file_open_tmp is used with + is an SVG file. To get the temporary filename Glib::file_open_tmp is used with ink_ext_ as a prefix. Don't worry, this file gets deleted at the end of the function. @@ -558,7 +557,7 @@ void Script::save(Inkscape::Extension::Output *module, std::string tempfilename_in; int tempfd_in = 0; try { - tempfd_in = Inkscape::IO::file_open_tmp(tempfilename_in, "ink_ext_XXXXXX.svg"); + tempfd_in = Glib::file_open_tmp(tempfilename_in, "ink_ext_XXXXXX.svg"); } catch (...) { /// \todo Popup dialog here throw Inkscape::Extension::Output::save_failed(); @@ -587,7 +586,7 @@ void Script::save(Inkscape::Extension::Output *module, success = fileout.toFile(lfilename); } - // make sure we don't leak file descriptors from g_file_open_tmp + // make sure we don't leak file descriptors from Glib::file_open_tmp close(tempfd_in); // FIXME: convert to utf8 (from "filename encoding") and unlink_utf8name unlink(tempfilename_in.c_str()); @@ -609,7 +608,7 @@ void Script::save(Inkscape::Extension::Output *module, This function is a little bit trickier than the previous two. It needs two temporary files to get it's work done. Both of these - files have random names created for them using the g_file_open_temp function + files have random names created for them using the Glib::file_open_temp function with the ink_ext_ prefix in the temporary directory. Like the other functions, the temporary files are deleted at the end. @@ -667,7 +666,7 @@ void Script::effect(Inkscape::Extension::Effect *module, std::string tempfilename_out; int tempfd_out = 0; try { - tempfd_out = Inkscape::IO::file_open_tmp(tempfilename_out, "ink_ext_XXXXXX.svg"); + tempfd_out = Glib::file_open_tmp(tempfilename_out, "ink_ext_XXXXXX.svg"); } catch (...) { /// \todo Popup dialog here return; @@ -740,7 +739,7 @@ void Script::effect(Inkscape::Extension::Effect *module, pump_events(); - // make sure we don't leak file descriptors from g_file_open_tmp + // make sure we don't leak file descriptors from Glib::file_open_tmp close(tempfd_out); g_unlink(tempfilename_out.c_str()); diff --git a/src/extension/implementation/xslt.cpp b/src/extension/implementation/xslt.cpp index 94852a98e..d11283db7 100644 --- a/src/extension/implementation/xslt.cpp +++ b/src/extension/implementation/xslt.cpp @@ -16,13 +16,13 @@ #include <config.h> #endif +#include <glibmm/fileutils.h> #include "file.h" #include "xslt.h" #include "../extension.h" #include "../output.h" #include "extension/input.h" -#include "io/sys.h" #include "io/resource.h" #include <unistd.h> #include <cstring> @@ -175,7 +175,7 @@ void XSLT::save(Inkscape::Extension::Output *module, SPDocument *doc, gchar cons std::string tempfilename_out; int tempfd_out = 0; try { - tempfd_out = Inkscape::IO::file_open_tmp(tempfilename_out, "ink_ext_XXXXXX"); + tempfd_out = Glib::file_open_tmp(tempfilename_out, "ink_ext_XXXXXX"); } catch (...) { /// \todo Popup dialog here return; diff --git a/src/extension/internal/makefile.in b/src/extension/internal/makefile.in deleted file mode 100644 index 466309a8f..000000000 --- a/src/extension/internal/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) extension/internal/all - -clean %.a %.$(OBJEXT): - cd ../.. && $(MAKE) extension/internal/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/extension/makefile.in b/src/extension/makefile.in deleted file mode 100644 index 5f19ccaa3..000000000 --- a/src/extension/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) extension/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) extension/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/filters/makefile.in b/src/filters/makefile.in deleted file mode 100644 index 5aa76ce1b..000000000 --- a/src/filters/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) filters/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) filters/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/helper/makefile.in b/src/helper/makefile.in deleted file mode 100644 index 7f40f58bc..000000000 --- a/src/helper/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) helper/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) helper/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/icon-size.h b/src/icon-size.h deleted file mode 100644 index 8058e8da8..000000000 --- a/src/icon-size.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef SEEN_ICON_SIZE_H -#define SEEN_ICON_SIZE_H - -/* - * Generic icon widget - * - * Author: - * Lauris Kaplinski <lauris@kaplinski.com> - * - * Copyright (C) 2002 Lauris Kaplinski - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#include <gtk/gtk.h> - -namespace Inkscape { - - enum IconSize { - ICON_SIZE_INVALID = ::GTK_ICON_SIZE_INVALID, - ICON_SIZE_MENU = ::GTK_ICON_SIZE_MENU, - ICON_SIZE_SMALL_TOOLBAR = ::GTK_ICON_SIZE_SMALL_TOOLBAR, - ICON_SIZE_LARGE_TOOLBAR = ::GTK_ICON_SIZE_LARGE_TOOLBAR, - ICON_SIZE_BUTTON = ::GTK_ICON_SIZE_BUTTON, - ICON_SIZE_DND = ::GTK_ICON_SIZE_DND, - ICON_SIZE_DIALOG = ::GTK_ICON_SIZE_DIALOG, - ICON_SIZE_DECORATION - }; -} // namespace Inkscape - -#endif // SEEN_ICON_SIZE_H diff --git a/src/io/makefile.in b/src/io/makefile.in deleted file mode 100644 index 74148f11a..000000000 --- a/src/io/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) io/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) io/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/io/sys.cpp b/src/io/sys.cpp index 833dee437..2ff17cdc9 100644 --- a/src/io/sys.cpp +++ b/src/io/sys.cpp @@ -18,7 +18,6 @@ #include <fstream> #include <glib.h> #include <glib/gstdio.h> -#include <glibmm/fileutils.h> #include <glibmm/ustring.h> #include <gtk/gtk.h> @@ -107,26 +106,6 @@ int Inkscape::IO::mkdir_utf8name( char const *utf8name ) return retval; } -/* - * Wrapper around Glib::file_open_tmp(). - * Returns a handle to the temp file. - * name_used contains the actual name used (a raw filename, not necessarily utf8). - * - * Returns: - * A file handle (as from open()) to the file opened for reading and writing. - * The file is opened in binary mode on platforms where there is a difference. - * The file handle should be closed with close(). - * - * Note: - * On Windows Vista Glib::file_open_tmp fails with the current version of glibmm - * A special case is implemented for WIN32. This can be removed if the issue is fixed - * in future versions of glibmm - * */ -int Inkscape::IO::file_open_tmp(std::string& name_used, const std::string& prefix) -{ - return Glib::file_open_tmp(name_used, prefix); -} - bool Inkscape::IO::file_test( char const *utf8name, GFileTest test ) { bool exists = false; diff --git a/src/io/sys.h b/src/io/sys.h index 78d25afa3..e349fc09c 100644 --- a/src/io/sys.h +++ b/src/io/sys.h @@ -32,8 +32,6 @@ FILE *fopen_utf8name( char const *utf8name, char const *mode ); int mkdir_utf8name( char const *utf8name ); -int file_open_tmp( std::string& name_used, const std::string& prefix ); - bool file_test( char const *utf8name, GFileTest test ); bool file_directory_exists( char const *utf8name ); diff --git a/src/libcroco/makefile.in b/src/libcroco/makefile.in deleted file mode 100644 index 554670f45..000000000 --- a/src/libcroco/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) libcroco/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) libcroco/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/libdepixelize/makefile.in b/src/libdepixelize/makefile.in deleted file mode 100644 index 51d020db1..000000000 --- a/src/libdepixelize/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) libdepixelize/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) libdepixelize/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/libuemf/makefile.in b/src/libuemf/makefile.in deleted file mode 100644 index f1a595e1d..000000000 --- a/src/libuemf/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) libuemf/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) libuemf/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/livarot/makefile.in b/src/livarot/makefile.in deleted file mode 100644 index f92015275..000000000 --- a/src/livarot/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) livarot/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) livarot/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/live_effects/makefile.in b/src/live_effects/makefile.in deleted file mode 100644 index 8a4da813b..000000000 --- a/src/live_effects/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) live_effects/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) live_effects/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/live_effects/parameter/makefile.in b/src/live_effects/parameter/makefile.in deleted file mode 100644 index af48c8e7a..000000000 --- a/src/live_effects/parameter/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) live_effects/parameter/all - -clean %.a %.$(OBJEXT): - cd ../.. && $(MAKE) live_effects/parameter/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/live_effects/parameter/originalitemarray.cpp b/src/live_effects/parameter/originalitemarray.cpp index 830d8aa90..f45de4ad8 100644 --- a/src/live_effects/parameter/originalitemarray.cpp +++ b/src/live_effects/parameter/originalitemarray.cpp @@ -19,7 +19,6 @@ #include <glibmm/i18n.h> #include "inkscape.h" -#include "icon-size.h" #include "ui/clipboard.h" #include "svg/svg.h" #include "svg/stringstream.h" diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp index 4535b6aa5..a98c91770 100644 --- a/src/live_effects/parameter/originalpatharray.cpp +++ b/src/live_effects/parameter/originalpatharray.cpp @@ -23,7 +23,6 @@ #include <glibmm/i18n.h> #include "inkscape.h" -#include "icon-size.h" #include "ui/clipboard.h" #include "svg/svg.h" #include "svg/stringstream.h" diff --git a/src/live_effects/parameter/togglebutton.h b/src/live_effects/parameter/togglebutton.h index 4d043b340..c5f8a3c28 100644 --- a/src/live_effects/parameter/togglebutton.h +++ b/src/live_effects/parameter/togglebutton.h @@ -12,7 +12,6 @@ #include <sigc++/signal.h> #include "live_effects/parameter/parameter.h" -#include "icon-size.h" #include "ui/widget/registered-widget.h" namespace Inkscape { diff --git a/src/svg/makefile.in b/src/svg/makefile.in deleted file mode 100644 index a906fc7c4..000000000 --- a/src/svg/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) svg/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) svg/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/trace/makefile.in b/src/trace/makefile.in deleted file mode 100644 index 8c2bfd912..000000000 --- a/src/trace/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) trace/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) trace/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/ui/cache/makefile.in b/src/ui/cache/makefile.in deleted file mode 100644 index af45adb0f..000000000 --- a/src/ui/cache/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/cache/all - -clean %.a %.$(OBJEXT): - cd ../.. && $(MAKE) ui/cache/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) 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/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/interface.cpp b/src/ui/interface.cpp index f6a353b33..4f1e5cd6f 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -110,8 +110,7 @@ static GtkTargetEntry *completeDropTargets = 0; static int completeDropTargetsCount = 0; static bool temporarily_block_actions = false; -#define ENTRIES_SIZE(n) sizeof(n)/sizeof(n[0]) -static guint nui_drop_target_entries = ENTRIES_SIZE(ui_drop_target_entries); +static guint nui_drop_target_entries = G_N_ELEMENTS(ui_drop_target_entries); static void sp_ui_import_files(gchar *buffer); static void sp_ui_import_one_file(char const *filename); static void sp_ui_import_one_file_with_check(gpointer filename, gpointer unused); diff --git a/src/ui/makefile.in b/src/ui/makefile.in deleted file mode 100644 index f8a407592..000000000 --- a/src/ui/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/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) ui/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/ui/tool/control-point-selection.h b/src/ui/tool/control-point-selection.h index f122a468d..ec845b1b3 100644 --- a/src/ui/tool/control-point-selection.h +++ b/src/ui/tool/control-point-selection.h @@ -20,7 +20,6 @@ #include <2geom/forward.h> #include <2geom/point.h> #include <2geom/rect.h> -#include "util/accumulators.h" #include "util/unordered-containers.h" #include "ui/tool/commit-events.h" #include "ui/tool/manipulator.h" diff --git a/src/ui/tool/control-point.h b/src/ui/tool/control-point.h index 4a01b9f21..bc1f060cd 100644 --- a/src/ui/tool/control-point.h +++ b/src/ui/tool/control-point.h @@ -18,7 +18,6 @@ #include <2geom/point.h> #include "ui/control-types.h" -#include "util/accumulators.h" #include "display/sodipodi-ctrl.h" #include "enums.h" @@ -76,8 +75,6 @@ namespace UI { */ class ControlPoint : boost::noncopyable, public sigc::trackable { public: - typedef Inkscape::Util::ReverseInterruptible RInt; - typedef Inkscape::Util::Interruptible Int; /** * Enumeration representing the possible states of the control point, used to determine @@ -162,15 +159,6 @@ public: void transferGrab(ControlPoint *from, GdkEventMotion *event); /// @} - /// @name Receive notifications about control point events - /// @{ - /*sigc::signal<void, Geom::Point const &, Geom::Point &, GdkEventMotion*> signal_dragged; - sigc::signal<bool, GdkEventButton*>::accumulated<RInt> signal_clicked; - sigc::signal<bool, GdkEventButton*>::accumulated<RInt> signal_doubleclicked; - sigc::signal<bool, GdkEventMotion*>::accumulated<Int> signal_grabbed; - sigc::signal<void, GdkEventButton*> signal_ungrabbed;*/ - /// @} - /// @name Inspect the state of the control point /// @{ State state() const { return _state; } diff --git a/src/ui/view/makefile.in b/src/ui/view/makefile.in deleted file mode 100644 index 0fe15637a..000000000 --- a/src/ui/view/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/view/all - -clean %.a %.$(OBJEXT): - cd ../.. && $(MAKE) ui/view/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/ui/widget/makefile.in b/src/ui/widget/makefile.in deleted file mode 100644 index e479d7031..000000000 --- a/src/ui/widget/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/widget/all - -clean %.a %.$(OBJEXT): - cd ../.. && $(MAKE) ui/widget/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 9332fe0f9..aea9b7e8e 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -24,7 +24,6 @@ #include <glibmm/i18n.h> #include "panel.h" -#include "icon-size.h" #include "preferences.h" #include "desktop.h" diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index 5d911e9d2..d9b93f6db 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -107,8 +107,7 @@ static const GtkTargetEntry ui_drop_target_entries [] = { {"application/x-color", 0, APP_X_COLOR} }; -#define ENTRIES_SIZE(n) sizeof(n)/sizeof(n[0]) -static guint nui_drop_target_entries = ENTRIES_SIZE(ui_drop_target_entries); +static guint nui_drop_target_entries = G_N_ELEMENTS(ui_drop_target_entries); /* convenience function */ static Dialog::FillAndStroke *get_fill_and_stroke_panel(SPDesktop *desktop); diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index 9680b6377..b8c61e2fe 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -10,8 +10,6 @@ set(util_SRC # ------- # Headers - accumulators.h - compose.hpp copy.h ege-appear-time-tracker.h ege-tags.h diff --git a/src/util/accumulators.h b/src/util/accumulators.h deleted file mode 100644 index 2cd51b101..000000000 --- a/src/util/accumulators.h +++ /dev/null @@ -1,113 +0,0 @@ -/** @file - * Frequently used accumulators for use with libsigc++ - */ -/* Authors: - * Krzysztof KosiĆski <tweenk.pl@gmail.com> - * - * Copyright (C) 2009 Authors - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#ifndef SEEN_UTIL_ACCUMULATORS_H -#define SEEN_UTIL_ACCUMULATORS_H - -#include <iterator> - -namespace Inkscape { -namespace Util { - -/** - * Accumulator which evaluates slots in reverse connection order. - * The slot that was connected last is evaluated first. - */ -struct Reverse { - typedef void result_type; - template <typename T_iterator> - result_type operator()(T_iterator first, T_iterator last) const { - while (first != last) *(--last); - } -}; - -/** - * Accumulator type for interruptible signals. Slots return a boolean value; emission - * is stopped when true is returned from a slot. - */ -struct Interruptible { - typedef bool result_type; - template <typename T_iterator> - result_type operator()(T_iterator first, T_iterator last) const { - for (; first != last; ++first) - if (*first) return true; - return false; - } -}; - -/** - * Same as Interruptible, but the slots are called in reverse order of connection, - * e.g. the slot that was connected last is evaluated first. - */ -struct ReverseInterruptible { - typedef bool result_type; - template <typename T_iterator> - result_type operator()(T_iterator first, T_iterator last) const { - while (first != last) { - if (*(--last)) return true; - } - return false; - } -}; - -/** - * The template parameter specifies how many slots from the beginning of the list - * should be evaluated after other slots. Useful for signals which invoke other signals - * once complete. Undefined results if the signal does not have at least @c num_chained - * slots before first emission. - * - * For example, if template param = 3, the execution order is as follows: - * @verbatim - 8. 1. 2. 3. 4. 5. 6. 7. - S1 S2 S3 S4 S5 S6 S7 S8 @endverbatim - */ -template <unsigned num_chained = 1> -struct Chained { - typedef void result_type; - template <typename T_iterator> - result_type operator()(T_iterator first, T_iterator last) const { - T_iterator save_first = first; - // ARGH, iterator_traits is not defined for slot iterators! - //std::advance(first, num_chained); - for (unsigned i = 0; i < num_chained && first != last; ++i) ++first; - for (; first != last; ++first) *first; - for (unsigned i = 0; i < num_chained && save_first != last; ++i, ++save_first) - *save_first; - } -}; - -/** - * Executes a logical OR on the results from slots. - */ -struct LogicalOr { - typedef bool result_type; - template <typename T_iterator> - result_type operator()(T_iterator first, T_iterator last) const { - bool ret = false; - for (; first != last; ++first) ret |= *first; - return ret; - } -}; - -} // namespace Util -} // namespace Inkscape - -#endif - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/compose.hpp b/src/util/compose.hpp deleted file mode 100644 index b3f410c8e..000000000 --- a/src/util/compose.hpp +++ /dev/null @@ -1,393 +0,0 @@ -/* Defines String::compose(fmt, arg...) for easy, i18n-friendly - * composition of strings. - * - * Version 1.0. - * - * Copyright (c) 2002 Ole Laursen <olau@hardworking.dk>. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA. - */ - -// -// Basic usage is like -// -// std::cout << String::compose("This is a %1x%2 matrix.", rows, cols); -// -// See http://www.cs.aau.dk/~olau/compose/ or the included README.compose for -// more details. -// - -#ifndef STRING_COMPOSE_H -#define STRING_COMPOSE_H - -#include <sstream> -#include <string> -#include <list> -#include <map> // for multimap - -namespace StringPrivate -{ - // the actual composition class - using string::compose is cleaner, so we - // hide it here - class Composition - { - public: - // initialize and prepare format string on the form "text %1 text %2 etc." - explicit Composition(std::string fmt); - - // supply an replacement argument starting from %1 - template <typename T> - Composition &arg(const T &obj); - - // compose and return string - std::string str() const; - - private: - std::ostringstream os; - int arg_no; - - // we store the output as a list - when the output string is requested, the - // list is concatenated to a string; this way we can keep iterators into - // the list instead of into a string where they're possibly invalidated on - // inserting a specification string - typedef std::list<std::string> output_list; - output_list output; - - // the initial parse of the format string fills in the specification map - // with positions for each of the various %?s - typedef std::multimap<int, output_list::iterator> specification_map; - specification_map specs; - }; - - // helper for converting spec string numbers - inline int char_to_int(char c) - { - switch (c) { - case '0': return 0; - case '1': return 1; - case '2': return 2; - case '3': return 3; - case '4': return 4; - case '5': return 5; - case '6': return 6; - case '7': return 7; - case '8': return 8; - case '9': return 9; - default: return -1000; - } - } - - inline bool is_number(int n) - { - switch (n) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - return true; - - default: - return false; - } - } - - - // implementation of class Composition - template <typename T> - inline Composition &Composition::arg(const T &obj) - { - os << obj; - - std::string rep = os.str(); - - if (!rep.empty()) { // manipulators don't produce output - for (specification_map::const_iterator i = specs.lower_bound(arg_no), - end = specs.upper_bound(arg_no); i != end; ++i) { - output_list::iterator pos = i->second; - ++pos; - - output.insert(pos, rep); - } - - os.str(std::string()); - //os.clear(); - ++arg_no; - } - - return *this; - } - - inline Composition::Composition(std::string fmt) - : arg_no(1) - { - std::string::size_type b = 0, i = 0; - - // fill in output with the strings between the %1 %2 %3 etc. and - // fill in specs with the positions - while (i < fmt.length()) { - if (fmt[i] == '%' && i + 1 < fmt.length()) { - if (fmt[i + 1] == '%') { // catch %% - fmt.replace(i, 2, "%"); - ++i; - } - else if (is_number(fmt[i + 1])) { // aha! a spec! - // save string - output.push_back(fmt.substr(b, i - b)); - - int n = 1; // number of digits - int spec_no = 0; - - do { - spec_no += char_to_int(fmt[i + n]); - spec_no *= 10; - ++n; - } while (i + n < fmt.length() && is_number(fmt[i + n])); - - spec_no /= 10; - output_list::iterator pos = output.end(); - --pos; // safe since we have just inserted a string> - - specs.insert(specification_map::value_type(spec_no, pos)); - - // jump over spec string - i += n; - b = i; - } - else - ++i; - } - else - ++i; - } - - if (i - b > 0) // add the rest of the string - output.push_back(fmt.substr(b, i - b)); - } - - inline std::string Composition::str() const - { - // assemble string - std::string str; - - for (output_list::const_iterator i = output.begin(), end = output.end(); - i != end; ++i) - str += *i; - - return str; - } -} - -// now for the real thing(s) -namespace String -{ - // a series of functions which accept a format string on the form "text %1 - // more %2 less %3" and a number of templated parameters and spits out the - // composited string - template <typename T1> - inline std::string compose(const std::string &fmt, const T1 &o1) - { - StringPrivate::Composition c(fmt); - c.arg(o1); - return c.str(); - } - - template <typename T1, typename T2> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2); - return c.str(); - } - - template <typename T1, typename T2, typename T3> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5, const T6 &o6) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5, const T6 &o6, - const T7 &o7) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5, const T6 &o6, - const T7 &o7, const T8 &o8) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5, const T6 &o6, - const T7 &o7, const T8 &o8, const T9 &o9) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9, typename T10> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5, const T6 &o6, - const T7 &o7, const T8 &o8, const T9 &o9, - const T10 &o10) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9) - .arg(o10); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9, typename T10, - typename T11> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5, const T6 &o6, - const T7 &o7, const T8 &o8, const T9 &o9, - const T10 &o10, const T11 &o11) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9) - .arg(o10).arg(o11); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9, typename T10, - typename T11, typename T12> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5, const T6 &o6, - const T7 &o7, const T8 &o8, const T9 &o9, - const T10 &o10, const T11 &o11, const T12 &o12) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9) - .arg(o10).arg(o11).arg(o12); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9, typename T10, - typename T11, typename T12, typename T13> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5, const T6 &o6, - const T7 &o7, const T8 &o8, const T9 &o9, - const T10 &o10, const T11 &o11, const T12 &o12, - const T13 &o13) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9) - .arg(o10).arg(o11).arg(o12).arg(o13); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9, typename T10, - typename T11, typename T12, typename T13, typename T14> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5, const T6 &o6, - const T7 &o7, const T8 &o8, const T9 &o9, - const T10 &o10, const T11 &o11, const T12 &o12, - const T13 &o13, const T14 &o14) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9) - .arg(o10).arg(o11).arg(o12).arg(o13).arg(o14); - return c.str(); - } - - template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9, typename T10, - typename T11, typename T12, typename T13, typename T14, - typename T15> - inline std::string compose(const std::string &fmt, - const T1 &o1, const T2 &o2, const T3 &o3, - const T4 &o4, const T5 &o5, const T6 &o6, - const T7 &o7, const T8 &o8, const T9 &o9, - const T10 &o10, const T11 &o11, const T12 &o12, - const T13 &o13, const T14 &o14, const T15 &o15) - { - StringPrivate::Composition c(fmt); - c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9) - .arg(o10).arg(o11).arg(o12).arg(o13).arg(o14).arg(o15); - return c.str(); - } -} - - -#endif // STRING_COMPOSE_H diff --git a/src/util/makefile.in b/src/util/makefile.in deleted file mode 100644 index fc4870075..000000000 --- a/src/util/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) util/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) util/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/widgets/button.h b/src/widgets/button.h index 94a956de3..680ccb79d 100644 --- a/src/widgets/button.h +++ b/src/widgets/button.h @@ -18,7 +18,6 @@ #include <gtk/gtk.h> #include <sigc++/connection.h> -#include "icon-size.h" struct SPAction; diff --git a/src/widgets/ege-adjustment-action.cpp b/src/widgets/ege-adjustment-action.cpp index fc72f00c7..597c697cb 100644 --- a/src/widgets/ege-adjustment-action.cpp +++ b/src/widgets/ege-adjustment-action.cpp @@ -48,7 +48,6 @@ #include <gtkmm/radiomenuitem.h> #include <gdk/gdkkeysyms.h> -#include "icon-size.h" #include "widgets/ege-adjustment-action.h" #include "gimp/gimpspinscale.h" #include "ui/icon-names.h" diff --git a/src/widgets/ink-action.h b/src/widgets/ink-action.h index 99786c878..396e4838b 100644 --- a/src/widgets/ink-action.h +++ b/src/widgets/ink-action.h @@ -2,7 +2,6 @@ #define SEEN_INK_ACTION #include <gtk/gtk.h> -#include "icon-size.h" #include "attributes.h" /* Equivalent to GTK Actions of the same type, but can support Inkscape SVG icons */ diff --git a/src/widgets/ink-toggle-action.cpp b/src/widgets/ink-toggle-action.cpp index c091a2e0d..200d0d558 100644 --- a/src/widgets/ink-toggle-action.cpp +++ b/src/widgets/ink-toggle-action.cpp @@ -51,9 +51,9 @@ static void ink_toggle_action_class_init( InkToggleActionClass* klass ) g_param_spec_int( "iconSize", "Icon Size", "The size the icon", - (int)Inkscape::ICON_SIZE_MENU, + GTK_ICON_SIZE_MENU, (int)99, - (int)Inkscape::ICON_SIZE_SMALL_TOOLBAR, + GTK_ICON_SIZE_SMALL_TOOLBAR, (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) ); g_type_class_add_private( klass, sizeof(InkToggleActionClass) ); diff --git a/src/widgets/ink-toggle-action.h b/src/widgets/ink-toggle-action.h index 9130b9f9f..f329f57a6 100644 --- a/src/widgets/ink-toggle-action.h +++ b/src/widgets/ink-toggle-action.h @@ -4,7 +4,6 @@ #include <gtk/gtk.h> #include "attributes.h" -#include "icon-size.h" G_BEGIN_DECLS #define INK_TOGGLE_ACTION_TYPE ( ink_toggle_action_get_type() ) diff --git a/src/widgets/makefile.in b/src/widgets/makefile.in deleted file mode 100644 index 5b756ebf3..000000000 --- a/src/widgets/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) widgets/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) widgets/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/widgets/toolbox.h b/src/widgets/toolbox.h index 09178ec2f..afa382e5b 100644 --- a/src/widgets/toolbox.h +++ b/src/widgets/toolbox.h @@ -15,7 +15,6 @@ #include <glibmm/ustring.h> -#include "icon-size.h" #include "preferences.h" #define TOOLBAR_SLIDER_HINT "full" diff --git a/src/xml/makefile.in b/src/xml/makefile.in deleted file mode 100644 index 376b4c218..000000000 --- a/src/xml/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) xml/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) xml/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp index d8e0f5418..f4b86a140 100644 --- a/src/xml/repr-io.cpp +++ b/src/xml/repr-io.cpp @@ -67,11 +67,6 @@ static void sp_repr_write_stream_element(Node *repr, Writer &out, gchar const *old_href_abs_base, gchar const *new_href_abs_base); -#ifdef HAVE_LIBWMF -static xmlDocPtr sp_wmf_convert (const char * file_name); -static char * sp_wmf_image_name (void * context); -#endif /* HAVE_LIBWMF */ - class XmlSource { @@ -323,19 +318,18 @@ int XmlSource::close() } /** - * Reads XML from a file, including WMF files, and returns the Document. + * Reads XML from a file, and returns the Document. * The default namespace can also be specified, if desired. */ Document *sp_repr_read_file (const gchar * filename, const gchar *default_ns) { - // g_warning( "Reading file: %s", filename ); xmlDocPtr doc = 0; Document * rdoc = 0; xmlSubstituteEntitiesDefault(1); - g_return_val_if_fail (filename != NULL, NULL); - if (!Inkscape::IO::file_test( filename, G_FILE_TEST_EXISTS )) { + g_return_val_if_fail(filename != NULL, NULL); + if (!Inkscape::IO::file_test(filename, G_FILE_TEST_EXISTS)) { g_warning("Can't open file: %s (doesn't exist)", filename); return NULL; } @@ -348,45 +342,32 @@ Document *sp_repr_read_file (const gchar * filename, const gchar *default_ns) gsize bytesWritten = 0; GError* error = NULL; // TODO: need to replace with our own fopen and reading - gchar* localFilename = g_filename_from_utf8 ( filename, - -1, &bytesRead, &bytesWritten, &error); - g_return_val_if_fail( localFilename != NULL, NULL ); - - Inkscape::IO::dump_fopen_call( filename, "N" ); + gchar* localFilename = g_filename_from_utf8(filename, -1, &bytesRead, &bytesWritten, &error); + g_return_val_if_fail(localFilename != NULL, NULL); -#ifdef HAVE_LIBWMF - if (strlen (localFilename) > 4) { - if ( (strcmp (localFilename + strlen (localFilename) - 4,".wmf") == 0) - || (strcmp (localFilename + strlen (localFilename) - 4,".WMF") == 0)) { - doc = sp_wmf_convert (localFilename); - } - } -#endif // !HAVE_LIBWMF + Inkscape::IO::dump_fopen_call(filename, "N"); - if ( !doc ) { - XmlSource src; + XmlSource src; - if ( (src.setFile(filename) == 0) ) { + if (src.setFile(filename) == 0) { + doc = src.readXml(); + rdoc = sp_repr_do_read(doc, default_ns); + // For some reason, failed ns loading results in this + // We try a system check version of load with NOENT for adobe + if (rdoc && strcmp(rdoc->root()->name(), "ns:svg") == 0) { + xmlFreeDoc(doc); + src.setFile(filename, true); doc = src.readXml(); - rdoc = sp_repr_do_read( doc, default_ns ); - // For some reason, failed ns loading results in this - // We try a system check version of load with NOENT for adobe - if(rdoc && strcmp(rdoc->root()->name(), "ns:svg") == 0) { - xmlFreeDoc( doc ); - src.setFile(filename, true); - doc = src.readXml(); - rdoc = sp_repr_do_read( doc, default_ns ); - } + rdoc = sp_repr_do_read(doc, default_ns); } } - - if ( doc ) { - xmlFreeDoc( doc ); + if (doc) { + xmlFreeDoc(doc); } - if ( localFilename ) { - g_free( localFilename ); + if (localFilename) { + g_free(localFilename); } return rdoc; |
