Next release of tbNotes

In last few days I got several emails with questions or bug-reports about current release of tbNotes (version 0.2.1) and I promised to realease the next version last night but I’m still not finished. There are still several bugs on which I’m working on so be patient please. I hope that I finish it today.

tbNotes 0.2

This morning I released another version of tbNotes. This version brings possibility of adding links to the single notes and also some bug fixies. You can download it from addons.mozilla.org.

tbNotes 0.1.5

tbNotes 0.1.5 - new notes view

Before a while I’ve uploaded new version of tbNotes to the AMO (http://addons.mozilla.org/en-US/thunderbird/addon/14395). The main new features including:

  • support for Thunderbird 3.0b4
  • new notes view (see screenshots)
  • completely rewritten database background
  • preferences dialog

tbNotes 0.1.5 comming soon

tbNotes 0.1.5 - New notes view

tbNotes 0.1.5 - New notes view

Here is only a list of already finished changes and one screenshot from upcomming tbNotes version:

  • updated for Thunderbird 3.0b4
  • first implementation of message header view
  • first implementation of the all notes view
  • added new toolbar button

Customizing Thunderbird’s message header view

screenAs I worked on tbNotes extension I needed to add item to the message header view (see the picture).

I didn’t found any usefull informations on MDC or Google so I look into the Thunderbird’s sources (msgHdrViewOverlay.js) file and there I founded it. Solution is simple:
Code placed in overlays.xul:

  <!-- Message header view overlay -->
  <rows id="expandedHeader2Rows">
    <row align="center">
      <label class="headerName" value="&headerNotes.label;"/>
      <hbox id="tbn-notesmsgheaderviewpane-hbox"/>
    </row>
  </rows>

and needed JavaScript:

  // Listener for gMessageListeners (msgHdrViewOverlay.js)
  extensions.tbnotes.messageListener = {
    onStartHeaders: function() {
      // Code where I'm updating [hbox#tbn-notesmsgheaderviewpane-hbox] ...
    },
    onBeforeShowHeaderPane: function() {},
    onEndHeaders: function() {},
    onEndAttachements: function() {}
  };
  // ...
  // Register listener 
  if(typeof(gMessageListeners) != "undefined") {
    gMessageListeners.push(extensions.tbnotes.messageListener);
  }

Don’t remember that lister should implement all methods mentioned above or will be thrown errors from msgHdrViewOverlay.js.

MySQL Trick: GROUP_CONCAT

Today I discovered and firstly used MySQL aggregate function GROUP_CONCAT and it’s really usefull in same cases. Consider structure database like this:

┌───────────────────────────────┐    ┌───────────────────────┐
│         eshop_items           │    │ eshop_items_to_genres │
├───────────────────────────────┤    ├───────────────────────┤
│ * ID                [INTEGER] |----|   item_ID   [INTEGER] │
│   title             [VARCHAR] │    │   genre_ID  [INTEGER] |----┐
│   image             [VARCHAR] │    └───────────────────────┘    |
│   director          [VARCHAR] │                                 |
│   actor             [VARCHAR] │                                 |
│   language          [VARCHAR] │    ┌─────────────────────────┐  |
│   subtitles         [VARCHAR] │    │ items_prize_categories  │  |
│   custom            [VARCHAR] │    ├─────────────────────────┤  |
│   prize_category_ID [INTEGER] |----| * ID          [INTEGER] │  |
│   created         [TIMESTAMP] │    │   title       [VARCHAR] │  |
│   display          [SHORTINT] │    │   prize       [INTEGER] │  |
└───────────────────────────────┘    └─────────────────────────┘  |
                              ┌────────────────────────────────┐  |
                              │     items_genre_categories     │  |
                              ├────────────────────────────────┤  |
                           ┌--| + ID                 [INTEGER] |--┘
                           └--|   parent_category_ID [INTEGER] │
                              │   title              [VARCHAR] │
                              └────────────────────────────────┘

And I was asked for creating SELECT query which returns data in table like this:

┌─────────┬────────────┬─────────────────────┬────────────────┐
│ Item ID │ Item title │ All attached genres │ Prize category │
├─────────┼────────────┼─────────────────────┼────────────────┤
│ 1       │ Any movie  │ Drama,Crime,Foreign │ Cheapest       │
│ ...     │ ...        │ ...                 │ ...            │

So after a while I created this query:

SELECT
  `t2`.`ID` AS `item_ID`,
  `t2`.`title` AS `item_title`,
  GROUP_CONCAT(`t3`.`title` ORDER BY `t3`.`title` ASC SEPARATOR ', ') AS `genre_categories`,
  `t4`.`title` AS `prize_category`
FROM `eshop_items_to_genres` AS `t1`
JOIN `eshop_items` AS `t2` ON `t2`.`ID` = `t1`.`item_ID`
JOIN `items_genre_categories` AS `t3` ON `t3`.`ID` = `t1`.`genre_category_ID`
JOIN `items_prize_categories` AS `t4` ON `t4`.`ID` = `t2`.`prize_category_ID`
WHERE
  `t2`.`display` = 1
GROUP BY `item_title`
ORDER BY `item_title` ASC

Before only a few years I certainly did this only using more SELECT queries so I’m a little bit proud of myself :) .

News on CsvViewer

CSV as HTML

CSV as HTML

Because there wasn’t any message about CSVViewer for a long time here are some news:

  • I’ve already finished the first version of handler (source) for text/csv mime type (which shows CSV document as a HTML page with table – see attached screenshot). This parser is tested on several files where the largest is about ~600 KB.
  • started working on overlays which allow turn HTML tables into CSVViewer documents (this is needed also for finishing text/csv mime handler)
  • new preferences dialog and an initial set of user settings
  • better recognizing of opened CSV files and a lot of bugfixies

I think that this 0.2 version will be finished in this week.

tbNotes 0.1.1

Only screen with progress:

tbNotes 0.1.1 - adding notes is now possible :)

tbNotes 0.1.1 - adding notes is now possible :)

tbNotes

A while ago I wrote about new Thunderbird notes extension and yesterday I started working on it. The list of requsted features were changed lightly – the main difference is that there is no support for Google Notebook because Google closed this service recently. But the rest is nearly same as before:

  • creating/editing/deleting notes – notes can be attached to any mail message, address book record or calendar item (only when Lightning addon is installed). To each target can be attached more then one note or notes can be created without target.
  • new view with list of all messages (see picture)
  • new sidebar with list of notes categories
  • support for Thunderbird’s Activity Manager
  • make notes searchable by Thunderbird’s Gloda
  • adding links to notes
  • allow to add note as the mail message attachement
  • each note can be exposed as a task or event (only when is Lightning addon installed)
  • support for SeaMonkey’s Messenger
  • support for Mozilla Weave

For the most actual list of finished/planned features see README.txt file. At the Mozdev are also available screenshots from the trunk versions – around here are only some of them.

You can download latest version of tbNotes on AMO: https://addons.mozilla.org/en-US/thunderbird/addon/14395. But be prepare that all not is implemented or fully functional because this project is still in an early phase.

Initial version of tbNotes

Initial version of tbNotes

Some of enhancements for tbNotes 0.1.5

Some of enhancements for tbNotes 0.1.5

tbNotes 0.1.5 - New notes view

tbNotes 0.1.5 - New notes view

MDC

Wow, I’ve just currently edited my first page on MDC :) – I updated page Add Option to Context Menu (in Thunderbird section) . I hope that all I wrote is correct… but still – even my addition is very short I’m very proud of my self ;) .