diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2012-03-21 12:59:45 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2012-03-21 12:59:45 +0000 |
| commit | 6fe8f224601795c237bbd74763bc8a386d726e82 (patch) | |
| tree | 895a98b0ef06eb68ace64bd1fcfb7ee5b0af48a8 /src | |
| parent | UI. Patch for Bug #789797 (Add an icon/definiton for Duplicate Current Layer). (diff) | |
| download | inkscape-6fe8f224601795c237bbd74763bc8a386d726e82.tar.gz inkscape-6fe8f224601795c237bbd74763bc8a386d726e82.zip | |
Preferences. New desktop integration preference for Windows users (native/gtk, see Bug #417365).
Preferences. Fix for a bug with the preferences dialog when Show dialogs is set to true (always opens on the Selector page).
Preferences. UI consistency fix (System information fields not correctly indented).
This line and the following will be ignored --------------
modified:
src/desktop.cpp
src/preferences-skeleton.h
src/ui/dialog/filedialog.cpp
src/ui/dialog/inkscape-preferences.cpp
src/ui/dialog/inkscape-preferences.h
unknown:
inkscape.el.1
inkscape.ja.1
inkscape.sk.1
inkscape.zh_TW.1
libtool
ltmain.sh@
preferencesDialog.diff
relink2.diff
revert10761.diff
rmbackups.sh
doc/keys.gl.html
doc/keys.pl.html
packaging/win32/languages/.fr-xLpu9j/
share/icons/inkscape-trunk.svg
share/icons/application/48x48/inkscape-trunk.png
src/.libs/
src/libnr/
src/relink.cpp
src/relink.h
src/extension/dbus/wrapper/inkdbus.pc
(bzr r11109)
Diffstat (limited to 'src')
| -rw-r--r-- | src/desktop.cpp | 2 | ||||
| -rw-r--r-- | src/preferences-skeleton.h | 3 | ||||
| -rw-r--r-- | src/ui/dialog/filedialog.cpp | 17 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 30 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.h | 2 |
5 files changed, 41 insertions, 13 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp index ecc480f86..cf71c8f9e 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -1822,7 +1822,7 @@ SPDesktop::show_dialogs() mapVerbPreference.insert(std::make_pair ((int)SP_VERB_VIEW_ICON_PREVIEW, "/dialogs/iconpreview") ); mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_SVG_FONTS, "/dialogs/svgfonts") ); mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_INPUT, "/dialogs/inputdevices") ); - mapVerbPreference.insert(std::make_pair ((int)SP_VERB_CONTEXT_SELECT_PREFS, "/dialogs/preferences") ); + mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_DISPLAY, "/dialogs/preferences") ); mapVerbPreference.insert(std::make_pair ((int)SP_VERB_SELECTION_GRIDTILE, "/dialogs/gridtiler") ); mapVerbPreference.insert(std::make_pair ((int)SP_VERB_SELECTION_TRACE, "/dialogs/trace") ); mapVerbPreference.insert(std::make_pair ((int)SP_VERB_DIALOG_TEXT, "/dialogs/textandfont") ); diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index 18b7150f5..2b674d015 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -281,6 +281,9 @@ static char const preferences_skeleton[] = " <group id=\"bitmapeditor\" value=\"gimp\"/>\n" " <group id=\"bitmapautoreload\" value=\"1\"/>\n" " <group id=\"dialogtype\" value=\"1\"/>\n" +#ifdef WIN32 +" <group id=\"desktopintegration\" value=\"1\"/>\n" +#endif " <group id=\"dock\" " " cancenterdock=\"1\"" " dockbarstyle=\"2\"" // GDL_DOCK_BAR_BOTH diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp index cff2f2488..47ba6c748 100644 --- a/src/ui/dialog/filedialog.cpp +++ b/src/ui/dialog/filedialog.cpp @@ -22,6 +22,7 @@ #include "gc-core.h" #include <dialogs/dialog-events.h> #include "extension/output.h" +#include "preferences.h" namespace Inkscape { @@ -86,7 +87,13 @@ FileOpenDialog *FileOpenDialog::create(Gtk::Window &parentWindow, const char *title) { #ifdef WIN32 - FileOpenDialog *dialog = new FileOpenDialogImplWin32(parentWindow, path, fileTypes, title); + FileOpenDialog *dialog = NULL; + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs->getBool( "/options/desktopintegration/value")) { + dialog = new FileOpenDialogImplWin32(parentWindow, path, fileTypes, title); + } else { + dialog = new FileOpenDialogImplGtk(parentWindow, path, fileTypes, title); + } #else FileOpenDialog *dialog = new FileOpenDialogImplGtk(parentWindow, path, fileTypes, title); #endif @@ -115,7 +122,13 @@ FileSaveDialog *FileSaveDialog::create(Gtk::Window& parentWindow, const Inkscape::Extension::FileSaveMethod save_method) { #ifdef WIN32 - FileSaveDialog *dialog = new FileSaveDialogImplWin32(parentWindow, path, fileTypes, title, default_key, docTitle, save_method); + FileSaveDialog *dialog = NULL; + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs->getBool( "/options/desktopintegration/value")) { + dialog = new FileSaveDialogImplWin32(parentWindow, path, fileTypes, title, default_key, docTitle, save_method); + } else { + dialog = new FileSaveDialogImplGtk(parentWindow, path, fileTypes, title, default_key, docTitle, save_method); + } #else FileSaveDialog *dialog = new FileSaveDialogImplGtk(parentWindow, path, fileTypes, title, default_key, docTitle, save_method); #endif diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 5030f17be..269266083 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -578,6 +578,9 @@ void InkscapePreferences::initPageUI() _win_dockable.init ( _("Dockable"), "/options/dialogtype/value", 1, true, 0); _win_floating.init ( _("Floating"), "/options/dialogtype/value", 0, false, &_win_dockable); + _win_native.init ( _("Native open/save dialogs"), "/options/desktopintegration/value", 1, true, 0); + _win_gtk.init ( _("GTK open/save dialogs"), "/options/desktopintegration/value", 0, false, &_win_native); + _win_hide_task.init ( _("Dialogs are hidden in taskbar"), "/options/dialogsskiptaskbar/value", true); _win_zoom_resize.init ( _("Zoom when window is resized"), "/options/stickyzoom/value", false); _win_show_close.init ( _("Show close button on dialogs"), "/dialogs/showclose", false); @@ -604,6 +607,13 @@ void InkscapePreferences::initPageUI() _("Dockable")); _page_windows.add_line( true, "", _win_floating, "", _("Floating")); +#ifdef WIN32 + _page_windows.add_group_header( _("Desktop integration")); + _page_windows.add_line( true, "", _win_native, "", + _("Use Windows like open and save dialogs")); + _page_windows.add_line( true, "", _win_gtk, "", + _("Use GTK open and save dialogs ")); +#endif #ifndef WIN32 // non-Win32 special code to enable transient dialogs _page_windows.add_group_header( _("Dialogs on top:")); @@ -1422,19 +1432,19 @@ void InkscapePreferences::initPageSystem() _sys_user_config.set_text((char const *)profile_path("")); _sys_user_config.set_editable(false); - _page_system.add_line( false, _("User config: "), _sys_user_config, "", _("Location of users configuration"), true); + _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( false, _("User preferences: "), _sys_user_prefs, "", _("Location of the users preferences file"), true); + _page_system.add_line(true, _("User preferences: "), _sys_user_prefs, "", _("Location of the users preferences file"), true); _sys_user_extension_dir.set_text((char const *)get_path(IO::Resource::USER, IO::Resource::EXTENSIONS, "")); _sys_user_extension_dir.set_editable(false); - _page_system.add_line( false, _("User extensions: "), _sys_user_extension_dir, "", _("Location of the users extensions"), true); + _page_system.add_line(true, _("User extensions: "), _sys_user_extension_dir, "", _("Location of the users extensions"), true); _sys_user_cache.set_text(g_get_user_cache_dir()); _sys_user_cache.set_editable(false); - _page_system.add_line( false, _("User cache: "), _sys_user_cache, "", _("Location of users cache"), true); + _page_system.add_line(true, _("User cache: "), _sys_user_cache, "", _("Location of users cache"), true); Glib::ustring tmp_dir = prefs->getString("/options/autosave/path"); if (tmp_dir.empty()) { @@ -1442,15 +1452,15 @@ void InkscapePreferences::initPageSystem() } _sys_tmp_files.set_text(tmp_dir); _sys_tmp_files.set_editable(false); - _page_system.add_line( false, _("Temporary files: "), _sys_tmp_files, "", _("Location of the temporary files used for autosave"), true); + _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( false, _("Inkscape data: "), _sys_data, "", _("Location of Inkscape data"), true); + _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( false, _("Inkscape extensions: "), _sys_extension_dir, "", _("Location of the Inkscape extensions"), true); + _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() ); @@ -1459,7 +1469,7 @@ void InkscapePreferences::initPageSystem() _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( false, _("System data: "), _sys_systemdata_scroll, "", _("Locations of system data"), true); + _page_system.add_line(true, _("System data: "), _sys_systemdata_scroll, "", _("Locations of system data"), true); { tmp = ""; @@ -1483,7 +1493,7 @@ void InkscapePreferences::initPageSystem() _sys_icon_scroll.add(_sys_icon); _sys_icon_scroll.set_size_request(0, 80); _sys_icon_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - _page_system.add_line( false, _("Icon theme: "), _sys_icon_scroll, "", _("Location of icon themes"), true); + _page_system.add_line(true, _("Icon theme: "), _sys_icon_scroll, "", _("Location of icon themes"), true); this->AddPage(_page_system, _("System"), PREFS_PAGE_SYSTEM); } @@ -1508,7 +1518,7 @@ bool InkscapePreferences::PresentPage(const Gtk::TreeModel::iterator& iter) int desired_page = prefs->getInt("/dialogs/preferences/page", 0); if (desired_page == row[_page_list_columns._col_id]) { - if (desired_page >= PREFS_PAGE_TOOLS && desired_page <= PREFS_PAGE_TOOLS_LPETOOL) + if (desired_page >= PREFS_PAGE_TOOLS && desired_page <= PREFS_PAGE_TOOLS_CONNECTOR) _page_list.expand_row(_path_tools, false); if (desired_page >= PREFS_PAGE_TOOLS_SHAPES && desired_page <= PREFS_PAGE_TOOLS_SHAPES_SPIRAL) _page_list.expand_row(_path_shapes, false); diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index f9944f8c0..1d03ab706 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -213,6 +213,8 @@ protected: UI::Widget::PrefRadioButton _win_dockable; UI::Widget::PrefRadioButton _win_floating; + UI::Widget::PrefRadioButton _win_native; + UI::Widget::PrefRadioButton _win_gtk; UI::Widget::PrefRadioButton _win_save_dialog_pos_on; UI::Widget::PrefRadioButton _win_save_dialog_pos_off; UI::Widget::PrefRadioButton _win_ontop_none; |
