[glade3/glade-3-8] * 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/glade-3-8] * gladeui/glade-base-editor.c, gladeui/glade-command.c: Avoid setting a null name on a widget.
- Date: Thu, 30 Dec 2010 13:12:16 +0000 (UTC)
commit 433e15951b090c1e26d6fdc6618de6e4cfcae66f
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Thu Dec 30 22:16:30 2010 +0900
* gladeui/glade-base-editor.c, gladeui/glade-command.c: Avoid setting a null name on a widget.
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 08308c7..09912cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,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 Tristan Van Berkom <tristanvb openismus com>
* gladeui/glade-design-view.c: Made loading progress bar nicer looking and ellipsizing.
diff --git a/gladeui/glade-base-editor.c b/gladeui/glade-base-editor.c
index d890cfc..88f9d43 100644
--- a/gladeui/glade-base-editor.c
+++ b/gladeui/glade-base-editor.c
@@ -353,7 +353,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 285336e..8ec8207 100644
--- a/gladeui/glade-command.c
+++ b/gladeui/glade-command.c
@@ -860,7 +860,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]