2010-03-27

New notes plugin release 1.7.3

Three months since the last release, and three months since it is available as a separate standalone application running in the notification area. This has made it a lot easier to test and debug, as before I had to build the plugin, install the plugin, restart the panel or remove/readd the plugin in the panel, now I just have to run ./xfce4-notes from the source directory.

This new release has seen some structural tree changes to save time during compilation. Now everything is in src/ and lib/, where lib/ contains code to build an XnpHypertextView, an XnpNote (a composite-widget that embeds a GtkScrolledWindow with an XnpHypertextView and sends “save” signals on changes), an XnpWindow with the custom made navigation and title bars and the right click menu on the title bar, and finally an XnpApplication class that is the heart of everything, it handles creations/deletions of notes, loads/saves the data, etc. The src/ directory contains the main files for the panel plugin, the status icon, the popup command and the settings dialogue.

The new stuff is mostly eye-candy as stated in the previous blog entry. The GTK+ RC style has been pimped up with custom made scrollbars and the source code contains a self-drawn close button. The stuff about GTK+ scrollbars theming is grossly explained on live.gnome.org but I opened the GTK+ Dust theme files which was, to me, more understandable :-) Also it was because of this particular theme I took a look at customizing the scrollbars, see below the before/after screenshots. The older article about writing a Widget with Cairo helped me getting started from scratch with an empty “close button” widget to replace the simple GtkButton with label. As I liked very much the time passed on these changes I contributed a tutorial “Monochrome icon” available only in PDF as of today which I hope to be useful for Vala beginners but also a nice update of the article about Cairo but with Vala language.


The fixes included in this release are the following: correctly restore sticky-window and keep-above states after some race conditions, and restore tab label orientation after renaming a note. And last but definitely not least the undo feature was not working because an internal timeout wasn't reset to zero which made the code think a snapshot was needed and thus the undo/redo buffers ended with the same content after the timeout elapsed. Thanks to Christian (the developer behind Midori) otherwise I would still not have taken a look around this!

The forthcoming features I have in mind would be a search dialogue and per-note options for activating a stripped down “markdown” syntax, an orthographic corrector and wrapping words which is the default for the moment.

The release is available at archive.xfce.org.

Thanks for the feedbacks and reports you sent and will send back.

Update: The tutorial is now also available on the Xfce wiki.

16 comments:

  1. Hmm.. Now it required unique. Can you make it optional? Thanks for your great job!

    ReplyDelete
  2. Since version 1.7.2! I tried to make it optional by keeping the code simple, but it didn't work out. As I'm using Vala I can't generate CCode with conditional pre-processings like #ifdef/#elif/#endif.

    It would only be possible if I pulled the code related to Unique into a separate C source which I wasn't willing to, as I find Unique essential. For example you don't want more than one xfce4-notes process as they all read from the same notes, and you don't want to open more than one xfce4-notes-settings process.

    Can you really really prove me wrong that Unique is one dep too much? ;-) Unique may at some point end in the GTK+ library, and it's a small library just like libxfce4util and gui4 which are also used in the notes plugin.

    ReplyDelete
  3. I use this app every day to organise my life. Thanks for all your hard work!

    Nathan

    ReplyDelete
  4. Thanks for this progress!. But I write on another topic.=)

    Some time ago I found a small bug. When I open the Appearance Settings dialog, it select the theme and icon used correctly but not shown.

    Search in bugzilla, and may be related to this: http://bugzilla.xfce.org/show_bug.cgi?id=4530

    It solves a small pach.
    diff --git a/dialogs/appearance-settings/main.c b/dialogs/appearance-settings/main.c
    index d8d2ad7..625de5d 100644
    --- a/dialogs/appearance-settings/main.c
    +++ b/dialogs/appearance-settings/main.c
    @@ -347,6 +347,7 @@ appearance_settings_load_icon_themes (GtkListStore *list_store,
    {
    tree_path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
    gtk_tree_selection_select_path (gtk_tree_view_get_selection (tree_view), tree_path);
    + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(tree_view), tree_path, NULL, TRUE, 0.5, 0);
    gtk_tree_path_free (tree_path);
    }
    }
    @@ -468,6 +469,7 @@ appearance_settings_load_ui_themes (GtkListStore *list_store,
    {
    tree_path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
    gtk_tree_selection_select_path (gtk_tree_view_get_selection (tree_view), tree_path);
    + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(tree_view), tree_path, NULL, TRUE, 0.5, 0);
    gtk_tree_path_free (tree_path);
    }

    Thanks!!!

    ReplyDelete
  5. @Matias: Indeed, way off topic, if you believe it belongs to the bug you mention, simply leave a comment and/or attach your patch there. I can't do anything with your patch except reporting it on bugzilla just like you.

    ReplyDelete
  6. Sorry Mike. You are right.

    I get an account in bugzilla and attach the patch correctly.

    Regards.
    Matias.

    ReplyDelete
  7. @Matias: Cool 8-)

    By the way, I'm glade to read you like this tool, I'm always looking forward to make it a little better.

    ReplyDelete
  8. Luis Henrique24/8/10 5:53 AM

    One question: is there a way to start xfce4-notes minimized to tray when I log in my Xfce session? I tried to hack ~/.config/autostart/xfce4-notes-autostart.desktop and changed 'Hidden=false' to 'Hidden=true' and the application simply didn't start upon login.

    ReplyDelete
  9. @Luis the autostart is described on the Freedesktop Autostart spec, of course it's not the right file to tweak.

    What you are looking for existed as an option but since the rewrite it has been dropped. Now the behavior is different, although still known as buggy for another reason[1], only the visible notes are restored upon next login. You can tweak the Visible config key of each note. The config file is saved under ~/.config/xfce4/xfce4-notes.rc if you are running the standalone app or ~/.config/xfce4/panel/xfce4-notes-plugin-[ID].rc if you are running the panel plugin.

    [1] The config file is saved when the application is exited. This is where the session manager jumps in and lets applications leave safely but it's not trustworthy, instead the notes program quits suddenly and doesn't save the state of the windows (position, visibility, etc).

    ReplyDelete
  10. Hi, call me old... and stupid.... but what happened to the plus/minus buttons that allow you to add/remove anote? I can not find in xfce 4.8
    Can not find a option to add them back.
    Anyway, congratulations for the best notes plugins ever!

    ReplyDelete
  11. Hi @Itlo,

    to be all fair, I made some changes here and there and at some point I decided to remove these buttons entirely. I'm always open for new suggestions, in the case of the add/remove buttons, I'll add them again for the next release, and probably make them optional through the settings dialog.

    However this won't happen soon as I lack time to code on the Xfce panel plugins lately.

    Thank you :)
    Mike

    ReplyDelete
  12. Jerry McBride30/12/11 7:11 PM

    Hi Mike!!

    My notes collection is quite large and dynamic in nature. I really, really need a way to quickly add and delete messages as I go...

    PLEASE add back the plus and minus keys. It's the only way I can justify keeping your notes app on my desktop...

    Pretty Please???

    ReplyDelete
  13. You can already create/delete a note with the keyboard shortcuts that are respectively Ctrl+n/w. But sure I can readd the buttons.

    ReplyDelete
  14. Hi. I'd like to know if it's possible chance the directory that notes are saved because I want to share the archives using Ubuntu One with my notebook and work computer. Thank you.

    ReplyDelete
  15. for me notes is very useful, minimized startup was very cool
    thank you andrew

    ReplyDelete
  16. In Manjaro Linux 16.06 with XFCE.I want only a single Note in a large-ish box for transient information, like a phone number, a link, a phone conversation note ("buy some jam on way home"). But I want the note box to pop up from the keyboard, then go back down to the panel. Didn't see a default way to do this and clicking on the panel icon is... whatever. Wanted a keyboard popup.

    The way I found works is, in Keyboard Settings, assign "xfce4-popup-notes" to a keyboard application key combination - I'm using the reassigned right Super key for that. Works a treat.

    Maybe someone will find that useful.

    ReplyDelete