(IPS.BUTTON_TITLE_YES * IPS.BUTTON_POS_0) + (IPS.BUTTON_TITLE_NO * IPS.BUTTON_POS_1), null, null, null, null, { }); 
IPS.STD_YES_NO_BUTTONS, null, null, null, null, { }); 
  removeFeed: function ()   {     var seln = this.mView.selection;    if (seln.count != 1) return;    var itemToRemove = this.mView.getItemAtIndex(seln.currentIndex);    if (!itemToRemove)      return;    // ask the user if he really wants to unsubscribe from the feed    var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(IPS);    var abortRemoval = promptService.confirmEx(window, this.mBundle.getString('subsribe-confirmFeedDeletionTitle'),                                                   this.mBundle.getFormattedString('subsribe-confirmFeedDeletion', [itemToRemove.name], 1),                                                   (IPS.BUTTON_TITLE_YES * IPS.BUTTON_POS_0) + (IPS.BUTTON_TITLE_NO * IPS.BUTTON_POS_1),                                                  null, null, null, null, { });    if (abortRemoval)      return;    var resource = rdf.GetResource(itemToRemove.url);    var feed = new Feed(resource);    var ds = getSubscriptionsDS(this.mRSSServer);    if (feed && ds)    {      // remove the feed from the subscriptions ds      var feeds = getSubscriptionsList(this.mRSSServer);      var index = feeds.IndexOf(resource);      if (index != kRowIndexUndefined)        feeds.RemoveElementAt(index, false);      // remove the feed property string from the folder data base      var currentFolder = ds.GetTarget(resource, FZ_DESTFOLDER, true);      if (currentFolder)       {        var currentFolderURI = currentFolder.QueryInterface(Components.interfaces.nsIRDFResource).Value;        currentFolder = rdf.GetResource(currentFolderURI).QueryInterface(Components.interfaces.nsIMsgFolder);            var feedUrl = ds.GetTarget(resource, DC_IDENTIFIER, true);            ds.Unassert(resource, DC_IDENTIFIER, feedUrl, true);        feedUrl = feedUrl ? feedUrl.QueryInterface(Components.interfaces.nsIRDFLiteral).Value : "";        updateFolderFeedUrl(currentFolder, feedUrl, true); // remove the old url      }      // Remove all assertions about the feed from the subscriptions database.      removeAssertions(ds, resource);      ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush(); // flush any changes      // Remove all assertions about items in the feed from the items database.      var itemds = getItemsDS(this.mRSSServer);      feed.invalidateItems();      feed.removeInvalidItems();      itemds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush(); // flush any changes    }    // Now that we have removed the feed from the datasource, it is time to update our    // view layer. Start by removing the child from its parent folder object    this.mView.removeItemAtIndex(seln.currentIndex);    // If we don't have any more subscriptions pointing into    // this folder, then I think we should offer to delete it...    // Cheat and look at the feed url property to see if anyone else is still using the feed...    // you could also accomplish this by looking at some properties in the data source...//    var msgdb = currentFolder.QueryInterface(Components.interfaces.nsIMsgFolder).getMsgDatabase(null);//   var folderInfo = msgdb.dBFolderInfo;//    var oldFeedUrl = folderInfo.getCharPtrProperty("feedUrl");//    if (!oldFeedUrl) // no more feeds pointing to the folder?//    {//      try {//        var openerResource = this.mRSSServer.rootMsgFolder.QueryInterface(Components.interfaces.nsIRDFResource);//        var folderResource = currentFolder.QueryInterface(Components.interfaces.nsIRDFResource);//        window.opener.messenger.DeleteFolders(window.opener.GetFolderDatasource(), openerResource, folderResource);//      } catch (e) { }//    }  },
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/bf31d5884509ec161b82dfe308d14c6cebee8146/feed-subscriptions.js/buggy/mail/extensions/newsblog/content/feed-subscriptions.js