Date: Thu, 15 Apr 2004 21:53:04 -0700 From: Alexander Kabaev <kan@FreeBSD.org> To: gnome@FreeBSD.org Subject: Unbreak GTK12 look under GNOME2 and KDE3 Message-ID: <20040416045304.GA1417@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
--J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Newest Gnome and KDE session managers find it fashionable to set $GTK_RC_FILES to partially bogus values, which make gtk12 default font horribly huge by default. For example, KDE sets the variable to /etc/gtk/gtkrc:$HOME/.gtkrc:$HOME/.kde/share/config/gtkrc, where the first path is clearly bogus. gnome-session is not far behind there too. Attached patch-gtk::gtkrc.c file replaces existing patch-ad file in gtk12/files directory. In addition to patch-ad changes, this file makes gtk to _always_ prepend default gtk config file to the list of files, supplied by environment. /usr/X11R6/share/themes/Default/gtk/gtkrc provides sane defaults and makes gtk12 default font to be of normal size again. Consider committing it to the port, please. -- Alexander Kabaev --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="patch-gtk::gtkrc.c" --- gtk/gtkrc.c.orig Thu Mar 15 13:41:40 2001 +++ gtk/gtkrc.c Fri Apr 16 00:24:54 2004 @@ -260,9 +260,9 @@ var = getenv("GTK_DATA_PREFIX"); if (var) - path = g_strdup_printf("%s%s", var, "/share/gtk/themes"); + path = g_strdup_printf("%s%s", var, "/share/themes"); else - path = g_strdup_printf("%s%s", GTK_DATA_PREFIX, "/share/gtk/themes"); + path = g_strdup_printf("%s%s", GTK_DATA_PREFIX, "/share/themes"); for (n = 0; pixmap_path[n]; n++) ; if (n >= GTK_RC_MAX_PIXMAP_PATHS - 1) @@ -294,7 +294,7 @@ var = g_get_home_dir (); if (var) - module_path[n++] = g_strdup_printf("%s%s", var, "/.gtk/lib/themes/engines"); + module_path[n++] = g_strdup_printf("%s%s", var, "/.gtk/themes/engines"); module_path[n] = NULL; } @@ -312,6 +312,10 @@ gtk_rc_default_files[0] = NULL; init = TRUE; + str = g_strdup_printf ("%s%s", GTK_SYSCONFDIR, "/gtkrc"); + gtk_rc_add_default_file (str); + g_free (str); + var = getenv("GTK_RC_FILES"); if (var) { @@ -326,10 +330,6 @@ } else { - str = g_strdup_printf ("%s%s", GTK_SYSCONFDIR, "/gtk/gtkrc"); - gtk_rc_add_default_file (str); - g_free (str); - var = g_get_home_dir (); if (var) { --J/dobhs11T7y2rNN--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040416045304.GA1417>