mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-29 20:52:16 -05:00
Fix removing keys from favorites
This commit is contained in:
parent
0a2af0ab62
commit
4130954c15
@ -1384,7 +1384,16 @@ servlist_editkey_cb (GtkCellRendererText *cell, gchar *name, gchar *newval, gpoi
|
|||||||
if (favchan)
|
if (favchan)
|
||||||
{
|
{
|
||||||
key = favchan->key;
|
key = favchan->key;
|
||||||
|
|
||||||
|
if (strlen (newval)) /* check key length, the field can be empty in order to delete the key! */
|
||||||
|
{
|
||||||
favchan->key = g_strdup (newval);
|
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);
|
gtk_list_store_set (GTK_LIST_STORE (model), &iter, 1, favchan->key, -1);
|
||||||
g_free (key);
|
g_free (key);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user