Code

non-localizable string
[inkscape.git] / src / ui / dialog / dialog.cpp
index aa48f7eb81b4eb9a3a6edfffb1fe13ef061d8da1..7cb360a43c24297a3f41f54dc36bcc4772228f70 100644 (file)
@@ -75,6 +75,9 @@ Dialog::save_geometry()
 
 //    g_print ("write %d %d %d %d\n", x, y, 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);
@@ -93,6 +96,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) {
@@ -111,12 +117,16 @@ Dialog::read_geometry()
 
 void hideCallback(GtkObject *object, gpointer dlgPtr)
 {
+    g_return_if_fail( dlgPtr != NULL );
+
     Dialog *dlg = (Dialog *)dlgPtr;
     dlg->onHideF12();
 }
 
 void unhideCallback(GtkObject *object, gpointer dlgPtr)
 {
+    g_return_if_fail( dlgPtr != NULL );
+
     Dialog *dlg = (Dialog *)dlgPtr;
     dlg->onShowF12();
 }