diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2006-11-27 15:01:13 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2006-11-27 15:01:13 +0000 |
| commit | 0e57fb789795266c3fcb7d82a355028a0233b83b (patch) | |
| tree | 946439234371cb16b10c2e697e5251689d12c328 /src/dialogs/object-properties.cpp | |
| parent | fixed temporary files management in eqtexsvg extension (diff) | |
| download | inkscape-0e57fb789795266c3fcb7d82a355028a0233b83b.tar.gz inkscape-0e57fb789795266c3fcb7d82a355028a0233b83b.zip | |
non-gtkmm dialogs are now always opened ON-screen
(bzr r2045)
Diffstat (limited to 'src/dialogs/object-properties.cpp')
| -rw-r--r-- | src/dialogs/object-properties.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/dialogs/object-properties.cpp b/src/dialogs/object-properties.cpp index 3cb670805..ce65edbeb 100644 --- a/src/dialogs/object-properties.cpp +++ b/src/dialogs/object-properties.cpp @@ -7,8 +7,9 @@ * Lauris Kaplinski <lauris@kaplinski.com> * Frank Felfe <innerspace@iname.com> * bulia byak <buliabyak@users.sf.net> + * Johan Engelen <goejendaagh@zonnet.nl> * - * Copyright (C) 1999-2005 authors + * Copyright (C) 1999-2006 authors * Copyright (C) 2001-2002 Ximian, Inc. * * Released under GNU GPL, read the file 'COPYING' for more information @@ -46,6 +47,8 @@ #include "xml/repr.h" #include "display/sp-canvas.h" +#define MIN_ONSCREEN_DISTANCE 50 + static GtkWidget *dlg = NULL; static win_data wd; @@ -122,22 +125,22 @@ sp_object_properties_dialog (void) dlg = sp_window_new (title, TRUE); if (x == -1000 || y == -1000) { - x = prefs_get_int_attribute (prefs_path, "x", 0); - y = prefs_get_int_attribute (prefs_path, "y", 0); + x = prefs_get_int_attribute (prefs_path, "x", -1000); + y = prefs_get_int_attribute (prefs_path, "y", -1000); } if (w ==0 || h == 0) { w = prefs_get_int_attribute (prefs_path, "w", 0); h = prefs_get_int_attribute (prefs_path, "h", 0); } - if (x<0) x=0; - if (y<0) y=0; +// if (x<0) x=0; +// if (y<0) y=0; - if (x != 0 || y != 0) + if (w && h) gtk_window_resize ((GtkWindow *) dlg, w, h); + if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) gtk_window_move ((GtkWindow *) dlg, x, y); else gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER); - if (w && h) gtk_window_resize ((GtkWindow *) dlg, w, h); sp_transientize (dlg); wd.win = dlg; wd.stop = 0; |
