diff options
author | Berke Viktor <bviktor@hexchat.org> | 2013-05-17 02:24:47 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2013-05-17 02:24:47 +0200 |
commit | 4130954c15ab31d5019a262dcd637087fcf4ce59 (patch) | |
tree | 955abe6e7177886758e43aaa582bf0689fd9263a /src | |
parent | 0a2af0ab6256f5ccbbd81e62fabfc8fa6022995b (diff) |
Fix removing keys from favorites
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-gtk/servlistgui.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/fe-gtk/servlistgui.c b/src/fe-gtk/servlistgui.c index 97c0062f..07a55d69 100644 --- a/src/fe-gtk/servlistgui.c +++ b/src/fe-gtk/servlistgui.c @@ -1384,7 +1384,16 @@ servlist_editkey_cb (GtkCellRendererText *cell, gchar *name, gchar *newval, gpoi if (favchan) { key = favchan->key; - favchan->key = g_strdup (newval); + + if (strlen (newval)) /* check key length, the field can be empty in order to delete the key! */ + { + favchan->key = g_strdup (newval); + } + else /* if key's empty, make sure we actually remove the key */ + { + favchan->key = NULL; + } + gtk_list_store_set (GTK_LIST_STORE (model), &iter, 1, favchan->key, -1); g_free (key); } |