summaryrefslogtreecommitdiffstats
path: root/src/dialogs/export.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2006-12-28 14:35:38 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2006-12-28 14:35:38 +0000
commit3640a92d5e985307f76d46d65241a63af0b2a2a4 (patch)
tree938549fe97f6eadf26a942b93480f875b269f04b /src/dialogs/export.cpp
parentCommitted [ 1620672 ] Funcplot: New features and bug fixes. With some adjustm... (diff)
downloadinkscape-3640a92d5e985307f76d46d65241a63af0b2a2a4.tar.gz
inkscape-3640a92d5e985307f76d46d65241a63af0b2a2a4.zip
Export dialog is now always shown in view (not outside of screen)
(bzr r2107)
Diffstat (limited to 'src/dialogs/export.cpp')
-rw-r--r--src/dialogs/export.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp
index 3dc25ddf9..387474485 100644
--- a/src/dialogs/export.cpp
+++ b/src/dialogs/export.cpp
@@ -62,7 +62,9 @@
#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 );
@@ -359,18 +361,14 @@ sp_export_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 {
+ 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;