Commit 4d676890 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte
Browse files

fixed Bug #525839 "Glade hangs in toolbar editor" replaced assert with if

* gladeui/glade-widget.c: fixed Bug #525839 "Glade hangs in toolbar editor"
  replaced assert with if statement in glade_widget_copy_properties()

* gladeui/glade-signal-editor.c: fixed Bug #522542 "glade-3 crashes when
  pressing Enter in signal handler entry field"
  removed unnecessary treeview row-activated handler.

svn path=/trunk/; revision=2077
parent 7313fc9a
2009-01-05 Juan Pablo Ugarte <juanpablougarte@gmail.com>
* gladeui/glade-widget.c: fixed Bug #525839 "Glade hangs in toolbar editor"
replaced assert with if statement in glade_widget_copy_properties()
* gladeui/glade-signal-editor.c: fixed Bug #522542 "glade-3 crashes when
pressing Enter in signal handler entry field"
removed unnecessary treeview row-activated handler.
2009-01-05 Tristan Van Berkom <tvb@gnome.org>
* gladeui/glade-base-editor.c: s/glade_widget_set_name()/glade_command_set_name()
......
......@@ -505,7 +505,10 @@ glade_signal_editor_handler_editing_started (GtkCellRenderer *cell,
const gchar *path,
GladeSignalEditor *editor)
{
GtkEntry *entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (editable)));
GtkEntry *entry;
g_return_if_fail (GTK_IS_COMBO_BOX_ENTRY (editable));
entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (editable)));
glade_signal_editor_editing_started (entry, TRUE);
......@@ -520,11 +523,14 @@ glade_signal_editor_user_data_editing_started (GtkCellRenderer *cell,
const gchar *path,
GladeSignalEditor *editor)
{
GtkEntry *entry = GTK_ENTRY (editable);
GtkEntry *entry;
GtkEntryCompletion *completion;
GtkListStore *store;
GtkTreeIter iter;
GList *list;
g_return_if_fail (GTK_IS_ENTRY (editable));
entry = GTK_ENTRY (editable);
g_return_if_fail (editor->widget != NULL);
......@@ -636,13 +642,6 @@ glade_signal_editor_userdata_cell_edited (GtkCellRendererText *cell,
g_free (old_userdata);
}
static void
row_activated (GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *tree_view_column, gpointer user_data)
{
gtk_tree_view_set_cursor (view, path, tree_view_column, TRUE);
gtk_widget_grab_focus (GTK_WIDGET (view));
}
static GtkWidget *
glade_signal_editor_construct_signals_list (GladeSignalEditor *editor)
{
......@@ -678,8 +677,6 @@ glade_signal_editor_construct_signals_list (GladeSignalEditor *editor)
/* the view now holds a reference, we can get rid of our own */
g_object_unref (G_OBJECT (editor->model));
g_signal_connect(view, "row-activated", (GCallback) row_activated, NULL);
/* Contruct handler model */
glade_signal_editor_construct_handler_store (editor);
......
......@@ -2204,14 +2204,17 @@ glade_widget_copy_properties (GladeWidget *widget,
GladeWidget *parentless;
glade_property_get (template_prop, &object);
g_assert (object);
if (object)
{
parentless = glade_widget_get_from_gobject (object);
parentless = glade_widget_dup (parentless, exact);
parentless = glade_widget_get_from_gobject (object);
parentless = glade_widget_dup (parentless, exact);
glade_widget_set_project (parentless, widget->project);
glade_widget_set_project (parentless, widget->project);
glade_property_set (widget_prop, parentless->object);
glade_property_set (widget_prop, parentless->object);
}
else
glade_property_set (widget_prop, NULL);
}
else
glade_property_set_value (widget_prop, template_prop->value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment