diff options
| author | Ralf Stephan <ralf@ark.in-berlin.de> | 2006-02-24 18:06:37 +0000 |
|---|---|---|
| committer | rwst <rwst@users.sourceforge.net> | 2006-02-24 18:06:37 +0000 |
| commit | 042242974a1cbd778129ed03f6ad910ac3c07583 (patch) | |
| tree | c84953c6dbdd5717dee95660d48ec45b7c46af22 /src/dialogs | |
| parent | including typecheck trying to prevent #1432680 (diff) | |
| download | inkscape-042242974a1cbd778129ed03f6ad910ac3c07583.tar.gz inkscape-042242974a1cbd778129ed03f6ad910ac3c07583.zip | |
make sure no negative dialog position is written into preferences,
part of fix for #1290647
(bzr r178)
Diffstat (limited to 'src/dialogs')
| -rw-r--r-- | src/dialogs/clonetiler.cpp | 3 | ||||
| -rw-r--r-- | src/dialogs/export.cpp | 3 | ||||
| -rw-r--r-- | src/dialogs/find.cpp | 3 | ||||
| -rw-r--r-- | src/dialogs/input.cpp | 3 | ||||
| -rw-r--r-- | src/dialogs/item-properties.cpp | 3 | ||||
| -rw-r--r-- | src/dialogs/object-properties.cpp | 3 | ||||
| -rw-r--r-- | src/dialogs/text-edit.cpp | 3 | ||||
| -rw-r--r-- | src/dialogs/xml-tree.cpp | 3 |
8 files changed, 24 insertions, 0 deletions
diff --git a/src/dialogs/clonetiler.cpp b/src/dialogs/clonetiler.cpp index 084186bf6..afe9cd77f 100644 --- a/src/dialogs/clonetiler.cpp +++ b/src/dialogs/clonetiler.cpp @@ -112,6 +112,9 @@ clonetiler_dialog_delete (GtkObject *object, GdkEvent * /*event*/, gpointer data gtk_window_get_position ((GtkWindow *) dlg, &x, &y); gtk_window_get_size ((GtkWindow *) dlg, &w, &h); + if (x<0) x=0; + if (y<0) y=0; + prefs_set_int_attribute (prefs_path, "x", x); prefs_set_int_attribute (prefs_path, "y", y); prefs_set_int_attribute (prefs_path, "w", w); diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp index 42a084dde..6cd108412 100644 --- a/src/dialogs/export.cpp +++ b/src/dialogs/export.cpp @@ -147,6 +147,9 @@ sp_export_dialog_delete ( GtkObject *object, GdkEvent *event, gpointer data ) gtk_window_get_position ((GtkWindow *) dlg, &x, &y); gtk_window_get_size ((GtkWindow *) dlg, &w, &h); + if (x<0) x=0; + if (y<0) y=0; + prefs_set_int_attribute (prefs_path, "x", x); prefs_set_int_attribute (prefs_path, "y", y); prefs_set_int_attribute (prefs_path, "w", w); diff --git a/src/dialogs/find.cpp b/src/dialogs/find.cpp index 85146f8a3..c1f1c9974 100644 --- a/src/dialogs/find.cpp +++ b/src/dialogs/find.cpp @@ -93,6 +93,9 @@ static gboolean sp_find_dialog_delete(GtkObject *, GdkEvent *, gpointer data) gtk_window_get_position (GTK_WINDOW (dlg), &x, &y); gtk_window_get_size (GTK_WINDOW (dlg), &w, &h); + if (x<0) x=0; + if (y<0) y=0; + prefs_set_int_attribute (prefs_path, "x", x); prefs_set_int_attribute (prefs_path, "y", y); prefs_set_int_attribute (prefs_path, "w", w); diff --git a/src/dialogs/input.cpp b/src/dialogs/input.cpp index 501a4a21b..be6a00542 100644 --- a/src/dialogs/input.cpp +++ b/src/dialogs/input.cpp @@ -49,6 +49,9 @@ sp_input_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data) gtk_window_get_position ((GtkWindow *) dlg, &x, &y); gtk_window_get_size ((GtkWindow *) dlg, &w, &h); + if (x<0) x=0; + if (y<0) y=0; + prefs_set_int_attribute (prefs_path, "x", x); prefs_set_int_attribute (prefs_path, "y", y); prefs_set_int_attribute (prefs_path, "w", w); diff --git a/src/dialogs/item-properties.cpp b/src/dialogs/item-properties.cpp index 7a9b37dcf..da5f7a00c 100644 --- a/src/dialogs/item-properties.cpp +++ b/src/dialogs/item-properties.cpp @@ -70,6 +70,9 @@ sp_item_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data) gtk_window_get_position ((GtkWindow *) dlg, &x, &y); gtk_window_get_size ((GtkWindow *) dlg, &w, &h); + if (x<0) x=0; + if (y<0) y=0; + prefs_set_int_attribute (prefs_path, "x", x); prefs_set_int_attribute (prefs_path, "y", y); prefs_set_int_attribute (prefs_path, "w", w); diff --git a/src/dialogs/object-properties.cpp b/src/dialogs/object-properties.cpp index 9cbf1c3ea..f571c75eb 100644 --- a/src/dialogs/object-properties.cpp +++ b/src/dialogs/object-properties.cpp @@ -68,6 +68,9 @@ sp_object_properties_dialog_delete ( GtkObject *object, gtk_window_get_position ((GtkWindow *) dlg, &x, &y); gtk_window_get_size ((GtkWindow *) dlg, &w, &h); + if (x<0) x=0; + if (y<0) y=0; + prefs_set_int_attribute (prefs_path, "x", x); prefs_set_int_attribute (prefs_path, "y", y); prefs_set_int_attribute (prefs_path, "w", w); diff --git a/src/dialogs/text-edit.cpp b/src/dialogs/text-edit.cpp index 8de2dedac..136cb823d 100644 --- a/src/dialogs/text-edit.cpp +++ b/src/dialogs/text-edit.cpp @@ -100,6 +100,9 @@ sp_text_edit_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data) gtk_window_get_position ((GtkWindow *) dlg, &x, &y); gtk_window_get_size ((GtkWindow *) dlg, &w, &h); + if (x<0) x=0; + if (y<0) y=0; + prefs_set_int_attribute (prefs_path, "x", x); prefs_set_int_attribute (prefs_path, "y", y); prefs_set_int_attribute (prefs_path, "w", w); diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp index fe51f0144..60845b6bb 100644 --- a/src/dialogs/xml-tree.cpp +++ b/src/dialogs/xml-tree.cpp @@ -913,6 +913,9 @@ static gboolean on_delete(GtkObject *object, GdkEvent *event, gpointer data) gtk_window_get_position((GtkWindow *) dlg, &x, &y); gtk_window_get_size((GtkWindow *) dlg, &w, &h); + if (x<0) x=0; + if (y<0) y=0; + prefs_set_int_attribute(prefs_path, "x", x); prefs_set_int_attribute(prefs_path, "y", y); prefs_set_int_attribute(prefs_path, "w", w); |
