summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2018-09-30 21:47:39 +0000
committerEduard Braun <eduard.braun2@gmx.de>2018-10-01 22:50:12 +0000
commit172dbd2b94199731c1bbd2f789e55535188ade5c (patch)
tree907ca31a726661673f72eb35c2a8431e0dc57873 /src/ui/dialog
parentconfig.h - remove all defines we never use (diff)
downloadinkscape-172dbd2b94199731c1bbd2f789e55535188ade5c.tar.gz
inkscape-172dbd2b94199731c1bbd2f789e55535188ade5c.zip
Use _WIN32 instead of WIN32
The former is guaranteed to be set for any compiler targeting win32, the latter is implementation dependent (but works for gcc) See also http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/dock-behavior.cpp2
-rw-r--r--src/ui/dialog/export.cpp4
-rw-r--r--src/ui/dialog/filedialog.cpp6
-rw-r--r--src/ui/dialog/filedialogimpl-win32.cpp4
-rw-r--r--src/ui/dialog/filedialogimpl-win32.h2
-rw-r--r--src/ui/dialog/floating-behavior.cpp2
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp12
-rw-r--r--src/ui/dialog/spellcheck.cpp10
-rw-r--r--src/ui/dialog/symbols.cpp2
9 files changed, 22 insertions, 22 deletions
diff --git a/src/ui/dialog/dock-behavior.cpp b/src/ui/dialog/dock-behavior.cpp
index 7d1131a5f..1f679d5d2 100644
--- a/src/ui/dialog/dock-behavior.cpp
+++ b/src/ui/dialog/dock-behavior.cpp
@@ -224,7 +224,7 @@ DockBehavior::onDesktopActivated(SPDesktop *desktop)
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
gint transient_policy = prefs->getIntLimited( "/options/transientpolicy/value", 1, 0, 2);
-#ifdef WIN32 // Win32 special code to enable transient dialogs
+#ifdef _WIN32 // Win32 special code to enable transient dialogs
transient_policy = 2;
#endif
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index f484f7e47..e153ed8f0 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -61,7 +61,7 @@
#include "extension/output.h"
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#include <commdlg.h>
#include <gdk/gdkwin32.h>
@@ -1313,7 +1313,7 @@ void Export::onBrowse ()
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (fs), filename.c_str());
-#ifdef WIN32
+#ifdef _WIN32
// code in this section is borrowed from ui/dialogs/filedialogimpl-win32.cpp
OPENFILENAMEW opf;
WCHAR filter_string[20];
diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp
index df3c4a307..fd192a6fb 100644
--- a/src/ui/dialog/filedialog.cpp
+++ b/src/ui/dialog/filedialog.cpp
@@ -15,7 +15,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#ifdef WIN32
+#ifdef _WIN32
# include "filedialogimpl-win32.h"
# include "preferences.h"
#endif
@@ -89,7 +89,7 @@ FileOpenDialog *FileOpenDialog::create(Gtk::Window &parentWindow,
FileDialogType fileTypes,
const char *title)
{
-#ifdef WIN32
+#ifdef _WIN32
FileOpenDialog *dialog = NULL;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
if (prefs->getBool( "/options/desktopintegration/value")) {
@@ -124,7 +124,7 @@ FileSaveDialog *FileSaveDialog::create(Gtk::Window& parentWindow,
const gchar *docTitle,
const Inkscape::Extension::FileSaveMethod save_method)
{
-#ifdef WIN32
+#ifdef _WIN32
FileSaveDialog *dialog = NULL;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
if (prefs->getBool( "/options/desktopintegration/value")) {
diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index c57594551..8f4ff0feb 100644
--- a/src/ui/dialog/filedialogimpl-win32.cpp
+++ b/src/ui/dialog/filedialogimpl-win32.cpp
@@ -11,7 +11,7 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#ifdef WIN32
+#ifdef _WIN32
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -1926,7 +1926,7 @@ UINT_PTR CALLBACK FileSaveDialogImplWin32::GetSaveFileName_hookproc(
} } } // namespace Dialog, UI, Inkscape
-#endif // ifdef WIN32
+#endif // ifdef _WIN32
/*
Local Variables:
diff --git a/src/ui/dialog/filedialogimpl-win32.h b/src/ui/dialog/filedialogimpl-win32.h
index 182247703..5c9043a30 100644
--- a/src/ui/dialog/filedialogimpl-win32.h
+++ b/src/ui/dialog/filedialogimpl-win32.h
@@ -12,7 +12,7 @@
#include <glibmm.h>
-#ifdef WIN32
+#ifdef _WIN32
#include "filedialogimpl-gtkmm.h"
diff --git a/src/ui/dialog/floating-behavior.cpp b/src/ui/dialog/floating-behavior.cpp
index dccbd76b7..1581a5020 100644
--- a/src/ui/dialog/floating-behavior.cpp
+++ b/src/ui/dialog/floating-behavior.cpp
@@ -184,7 +184,7 @@ FloatingBehavior::onDesktopActivated (SPDesktop *desktop)
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
gint transient_policy = prefs->getIntLimited("/options/transientpolicy/value", 1, 0, 2);
-#ifdef WIN32 // Win32 special code to enable transient dialogs
+#ifdef _WIN32 // Win32 special code to enable transient dialogs
transient_policy = 2;
#endif
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index 84550dbf4..b10948229 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -60,7 +60,7 @@
#ifdef HAVE_ASPELL
# include <aspell.h>
-# ifdef WIN32
+# ifdef _WIN32
# include <windows.h>
# endif
#endif
@@ -610,7 +610,7 @@ void InkscapePreferences::symbolicThemeCheck()
folder.erase(0, last_slash_idx + 1);
}
if (folder == prefs->getString("/theme/iconTheme")) {
-#ifdef WIN32
+#ifdef _WIN32
path += g_win32_locale_filename_from_utf8("/symbolic/actions");
#else
path += "/symbolic/actions";
@@ -953,7 +953,7 @@ void InkscapePreferences::initPageUI()
_("Dockable"));
_page_windows.add_line( true, "", _win_floating, "",
_("Floating"));
-#ifdef WIN32
+#ifdef _WIN32
_page_windows.add_group_header( _("Desktop integration"));
_page_windows.add_line( true, "", _win_native, "",
_("Use Windows like open and save dialogs"));
@@ -961,7 +961,7 @@ void InkscapePreferences::initPageUI()
_("Use GTK open and save dialogs "));
#endif
-#ifndef WIN32 // non-Win32 special code to enable transient dialogs
+#ifndef _WIN32 // non-Win32 special code to enable transient dialogs
_page_windows.add_group_header( _("Dialogs on top:"));
_page_windows.add_line( true, "", _win_ontop_none, "",
@@ -982,7 +982,7 @@ void InkscapePreferences::initPageUI()
_page_windows.add_group_header( _("Miscellaneous"));
-#ifndef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
+#ifndef _WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
_page_windows.add_line( true, "", _win_hide_task, "",
_("Whether dialog windows are to be hidden in the window manager taskbar"));
#endif
@@ -2118,7 +2118,7 @@ void InkscapePreferences::initPageSpellcheck()
AspellConfig *config = new_aspell_config();
-#ifdef WIN32
+#ifdef _WIN32
// on windows, dictionaries are in a lib/aspell-0.60 subdir off inkscape's executable dir;
// this is some black magick to find out the executable path to give it to aspell
char exeName[MAX_PATH+1];
diff --git a/src/ui/dialog/spellcheck.cpp b/src/ui/dialog/spellcheck.cpp
index 972f2d1f9..267b52423 100644
--- a/src/ui/dialog/spellcheck.cpp
+++ b/src/ui/dialog/spellcheck.cpp
@@ -39,7 +39,7 @@
#include <glibmm/i18n.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#endif
@@ -312,7 +312,7 @@ SpellCheck::init(SPDesktop *d)
gtk_widget_set_sensitive(dictionary_combo, false);
start_button.set_sensitive(false);
-#ifdef WIN32
+#ifdef _WIN32
// on windows, dictionaries are in a lib/aspell-0.60 subdir off inkscape's executable dir;
// this is some black magick to find out the executable path to give it to aspell
char exeName[MAX_PATH+1];
@@ -330,7 +330,7 @@ SpellCheck::init(SPDesktop *d)
#ifdef HAVE_ASPELL
{
AspellConfig *config = new_aspell_config();
-#ifdef WIN32
+#ifdef _WIN32
aspell_config_replace(config, "prefix", exeName);
#endif
aspell_config_replace(config, "lang", _lang.c_str());
@@ -347,7 +347,7 @@ SpellCheck::init(SPDesktop *d)
if (_lang2 != "") {
AspellConfig *config = new_aspell_config();
-#ifdef WIN32
+#ifdef _WIN32
aspell_config_replace(config, "prefix", exeName);
#endif
aspell_config_replace(config, "lang", _lang2.c_str());
@@ -364,7 +364,7 @@ SpellCheck::init(SPDesktop *d)
if (_lang3 != "") {
AspellConfig *config = new_aspell_config();
-#ifdef WIN32
+#ifdef _WIN32
aspell_config_replace(config, "prefix", exeName);
#endif
aspell_config_replace(config, "lang", _lang3.c_str());
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index ffeeb2ec9..c6e5cb98e 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -714,7 +714,7 @@ class REVENGE_API RVNGSVGDrawingGenerator_WithTitle : public RVNGSVGDrawingGener
// Read Visio stencil files
SPDocument* read_vss(Glib::ustring filename, Glib::ustring name ) {
gchar *fullname;
- #ifdef WIN32
+ #ifdef _WIN32
// RVNGFileStream uses fopen() internally which unfortunately only uses ANSI encoding on Windows
// therefore attempt to convert uri to the system codepage
// even if this is not possible the alternate short (8.3) file name will be used if available