mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 00:30:08 +00:00
0349676329
* .cvsignore: Ignore the sgml directory made by gtkdoc. * demos/pixbuf-demo.c: (main): Use gtk_window_set_resizable instead of the deprecated gtk_window_set_policy. * demos/testpixbuf-scale.c: Add missing <stdlib.h> include. * gdk/gdkkeys.c: (gdk_keymap_class_init): Remove empty finalize function to get rid of warning and some code too. * gdk/x11/gdkfont-x11.c: (gdk_font_charset_for_locale): Add missing const. * gdk/x11/gdkmain-x11.c: (_gdk_windowing_init_check): Remove unused local. * gdk/x11/gdkpango-x11.c: (gdk_pango_context_get): Add missing const. * gdk/x11/gdkselection-x11.c: (gdk_text_property_to_utf8_list), (gdk_utf8_to_compound_text): Add missing const. * gtk/gtkimage.c: (gtk_image_expose): Remove unused local. * gtk/gtkmenubar.c: (gtk_menu_bar_hierarchy_changed): Add missing cast and get rid of an unnecessary one. * gtk/gtksettings.c: (gtk_settings_notify): Remove unused local. * gtk/gtkstatusbar.c: (gtk_statusbar_size_allocate): Remove unused local. * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_build_level): Remove unused local. * modules/input/gtkimcontextxim.c: (gtk_im_context_xim_new): Add missing const. * tests/testsocket.c: (add_child): Add cast so the printf format doesn't make us implicitly depend on what integer type gtk_socket_get_id returns. * tests/testtextbuffer.c: Add missing const. * tests/testtreefocus.c: (main): Remove unused local. * tests/treestoretest.c: (iter_remove): Remove unused local. (uppercase_value): Remove unused function. (make_window): Add statement to quiet the compiler's uninitialized variable warning.
48 lines
1.3 KiB
C
48 lines
1.3 KiB
C
/* GDK - The GIMP Drawing Kit
|
|
* Copyright (C) 2000 Red Hat, Inc.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#include <config.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "gdkprivate-x11.h"
|
|
#include "gdkpango.h"
|
|
#include <pango/pangox.h>
|
|
#ifdef HAVE_XFT
|
|
#include <pango/pangoxft.h>
|
|
#endif
|
|
|
|
PangoContext *
|
|
gdk_pango_context_get (void)
|
|
{
|
|
#ifdef HAVE_XFT
|
|
static gint use_xft = -1;
|
|
if (use_xft == -1)
|
|
{
|
|
const char *val = g_getenv ("GDK_USE_XFT");
|
|
|
|
use_xft = val && (atoi (val) != 0);
|
|
}
|
|
|
|
if (use_xft)
|
|
return pango_xft_get_context (GDK_DISPLAY (), DefaultScreen (GDK_DISPLAY ()));
|
|
else
|
|
#endif /* HAVE_XFT */
|
|
return pango_x_get_context (GDK_DISPLAY ());
|
|
}
|