From 62238aa4267a14c53b928b9425eea3cfbcbad110 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Fri, 23 Mar 2012 16:23:25 +0000 Subject: [PATCH] Ajustes windows na funcao de charset --- src/gtk/dialog.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/gtk/dialog.c b/src/gtk/dialog.c index 3b59bb4..38a5013 100644 --- a/src/gtk/dialog.c +++ b/src/gtk/dialog.c @@ -332,14 +332,19 @@ } list[] = { // http://en.wikipedia.org/wiki/Character_encoding - { "ISO-8859-1", N_( "Western Europe (ISO 8859-1)" ) }, + { "ISO-8859-1", N_( "Western Europe (ISO 8859-1)" ) }, + { "CP1252", N_( "Windows Western languages (CP1252)" ) }, { NULL, NULL } }; GtkWidget * label = gtk_label_new_with_mnemonic (_("C_haracter Coding:")); const gchar * charset = NULL; +#if GTK_CHECK_VERSION(2,24,0) GtkWidget * menu = gtk_combo_box_text_new(); +#else + GtkWidget * menu = gtk_combo_box_new(); +#endif // GTK(2,24) gchar * text; int f; int p = 0; @@ -348,7 +353,12 @@ *encoding = g_strdup(charset); text = g_strdup_printf(_("Current (%s)"),charset); + +#if GTK_CHECK_VERSION(2,24,0) gtk_combo_box_text_insert(GTK_COMBO_BOX_TEXT(menu),p,charset,text); +#else + +#endif // GTK(2,24) g_free(text); gtk_combo_box_set_active(GTK_COMBO_BOX(menu),p++); @@ -356,7 +366,13 @@ for(f=0;list[f].charset;f++) { if(strcasecmp(charset,list[f].charset)) + { +#if GTK_CHECK_VERSION(2,24,0) gtk_combo_box_text_insert(GTK_COMBO_BOX_TEXT(menu),p++,list[f].charset,gettext(list[f].text)); +#else + +#endif // GTK(2,24) + } } -- libgit2 0.21.2