summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f7b7ce5)
raw | patch | inline | side by side (parent: f7b7ce5)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Thu, 28 Dec 2006 14:35:38 +0000 (14:35 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Thu, 28 Dec 2006 14:35:38 +0000 (14:35 +0000) |
src/dialogs/export.cpp | patch | blob | history |
diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp
index 3dc25ddf9f8ddefa0a9245a5d85347da5cb726c8..38747448562a96965af4e487929887b9c68cac10 100644 (file)
--- a/src/dialogs/export.cpp
+++ b/src/dialogs/export.cpp
#define DPI_BASE PX_PER_IN
-#define EXPORT_COORD_PRECISION 3
+#define EXPORT_COORD_PRECISION 3
+
+#define MIN_ONSCREEN_DISTANCE 50
static void sp_export_area_toggled ( GtkToggleButton *tb, GtkObject *base );
static void sp_export_export_clicked ( GtkButton *button, GtkObject *base );
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 {
+ 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;