Solved

thunderbird adding a view column

Posted on 2008-10-05
9
1,427 Views
Last Modified: 2012-06-21
I wanted to know how to add a new column to messages view, like we do in Microsoft outlook. In outlook, we can customize the current view as View->Arrange By->Current View->Customize current view... and we can select the fields to add to view. I understand I need to write a chrome to do that, but don't know which file I should extend?
0
Comment
Question by:Ajay-Singh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 30

Expert Comment

by:Marc Z
ID: 22649083
Before you start creating something you might not need, have you checked (when in the mailbox folder of your choice) in the View->Sort By to see if your Customized view has already been set as an option?
0
 
LVL 30

Expert Comment

by:Marc Z
ID: 22649375
According to http://kb.mozillazine.org/Message-list_columns
you can install this add-on and it may do what you desire.
https://addons.mozilla.org/en-US/thunderbird/addon/2516
0
 
LVL 23

Author Comment

by:Ajay-Singh
ID: 22651589
> https://addons.mozilla.org/en-US/thunderbird/addon/2516
I tried that. It doesn't do what I need. It just changes the message display pane to show extra headers.

May be I was not clear earlier...
I want to add the custom headers (outside the predefined ones) as one of the columns on the message view pane and I want to sort by that too...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Expert Comment

by:Marc Z
ID: 22653514
I understand.  I cannot help showing the custom headers, because  I don't know how to.

Sorry if I wasted your time. Perhaps someone else can help you on this one.

Maybe this page will help,
http://developer.mozilla.org/En/Extensions/Thunderbird
specifically
http://developer.mozilla.org/en/Extensions/Thunderbird/Creating_a_Custom_Column
0
 
LVL 23

Author Comment

by:Ajay-Singh
ID: 22659847
mtz1of4,

The links you have given is very informative. I have written the overylay and js. Unfortunately, its not working. Can you check and let me know if everything is ok here?
xul file:
 
<?xml version="1.0"?>
 
<overlay xmlns:html="http://www.w3.org/1999/xhtml"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
	<script src="a.js"/>
	
	<!--
	<stringbundle id="bundle_fpse" src="chrome://global/locale/fpse.properties"/>
	-->
	
	<tree id="threadTree">
		<treecols id="threadCols">
			<splitter class="tree-splitter"/>
			<treecol id="colReplyTo" persist="hidden ordinal width"
				currentView="unthreaded" flex="2" label="Reply-To"
				tooltiptext="Click to sort by the Reply-To header"/>
		</treecols>
	</tree>
</overlay>
 
 
 
 
------------------------------------------a.js--------------------------------------
var columnHandler = {
   getCellText:         function(row, col) {
      //get the message's header so that we can extract the reply to field
      var key = gDBView.getKeyAt(row);
      var hdr = gDBView.db.GetMsgHdrForKey(key);
      
      return hdr.getStringProperty("replyTo");
   },
   getSortStringForRow: function(hdr) {return hdr.getStringProperty("replyTo");},
   isString:            function() {return true;},
 
   getCellProperties:   function(row, col, props){},
   getRowProperties:    function(row, props){},
   getImageSrc:         function(row, col) {return null;},
   getSortLongForRow:   function(hdr) {return 0;}
}
 
//gDBView.addColumnHandler("colReplyTo", columnHandler);
 
window.addEventListener("load", doOnceLoaded, false);
alert("Started");
 
function doOnceLoaded() {
  var ObserverService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
  ObserverService.addObserver(CreateDbObserver, "MsgCreateDBView", false);
}
 
var CreateDbObserver = {
  // Components.interfaces.nsIObserver
  observe: function(aMsgFolder, aTopic, aData)
  {  
     addCustomColumnHandler();
  }
}
function addCustomColumnHandler() {
   gDBView.addColumnHandler("colReplyTo", columnHandler);
}

Open in new window

0
 
LVL 30

Accepted Solution

by:
Marc Z earned 500 total points
ID: 22683184
Sorry, Ajay-Singh,

I don't know how to read code.  Perhaps these guys over at this forum may be of assistance.
Either
http://forums.mozillazine.org/viewforum.php?f=50 or
http://forums.mozillazine.org/viewforum.php?f=54
0
 
LVL 23

Author Comment

by:Ajay-Singh
ID: 22718966
Sure, I was wondering if somebody else from this forum can help me out on this?
0
 

Expert Comment

by:CharlieL
ID: 25508601
Sorry I'm a latecomer on this, but I encountered this thread while trying to solve the same problem.   If I understand the problem correctly, I have now found a much simpler solution.  My Thunderbird is v2.0, and there is a button on the far right of the column headings whose tool tip is "Click to select columns to display."
0
 
LVL 30

Expert Comment

by:Marc Z
ID: 25517592
Sorry CharlieL, he wanted to create a Custom Header and sort by it, not one of the predefined one.

I want to add the custom headers (outside the predefined ones) as one of the columns on the message view pane and I want to sort by that too...
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Getting to know the threat landscape in which DDoS has evolved, and making the right choice to get ourselves geared up to defend against  DDoS attacks effectively. Get the necessary preparation works done and focus on Doing the First Things Right.
Choosing a core focus or particular set of features and options can be tough. To help out, we’re going to highlight a handful of things your business needs on one of your social media pages. In other words, if one of these is missing, you should imp…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question