diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-01-06 19:25:28 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-01-06 19:25:28 +0000 |
| commit | 088d4ff31849c5bbf93853fb5327743490a2493f (patch) | |
| tree | aca7f5370d60de67a87fac50d56ee117e0c2168e /src/ui/dialog | |
| parent | An update of czech translation of interface (diff) | |
| download | inkscape-088d4ff31849c5bbf93853fb5327743490a2493f.tar.gz inkscape-088d4ff31849c5bbf93853fb5327743490a2493f.zip | |
Special #ifdef win32 code to enable Dialogs on Top for windows. Note the removal of options from the global preferences on win32! just one option left: dialogs on top yes/no. Does have one "bug" though... read note!
(bzr r2138)
Diffstat (limited to 'src/ui/dialog')
| -rw-r--r-- | src/ui/dialog/dialog.cpp | 17 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 12 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.h | 5 |
3 files changed, 29 insertions, 5 deletions
diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp index 8fb04a91f..d57083951 100644 --- a/src/ui/dialog/dialog.cpp +++ b/src/ui/dialog/dialog.cpp @@ -40,7 +40,7 @@ namespace Inkscape { namespace UI { namespace Dialog { -#ifndef WIN32 +//#ifndef WIN32 static gboolean sp_retransientize_again (gpointer dlgPtr) { @@ -48,7 +48,7 @@ sp_retransientize_again (gpointer dlgPtr) dlg->retransientize_suppress = false; return FALSE; // so that it is only called once } -#endif +//#endif static void sp_retransientize (Inkscape::Application *inkscape, SPDesktop *desktop, gpointer dlgPtr) @@ -290,10 +290,18 @@ Dialog::onDesktopActivated (SPDesktop *desktop) { gint transient_policy = prefs_get_int_attribute_limited ( "options.transientpolicy", "value", 1, 0, 2); - if (!transient_policy) +#ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs + if (prefs_get_int_attribute ( "options.dialogsontopwin32", "value", 0)) + transient_policy = 2; + else + return; +#endif + + if (!transient_policy) return; -#ifndef WIN32 + + GtkWindow *dialog_win = GTK_WINDOW(gobj()); if (retransientize_suppress) { @@ -327,7 +335,6 @@ Dialog::onDesktopActivated (SPDesktop *desktop) // we're done, allow next retransientizing not sooner than after 120 msec gtk_timeout_add (120, (GtkFunction) sp_retransientize_again, (gpointer) this); -#endif } diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index caf86161a..aa0ab8c6f 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -408,21 +408,33 @@ void InkscapePreferences::initPageWindows() _win_ontop_normal.init ( _("Normal"), "options.transientpolicy", "value", 1, true, &_win_ontop_none); _win_ontop_agressive.init ( _("Aggressive"), "options.transientpolicy", "value", 2, false, &_win_ontop_none); +// FIXME: Temporary Win32 special code to enable transient dialogs +#ifdef WIN32 + _win_ontop_win32.init ( _("Dialogs stay on top (experimental!)"), "options.dialogsontopwin32", "value", false); +#endif + _page_windows.add_line( false, "", _win_save_geom, "", _("Save the window size and position with each document (only for Inkscape SVG format)")); +#ifndef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs _page_windows.add_line( false, "", _win_hide_task, "", _("Whether dialog windows are to be hidden in the window manager taskbar")); +#endif _page_windows.add_line( false, "", _win_zoom_resize, "", _("Zoom drawing when document window is resized, to keep the same area visible (this is the default which can be changed in any window using the button above the right scrollbar)")); _page_windows.add_line( false, "", _win_show_close, "", _("Whether dialog windows have a close button (requires restart)")); _page_windows.add_group_header( _("Dialogs on top:")); +#ifndef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs _page_windows.add_line( true, "", _win_ontop_none, "", _("Dialogs are treated as regular windows")); _page_windows.add_line( true, "", _win_ontop_normal, "", _("Dialogs stay on top of document windows")); _page_windows.add_line( true, "", _win_ontop_agressive, "", _("Same as Normal but may work better with some window managers")); +#else + _page_windows.add_line( false, "", _win_ontop_win32, "", + _("Whether dialogs should stay on top of document windows. Read the ReleaseNotes on this issue! (Rightclick the taskbar button and press 'Restore' to bring back a minimized document window)")); +#endif this->AddPage(_page_windows, _("Windows"), PREFS_PAGE_WINDOWS); } diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index 4188268ec..9f052b1d3 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -115,6 +115,11 @@ protected: PrefRadioButton _win_ontop_none, _win_ontop_normal, _win_ontop_agressive; PrefCheckButton _win_save_geom, _win_hide_task, _win_zoom_resize , _win_show_close; +// FIXME: Temporary Win32 special code to enable transient dialogs +#ifdef WIN32 + PrefCheckButton _win_ontop_win32; +#endif + PrefCheckButton _calligrapy_use_abs_size; PrefCheckButton _calligrapy_keep_selected; |
