GNOME Bugzilla – Bug 677938
set the number of notes doesn't work
Last modified: 2012-07-02 15:22:02 UTC
In advance tab preferences there is option to set the number of notes that are visible in list. I set it to 18, but I still can see only 10, while my total number of notes is 14. Tomboy 1.10.1 on Kubuntu 12.04.
Could you try creating a new note? Will that newly created note display in your recent list causing the count to increase? I see some code that maybe has to do with changeDate, but not sure.
The newly created notes display in my recent list but it doesn't cause the count to increase. There are only 10 visible in the list. To access other notes I need to open "search notes" option.
By the way maybe instead of setting the fix number of notes visible even to 18 would be better to display them all and create a scroll-bar. Just an idea. :)
gconftool-2 -g /apps/tomboy/menu_note_count
Oh boy, don't start such a war. <G> Feel free to submit a enhancement request. (In reply to comment #3) > By the way maybe instead of setting the fix number of notes visible even to 18 > would be better to display them all and create a scroll-bar. Just an idea. :)
(In reply to comment #4) > gconftool-2 -g /apps/tomboy/menu_note_count Weird. That comment is missing half of what I said. I was wondering what number the gconftool reported as set on your system.
(In reply to comment #6) > (In reply to comment #4) > > gconftool-2 -g /apps/tomboy/menu_note_count > > Weird. That comment is missing half of what I said. > I was wondering what number the gconftool reported as set on your system. It returns 18.
Ug, I can't duplicate this. Looking at the code I don't see any logging that will help. So I guess I could either add more debug statements and send you a new tarball or are you able to compile from source? Would you mind creating more than 18 Notes in your System? I'm wondering if it has to do with the number of notes you have.
I installed Tomboy 1.11.1 from here: https://launchpad.net/ubuntu/+source/tomboy/1.11.1-1ubuntu2/+build/3488195 on Kubuntu 12.04 Precise. It works but the problem still exist. Maybe it is not a Tomboy problem but a problem with this add-in? It looks like it is very old, because as dependency in description it has tomboy 0.10. If you can send me something easy to run with debugging options I could try but I guess compiling would be too difficult for me. If not possible - well I can live with that. :)
I've implemented this one. It was once a hardcoded constant and then I turned this to a setting, to give you some background. Tomboy 0.10 dependency is meaningless, I've just copied it from the default, there isn't really any dependency worht noting. I don't have the code in front of me and it was quite a while ago, so I can't recall the details, but IIRC there was not some [preexisting] more complex condition in relation to this number than just [intuitively expected] "this is the number of notes that will be shown on the list". I'll take a look at this during the upcoming weekend and get back to you.
RE:Comment 11 That's awesome Alex. I was going to compile something for Axel, but I have to fire up my Ubuntu VM :)
(In reply to comment #11) > there was not some [preexisting] more complex > condition in relation to this number than just [intuitively expected] "this is > the number of notes that will be shown on the list". Thank you Alex for taking care of it. If this number is "randomly chosen" could you set it to a bigger number like 30 or so, on this occasion? Or should I fill a request?
(In reply to comment #13) > If this number is "randomly chosen" could you set it to a bigger number like 30 > or so, on this occasion? Or should I fill a request? It's not random, IIRC. There's some limitation somewhere else. I'll clarify everything on the weekend and post here.
So looks like it works as follows: 1) The number set on the Advanced tab in Preferences sets the minimum number of notes which should be displayed no matter what. If there's not enough "recently changed" notes (modified less than 3 days ago), it should put older notes there to have at least that number of notes displayed; 2) Maximum length of the list (18) is hardcoded in that subroutine, there's no comments as to why it was set to 18; 3) Pinned notes are shown regardless of the setting; 4) Currently opened notes are counted together with recently changed ones; 5) Template and Start Here notes are not considered at all; 5) The whole logic is in Tomboy/Tray.cs:AddRecentlyChangedNotes(); BTW, the add-in which displays the Advanced tab has nothing to do with the code implementing the logic - it merely sets the MENU_NOTE_COUNT, which is /apps/tomboy/menu_note_count option. Now back to axel's problem. With 14 notes total and "minimum" set to 18, all 14 should be visible in that list, not 10, _unless_ 4 of them are templates. Axel, can it be the case? Could you please run the following commands & paste the output here for us to understand how does your notes directory look like? 1) ls -alF $HOME/.local/share/tomboy 2) grep 'system:template' $HOME/.local/share/tomboy/* 3) grep 'last-change-date' $HOME/.local/share/tomboy/*
Since bug report it could change because I used Tomboy all the time. Here is output: http://pastebin.com/xgZtG0C6
Thanks & no worries, if it's a bug - it should be reproducible, if it's not, then we'll just clarify the situation. Unfortunately the first command didn't produce the result I expected as I haven't accounted for the fact you may have a symlink there, so could you please rerun it like below, to double-check? 1) ls -alF $HOME/.local/share/tomboy/* Out of those command outputs that worked it looks like you currently have 16 notes and 3 of those are templates. 4 of them are "recent" (now minus 3 days). So according to that logic I described above, if you set that "Minimum number of notes..." to the max (18), you should see 13 notes. Now, what do you actually see?
http://pastebin.com/FzLzVcks I still see only 10 from tray icon out of the total 14 that I see from search notes option. In the meantime I added and removed temporary notes. But 14 is the number of my "permanent" - every day used notes, that I never delay. They always stay, although I edit their content frequently.
And you are sure you have the setting at 18 on the Advanced tab, could you please double-check? Out of that last command output, you've got 5 notes that are modified within three last days, if you decrease the number to 5, what do you see in the list? I can't reproduce this, I've played with note modification dates and that minimum limit and everything works as expected. So I suspect there may be some peculiarity in your notes set causing this. Another thing I'd like to ask you to do is the following: 1) Run the following command in the terminal. It will grep two lines out of each note - the title and the last modification date as written by Tomboy inside the note. Command: egrep 'title|last-change-date' $HOME/.local/share/tomboy/* 2) Create a list of notes modified within last 3 days (up to June 23rd inclusive) 3) Set the limit on the Advanced tab to "1" 4) As a result you should only see the "recent" notes in the menu (those modified within 3 days per the output of command #1). 5) Compare the menu list and the list you've created at step (2) and tell me what notes didn't make it to the menu that should have: what are their modification dates, is there anything special about their content. I assume you aren't willing to show the titles of your notes, therefore all those steps. If that's not a problem for you - you can just provide me with the list from (1) and screenshot of the (4) (feel free to send them to me directly if you feel like that) and I'll analyze that by myself.
For the record - axel has sent me the his notes set in a direct email. I'm still not not able to reproduce this even with the original notes on OpenSUSE 12.1 with neither latest git nor 1.10.1 (as originally reported) version of the Tomboy. The notes are shown exactly in accordance with the number I put into that setting. Actually the code there is quite simple leaving small space for a bug. I suspect this may be related to either axel's specific system/setup or some more generic problem like (wild guess) incorrect interaction between Tomboy and specific window manager/decoration that axel (or Kubuntu) uses. Attached is a debug version with some additional debug output enabled (note titles will be logged). Axel, can you please do the following: 1) Download the tarball into your /tmp and unpack by running: > tar xjvf ./tb-debug-axel.tar.bz2 The file is here: http://ge.tt/362uYrJ/v/0?c (unfortunately this Bugzilla doesn't allow non-patch attachments more than 1MB, md5 sum is f251f9bbbd81d52302c61c3b963625ae). 2) Delete (or move you care) your existing Tomboy log file by running > rm $HOME/.config/tomboy/tomboy.log 3) Run the debug version and try setting the configuration option to various numbers (make sure to click the Close button on the settings window) and then opening up the menu (left click on the Tomboy icon in the tray). This will generate the debug output I'm looking for and put it onto the screen and into the log file. > /tmp/tb-debug-axel/bin/tomboy --debug 4) Send the log file to me or attach to this bug. Just please ensure the information made it into the file (to avoid going back and forth). File is here: > $HOME/.config/tomboy/tomboy.log In the meanwhile I'll download Kubuntu version axel has and try to see if it's the distribution specific that may interfere here.
Created attachment 217762 [details] tomboy log file Axel, please only send the files off-bugzilla and write your comments here. You'll benefit from having more eyes over your problem and will help others who may have the same symptoms. Here's the content of your last email with the reply: === > I did exactly as you wrote. When I do it nothing changes. Log shows only > "Adding preference tab addin: AdvancedPreferencesAddin" > but it doesn't show what exactly happens, how preferences are changed forexample from 2 notes to 4 notes. > > a couple of times. > I just thought maybe it has something to do with how tomboy or plasma refreshes its view... > > I don't know. > > But when I remove one not it shows me still 10 but display the one that was not displayed before. When I create a note it hides one to display the new one. === It doesn't seem that you run the package I've sent you. The log file says it picks the plugins from /usr/lib/tomboy and that means you run the distribution-provided Tomboy. Please run through the steps I provided in the previous post *exactly* and show me the screent output of all steps + the tomboy.log file. The debug package may crash on initialization of Evolution add-on, at least it does on my VM, due to not being able to find gmime-sharp package. If that happens - just delete the /tmp/tb-debug-axel/lib64/addons/Evolution* files, they are not relevant for the problem at hand. I have my Kubuntu VM installed and in the default setup + distribution-provided Tomboy or with the debug package I've sent you I have the same - correct - behavior (and the debug output appears just fine).
Also I've noticed previously you had "user1" as the user name but the tomboy.log file says "/home/atlanta", do you have two users on your machines, or is it happening on different machines, or your home dir name doesn't match your account name, or what?
This log was in .config/tomboy And when I run Tomboy from terminal from the /tmp/tb-debug-axel/bin/ by tomboy --debug > /tmp/tb-debug-axel/bin/tomboy --debug I got exactly the same output displayed in terminal as in log file. When I uninstalled Tomboy from I can't run the file that you send me. It ask me to install Tomboy from repository. So I don't know how to tun the file from the package you sent me and exclude the possibility that Tomboy installed from repositories is run. atlanta - is the name of user2, which is an account I run Tomboy. But on account user1 the situation is the same. Sorry, I should have change it to make information consistent.
Please paste here (or pastebin) the full console output of the commands (and their results), there's something wrong with your installation or the way you do it, because for me it runs as expected.
http://pastebin.com/6YMnqqd5 [DEBUG 16:30:23.744] Adding preference tab addin: AdvancedPreferencesAddin [DEBUG 16:30:42.757] Adding preference tab addin: AdvancedPreferencesAddin [DEBUG 16:30:57.161] Adding preference tab addin: AdvancedPreferencesAddin This is what is displayed when I change the number in preferences. The same happens on both accounts. It looks as if Tomboy doesn't react at all to changes. This debug option doesn't even show that I made any change to preferences and what was changed to what value.
Ok, it gets more clear. You're indeed doing it wrong ;). First, when you run it like that: ===log snippet=== atlanta@axel-945P-DS3:/tmp/tb-debug-axel/bin$ tomboy --debug ===log snippet=== You're starting the "default", distribution installed Tomboy, because it's in your $PATH. And second, after changing the setting on the Advanced tab, you should left-click on the Tomboy icon in the tray, to open the menu with the notes list, my debug output will be shown only in that case. Okay. To avoid any additional distractions, I have recompiled the debug package on Kubuntu 12.04 for you. Get it here: http://ge.tt/41dJpsJ (md5sum is 8ca84c9ab58a18f84ea8354f0f13a7a6). And once again the commands I want you to run and show me the output (+the log). Please run them *literally*, by just cutting and pasting. 1) Download the file and put it into /tmp 2) Unpack the file by running > cd /tmp && tar --strip-component=1 -xjvf /tmp/tb-debug-axel-kubuntu.tar.bz2 && chmod -R 777 /tmp/tb-debug-axel-kubuntu 3) Run the tomboy by executing > /tmp/tb-debug-axel-kubuntu/bin/tomboy --debug Note that it may fail with "System.InvalidOperationException: Could not read add-in description" - ignore and start it one more time, that's a known, irrelevant to your case bug. 4) Several times change the limit on the Advanced tab, *important* each time opening the menu with Tomboy recent notes by left-clicking on the Tomboy icon in the tray. 5) Exit Tomboy using the right-click on the same icon, then selecting Exit 6) Copy all the console output from all the above steps starting from (1) + the tomboy.log file and show them to me.
There is another issue. When I left-click nothing happens. I have to right-click to open menu from icon on panel. Does it make any difference? After every change in preferences I right-click on panel icon to show the menu but debugging doesn't change. It shows only Adding preference tab addin: AdvancedPreferencesAddin And I really followed your steps: downloaded, unpacked with the command you gave and run pasted the command you gave atlanta@axel-945P-DS3:~$ /tmp/tb-debug-axel-kubuntu/bin/tomboy --debug ** Running Mono with --debug ** [DEBUG 17:29:22.128] Failed to register with session manager: org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files [DEBUG 17:29:22.327] NoteManager created with note path "/home/atlanta/.local/share/tomboy". Unhandled Exception: System.DllNotFoundException: libtomboy.so at (wrapper managed-to-native) Tomboy.XKeybinder:tomboy_keybinder_init () at Tomboy.XKeybinder..ctor () [0x00023] in /tmp/tomboy/tomboy.git/Tomboy/XKeybinder.cs:35 at Tomboy.GnomeFactory.CreateKeybinder () [0x00000] in /tmp/tomboy/tomboy.git/Tomboy/GnomeFactory.cs:28 at Tomboy.Services.get_Keybinder () [0x0000a] in /tmp/tomboy/tomboy.git/Tomboy/Services.cs:76 at Tomboy.GConfKeybindingToAccel.AddAccelerator (Gtk.MenuItem item, System.String gconf_path) [0x00000] in /tmp/tomboy/tomboy.git/Tomboy/Tray.cs:661 at Tomboy.TomboyTray.MakeTrayNotesMenu () [0x00046] in /tmp/tomboy/tomboy.git/Tomboy/Tray.cs:404 at Tomboy.TomboyTray..ctor (Tomboy.NoteManager manager) [0x00018] in /tmp/tomboy/tomboy.git/Tomboy/Tray.cs:382 at Tomboy.TomboyTray..ctor (Tomboy.NoteManager manager, ITomboyTray tray) [0x00000] in <filename unknown>:0 at Tomboy.TomboyTrayIcon..ctor (Tomboy.NoteManager manager) [0x00006] in /tmp/tomboy/tomboy.git/Tomboy/Tray.cs:149 at Tomboy.Tomboy.StartTrayIcon () [0x00000] in /tmp/tomboy/tomboy.git/Tomboy/Tomboy.cs:197 at Tomboy.Tomboy.Main (System.String[] args) [0x0015a] in /tmp/tomboy/tomboy.git/Tomboy/Tomboy.cs:156 [ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libtomboy.so at (wrapper managed-to-native) Tomboy.XKeybinder:tomboy_keybinder_init () at Tomboy.XKeybinder..ctor () [0x00023] in /tmp/tomboy/tomboy.git/Tomboy/XKeybinder.cs:35 at Tomboy.GnomeFactory.CreateKeybinder () [0x00000] in /tmp/tomboy/tomboy.git/Tomboy/GnomeFactory.cs:28 at Tomboy.Services.get_Keybinder () [0x0000a] in /tmp/tomboy/tomboy.git/Tomboy/Services.cs:76 at Tomboy.GConfKeybindingToAccel.AddAccelerator (Gtk.MenuItem item, System.String gconf_path) [0x00000] in /tmp/tomboy/tomboy.git/Tomboy/Tray.cs:661 at Tomboy.TomboyTray.MakeTrayNotesMenu () [0x00046] in /tmp/tomboy/tomboy.git/Tomboy/Tray.cs:404 at Tomboy.TomboyTray..ctor (Tomboy.NoteManager manager) [0x00018] in /tmp/tomboy/tomboy.git/Tomboy/Tray.cs:382 at Tomboy.TomboyTray..ctor (Tomboy.NoteManager manager, ITomboyTray tray) [0x00000] in <filename unknown>:0 at Tomboy.TomboyTrayIcon..ctor (Tomboy.NoteManager manager) [0x00006] in /tmp/tomboy/tomboy.git/Tomboy/Tray.cs:149 at Tomboy.Tomboy.StartTrayIcon () [0x00000] in /tmp/tomboy/tomboy.git/Tomboy/Tomboy.cs:197 at Tomboy.Tomboy.Main (System.String[] args) [0x0015a] in /tmp/tomboy/tomboy.git/Tomboy/Tomboy.cs:156 atlanta@axel-945P-DS3:~$
I mean when I did it before I had to use right click. When I pasted the command the output is like above but tomboy doesn't run.
Wonder why this line fired? [DEBUG 17:29:22.327] NoteManager created with note path "/home/atlanta/.local/share/tomboy". Also what happened with libtomboy.so ?
I mean when I did it before I had to use right click. When I pasted the command the output is like above but tomboy doesn't run. I did it on "atlanta" account.
(In reply to comment #27) > There is another issue. When I left-click nothing happens. I have to > right-click to open menu from icon on panel. Does it make any difference? > After every change in preferences I right-click on panel icon to show the menu > but debugging doesn't change. It shows only > Adding preference tab addin: AdvancedPreferencesAddin This was happening because you actually were starting the OS Tomboy. It seems to be modified, so everything is in the right-click menu. The "vanilla" one, including my debug build will need left click to show the notes list and right click to exit & change settings. (In reply to comment #29) > Wonder why this line fired? > [DEBUG 17:29:22.327] NoteManager created with note path > "/home/atlanta/.local/share/tomboy". I think this is fine, we clarified that axel uses "atlanta" account, so it's expected > Also what happened with libtomboy.so ? And this is strange, indeed. It *is* in the debug build, I've just checked. Axel, could you run the following commands and show us the output? 1) uname -a 2) find /tmp/tb-debug-axel-kubuntu -name 'libtomboy*'
atlanta@axel-945P-DS3:~$ uname -a Linux axel-945P-DS3 3.2.0-26-generic-pae #41-Ubuntu SMP Thu Jun 14 16:45:14 UTC 2012 i686 i686 i386 GNU/Linux atlanta@axel-945P-DS3:~$ find /tmp/tb-debug-axel-kubuntu -name 'libtomboy*' /tmp/tb-debug-axel-kubuntu/lib/tomboy/libtomboy.so /tmp/tb-debug-axel-kubuntu/lib/tomboy/libtomboy.la atlanta@axel-945P-DS3:~$
Ok, that's what I suspected - your system is 32 bit whereas my Kubuntu VM is 64 and libtomboy.so was compiled as 64 bit. Let me think how to quickly fix that other than asking you to compile the Tomboy from sources.
Here's the 32-bit build (completely replaces the previous package, md5sum is 711bd3607cc78d4c2ed22dcb1f26eb2a): http://ge.tt/8pqT9tJ/v/0?c Axel, please run the following command and then follow all the directions from my comment 26 above. 0) rm -r /tmp/tb-debug-axel-kubuntu
Created attachment 217785 [details] log from tb-debug-axel-kubuntu.tar.bz2 I attached log file because Konsole output was long and I don't know how to scroll up to copy all of it. But now it works correctly and the number of notes is changing. The lowest number shown in menu is 3 the higher is 18, I guess - I checked only up to 14. It even appears in Gtk style not KDE style as version from Kubuntu repository.
Thanks. We are getting really close. So now we are sure it works ok when you use latest git vanilla Tomboy. And doesn't work when you use OS-provided one version 1.10.1. Actually (this is being written a couple of minutes later after a couple of tests) I can now also see this problem. It constantly shows 10 out of 14 notes no matter what the setting is, just the order changes if I edit some notes (they get up in the list). This is like if the setting is constantly at 10 - which is the default hardcoded value and it was like that before I wrote that plugin which exposed this as a configurable value - and the Advanced tab setting is not used by the code at all. Looks like it only happens with the OS-provided Tomboy on both 32 and 64 bit version (no sure how that happened as I was testing this earlier today on 64 bit and it was ok %). Self-compiled vanilla Tomboy 1.10.1 works fine everywhere, so it's not the version problem. Let me check a couple of things.
And btw gconftool-2 immediately shows that the /apps/tomboy/menu_note_count setting *does* change after I modify it on the Advanced tab. Which leads me to thinking that somehow the OS-provided version does not use it or that menu modification (single menu in OS one instead of dual in vanilla Tomboy) broke the menu building process. Stay tuned.
Eventually the reason is that Ubuntu folks (based on what I see in the changelog in Tomboy source package) replaced Tomboy's own tray indicator with their ApplicationIndicator descendant (added a class + some plumbing around) - looks like something like this:http://unity.ubuntu.com/projects/appindicators/ That indicator doesn't take into account the setting we use and simply picks 10 notes out of the whole set and only sorts them according to the last change date. So I believe there's nothing to be done by the Tomboy team, it's Ubuntu, downstream team, who changed the app behavior and they have to fix it (or not, if they choose not to). I've considered doing that myself, but I don't see any quick solution and long as this is only for Unity and IMO doesn't do the thing right, I'm not interested in looking into that deeper. Quick look at the Launchpad doesn't reveal any related questions, so my suggestion to you axel would be to go there: https://answers.launchpad.net/ubuntu and submit your problem with a reference to this bug thread so that they'll get the point quickly. Sorry I can't fix this for you, but now the reason is clear and it should save a lot of time for the one who'll be fixing it at Ubuntu.
Ok. I take your point. Thank you Alex for your patience and finding the source of the problem. I will ask Ubuntu/Kubuntu team to deal with it further.
I reported a bug on Launchpad set the number of notes in menu doesn't work - in Kubuntu https://bugs.launchpad.net/ubuntu/+source/tomboy/+bug/1019950
Thanks Axel for creating and reporting the bug.