GNOME Bugzilla – Bug 529098
Create option to bug user once in a while
Last modified: 2008-10-23 22:11:30 UTC
Reported by toms.baugis, Mar 26, 2008 It would be nice to bug the user in an unobtrusive manner, once in a while to update the hamster - that could be performed with the notify-something like how it works for rhythmbox or update manager. I would like to be not buggered, so that should be an option Comment 1 by frandavid100, Apr 13, 2008 Yeah, a libnotify bubble could pop up every certain minutes asking, hey, are you still doing this? I'm quite absent minded sometimes and I can picture myself starting to do something else and just forgetting to report to Hamster, so I really could use a reminder once in a while.
Great idea. I often forget I'm logging time for something long after I've switched gears to another project. Part of this is probably just getting more used to using Hamster (I'm a newbie), but it'd be great to have the notify option. An alternative treatment would be to flash a bright yellow highlight a couple of times behind the text for the activity in progress. This seems less obtrusive than a bubble (since you don't have to close anything), but probably still enough visual weight to get your attention for a second. The "flashing" could be configured to occur at a user decided interval (I know I wouldn't want it happening any more than once or twice an hour).
Hello, I have implemented a libnotify solution for this. Every a specified amount of minutes, a pop up asks the use if he is still working on the task. The pop up comes with two buttons, Yes and No so the user can either close immediately the popup without any action taken ("Yes" option), or immediately switch to "No activity" ("No" option). I also added the needed fields on the preferences menu, so one can (de)activate the feature and specify the time interval. I attach the patch bellow.
Created attachment 121022 [details] [review] Libnotify patch
I like the idea but am not sure if there is a need for a "yes" button. Isn't closing the popup enough? Also "yes" and "no" make very bad button labels, all buttons should use self-explaining names ("abort current activity" or "stop tracking" or something that makes the effect clear without reading the whole message). Please also keep in mind we need to make sure hamster works also without libnotify (it is not a blessed dependency of GNOME)
The "yes" button isn't really necessary, I just thought that is more convenient to have a large enough button to quickly close the popup without changing anything and the popup's close button I think is a small one. I don't strongly insist on having a "yes" button anyway, so if that's the case I can remove it and probably reform the question so I can add a "abort current activity" button as you suggested. About libnotify now, I thought that it is part of the GNOME because almost everyone uses that :) Maybe I can code a "highlight" nag, like that timer-applet has, but I think it's not as good solution as libnotify, because you cannot really add buttons or ask questions and I think that users will be just clicking on that highlighted applet. Please post any thoughts on how we can implenent this without libnotify in a GNOME way and I will try to work something out.
Patryk - what would be the proposed alternative to libnotify? Or should it just check for existence and hide preferences, when there is no libnotify? George - good start! Few knits: * In buttons, please use imperative verbs instead of passive yes / no (http://library.gnome.org/devel/hig-book/stable/controls-buttons.html.en) In this case affirmative action would be "Keep tracking" and negative - "Switch task". * Language in the preferences: "Remind me of current task" would be, in my opinion, somewhat more english. Also, the spacing between checkbox and the spinner is somewhat awkward - please check out other dialogs (screensaver, power manager, others) in gnome and see how they work with time, i think a slider might work better here. * Notification title should use the functional title, which is "Time tracker" Code: notify_tracked checkbox is not tied to event, thus the checkbox doesn't do anything. Code is a bit mess regarding it, anyway - it get's checked only on load, but the check_user attempts to set notification anyway each time. Also, you could live with just one gconf setting - notify_interval, where "0" would mean that it is disabled. But that's only matter of taste, because having 2 configuration settings allows to remember previous value for user. Any way or other, please clean up your code regarding the boolean notify_enabled.
oh, and also please take notice of the hamster-applet.schemas.in file in data folder
umm, and the two buttons could be "stop tracking" and "switch task" and "yes i'm still working on this task" action could be mapped to popup timeout / closing dialog - that should make perfect sense!
I meant to hide the feature completely if there is no python-libnotify available, not to implement our own fallback ;)
Thanks for the comments. I updated the code using your instructions and it's looks better right now. * Added slider and removed the checkbox. If value is zero, notifying is disabled * Fixed the buttons to "switch task" and "stop tracking". The default action is to continue tracking * Changed the notification title to "Time tracker" * Updated hamster-applet.schemas.in file About libnotify, I placed a try/except statement to disable notifications if the library isn't there, but I believe that we should disable the menus also. I don't have a clue how I to change on the fly the menu entries, so please provide me with some info. I 'm not very happy with the slider design, but this is one my first gtk designs so I cannot think of something better.
Created attachment 121062 [details] [review] Libnotify patch
Thanks George, the patch with some modifications has been checked in! http://svn.gnome.org/viewvc/hamster-applet?view=revision&revision=590 Modifications performed: * fixed slider layout * listening to both format_value and value_changed events for the slider, instead of just format_value * hiding notification slider if there is no pynotify * sensible defaults * sensible limits * wording in schemas * removed extra changed bits in glade file - fix should just cover the topic specified Thanks again and hope to see more from you George! :)
I like the feature, but I miss the possibility of disable it. I'll do it with a check before (above) the slide bar to deactivate the slide bar and set the timeout to 0 or just set 0 as the lower slide bar value. What do you think?
@juanje If you drag the bar to the right end you can disable the feature. Probably this behavior isn't too clear. I first tried the left end but maybe it's just me. @toms Thanks for accepting my patch!
Juanje - just slide it to the right. That's how it also works in gnome power manager.
It's true. I did't see before. I've just realised in gnome power manager work like that but still I don't think is intuitive at all... HIG[1] doesn't say anything specific about this, but for me is not intuitive at like now. But it's just my opinion, I don't know if there is any convention about it. Maybe this is the best way (taken "Never" as the limit to infinite so is the higest value), but could be nice to say so in any way. [1] http://library.gnome.org/devel/hig-book/stable/controls-sliders.html.en
i think it is good as it is. and i'd imagine that you would think like this - "i want to disable that notification thing, but i have just one slider. uh, what do i do. well, watta heck, if i can disable it, i'll just move it to the end, so it appears really rare. ooh, it says "never". never sounds good, i like never! ahahahaha!...."
forgot to resolve... strange