[gtk+/gdk-backend: 78/91] Drop g[dt]k_set_locale



commit 856335a4f05854cd441a9fbfba34185000ee6016
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Dec 16 11:33:43 2010 -0500

    Drop g[dt]k_set_locale
    
    These functions were essentially just calling setlocale anyway.
    The X11 version was also setting a gdk_use_mb variable that
    is not used anywhere.

 docs/reference/gdk/gdk3-sections.txt |    2 -
 docs/reference/gtk/gtk3-sections.txt |    1 -
 gdk/Makefile.am                      |    1 -
 gdk/gdk.symbols                      |    1 -
 gdk/gdkmain.h                        |   24 +--------
 gdk/x11/Makefile.am                  |    1 -
 gdk/x11/gdkdisplay-x11.c             |    6 +-
 gdk/x11/gdkdnd-x11.c                 |    5 +-
 gdk/x11/gdkim-x11.c                  |  103 ----------------------------------
 gdk/x11/gdkmain-x11.c                |    2 -
 gdk/x11/gdkprivate-x11.h             |    5 +-
 gtk/gtk.symbols                      |    1 -
 gtk/gtkmain.c                        |   31 ----------
 gtk/gtkmain.h                        |    1 -
 14 files changed, 6 insertions(+), 178 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index 0b45b16..90cf828 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -8,8 +8,6 @@ gdk_init
 gdk_init_check
 gdk_parse_args
 gdk_get_display_arg_name
-gdk_set_locale
-gdk_set_sm_client_id
 gdk_notify_startup_complete
 gdk_notify_startup_complete_with_id
 
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index e16eb06..87d0a28 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -5294,7 +5294,6 @@ gtk_window_group_get_type
 <SECTION>
 <FILE>gtkmain</FILE>
 <TITLE>General</TITLE>
-gtk_set_locale
 gtk_disable_setlocale
 gtk_get_default_language
 gtk_parse_args
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 12b6fd6..b07af09 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -201,7 +201,6 @@ x11_introspection_files = 		\
 	x11/gdkeventsource.c		\
 	x11/gdkeventtranslator.c	\
 	x11/gdkgeometry-x11.c		\
-	x11/gdkim-x11.c			\
 	x11/gdkkeys-x11.c		\
 	x11/gdkmain-x11.c		\
 	x11/gdkproperty-x11.c		\
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index 8d9c560..f996e84 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -313,7 +313,6 @@ gdk_selection_property_get
 gdk_selection_send_notify
 gdk_selection_send_notify_for_display
 gdk_set_double_click_time
-gdk_set_locale
 gdk_set_pointer_hooks
 gdk_set_program_class
 gdk_set_show_events
diff --git a/gdk/gdkmain.h b/gdk/gdkmain.h
index b9915a3..28b5877 100644
--- a/gdk/gdkmain.h
+++ b/gdk/gdkmain.h
@@ -50,29 +50,7 @@ gboolean              gdk_init_check                      (gint           *argc,
 void                  gdk_add_option_entries_libgtk_only  (GOptionGroup   *group);
 void                  gdk_pre_parse_libgtk_only           (void);
 
-/**
- * gdk_set_locale:
- *
- * Initializes the support for internationalization by calling the <function>setlocale()</function>
- * system call. This function is called by gtk_set_locale() and so GTK+
- * applications should use that instead.
- *
- * The locale to use is determined by the <envar>LANG</envar> environment variable,
- * so to run an application in a certain locale you can do something like this:
- * <informalexample>
- * <programlisting>
- *   export LANG="fr"
- *   ... run application ...
- * </programlisting>
- * </informalexample>
- *
- * If the locale is not supported by X then it is reset to the standard "C"
- * locale.
- *
- * Returns: the resulting locale.
- */
-gchar*                gdk_set_locale                      (void);
-void                  gdk_disable_multidevice             (void);
+void                  gdk_enable_multidevice              (void);
 
 G_CONST_RETURN gchar *gdk_get_program_class               (void);
 void                  gdk_set_program_class               (const gchar    *program_class);
diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am
index 72487ae..4422b2b 100644
--- a/gdk/x11/Makefile.am
+++ b/gdk/x11/Makefile.am
@@ -36,7 +36,6 @@ libgdk_x11_la_SOURCES = 	\
 	gdkeventtranslator.c	\
 	gdkeventtranslator.h	\
 	gdkgeometry-x11.c  	\
-	gdkim-x11.c	   	\
 	gdkkeys-x11.c		\
 	gdkmain-x11.c		\
 	gdkproperty-x11.c	\
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index f24614a..7bcb5de 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -1117,7 +1117,7 @@ gdk_event_init (GdkDisplay *display)
 }
 
 static void
-gdk_input_init (GdkDisplay *display)
+gdk_x11_display_init_input (GdkDisplay *display)
 {
   GdkDisplayX11 *display_x11;
   GdkDeviceManager *device_manager;
@@ -1446,8 +1446,8 @@ _gdk_x11_display_open (const gchar *display_name)
   }
 #endif
 
-  gdk_input_init (display);
-  _gdk_x11_dnd_init (display);
+  gdk_x11_display_init_input (display);
+  _gdk_x11_display_init_dnd (display);
 
   for (i = 0; i < ScreenCount (display_x11->xdisplay); i++)
     _gdk_x11_screen_setup (display_x11->screens[i]);
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 4be4e9c..eff8bd3 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -3072,11 +3072,8 @@ xdnd_drop_filter (GdkXEvent *xev,
   return GDK_FILTER_REMOVE;
 }
 
-/*************************************************************
- ************************** Public API ***********************
- *************************************************************/
 void
-_gdk_x11_dnd_init (GdkDisplay *display)
+_gdk_x11_display_init_dnd (GdkDisplay *display)
 {
   int i;
   init_byte_order ();
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index f629da1..13434db 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -80,8 +80,6 @@ static int	    gdk_x_io_error		 (Display     *display);
 void
 _gdk_x11_windowing_init (void)
 {
-  _gdk_x11_initialize_locale ();
-
   XSetErrorHandler (gdk_x_error);
   XSetIOErrorHandler (gdk_x_io_error);
 }
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index 67e23a1..4dc341c 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -149,7 +149,6 @@ void     _gdk_x11_keymap_add_virt_mods   (GdkKeymap       *keymap,
 gboolean _gdk_x11_keymap_key_is_modifier (GdkKeymap       *keymap,
                                           guint            keycode);
 
-void _gdk_x11_initialize_locale (void);
 void _gdk_x11_windowing_init    (void);
 
 void _gdk_x11_window_grab_check_unmap   (GdkWindow *window,
@@ -214,9 +213,7 @@ void _gdk_x11_precache_atoms (GdkDisplay          *display,
                               const gchar * const *atom_names,
                               gint                 n_atoms);
 
-void _gdk_events_init                 (GdkDisplay *display);
-void _gdk_events_uninit               (GdkDisplay *display);
-void _gdk_x11_dnd_init                (GdkDisplay *display);
+void _gdk_x11_display_init_dnd        (GdkDisplay *display);
 
 void _gdk_x11_screen_init_root_window (GdkScreen *screen);
 void _gdk_x11_screen_init_visuals     (GdkScreen *screen);
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index ad10d60..9ed9038 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -2269,7 +2269,6 @@ gtk_separator_tool_item_get_type G_GNUC_CONST
 gtk_separator_tool_item_new
 gtk_separator_tool_item_set_draw
 gtk_set_debug_flags
-gtk_set_locale
 gtk_settings_get_default
 gtk_settings_get_for_screen
 gtk_settings_get_type G_GNUC_CONST
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 49204f6..2fc1fb5 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1165,37 +1165,6 @@ gtk_init_check_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof
 #endif
 
 /**
- * gtk_set_locale:
- *
- * Initializes internationalization support for GTK+. gtk_init()
- * automatically does this, so there is typically no point
- * in calling this function.
- *
- * If you are calling this function because you changed the locale
- * after GTK+ is was initialized, then calling this function
- * may help a bit. (Note, however, that changing the locale
- * after GTK+ is initialized may produce inconsistent results and
- * is not really supported.)
- * 
- * In detail - sets the current locale according to the
- * program environment. This is the same as calling the C library function
- * <literal>setlocale (LC_ALL, "")</literal> but also takes care of the 
- * locale specific setup of the windowing system used by GDK.
- * 
- * Returns: a string corresponding to the locale set, typically in the
- * form lang_COUNTRY, where lang is an ISO-639 language code, and
- * COUNTRY is an ISO-3166 country code. On Unix, this form matches the
- * result of the setlocale(); it is also used on other machines, such as 
- * Windows, where the C library returns a different result. The string is 
- * owned by GTK+ and should not be modified or freed.
- **/
-gchar *
-gtk_set_locale (void)
-{
-  return gdk_set_locale ();
-}
-
-/**
  * _gtk_get_lc_ctype:
  *
  * Return the Unix-style locale string for the language currently in
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index 1549d95..050b18c 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -112,7 +112,6 @@ gboolean gtk_init_check_abi_check (int	  *argc,
 #endif
 
 void           gtk_disable_setlocale    (void);
-gchar *        gtk_set_locale           (void);
 PangoLanguage *gtk_get_default_language (void);
 gboolean       gtk_events_pending       (void);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]