summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c71ef4d)
raw | patch | inline | side by side (parent: c71ef4d)
| author | johanengelen <johanengelen@users.sourceforge.net> | |
| Sat, 6 Jan 2007 19:25:28 +0000 (19:25 +0000) | ||
| committer | johanengelen <johanengelen@users.sourceforge.net> | |
| Sat, 6 Jan 2007 19:25:28 +0000 (19:25 +0000) |
index deabcf3839438e6df6f64730e5e82079fbcf66f1..c2ac1b12f4a1321d6367a8e3e9e13a3eaf32a32e 100644 (file)
void
sp_transientize (GtkWidget *dialog)
{
+#ifndef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
+ // _set_skip_taskbar_hint makes transient dialogs NON-transient! When dialogs
+ // are made transient (_set_transient_for), they are already removed from
+ // the taskbar in Win32.
if (prefs_get_int_attribute ( "options.dialogsskiptaskbar", "value", 0)) {
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), TRUE);
- }
+ }
+#endif
gint transient_policy = prefs_get_int_attribute_limited ( "options.transientpolicy", "value", 1, 0, 2 );
+#ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
+ if (prefs_get_int_attribute ( "options.dialogsontopwin32", "value", 0))
+ transient_policy = 2;
+ else
+ transient_policy = 0;
+#endif
+
if (transient_policy) {
// if there's an active document window, attach dialog to it as a transient:
sp_transientize_callback ( Inkscape::Application * /*inkscape*/,
SPDesktop *desktop, win_data *wd )
{
- gint transient_policy =
- prefs_get_int_attribute_limited ( "options.transientpolicy", "value",
- 1, 0, 2);
+ gint transient_policy = prefs_get_int_attribute_limited ( "options.transientpolicy", "value", 1, 0, 2);
+
+#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;
index d18f0761229749905f14b029c6c12790489d8bd7..49cc632372897b506d26ef88887ad1c6d87fd807 100644 (file)
" <group id=\"autoscrolldistance\" value=\"-10\"/>\n"
" <group id=\"simplifythreshold\" value=\"0.002\"/>\n"
" <group id=\"dialogsskiptaskbar\" value=\"1\"/>\n"
+#ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
+" <group id=\"dialogsontopwin32\" value=\"0\"/>\n"
+#endif
" <group id=\"arenatilescachesize\" value=\"8192\"/>\n"
" <group id=\"preservetransform\" value=\"0\"/>\n"
" <group id=\"clonecompensation\" value=\"1\"/>\n"
index 8fb04a91f8ab317f2548d3b956922b658a0d9b31..d5708395113f2ad89f631cda5db4055c76f0645c 100644 (file)
--- a/src/ui/dialog/dialog.cpp
+++ b/src/ui/dialog/dialog.cpp
namespace UI {
namespace Dialog {
-#ifndef WIN32
+//#ifndef WIN32
static gboolean
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)
{
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) {
// we're done, allow next retransientizing not sooner than after 120 msec
gtk_timeout_add (120, (GtkFunction) sp_retransientize_again, (gpointer) this);
-#endif
}
index caf86161acbb10dd791ce2fc0279a2c2a2b95d69..aa0ab8c6ffe26456553dba86c812902adba0591c 100644 (file)
_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);
}
index 4188268ec9241dc16fd5b7d48b7dc9cefe1d8b48..9f052b1d3d62db393bb104377ccc46b087687dff 100644 (file)
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;
index 0053ea1b767c8858c4cfff4e766cf835ea7cf90d..187ec04fa70a4d2fb90e9b5cf060df1e7004cb9b 100644 (file)
void
EditWidget::setTransient (void* p, int i)
{
-#ifndef WIN32
gtk_window_set_transient_for (static_cast<GtkWindow*>(p), this->gobj());
if (i==2)
this->Gtk::Window::present();
-#endif
}
NR::Point
index 106df37d7ffa729cca6fb2e298dd59a7761817b7..c84292e50c2c48fcc5bf9240964c07c3ee6f035f 100644 (file)
/**
* \note transientizing does not work on windows; when you minimize a document
* and then open it back, only its transient emerges and you cannot access
- * the document window.
+ * the document window. The document window must be restored by rightclicking
+ * the taskbar button and pressing "Restore"
*/
void
SPDesktopWidget::setWindowTransient (void *p, int transient_policy)
{
-#ifndef WIN32
GtkWindow *w =GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(this)));
if (w)
{
// without this, a transient window not always emerges on top
gtk_window_present (w);
}
-#endif
}
void