7
7
* bulia byak <bulia@dr.com>
8
* Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
9
* Copyright (C) 2003 authors
10
* Copyright (C) 2003-2007 Authors
11
12
* Released under GNU GPL, read the file 'COPYING' for more information
67
sp_dialog_defocus_callback (GtkWindow *win, gpointer data)
68
sp_dialog_defocus_callback (GtkWindow */*win*/, gpointer data)
69
70
sp_dialog_defocus ((GtkWindow *)
70
71
gtk_widget_get_toplevel ((GtkWidget *) data));
146
147
sp_transientize (GtkWidget *dialog)
149
#ifndef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
150
// _set_skip_taskbar_hint makes transient dialogs NON-transient! When dialogs
151
// are made transient (_set_transient_for), they are already removed from
152
// the taskbar in Win32.
148
153
if (prefs_get_int_attribute ( "options.dialogsskiptaskbar", "value", 0)) {
149
154
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), TRUE);
152
158
gint transient_policy = prefs_get_int_attribute_limited ( "options.transientpolicy", "value", 1, 0, 2 );
160
#ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
161
if (prefs_get_int_attribute ( "options.dialogsontopwin32", "value", 0))
162
transient_policy = 2;
164
transient_policy = 0;
154
167
if (transient_policy) {
156
169
// if there's an active document window, attach dialog to it as a transient:
158
171
if ( SP_ACTIVE_DESKTOP )
160
173
SP_ACTIVE_DESKTOP->setWindowTransient (dialog, transient_policy);
171
sp_transientize_callback ( Inkscape::Application * /*inkscape*/,
184
sp_transientize_callback ( Inkscape::Application * /*inkscape*/,
172
185
SPDesktop *desktop, win_data *wd )
174
gint transient_policy =
175
prefs_get_int_attribute_limited ( "options.transientpolicy", "value",
178
if (!transient_policy)
183
* if retransientizing of this dialog is still forbidden after
184
* previous call warning turned off because it was confusingly fired
187
gint transient_policy = prefs_get_int_attribute_limited ( "options.transientpolicy", "value", 1, 0, 2);
189
#ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
190
if (prefs_get_int_attribute ( "options.dialogsontopwin32", "value", 0))
191
transient_policy = 2;
196
if (!transient_policy)
201
* if retransientizing of this dialog is still forbidden after
202
* previous call warning turned off because it was confusingly fired
185
203
* when loading many files from command line
187
// g_warning("Retranzientize aborted! You're switching windows too fast!");
205
// g_warning("Retranzientize aborted! You're switching windows too fast!");
193
211
wd->stop = 1; // disallow other attempts to retranzientize this dialog
194
212
desktop->setWindowTransient (wd->win, transient_policy);
197
215
// we're done, allow next retransientizing not sooner than after 6 msec
198
gtk_timeout_add (6, (GtkFunction) sp_allow_again, (gpointer) wd);
216
gtk_timeout_add (6, (GtkFunction) sp_allow_again, (gpointer) wd);
201
219
void on_dialog_hide (GtkWidget *w)