index b4e491bf960bd81dbc007f1072559416722a6d1e..7cb360a43c24297a3f41f54dc36bcc4772228f70 100644 (file)
--- a/src/ui/dialog/dialog.cpp
+++ b/src/ui/dialog/dialog.cpp
# include <config.h>
#endif
-#include <typeinfo>
#include <gtkmm/stock.h>
#include <gtk/gtk.h>
// 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);
// 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) {
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();
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();