Mercurial > pidgin
changeset 32096:d5b2b5021851
Show only the MessageStyle name and not the entire path.
author | tdrhq@soc.pidgin.im |
---|---|
date | Mon, 10 Aug 2009 23:51:12 +0000 |
parents | d25e6f4a239a |
children | f00af06ef995 |
files | pidgin/plugins/adiumthemes/webkit.c |
diffstat | 1 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/plugins/adiumthemes/webkit.c Mon Aug 10 23:44:22 2009 +0000 +++ b/pidgin/plugins/adiumthemes/webkit.c Mon Aug 10 23:51:12 2009 +0000 @@ -810,9 +810,22 @@ { char *name = gtk_combo_box_get_active_text (GTK_COMBO_BOX(combobox)); GtkWidget *dialog; + GList *styles = get_style_directory_list (), *iter; + /* find the full path for this name, I wish I could store this info in the combobox itself. :( */ + for (iter = styles; iter; iter = g_list_next(iter)) { + char* basename = g_path_get_basename (iter->data); + if (g_str_equal (basename, name)) { + g_free (basename); + break; + } + g_free (basename); + } + + g_assert (iter); + g_free (name); g_free (cur_style_dir); - cur_style_dir = name; + cur_style_dir = g_strdup (iter->data);; /* inform the user that existing conversations haven't changed */ dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, "The style for existing conversations have not been changed. Please close and re-open the conversation for the changes to take effect."); @@ -832,7 +845,10 @@ PidginMessageStyle *style = pidgin_message_style_load (iter->data); if (style) { - gtk_combo_box_append_text (GTK_COMBO_BOX(combobox), iter->data); + char *text = g_path_get_basename (iter->data); + gtk_combo_box_append_text (GTK_COMBO_BOX(combobox), text); + g_free (text); + if (g_str_equal (iter->data, cur_style_dir)) selected = index; index++;