Closed Bug 242598 Opened 18 years ago Closed 17 years ago

Use default.xpm for default top-level window icon on GTK1

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 300129

People

(Reporter: robert, Assigned: jag+mozilla)

References

Details

On GTK2, the icon for toplevel windows is initially set to default.xpm, and if
an icon with the window ID as the filename (e.g. main-window.xpm) exists in
chrome/icons/default/ then the default icon is overridden with that.

To properly fix Bug 171349 on GTK1 builds, we should "port" that behavior from GTK2.

The relevant checkins to add this functionality to GTK2 were:

This is the CVS checkin that accomplished the original default.xpm stuff on GTK2:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2002-08-10+11%3A06&maxdate=2002-08-10+11%3A08&cvsroot=%2Fcvsroot


This is where the default.xpm fallback was added to GTK2:
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsWindow.cpp&branch=&root=/cvsroot&subdir=mozilla/widget/src/gtk2&command=DIFF_FRAMESET&rev1=1.36&rev2=1.37
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsWindow.cpp&branch=&root=/cvsroot&subdir=mozilla/widget/src/gtk2&command=DIFF_FRAMESET&rev1=1.54&rev2=1.55
No longer blocks: 171349
Blocks: 171349
From Bug 171349 Comment 186

From Anbo Motohiko

Then, GTK1 issue is left. I'm not Linux user, this comment is FYI.

In GTK2's nsWindow.cpp, NativeCreate() calls SetDefaultIcon() to set
'default.xpm' for app icon.
http://lxr.mozilla.org/mozilla/source/widget/src/gtk2/nsWindow.cpp#2293

But GTK1, this code is missing.
http://lxr.mozilla.org/mozilla/source/widget/src/gtk/nsWindow.cpp#1832

Should be like this?
1865     mIsToplevel = PR_TRUE;
         SetIcon(NS_LITERAL_STRING("default"));
1866     mShell = gtk_window_new(GTK_WINDOW_DIALOG);
  :
1920     mIsToplevel = PR_TRUE;
         SetIcon(NS_LITERAL_STRING("default"));
1921     mShell = gtk_window_new(GTK_WINDOW_TOPLEVEL);


And there are no codes for GTK1's icons in makefile.
http://lxr.mozilla.org/mozilla/source/browser/app/Makefile.in#252


Does anyone try to fix this?
Is this bug is fixed by checkin of Bug 300129?
Yeah, backend code was fixed in bug 300129, sorry for not searching first.
Actually providing icons will be a different bug, because they need branding.

*** This bug has been marked as a duplicate of 300129 ***
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.