Code

non-localizable string
[inkscape.git] / src / ui / dialog / dialog.cpp
index 84e69ee24317ce606a9f55409caba497042c5de1..7cb360a43c24297a3f41f54dc36bcc4772228f70 100644 (file)
@@ -15,7 +15,6 @@
 # include <config.h>
 #endif
 
-#include <typeinfo>
 #include <gtkmm/stock.h>
 #include <gtk/gtk.h>
 
@@ -97,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) {
@@ -115,9 +117,7 @@ Dialog::read_geometry()
 
 void hideCallback(GtkObject *object, gpointer dlgPtr)
 {
-    Dialog* example;
-    if ((void*)dlgPtr == 0 || typeid(dlgPtr) != typeid(example))
-            return;
+    g_return_if_fail( dlgPtr != NULL );
 
     Dialog *dlg = (Dialog *)dlgPtr;
     dlg->onHideF12();
@@ -125,9 +125,7 @@ void hideCallback(GtkObject *object, gpointer dlgPtr)
 
 void unhideCallback(GtkObject *object, gpointer dlgPtr)
 {
-    Dialog* example;
-    if ((void*)dlgPtr == 0 || typeid(dlgPtr) != typeid(example))
-            return;
+    g_return_if_fail( dlgPtr != NULL );
 
     Dialog *dlg = (Dialog *)dlgPtr;
     dlg->onShowF12();