Closed
Bug 80583
Opened 24 years ago
Closed 24 years ago
Ability to use a different gtk-theme for mozilla
Categories
(Core Graveyard :: Embedding: GTK Widget, enhancement, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.9.3
People
(Reporter: martin.storsjo, Assigned: dbaron)
References
Details
I'm using quite a dark gtk-theme. This doesn't look too good in Mozilla, but I
thought it would be possible to fix this for myself with a small hack, by
setting the GTK_RC_FILES-environment variable to point to the default theme
before starting Mozilla. This is a standard gtk-variable and works for all
"normal" gtk-applications. Too bad Mozilla doesn't read this variable.
Implementing this wouldn't bee too hard, and would be very useful, at least for me.
Comment 1•24 years ago
|
||
How does this avariable work exactly? Does it just point to the directory in
which the .gtkrc that the app is supposed to read lives? Or does it point to an
actual file to be read instead of .gtkrc?
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 2•24 years ago
|
||
It consists of a list of gtkrc-files to be read instead of ~/.gtkrc. Code
example from gtkrc.c in gtk+-1.2.9:
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++;
}
g_strfreev (files);
}
else
{
str = g_strdup_printf ("%s%s", GTK_SYSCONFDIR, "/gtk/gtkrc");
gtk_rc_add_default_file (str);
g_free (str);
str = g_strdup_printf ("%s%s", g_get_home_dir (), "/.gtkrc");
gtk_rc_add_default_file (str);
g_free (str);
}
Comment 3•24 years ago
|
||
OK. The code that needs fixing seems to be at:
http://lxr.mozilla.org/seamonkey/source/widget/src/gtk/nsAppShell.cpp#256
| Assignee | ||
Comment 5•24 years ago
|
||
Why do we need to call gtk_rc_parse at all? gtk_init (which we call just above
the mozilla code cited above) calls gtk_rc_init, which should call the function
containing the code pasted above. Right?
| Assignee | ||
Comment 6•24 years ago
|
||
If somebody wants to dig into this sooner, feel free (see my comments above).
It's not a high priority for me right now.
Status: NEW → ASSIGNED
Priority: -- → P4
Target Milestone: --- → mozilla1.0.1
| Reporter | ||
Comment 7•24 years ago
|
||
Well, as dbaron said, it seems like all those gtk_rc_parse-calls are
unnecessary. This patch seems to fix it:
--- mozilla/widget/src/gtk/nsAppShell.cpp.orig Thu May 24 11:30:16 2001
+++ mozilla/widget/src/gtk/nsAppShell.cpp Thu May 24 13:36:00 2001
@@ -223,9 +223,6 @@
sInitialized = PR_TRUE;
- gchar *home=nsnull;
- gchar *path=nsnull;
-
int argc = bac ? *bac : 0;
char **argv = bav;
@@ -252,15 +249,6 @@
HandleColormapPrefs();
gdk_rgb_init();
-
- home = g_get_home_dir();
- if ((char*)nsnull != home) {
- path = g_strdup_printf("%s%c%s", home, G_DIR_SEPARATOR, ".gtkrc");
- if ((char *)nsnull != path) {
- gtk_rc_parse(path);
- g_free(path);
- }
- }
return NS_OK;
}
| Assignee | ||
Updated•24 years ago
|
Comment 8•24 years ago
|
||
we should verify that in gtk 1.2.0 this was the case.. i expect it wasn't. we
should figure out what version of gtk 1.2 added this and ifdef it.
| Reporter | ||
Comment 9•24 years ago
|
||
This gtkrc-loading code looks exactly the same in both gtk-1.2.0 and gtk-1.2.9,
so this should work for at least these releases.
Comment 10•24 years ago
|
||
r=blizzard Looks fine to me.
Comment 11•24 years ago
|
||
ok then, r=pavlov.
| Assignee | ||
Comment 12•24 years ago
|
||
Sorry I didn't get to this sooner. Moving to 0.9.3, but I really will try to
get it in in the next few days...
Target Milestone: mozilla0.9.2 → mozilla0.9.3
| Assignee | ||
Comment 13•24 years ago
|
||
blizzard said by email that his review could count as a super-review
| Assignee | ||
Updated•24 years ago
|
Priority: P2 → P1
| Assignee | ||
Comment 14•24 years ago
|
||
Fix checked in 2001-07-03 19:12 PDT.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 15•24 years ago
|
||
*** Bug 91809 has been marked as a duplicate of this bug. ***
Updated•13 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•