]> granicus.if.org Git - vim/commitdiff
Other solution for GTK not changing the locale.
authorBram Moolenaar <Bram@vim.org>
Fri, 21 May 2010 10:04:55 +0000 (12:04 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 21 May 2010 10:04:55 +0000 (12:04 +0200)
src/ex_cmds2.c
src/main.c
src/window.c

index 92451b5e12288ca4789c9e4f642714de20d70b79..e5ce640e23ad38f730d166c01d7de21c924e02d7 100644 (file)
@@ -4159,18 +4159,6 @@ ex_language(eap)
                    set_helplang_default(mname);
 #endif
                }
-
-               /* Set $LC_CTYPE, because it overrules $LANG, and
-                * gtk_set_locale() calls setlocale() again.  gnome_init()
-                * sets $LC_CTYPE to "en_US" (that's a bug!). */
-               if (what != VIM_LC_MESSAGES)
-                   vim_setenv((char_u *)"LC_CTYPE", name);
-# ifdef FEAT_GUI_GTK
-               /* Let GTK know what locale we're using.  Not sure this is
-                * really needed... */
-               if (gui.in_use)
-                   (void)gtk_set_locale();
-# endif
            }
 
 # ifdef FEAT_EVAL
index 7e741def2f0e5b475f02120ebceeaade5ea0852f..b9e92094ed0bb32636a9ea88635988d5a660a0e9 100644 (file)
@@ -377,10 +377,6 @@ main
            if (params.evim_mode)
                mch_exit(1);
        }
-#  if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
-       /* Re-initialize locale, it may have been altered by gui_init_check() */
-       init_locale();
-#  endif
     }
 # endif
 #endif
@@ -1400,6 +1396,10 @@ init_locale()
 {
     setlocale(LC_ALL, "");
 
+# ifdef FEAT_GUI_GTK
+    /* Tell Gtk not to change our locale settings. */
+    gtk_disable_setlocale();
+# endif
 # if defined(FEAT_FLOAT) && defined(LC_NUMERIC)
     /* Make sure strtod() uses a decimal point, not a comma. */
     setlocale(LC_NUMERIC, "C");
index cc114ccade594c4d2361ebd9f0b03c4550f0aa06..9071012955b40186d63fff16ac577106a53dd1ab 100644 (file)
@@ -3775,6 +3775,9 @@ goto_tabpage(n)
 goto_tabpage_tp(tp)
     tabpage_T  *tp;
 {
+    /* Don't repeat a message in another tab page. */
+    set_keep_msg(NULL, 0);
+
     if (tp != curtab && leave_tabpage(tp->tp_curwin->w_buffer) == OK)
     {
        if (valid_tabpage(tp))