diff options
Diffstat (limited to 'src/dialogs/item-properties.cpp')
| -rw-r--r-- | src/dialogs/item-properties.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/dialogs/item-properties.cpp b/src/dialogs/item-properties.cpp index 3bb7f7d84..db4eb34fc 100644 --- a/src/dialogs/item-properties.cpp +++ b/src/dialogs/item-properties.cpp @@ -6,8 +6,9 @@ * Authors: * Lauris Kaplinski <lauris@kaplinski.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 Ximian, Inc. * * Released under GNU GPL, read the file 'COPYING' for more information @@ -41,6 +42,7 @@ #include "dialog-events.h" #include "../prefs-utils.h" +#define MIN_ONSCREEN_DISTANCE 50 static GtkWidget *dlg = NULL; static win_data wd; @@ -452,8 +454,8 @@ sp_item_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) { @@ -461,18 +463,18 @@ sp_item_dialog (void) 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; |
