Handle the case without XKB properly.
Thu Jun 21 13:42:01 2001 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle the case without XKB properly. * gtk/gtkrc.c (gtk_rc_set_default_files): Remove unused gtk_rc_auto_parse variable. * gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt: Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no longer needed with GdkPixbuf. * gtk/gtkrc.c (_gtk_rc_init): Make private.
This commit is contained in:
parent
9c3c1cd3b5
commit
d809ceee2e
14 changed files with 290 additions and 74 deletions
36
ChangeLog
36
ChangeLog
|
|
@ -1,3 +1,37 @@
|
|||
Thu Jun 21 13:42:01 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
|
||||
the case without XKB properly.
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_set_default_files): Remove
|
||||
unused gtk_rc_auto_parse variable.
|
||||
|
||||
* gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
|
||||
Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
|
||||
longer needed with GdkPixbuf.
|
||||
|
||||
* gtk/gtkrc.c (_gtk_rc_init): Make private.
|
||||
|
||||
Fri Jun 15 16:26:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.h: Mark deprecated functions with
|
||||
GTK_DISABLE_DEPRECATED.
|
||||
|
||||
Mon Jun 11 18:15:16 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
|
||||
|
||||
* gtk/gtk[hv]scale.c: Include math.h, stdlib.h
|
||||
|
||||
* gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
|
||||
gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
|
||||
gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
|
||||
gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
|
||||
to recent changes in Pango.
|
||||
|
||||
* tests/testgtk.c: Set language tags with gtk_label_set_markup()
|
||||
to test whether the basic engine honors them.
|
||||
|
||||
Thu Jun 21 02:13:40 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
|
||||
|
|
@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001 Jonathan Blandford <jrb@redhat.com>
|
|||
|
||||
* demos/gtk-demo/main.c (main): fix colors ;-)
|
||||
|
||||
Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
`Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
|
||||
that allows grouping together multiple windows so that grabs
|
||||
|
|
|
|||
|
|
@ -1,3 +1,37 @@
|
|||
Thu Jun 21 13:42:01 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
|
||||
the case without XKB properly.
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_set_default_files): Remove
|
||||
unused gtk_rc_auto_parse variable.
|
||||
|
||||
* gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
|
||||
Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
|
||||
longer needed with GdkPixbuf.
|
||||
|
||||
* gtk/gtkrc.c (_gtk_rc_init): Make private.
|
||||
|
||||
Fri Jun 15 16:26:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.h: Mark deprecated functions with
|
||||
GTK_DISABLE_DEPRECATED.
|
||||
|
||||
Mon Jun 11 18:15:16 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
|
||||
|
||||
* gtk/gtk[hv]scale.c: Include math.h, stdlib.h
|
||||
|
||||
* gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
|
||||
gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
|
||||
gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
|
||||
gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
|
||||
to recent changes in Pango.
|
||||
|
||||
* tests/testgtk.c: Set language tags with gtk_label_set_markup()
|
||||
to test whether the basic engine honors them.
|
||||
|
||||
Thu Jun 21 02:13:40 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
|
||||
|
|
@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001 Jonathan Blandford <jrb@redhat.com>
|
|||
|
||||
* demos/gtk-demo/main.c (main): fix colors ;-)
|
||||
|
||||
Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
`Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
|
||||
that allows grouping together multiple windows so that grabs
|
||||
|
|
|
|||
|
|
@ -1,3 +1,37 @@
|
|||
Thu Jun 21 13:42:01 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
|
||||
the case without XKB properly.
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_set_default_files): Remove
|
||||
unused gtk_rc_auto_parse variable.
|
||||
|
||||
* gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
|
||||
Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
|
||||
longer needed with GdkPixbuf.
|
||||
|
||||
* gtk/gtkrc.c (_gtk_rc_init): Make private.
|
||||
|
||||
Fri Jun 15 16:26:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.h: Mark deprecated functions with
|
||||
GTK_DISABLE_DEPRECATED.
|
||||
|
||||
Mon Jun 11 18:15:16 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
|
||||
|
||||
* gtk/gtk[hv]scale.c: Include math.h, stdlib.h
|
||||
|
||||
* gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
|
||||
gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
|
||||
gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
|
||||
gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
|
||||
to recent changes in Pango.
|
||||
|
||||
* tests/testgtk.c: Set language tags with gtk_label_set_markup()
|
||||
to test whether the basic engine honors them.
|
||||
|
||||
Thu Jun 21 02:13:40 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
|
||||
|
|
@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001 Jonathan Blandford <jrb@redhat.com>
|
|||
|
||||
* demos/gtk-demo/main.c (main): fix colors ;-)
|
||||
|
||||
Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
`Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
|
||||
that allows grouping together multiple windows so that grabs
|
||||
|
|
|
|||
|
|
@ -1,3 +1,37 @@
|
|||
Thu Jun 21 13:42:01 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
|
||||
the case without XKB properly.
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_set_default_files): Remove
|
||||
unused gtk_rc_auto_parse variable.
|
||||
|
||||
* gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
|
||||
Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
|
||||
longer needed with GdkPixbuf.
|
||||
|
||||
* gtk/gtkrc.c (_gtk_rc_init): Make private.
|
||||
|
||||
Fri Jun 15 16:26:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.h: Mark deprecated functions with
|
||||
GTK_DISABLE_DEPRECATED.
|
||||
|
||||
Mon Jun 11 18:15:16 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
|
||||
|
||||
* gtk/gtk[hv]scale.c: Include math.h, stdlib.h
|
||||
|
||||
* gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
|
||||
gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
|
||||
gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
|
||||
gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
|
||||
to recent changes in Pango.
|
||||
|
||||
* tests/testgtk.c: Set language tags with gtk_label_set_markup()
|
||||
to test whether the basic engine honors them.
|
||||
|
||||
Thu Jun 21 02:13:40 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
|
||||
|
|
@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001 Jonathan Blandford <jrb@redhat.com>
|
|||
|
||||
* demos/gtk-demo/main.c (main): fix colors ;-)
|
||||
|
||||
Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
`Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
|
||||
that allows grouping together multiple windows so that grabs
|
||||
|
|
|
|||
|
|
@ -1,3 +1,37 @@
|
|||
Thu Jun 21 13:42:01 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
|
||||
the case without XKB properly.
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_set_default_files): Remove
|
||||
unused gtk_rc_auto_parse variable.
|
||||
|
||||
* gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
|
||||
Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
|
||||
longer needed with GdkPixbuf.
|
||||
|
||||
* gtk/gtkrc.c (_gtk_rc_init): Make private.
|
||||
|
||||
Fri Jun 15 16:26:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.h: Mark deprecated functions with
|
||||
GTK_DISABLE_DEPRECATED.
|
||||
|
||||
Mon Jun 11 18:15:16 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
|
||||
|
||||
* gtk/gtk[hv]scale.c: Include math.h, stdlib.h
|
||||
|
||||
* gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
|
||||
gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
|
||||
gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
|
||||
gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
|
||||
to recent changes in Pango.
|
||||
|
||||
* tests/testgtk.c: Set language tags with gtk_label_set_markup()
|
||||
to test whether the basic engine honors them.
|
||||
|
||||
Thu Jun 21 02:13:40 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
|
||||
|
|
@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001 Jonathan Blandford <jrb@redhat.com>
|
|||
|
||||
* demos/gtk-demo/main.c (main): fix colors ;-)
|
||||
|
||||
Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
`Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
|
||||
that allows grouping together multiple windows so that grabs
|
||||
|
|
|
|||
|
|
@ -1,3 +1,37 @@
|
|||
Thu Jun 21 13:42:01 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
|
||||
the case without XKB properly.
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_set_default_files): Remove
|
||||
unused gtk_rc_auto_parse variable.
|
||||
|
||||
* gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
|
||||
Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
|
||||
longer needed with GdkPixbuf.
|
||||
|
||||
* gtk/gtkrc.c (_gtk_rc_init): Make private.
|
||||
|
||||
Fri Jun 15 16:26:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.h: Mark deprecated functions with
|
||||
GTK_DISABLE_DEPRECATED.
|
||||
|
||||
Mon Jun 11 18:15:16 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
|
||||
|
||||
* gtk/gtk[hv]scale.c: Include math.h, stdlib.h
|
||||
|
||||
* gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
|
||||
gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
|
||||
gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
|
||||
gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
|
||||
to recent changes in Pango.
|
||||
|
||||
* tests/testgtk.c: Set language tags with gtk_label_set_markup()
|
||||
to test whether the basic engine honors them.
|
||||
|
||||
Thu Jun 21 02:13:40 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
|
||||
|
|
@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001 Jonathan Blandford <jrb@redhat.com>
|
|||
|
||||
* demos/gtk-demo/main.c (main): fix colors ;-)
|
||||
|
||||
Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
`Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
|
||||
that allows grouping together multiple windows so that grabs
|
||||
|
|
|
|||
|
|
@ -1,3 +1,37 @@
|
|||
Thu Jun 21 13:42:01 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
|
||||
the case without XKB properly.
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_set_default_files): Remove
|
||||
unused gtk_rc_auto_parse variable.
|
||||
|
||||
* gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
|
||||
Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
|
||||
longer needed with GdkPixbuf.
|
||||
|
||||
* gtk/gtkrc.c (_gtk_rc_init): Make private.
|
||||
|
||||
Fri Jun 15 16:26:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.h: Mark deprecated functions with
|
||||
GTK_DISABLE_DEPRECATED.
|
||||
|
||||
Mon Jun 11 18:15:16 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
|
||||
|
||||
* gtk/gtk[hv]scale.c: Include math.h, stdlib.h
|
||||
|
||||
* gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
|
||||
gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
|
||||
gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
|
||||
gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
|
||||
to recent changes in Pango.
|
||||
|
||||
* tests/testgtk.c: Set language tags with gtk_label_set_markup()
|
||||
to test whether the basic engine honors them.
|
||||
|
||||
Thu Jun 21 02:13:40 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
|
||||
|
|
@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001 Jonathan Blandford <jrb@redhat.com>
|
|||
|
||||
* demos/gtk-demo/main.c (main): fix colors ;-)
|
||||
|
||||
Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
`Fri Jun 8 17:56:52 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
|
||||
that allows grouping together multiple windows so that grabs
|
||||
|
|
|
|||
|
|
@ -364,4 +364,5 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
|
|||
The purpose of this change was to allow non-containers to have
|
||||
focusable elements.
|
||||
|
||||
|
||||
* gtk_rc_set_image_loader() and gtk_rc_load_image() has been removed, now
|
||||
that GTK+ includes decent image loading capabilities itself.
|
||||
|
|
|
|||
|
|
@ -192,7 +192,6 @@ get_keymap (void)
|
|||
}
|
||||
|
||||
#if HAVE_XKB
|
||||
|
||||
PangoDirection
|
||||
get_direction (void)
|
||||
{
|
||||
|
|
@ -236,13 +235,20 @@ _gdk_keymap_state_changed (void)
|
|||
PangoDirection
|
||||
gdk_keymap_get_direction (GdkKeymap *keymap)
|
||||
{
|
||||
if (!have_direction)
|
||||
#if HAVE_XKB
|
||||
if (_gdk_use_xkb)
|
||||
{
|
||||
current_direction = get_direction ();
|
||||
have_direction = TRUE;
|
||||
}
|
||||
if (!have_direction)
|
||||
{
|
||||
current_direction = get_direction ();
|
||||
have_direction = TRUE;
|
||||
}
|
||||
|
||||
return current_direction;
|
||||
return current_direction;
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_XKB */
|
||||
return PANGO_DIRECTION_LTR;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -181,6 +181,8 @@ void gtk_entry_get_layout_offsets (GtkEntry *entry,
|
|||
|
||||
/* Deprecated compatibility functions
|
||||
*/
|
||||
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
GtkWidget* gtk_entry_new_with_max_length (gint max);
|
||||
void gtk_entry_append_text (GtkEntry *entry,
|
||||
const gchar *text);
|
||||
|
|
@ -191,6 +193,7 @@ void gtk_entry_set_position (GtkEntry *entry,
|
|||
void gtk_entry_select_region (GtkEntry *entry,
|
||||
gint start,
|
||||
gint end);
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ gtk_init_check (int *argc,
|
|||
gtk_colormap = gdk_colormap_get_system ();
|
||||
|
||||
gtk_type_init (0);
|
||||
gtk_rc_init ();
|
||||
_gtk_rc_init ();
|
||||
|
||||
|
||||
/* Register an exit function to make sure we are able to cleanup.
|
||||
|
|
|
|||
40
gtk/gtkrc.c
40
gtk/gtkrc.c
|
|
@ -247,7 +247,6 @@ static GSList *gtk_rc_sets_class = NULL;
|
|||
|
||||
#define GTK_RC_MAX_DEFAULT_FILES 128
|
||||
static gchar *gtk_rc_default_files[GTK_RC_MAX_DEFAULT_FILES];
|
||||
static gboolean gtk_rc_auto_parse = TRUE;
|
||||
|
||||
#define GTK_RC_MAX_PIXMAP_PATHS 128
|
||||
static gchar *pixmap_path[GTK_RC_MAX_PIXMAP_PATHS];
|
||||
|
|
@ -262,8 +261,6 @@ static GSList *rc_dir_stack = NULL;
|
|||
/* The files we have parsed, to reread later if necessary */
|
||||
static GSList *rc_files = NULL;
|
||||
|
||||
static GtkImageLoader image_loader = NULL;
|
||||
|
||||
/* RC file handling */
|
||||
|
||||
|
||||
|
|
@ -492,7 +489,6 @@ gtk_rc_set_default_files (gchar **files)
|
|||
}
|
||||
|
||||
gtk_rc_default_files[0] = NULL;
|
||||
gtk_rc_auto_parse = FALSE;
|
||||
|
||||
i = 0;
|
||||
while (files[i] != NULL)
|
||||
|
|
@ -560,7 +556,7 @@ gtk_rc_get_default_files (void)
|
|||
}
|
||||
|
||||
void
|
||||
gtk_rc_init (void)
|
||||
_gtk_rc_init (void)
|
||||
{
|
||||
static gboolean initialized = FALSE;
|
||||
static gchar *locale_suffixes[3];
|
||||
|
|
@ -3276,37 +3272,3 @@ gtk_rc_parse_stock (GScanner *scanner,
|
|||
|
||||
return G_TOKEN_NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
typedef GdkPixmap * (*GtkImageLoader) (GdkWindow *window,
|
||||
GdkColormap *colormap,
|
||||
GdkBitmap **mask,
|
||||
GdkColor *transparent_color,
|
||||
const gchar *filename);
|
||||
*/
|
||||
|
||||
void
|
||||
gtk_rc_set_image_loader(GtkImageLoader loader)
|
||||
{
|
||||
image_loader = loader;
|
||||
}
|
||||
|
||||
GdkPixmap *
|
||||
gtk_rc_load_image (GdkColormap *colormap,
|
||||
GdkColor *transparent_color,
|
||||
const gchar *filename)
|
||||
{
|
||||
if (strcmp (filename, "<parent>") == 0)
|
||||
return (GdkPixmap*) GDK_PARENT_RELATIVE;
|
||||
else
|
||||
{
|
||||
if(image_loader)
|
||||
return image_loader(NULL, colormap, NULL,
|
||||
transparent_color,
|
||||
filename);
|
||||
else
|
||||
return gdk_pixmap_colormap_create_from_xpm (NULL, colormap, NULL,
|
||||
transparent_color,
|
||||
filename);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
25
gtk/gtkrc.h
25
gtk/gtkrc.h
|
|
@ -38,6 +38,9 @@ extern "C" {
|
|||
/* Forward declaration */
|
||||
typedef struct _GtkIconFactory GtkIconFactory;
|
||||
|
||||
typedef struct _GtkRcStyleClass GtkRcStyleClass;
|
||||
typedef struct _GtkRCContext GtkRcContext;
|
||||
|
||||
#define GTK_TYPE_RC_STYLE (gtk_rc_style_get_type ())
|
||||
#define GTK_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_RC_STYLE, GtkRcStyle))
|
||||
#define GTK_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_RC_STYLE, GtkRcStyleClass))
|
||||
|
|
@ -53,8 +56,6 @@ typedef enum
|
|||
GTK_RC_BASE = 1 << 3
|
||||
} GtkRcFlags;
|
||||
|
||||
typedef struct _GtkRcStyleClass GtkRcStyleClass;
|
||||
|
||||
struct _GtkRcStyle
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
|
@ -112,14 +113,15 @@ struct _GtkRcStyleClass
|
|||
GtkStyle * (*create_style) (GtkRcStyle *rc_style);
|
||||
};
|
||||
|
||||
void gtk_rc_init (void);
|
||||
void _gtk_rc_init (void);
|
||||
void gtk_rc_add_default_file (const gchar *filename);
|
||||
void gtk_rc_set_default_files (gchar **filenames);
|
||||
gchar** gtk_rc_get_default_files (void);
|
||||
void gtk_rc_parse (const gchar *filename);
|
||||
void gtk_rc_parse_string (const gchar *rc_string);
|
||||
gboolean gtk_rc_reparse_all (void);
|
||||
GtkStyle* gtk_rc_get_style (GtkWidget *widget);
|
||||
|
||||
gboolean gtk_rc_reparse_all (void);
|
||||
void gtk_rc_add_widget_name_style (GtkRcStyle *rc_style,
|
||||
const gchar *pattern);
|
||||
void gtk_rc_add_widget_class_style (GtkRcStyle *rc_style,
|
||||
|
|
@ -127,25 +129,14 @@ void gtk_rc_add_widget_class_style (GtkRcStyle *rc_style,
|
|||
void gtk_rc_add_class_style (GtkRcStyle *rc_style,
|
||||
const gchar *pattern);
|
||||
|
||||
|
||||
|
||||
GType gtk_rc_style_get_type (void) G_GNUC_CONST;
|
||||
GtkRcStyle* gtk_rc_style_new (void);
|
||||
GtkRcStyle* gtk_rc_style_copy (GtkRcStyle *orig);
|
||||
void gtk_rc_style_ref (GtkRcStyle *rc_style);
|
||||
void gtk_rc_style_unref (GtkRcStyle *rc_style);
|
||||
|
||||
/* Tell gtkrc to use a custom routine to load images specified in rc files instead of
|
||||
* the default xpm-only loader
|
||||
*/
|
||||
typedef GdkPixmap* (*GtkImageLoader) (GdkWindow *window,
|
||||
GdkColormap *colormap,
|
||||
GdkBitmap **mask,
|
||||
GdkColor *transparent_color,
|
||||
const gchar *filename);
|
||||
void gtk_rc_set_image_loader (GtkImageLoader loader);
|
||||
|
||||
GdkPixmap* gtk_rc_load_image (GdkColormap *colormap,
|
||||
GdkColor *transparent_color,
|
||||
const gchar *filename);
|
||||
gchar* gtk_rc_find_pixmap_in_path (GScanner *scanner,
|
||||
const gchar *pixmap_file);
|
||||
gchar* gtk_rc_find_module_in_path (const gchar *module_file);
|
||||
|
|
|
|||
|
|
@ -1377,6 +1377,21 @@ _gtk_style_peek_property_value (GtkStyle *style,
|
|||
return &pcache->value;
|
||||
}
|
||||
|
||||
GdkPixmap *
|
||||
load_bg_image (GdkColormap *colormap,
|
||||
GdkColor *bg_color,
|
||||
const gchar *filename)
|
||||
{
|
||||
if (strcmp (filename, "<parent>") == 0)
|
||||
return (GdkPixmap*) GDK_PARENT_RELATIVE;
|
||||
else
|
||||
{
|
||||
return gdk_pixmap_colormap_create_from_xpm (NULL, colormap, NULL,
|
||||
bg_color,
|
||||
filename);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_style_real_realize (GtkStyle *style)
|
||||
{
|
||||
|
|
@ -1421,9 +1436,9 @@ gtk_style_real_realize (GtkStyle *style)
|
|||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (style->rc_style && style->rc_style->bg_pixmap_name[i])
|
||||
style->bg_pixmap[i] = gtk_rc_load_image (style->colormap,
|
||||
&style->bg[i],
|
||||
style->rc_style->bg_pixmap_name[i]);
|
||||
style->bg_pixmap[i] = load_bg_image (style->colormap,
|
||||
&style->bg[i],
|
||||
style->rc_style->bg_pixmap_name[i]);
|
||||
|
||||
if (!gdk_color_alloc (style->colormap, &style->fg[i]))
|
||||
g_warning ("unable to allocate color: ( %d %d %d )",
|
||||
|
|
|
|||
Loading…
Reference in a new issue