# HG changeset patch # User Sadrul Habib Chowdhury # Date 1186805972 0 # Node ID 7066896f66285ff2eba4e8287467f4c18dead04e # Parent 85b155a574a376894c71524944bc0d4d4360cc83 disapproval of revision 'a4ce7b8adf2db74d531c35278fe83247d90ce4b1' diff -r 85b155a574a3 -r 7066896f6628 finch/libgnt/gntbutton.c --- a/finch/libgnt/gntbutton.c Sat Aug 11 04:18:14 2007 +0000 +++ b/finch/libgnt/gntbutton.c Sat Aug 11 04:19:32 2007 +0000 @@ -162,7 +162,6 @@ GntWidget *widget = g_object_new(GNT_TYPE_BUTTON, NULL); GntButton *button = GNT_BUTTON(widget); - text = gnt_util_localize_string(text); button->priv->text = gnt_util_onscreen_fit_string(text, -1); gnt_widget_set_take_focus(widget, TRUE); diff -r 85b155a574a3 -r 7066896f6628 finch/libgnt/gntcheckbox.c --- a/finch/libgnt/gntcheckbox.c Sat Aug 11 04:18:14 2007 +0000 +++ b/finch/libgnt/gntcheckbox.c Sat Aug 11 04:19:32 2007 +0000 @@ -21,7 +21,6 @@ */ #include "gntcheckbox.h" -#include "gntutils.h" enum { @@ -155,7 +154,6 @@ { GntWidget *widget = g_object_new(GNT_TYPE_CHECK_BOX, NULL); - text = gnt_util_localize_string(text); GNT_BUTTON(widget)->priv->text = g_strdup(text); gnt_widget_set_take_focus(widget, TRUE); diff -r 85b155a574a3 -r 7066896f6628 finch/libgnt/gntentry.c --- a/finch/libgnt/gntentry.c Sat Aug 11 04:18:14 2007 +0000 +++ b/finch/libgnt/gntentry.c Sat Aug 11 04:19:32 2007 +0000 @@ -830,7 +830,6 @@ g_free(entry->start); - text = gnt_util_localize_string(text); if (text && text[0]) { len = strlen(text); diff -r 85b155a574a3 -r 7066896f6628 finch/libgnt/gntlabel.c --- a/finch/libgnt/gntlabel.c Sat Aug 11 04:18:14 2007 +0000 +++ b/finch/libgnt/gntlabel.c Sat Aug 11 04:19:32 2007 +0000 @@ -134,7 +134,6 @@ void gnt_label_set_text(GntLabel *label, const char *text) { g_free(label->text); - text = gnt_util_localize_string(text); label->text = gnt_util_onscreen_fit_string(text, -1); if (GNT_WIDGET(label)->window) diff -r 85b155a574a3 -r 7066896f6628 finch/libgnt/gntmain.c --- a/finch/libgnt/gntmain.c Sat Aug 11 04:18:14 2007 +0000 +++ b/finch/libgnt/gntmain.c Sat Aug 11 04:19:32 2007 +0000 @@ -222,7 +222,7 @@ { char keys[256]; int rd; - char *k, *utf8; + char *k; if (wm->mode == GNT_KP_MODE_WAIT_ON_CHILD) return FALSE; @@ -251,8 +251,7 @@ if (HOLDING_ESCAPE) keys[0] = '\033'; - utf8 = g_locale_to_utf8(keys, rd, NULL, NULL, NULL); - k = utf8 ? utf8 : keys; + k = keys; while (rd) { char back; int p; @@ -279,7 +278,6 @@ } end: gnt_wm_set_event_stack(wm, FALSE); - g_free(utf8); return TRUE; } diff -r 85b155a574a3 -r 7066896f6628 finch/libgnt/gnttextview.c --- a/finch/libgnt/gnttextview.c Sat Aug 11 04:18:14 2007 +0000 +++ b/finch/libgnt/gnttextview.c Sat Aug 11 04:19:32 2007 +0000 @@ -376,7 +376,6 @@ view->string->len = 0; GNT_WIDGET_SET_FLAGS(GNT_WIDGET(view), GNT_WIDGET_DRAWING); - g_object_set_data(G_OBJECT(view), "resizing", GINT_TO_POINTER(TRUE)); for (; back; back = back->prev) { line = back->data; if (back->next && !line->soft) { @@ -395,7 +394,6 @@ free_text_line(line, NULL); } g_list_free(list); - g_object_set_data(G_OBJECT(view), "resizing", GINT_TO_POINTER(FALSE)); list = view->list = g_list_first(view->list); /* Go back to the line that was in view before resizing started */ @@ -509,8 +507,6 @@ if (text == NULL || *text == '\0') return; - if (!g_object_get_data(G_OBJECT(view), "resizing")) - text = gnt_util_localize_string(text); fl = gnt_text_format_flag_to_chtype(flags); len = view->string->len; @@ -705,7 +701,6 @@ GList *list, *next, *iter, *inext; const int text_length = text ? strlen(text) : 0; int count = 0; - text = gnt_util_localize_string(text); for (list = view->tags; list; list = next) { GntTextTag *tag = list->data; next = list->next; diff -r 85b155a574a3 -r 7066896f6628 finch/libgnt/gnttree.c --- a/finch/libgnt/gnttree.c Sat Aug 11 04:18:14 2007 +0000 +++ b/finch/libgnt/gnttree.c Sat Aug 11 04:19:32 2007 +0000 @@ -1486,7 +1486,6 @@ g_return_if_fail(colno < tree->ncol); - text = gnt_util_localize_string(text); row = g_hash_table_lookup(tree->hash, key); if (row) { @@ -1626,9 +1625,7 @@ col->text = iter->data; col->isbinary = TRUE; } else { - const char *text = iter->data; - text = gnt_util_localize_string(text); - col->text = g_strdup(text ? text : ""); + col->text = g_strdup(iter->data ? iter->data : ""); col->isbinary = FALSE; } @@ -1670,7 +1667,6 @@ void gnt_tree_set_column_title(GntTree *tree, int index, const char *title) { g_free(tree->columns[index].title); - title = gnt_util_localize_string(title); tree->columns[index].title = g_strdup(title); } @@ -1683,7 +1679,6 @@ for (i = 0; i < tree->ncol; i++) { const char *title = va_arg(args, const char *); - title = gnt_util_localize_string(title); tree->columns[i].title = g_strdup(title); } va_end(args); diff -r 85b155a574a3 -r 7066896f6628 finch/libgnt/gntutils.c --- a/finch/libgnt/gntutils.c Sat Aug 11 04:18:14 2007 +0000 +++ b/finch/libgnt/gntutils.c Sat Aug 11 04:19:32 2007 +0000 @@ -409,14 +409,3 @@ g_signal_connect_swapped(G_OBJECT(button), "destroy", G_CALLBACK(free_trigger_button), tb); } -const char *gnt_util_localize_string(const char *string) -{ - static char *loc = NULL; - - g_free(loc); - - loc = string ? g_locale_from_utf8(string, -1, NULL, NULL, NULL) : NULL; - - return loc ? loc : string; -} - diff -r 85b155a574a3 -r 7066896f6628 finch/libgnt/gntutils.h --- a/finch/libgnt/gntutils.h Sat Aug 11 04:18:14 2007 +0000 +++ b/finch/libgnt/gntutils.h Sat Aug 11 04:19:32 2007 +0000 @@ -139,10 +139,3 @@ */ void gnt_util_set_trigger_widget(GntWidget *wid, const char *text, GntWidget *button); -/** - * Return a string safe to print. - * - * @param string The UTF-8 string. - */ -const char *gnt_util_localize_string(const char *string); -