Mercurial > hg > forks > geeqie
changeset 1971:491b4e901f05
Fix up deprecated gtk functions.
gtk_combo_box_entry_new_text() -> gtk_combo_box_text_new_with_entry()
gtk_combo_box_append_text() -> gtk_combo_box_text_append_text()
author | Laurent Monin <zas@norz.org> |
---|---|
date | Mon, 14 May 2012 13:08:18 +0200 |
parents | 3f82625ef97b |
children | 09757f887309 |
files | src/ui_bookmark.c |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ui_bookmark.c Tue Mar 06 18:03:01 2012 +0100 +++ b/src/ui_bookmark.c Mon May 14 13:08:18 2012 +0200 @@ -876,7 +876,12 @@ hc->history_key = g_strdup(history_key); hc->history_levels = max_levels; +#if GTK_CHECK_VERSION(2,24,0) + hc->combo = gtk_combo_box_text_new_with_entry(); +#else hc->combo = gtk_combo_box_entry_new_text(); +#endif + #if 0 gtk_combo_set_case_sensitive(GTK_COMBO(hc->combo), TRUE); gtk_combo_set_use_arrows(GTK_COMBO(hc->combo), FALSE); @@ -892,7 +897,11 @@ work = history_list_get_by_key(hc->history_key); while (work) { +#if GTK_CHECK_VERSION(2,24,0) + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(hc->combo), (gchar *)work->data); +#else gtk_combo_box_append_text(GTK_COMBO_BOX(hc->combo), (gchar *)work->data); +#endif work = work->next; n++; } @@ -949,7 +958,11 @@ work = history_list_get_by_key(hc->history_key); while (work) { +#if GTK_CHECK_VERSION(2,24,0) + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(hc->combo), (gchar *)work->data); +#else gtk_combo_box_append_text(GTK_COMBO_BOX(hc->combo), (gchar *)work->data); +#endif work = work->next; } }