Commit 6421c96c authored by CST 1998 Shawn T. Amundson's avatar CST 1998 Shawn T. Amundson Committed by Shawn Amundson

Released GTK+ 1.1.6

Tue Dec  8 18:29:05 CST 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GTK+ 1.1.6

        * NEWS: updated

        * gtk/Makefile.am:
          gtk/testgtk.c:
          gtk/gtkrc.h:
          gtk/gtkrc.c: Read in default files.
parent 9806d64e
Tue Dec 8 18:29:05 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.6
* NEWS: updated
* gtk/Makefile.am:
gtk/testgtk.c:
gtk/gtkrc.h:
gtk/gtkrc.c: Read in default files.
Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h:
......
Tue Dec 8 18:29:05 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.6
* NEWS: updated
* gtk/Makefile.am:
gtk/testgtk.c:
gtk/gtkrc.h:
gtk/gtkrc.c: Read in default files.
Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h:
......
Tue Dec 8 18:29:05 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.6
* NEWS: updated
* gtk/Makefile.am:
gtk/testgtk.c:
gtk/gtkrc.h:
gtk/gtkrc.c: Read in default files.
Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h:
......
Tue Dec 8 18:29:05 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.6
* NEWS: updated
* gtk/Makefile.am:
gtk/testgtk.c:
gtk/gtkrc.h:
gtk/gtkrc.c: Read in default files.
Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h:
......
Tue Dec 8 18:29:05 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.6
* NEWS: updated
* gtk/Makefile.am:
gtk/testgtk.c:
gtk/gtkrc.h:
gtk/gtkrc.c: Read in default files.
Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h:
......
Tue Dec 8 18:29:05 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.6
* NEWS: updated
* gtk/Makefile.am:
gtk/testgtk.c:
gtk/gtkrc.h:
gtk/gtkrc.c: Read in default files.
Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h:
......
Tue Dec 8 18:29:05 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.6
* NEWS: updated
* gtk/Makefile.am:
gtk/testgtk.c:
gtk/gtkrc.h:
gtk/gtkrc.c: Read in default files.
Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h:
......
......@@ -14,11 +14,14 @@ EXTRA_DIST = \
NEWS.pre-1-0 \
ChangeLog.pre-1-0 \
README.cvs-commits \
examples/Makefile \
examples/README.1ST \
examples/extract.awk \
examples/extract.sh \
examples/aspectframe/Makefile \
examples/aspectframe/aspectframe.c \
examples/base/Makefile \
examples/base/base.c \
examples/buttons/Makefile \
examples/buttons/buttons.c \
examples/buttons/info.xpm \
......
......@@ -12,7 +12,12 @@ What is new in GTK+ 1.1.6:
* Lots of API clean ups.
* Incremental freezing abilities.
* Integrated widgets from the GNOME tree: GtkLayout, GtkPlug and GtkSocket.
* Read doc/Changes-1.2 to properly adapt your code.
* New window functions for transient relationship, default size, and
geometry hints
* Default rc files are now read in (<sysconfdir/etc/gtkrc and ~/.gtkrc)
GTK_RC_FILES environment variable and functions are provided to configure
this behavior
* Read doc/Changes-1.2.txt to properly adapt your code.
* Bug Fixes.
What is new in GTK+ 1.1.5:
......
......@@ -100,3 +100,9 @@ Incompatible Changes from GTK+-1.0 to GTK+-1.2:
gtk_clist_freeze (clist);
[...]
gtk_clist_thaw (clist);
* All functions matching g_message* are deprecated
* Functions *_interp are deprecated, *_full variants are available
instead
......@@ -343,6 +343,7 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"Gtk\" \
-DGTK_EXE_PREFIX=\"$(exec_prefix)\" \
-DGTK_DATA_PREFIX=\"$(prefix)\" \
-DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
-I$(top_srcdir) \
@GTK_DEBUG_FLAGS@ \
@GTK_XIM_FLAGS@ \
......
......@@ -23,6 +23,7 @@
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "gtkrc.h"
#include "gtkbindings.h"
#include "gtkthemes.h"
......@@ -95,6 +96,7 @@ static void gtk_rc_clear_styles (void);
static void gtk_rc_append_default_pixmap_path (void);
static void gtk_rc_append_default_module_path (void);
static void gtk_rc_append_pixmap_path (gchar *dir);
static void gtk_rc_add_initial_default_files (void);
static const GScannerConfig gtk_rc_scanner_config =
......@@ -180,6 +182,10 @@ static GSList *gtk_rc_sets_widget = NULL;
static GSList *gtk_rc_sets_widget_class = NULL;
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];
#define GTK_RC_MAX_MODULE_PATHS 128
......@@ -303,15 +309,112 @@ gtk_rc_append_default_module_path(void)
g_free(path);
}
static void
gtk_rc_add_initial_default_files (void)
{
static gint init = FALSE;
gchar *var, *str;
gchar **files;
gint i;
if (init)
return;
gtk_rc_default_files[0] = NULL;
init = TRUE;
var = getenv("GTK_RC_FILES");
if (var)
{
files = g_strsplit (var, ":", 128);
i=0;
while (files[i])
{
gtk_rc_add_default_file (files[i]);
i++;
}
}
else
{
str = g_malloc (strlen(GTK_SYSCONFDIR) + strlen("/gtkrc"));
sprintf (str, "%s%s", GTK_SYSCONFDIR, "/gtkrc");
gtk_rc_add_default_file (str);
var = g_get_home_dir ();
str = g_malloc (strlen(var) + strlen("/.gtkrc"));
sprintf (str, "%s%s", var, "/.gtkrc");
gtk_rc_add_default_file (str);
}
}
void
gtk_rc_add_default_file (const gchar *file)
{
guint n;
gtk_rc_add_initial_default_files ();
for (n = 0; gtk_rc_default_files[n]; n++) ;
if (n >= GTK_RC_MAX_DEFAULT_FILES - 1)
return;
gtk_rc_default_files[n++] = g_strdup (file);
gtk_rc_default_files[n] = NULL;
}
void
gtk_rc_set_default_files (gchar **files)
{
gint i;
gtk_rc_add_initial_default_files ();
i = 0;
while (gtk_rc_default_files[i])
{
g_free (gtk_rc_default_files[i]);
i++;
}
gtk_rc_default_files[0] = NULL;
gtk_rc_auto_parse = FALSE;
i = 0;
while (files[i] != NULL)
{
gtk_rc_add_default_file (files[i]);
i++;
}
}
gchar **
gtk_rc_get_default_files (void)
{
gtk_rc_add_initial_default_files ();
return gtk_rc_default_files;
}
void
gtk_rc_init (void)
{
guint i;
rc_style_ht = g_hash_table_new ((GHashFunc) gtk_rc_style_hash,
(GCompareFunc) gtk_rc_style_compare);
pixmap_path[0] = NULL;
module_path[0] = NULL;
gtk_rc_append_default_pixmap_path();
gtk_rc_append_default_module_path();
gtk_rc_add_initial_default_files ();
i = 0;
while (gtk_rc_default_files[i] != NULL)
{
gtk_rc_parse (gtk_rc_default_files[i]);
i++;
}
}
void
......
......@@ -56,6 +56,9 @@ struct _GtkRcStyle
};
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);
......
......@@ -8350,6 +8350,8 @@ main (int argc, char *argv[])
gtk_set_locale ();
gtk_rc_add_default_file ("testgtkrc");
gtk_init (&argc, &argv);
gdk_rgb_init ();
......@@ -8363,8 +8365,6 @@ main (int argc, char *argv[])
1,
GTK_TYPE_STRING, "GtkWidgetClass <ctrl><release>9 test");
gtk_rc_parse ("testgtkrc");
create_main_window ();
gtk_main ();
......
......@@ -8350,6 +8350,8 @@ main (int argc, char *argv[])
gtk_set_locale ();
gtk_rc_add_default_file ("testgtkrc");
gtk_init (&argc, &argv);
gdk_rgb_init ();
......@@ -8363,8 +8365,6 @@ main (int argc, char *argv[])
1,
GTK_TYPE_STRING, "GtkWidgetClass <ctrl><release>9 test");
gtk_rc_parse ("testgtkrc");
create_main_window ();
gtk_main ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment