GDK_NO_XSETTINGS leaves the settings of the desktop unread, GTK_LOCALEDIR points to the translations of GTK+ (from Ardour's YTK)
This commit is contained in:
parent
2933cdb857
commit
b024119172
2 changed files with 16 additions and 3 deletions
|
|
@ -190,6 +190,11 @@ _gdk_x11_events_init_screen (GdkScreen *screen)
|
|||
{
|
||||
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
|
||||
|
||||
/* GDK_NO_XSETTINGS: the settings of the desktop are not read, to see
|
||||
* what a program does without them (as Ardour's YDK has it) */
|
||||
if (g_getenv ("GDK_NO_XSETTINGS"))
|
||||
return;
|
||||
|
||||
/* Keep a flag to avoid extra notifies that we don't need
|
||||
*/
|
||||
screen_x11->xsettings_in_init = TRUE;
|
||||
|
|
@ -3191,7 +3196,7 @@ gdk_screen_get_setting (GdkScreen *screen,
|
|||
break;
|
||||
}
|
||||
|
||||
if (!xsettings_name)
|
||||
if (!xsettings_name || !screen_x11->xsettings_client)
|
||||
goto out;
|
||||
|
||||
result = xsettings_client_get_setting (screen_x11->xsettings_client,
|
||||
|
|
|
|||
|
|
@ -723,8 +723,16 @@ gettext_initialization (void)
|
|||
setlocale_initialization ();
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR);
|
||||
bindtextdomain (GETTEXT_PACKAGE "-properties", GTK_LOCALEDIR);
|
||||
/* GTK_LOCALEDIR: the translations of GTK+ elsewhere, for programs
|
||||
* that bring GTK+ along (as Ardour's YTK has it) */
|
||||
{
|
||||
const gchar *localedir = g_getenv ("GTK_LOCALEDIR");
|
||||
|
||||
if (localedir == NULL || localedir[0] == '\0')
|
||||
localedir = GTK_LOCALEDIR;
|
||||
bindtextdomain (GETTEXT_PACKAGE, localedir);
|
||||
bindtextdomain (GETTEXT_PACKAGE "-properties", localedir);
|
||||
}
|
||||
# ifdef HAVE_BIND_TEXTDOMAIN_CODESET
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE "-properties", "UTF-8");
|
||||
|
|
|
|||
Loading…
Reference in a new issue