diff --git a/ChangeLog b/ChangeLog index 5b4175a69a..7b81410cd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Thu Aug 20 18:27:29 EDT 1998 The Rasterman + * made gtkrc scanner append dir that gtkrc is read from to pixmap path. + Mon Aug 10 23:03:55 1998 The Rasterman * Fixed minor problem in gtkhandlebox.c with drawing, and some notebook stuff. Also pixmap theme is now "clean" again. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 5b4175a69a..7b81410cd1 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,6 @@ +Thu Aug 20 18:27:29 EDT 1998 The Rasterman + * made gtkrc scanner append dir that gtkrc is read from to pixmap path. + Mon Aug 10 23:03:55 1998 The Rasterman * Fixed minor problem in gtkhandlebox.c with drawing, and some notebook stuff. Also pixmap theme is now "clean" again. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5b4175a69a..7b81410cd1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,6 @@ +Thu Aug 20 18:27:29 EDT 1998 The Rasterman + * made gtkrc scanner append dir that gtkrc is read from to pixmap path. + Mon Aug 10 23:03:55 1998 The Rasterman * Fixed minor problem in gtkhandlebox.c with drawing, and some notebook stuff. Also pixmap theme is now "clean" again. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 5b4175a69a..7b81410cd1 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,6 @@ +Thu Aug 20 18:27:29 EDT 1998 The Rasterman + * made gtkrc scanner append dir that gtkrc is read from to pixmap path. + Mon Aug 10 23:03:55 1998 The Rasterman * Fixed minor problem in gtkhandlebox.c with drawing, and some notebook stuff. Also pixmap theme is now "clean" again. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 5b4175a69a..7b81410cd1 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,6 @@ +Thu Aug 20 18:27:29 EDT 1998 The Rasterman + * made gtkrc scanner append dir that gtkrc is read from to pixmap path. + Mon Aug 10 23:03:55 1998 The Rasterman * Fixed minor problem in gtkhandlebox.c with drawing, and some notebook stuff. Also pixmap theme is now "clean" again. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5b4175a69a..7b81410cd1 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,6 @@ +Thu Aug 20 18:27:29 EDT 1998 The Rasterman + * made gtkrc scanner append dir that gtkrc is read from to pixmap path. + Mon Aug 10 23:03:55 1998 The Rasterman * Fixed minor problem in gtkhandlebox.c with drawing, and some notebook stuff. Also pixmap theme is now "clean" again. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5b4175a69a..7b81410cd1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,6 @@ +Thu Aug 20 18:27:29 EDT 1998 The Rasterman + * made gtkrc scanner append dir that gtkrc is read from to pixmap path. + Mon Aug 10 23:03:55 1998 The Rasterman * Fixed minor problem in gtkhandlebox.c with drawing, and some notebook stuff. Also pixmap theme is now "clean" again. diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 309cafa67f..a7853baa34 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -91,10 +91,10 @@ static guint gtk_rc_parse_path_pattern (GScanner *scanner); static void gtk_rc_clear_hash_node (gpointer key, gpointer data, gpointer user_data); -static void gtk_rc_clear_styles (void); +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 GScannerConfig gtk_rc_scanner_config = @@ -214,10 +214,22 @@ gtk_rc_append_default_pixmap_path(void) if (n >= GTK_RC_MAX_MODULE_PATHS - 1) return; pixmap_path[n++] = g_strdup(path); - pixmap_path[n] = g_strdup(path); + pixmap_path[n] = NULL; g_free(path); } +static void +gtk_rc_append_pixmap_path(gchar *dir) +{ + gint n; + + for (n = 0; pixmap_path[n]; n++) ; + if (n >= GTK_RC_MAX_MODULE_PATHS - 1) + return; + pixmap_path[n++] = g_strdup(dir); + pixmap_path[n] = NULL; +} + static void gtk_rc_append_default_module_path(void) { @@ -240,7 +252,7 @@ gtk_rc_append_default_module_path(void) if (n >= GTK_RC_MAX_MODULE_PATHS - 1) return; module_path[n++] = g_strdup(path); - module_path[n] = g_strdup(path); + module_path[n] = NULL; g_free(path); } @@ -330,6 +342,16 @@ gtk_rc_parse_file (const gchar *filename, gboolean reload) if (fd < 0) return; + { + gint i; + gchar *dir; + + dir = g_strdup(rc_file->canonical_name); + for (i = strlen(dir) - 1; (i >= 0) && (dir[i] != '/'); i--) + dir[i] = 0; + gtk_rc_append_pixmap_path(dir); + g_free(dir); + } gtk_rc_parse_any (filename, fd, NULL); close (fd); @@ -1305,7 +1327,6 @@ gtk_rc_find_module_in_path (GScanner *scanner, for (i = 0; (i < GTK_RC_MAX_MODULE_PATHS) && (module_path[i] != NULL); i++) { - printf("path %s\n",module_path[i]); buf = g_malloc (strlen (module_path[i]) + strlen (module_file) + 2); sprintf (buf, "%s%c%s", module_path[i], '/', module_file); diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index cfa333e7c0..d3098c8bf3 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1070,7 +1070,7 @@ gtk_window_move_resize (GtkWindow *window) (height < widget->requisition.height)) { window->resize_count += 1; - if ((x != -1) && (y != -1)) + if ((x != -1) && (y != -1) && (window->position != GTK_WIN_POS_NONE)) gdk_window_move_resize (widget->window, x, y, widget->requisition.width, widget->requisition.height); diff --git a/gtk/testgtkrc b/gtk/testgtkrc index bee286a5c8..0a1f7ff1ed 100644 --- a/gtk/testgtkrc +++ b/gtk/testgtkrc @@ -1,1047 +1 @@ -# pixmap_path ":::..." -# -# include "rc-file" -# -# style [= ] -# { -#