Home > Enterprise Linux Tips > Administrator > Re-branding Mozilla
Enterprise Linux Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ADMINISTRATOR

Re-branding Mozilla


Nigel McFarlane
10.26.2004
Rating: -4.50- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


The Web browsers made by the Mozilla Foundation are highly customizable, either on Linux, Unix or Windows. In this tip I'll show you how to change the animated waiting for download icon, officially known as a throbber. It's the icon in the top right corner of either the Firefox browser or the Mozilla Application Suite browser.

All Mozilla technology has the same core technology, and that includes a chrome directory in the install area. Chrome is a set of human-readable, plain text, interpreted files that are used to specify the user interface of the application. Most differences between Mozilla's Firefox browser and the Application Suite's browser are differences in chrome. Think of the chrome as Mozilla's variation on Perl's CPAN archive, PHP's PEAR archive, or Java's JAR system.

If your Mozilla is installed in /local/mozilla, then the chrome directory is in /local/mozilla/chrome. In the case of Firefox, there's a file in there called "classic.jar." This is the look and feel for the Firefox browser when viewed with the standard Firefox theme. There's an equivalent file called "modern.jar," which aims to support the modern theme, but stick with classic.jar for now. The classic.jar file is in ZIP format, so its contents can be viewed with a tool like "unzip" (try the -l option to avoid expanding the file in-place) or the more graphical "file-roller." Work on a copy of the file, not the original.

To change the throbber, just note that this JAR file contains files named Throbber.gif and Throbber-small.gif (beware that these names might change for the final Firefox release). These are animated GIF files, just like the ones you might create for the Web with a tool like JDraw or the GIMP. The equivalent .png files are the static, non-animated versions. They're used when nothing is being downloaded. All you have to do to change the throbber icon is replace these .gif files in the JAR file with new ones of your own design, put the file back, and restart the browser.

In the case of the Mozilla Application Suite, the throbber files are still in classic.jar, but they're called throbber-anim.gif and throbber16-anim.gif. Otherwise it's all the same.

If you want to go further, then you can. For example, Firefox raises an "About Firefox" dialog box if the "About" option is chosen from the Help menu. You can change the content of this dialog as well. In the Firefox chrome directory, there's a file called browser.jar. Unzip a copy of that, and you'll be able to see the aboutDialog.xul file. That file's content is written in Mozilla's XUL language, and specifies the whole of the dialog box. Just modify it (carefully) and put it back. There's plenty of information about XUL on the Web and in books.

In fact, Mozilla applications are highly customizable in this way. This is exactly how different themes are developed for browsers, and it is how different browsers are developed. Once you open the chrome, the world of custom GUI design is yours to enjoy.


Nigel McFarlane is an open source software analyst and technologist with a broad background in technology and software engineering. He has an extensive programming background and degrees in computer science and physics. His latest book is Rapid Application Development with Mozilla from Prentice Hall PTR.

Rate this Tip
To rate tips, you must be a member of SearchEnterpriseLinux.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Enterprise Linux Web Server & Application Server
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts