[glade3] * gladeui/glade-base-editor.c, gladeui/glade-command.c: Avoid setting a null name on a widget.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3] * gladeui/glade-base-editor.c, gladeui/glade-command.c: Avoid setting a null name on a widget.
- Date: Thu, 30 Dec 2010 13:12:21 +0000 (UTC)
commit f9e580e4a8e30854b81b61ddce713dcb8f4e82ea
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Thu Dec 30 22:18:45 2010 +0900
* gladeui/glade-base-editor.c, gladeui/glade-command.c: Avoid setting a null name on a widget.
Conflicts:
ChangeLog
gladeui/glade-base-editor.c
gladeui/glade-command.c
ChangeLog | 2 ++
gladeui/glade-base-editor.c | 2 +-
gladeui/glade-command.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 863050e..e5aafb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,8 @@
* plugins/gtk+/gtk+.xml.in: Updated catalog for 2.22 and 2.24 symbols.
+ * gladeui/glade-base-editor.c, gladeui/glade-command.c: Avoid setting a null name on a widget.
+
2010-12-29 Javier Jardón <jjardon gnome org>
* configure.ac: Use upstream gettext
diff --git a/gladeui/glade-base-editor.c b/gladeui/glade-base-editor.c
index a46e1c9..2254dfb 100644
--- a/gladeui/glade-base-editor.c
+++ b/gladeui/glade-base-editor.c
@@ -354,7 +354,7 @@ glade_base_editor_name_activate (GtkEntry * entry, GladeWidget * gchild)
const gchar *text = gtk_entry_get_text (GTK_ENTRY (entry));
GladeBaseEditor *editor = g_object_get_data (G_OBJECT (entry), "editor");
- if (strcmp (glade_widget_get_name (gchild), text))
+ if (text && text[0] && strcmp (glade_widget_get_name (gchild), text))
{
g_signal_handlers_block_by_func (gchild->project,
glade_base_editor_project_widget_name_changed,
diff --git a/gladeui/glade-command.c b/gladeui/glade-command.c
index 4ef6e20..226d053 100644
--- a/gladeui/glade-command.c
+++ b/gladeui/glade-command.c
@@ -854,7 +854,7 @@ glade_command_set_name (GladeWidget * widget, const gchar * name)
GladeCommand *cmd;
g_return_if_fail (GLADE_IS_WIDGET (widget));
- g_return_if_fail (name != NULL);
+ g_return_if_fail (name && name[0]);
/* Dont spam the queue with false name changes.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]