diff options
| author | Ralf Stephan <ralf@ark.in-berlin.de> | 2006-02-24 18:33:07 +0000 |
|---|---|---|
| committer | rwst <rwst@users.sourceforge.net> | 2006-02-24 18:33:07 +0000 |
| commit | c9d9afe6d19336eccc34a3cf0255872e2f77a70e (patch) | |
| tree | 8c0f0b5cac6a906beac775f101584799f4fdd74f /src | |
| parent | make sure positive xy widget pos is written (diff) | |
| download | inkscape-c9d9afe6d19336eccc34a3cf0255872e2f77a70e.tar.gz inkscape-c9d9afe6d19336eccc34a3cf0255872e2f77a70e.zip | |
make sure only positive dialog positions are read from preferences, fixes #1290647
(bzr r180)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dialogs/clonetiler.cpp | 3 | ||||
| -rw-r--r-- | src/dialogs/export.cpp | 3 | ||||
| -rw-r--r-- | src/dialogs/find.cpp | 4 | ||||
| -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 | 4 | ||||
| -rw-r--r-- | src/dialogs/text-edit.cpp | 3 | ||||
| -rw-r--r-- | src/dialogs/xml-tree.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/dialog.cpp | 3 | ||||
| -rw-r--r-- | src/widgets/gradient-vector.cpp | 4 |
10 files changed, 34 insertions, 0 deletions
diff --git a/src/dialogs/clonetiler.cpp b/src/dialogs/clonetiler.cpp index afe9cd77f..304bf7c0e 100644 --- a/src/dialogs/clonetiler.cpp +++ b/src/dialogs/clonetiler.cpp @@ -1583,6 +1583,9 @@ clonetiler_dialog (void) h = prefs_get_int_attribute (prefs_path, "h", 0); } + if (x<0) x=0; + if (y<0) y=0; + if (x != 0 || y != 0) { gtk_window_move ((GtkWindow *) dlg, x, y); diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp index 6cd108412..54df64782 100644 --- a/src/dialogs/export.cpp +++ b/src/dialogs/export.cpp @@ -348,6 +348,9 @@ 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 || y != 0) { gtk_window_move ((GtkWindow *) dlg, x, y); } else { diff --git a/src/dialogs/find.cpp b/src/dialogs/find.cpp index c1f1c9974..c76390ccb 100644 --- a/src/dialogs/find.cpp +++ b/src/dialogs/find.cpp @@ -652,6 +652,10 @@ sp_find_dialog_old (void) 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 || y != 0) { gtk_window_move ((GtkWindow *) dlg, x, y); } else { diff --git a/src/dialogs/input.cpp b/src/dialogs/input.cpp index be6a00542..eac3a0c5a 100644 --- a/src/dialogs/input.cpp +++ b/src/dialogs/input.cpp @@ -230,6 +230,9 @@ sp_input_dialog (void) h = prefs_get_int_attribute (prefs_path, "h", 0); } + if (x<0) x=0; + if (y<0) y=0; + if (x != 0 || y != 0) { gtk_window_move ((GtkWindow *) dlg, x, y); } else { diff --git a/src/dialogs/item-properties.cpp b/src/dialogs/item-properties.cpp index da5f7a00c..50027e2fa 100644 --- a/src/dialogs/item-properties.cpp +++ b/src/dialogs/item-properties.cpp @@ -455,6 +455,9 @@ 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 || y != 0) { gtk_window_move ((GtkWindow *) dlg, x, y); } else { diff --git a/src/dialogs/object-properties.cpp b/src/dialogs/object-properties.cpp index f571c75eb..f4a40cd28 100644 --- a/src/dialogs/object-properties.cpp +++ b/src/dialogs/object-properties.cpp @@ -122,6 +122,10 @@ sp_object_properties_dialog (void) 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 || y != 0) gtk_window_move ((GtkWindow *) dlg, x, y); else diff --git a/src/dialogs/text-edit.cpp b/src/dialogs/text-edit.cpp index 136cb823d..9d8fe5ced 100644 --- a/src/dialogs/text-edit.cpp +++ b/src/dialogs/text-edit.cpp @@ -154,6 +154,9 @@ sp_text_edit_dialog (void) h = prefs_get_int_attribute (prefs_path, "h", 0); } + if (x<0) x=0; + if (y<0) y=0; + if (x != 0 || y != 0) { gtk_window_move ((GtkWindow *) dlg, x, y); } else { diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp index 60845b6bb..44426d921 100644 --- a/src/dialogs/xml-tree.cpp +++ b/src/dialogs/xml-tree.cpp @@ -217,6 +217,10 @@ void sp_xml_tree_dialog() 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 || y != 0) { gtk_window_move((GtkWindow *) dlg, x, y); } else { diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp index 84e69ee24..238c6d9f7 100644 --- a/src/ui/dialog/dialog.cpp +++ b/src/ui/dialog/dialog.cpp @@ -97,6 +97,9 @@ Dialog::read_geometry() // g_print ("read %d %d %d %d\n", x, y, w, h); + if (x<0) x=0; + if (y<0) y=0; + // If there are stored height and width values for the dialog, // resize the window to match; otherwise we leave it at its default if (w != 0 && h != 0) { diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index 15c19da0e..2917ab89d 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -878,6 +878,10 @@ sp_gradient_vector_editor_new (SPGradient *gradient, SPStop *stop) 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 || y != 0) gtk_window_move ((GtkWindow *) dlg, x, y); else |
