Code

* Make sure we don't read on NULL pointer instead of gobject instance in text-edit...
authormderezynski <mderezynski@users.sourceforge.net>
Mon, 22 May 2006 08:57:39 +0000 (08:57 +0000)
committermderezynski <mderezynski@users.sourceforge.net>
Mon, 22 May 2006 08:57:39 +0000 (08:57 +0000)
src/dialogs/text-edit.cpp
src/widgets/toolbox.cpp

index 97f872891d26c2e38a61777de9f84698f78728de..30e7f7a0e47ef259bc833a03555b1c6c503a9a4f 100644 (file)
@@ -804,6 +804,7 @@ sp_text_edit_dialog_text_changed (GtkTextBuffer *tb, GtkWidget *dlg)
 void
 sp_text_edit_dialog_default_set_insensitive ()
 {
+    if (!dlg) return;
     gpointer data = g_object_get_data (G_OBJECT (dlg), "default");
     if (!data) return;
     gtk_widget_set_sensitive (GTK_WIDGET (data), FALSE);
index 98ea859a8f48b68ededdde2f975b540ebf8733f7..f8f2f611d9b98f3bbf2aee3d928154d4ca00dafa 100644 (file)
@@ -2967,6 +2967,9 @@ namespace {
         GtkTreeIter   iter;
         char         *family;
 
+        gdk_pointer_ungrab (GDK_CURRENT_TIME);
+        gdk_keyboard_ungrab (GDK_CURRENT_TIME);
+
         gtk_tree_selection_get_selected (selection, &model, &iter);
         gtk_tree_model_get (model, &iter, 0, &family, -1);
 
@@ -3209,6 +3212,7 @@ namespace {
             gtk_window_move (GTK_WINDOW (popdown), x, y + widget->allocation.height + 2); //2px of grace space 
             gtk_widget_show_all (popdown);
 
+#if 0
             gdk_pointer_grab (widget->window, TRUE,
                          GdkEventMask (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
                          GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
@@ -3216,6 +3220,7 @@ namespace {
                          NULL, NULL, GDK_CURRENT_TIME);
 
             gdk_keyboard_grab (widget->window, TRUE, GDK_CURRENT_TIME);
+#endif
 
             visible = true;
         }