fracte / keepnote

Automatically exported from code.google.com/p/keepnote
0 stars 0 forks source link

Better integration with GNOME ? #21

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I really like the "Use GTK stock icons on toolbar".

Maybe is it possible to achieve a better integration with GNOME ?

a) Helper applications
having Helper applications to be completed by default regarding your OS
would be cool.
keepNote could have defaults profiles and select the good one regarding the OS

I don't know how KeepNote can know what is the current OS

Reading the  /etc/lsb-release file on Linux gives some information
in my case :
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu jaunty (development branch)

Then the profile for Ubuntu (DISTRIB_ID) could be :

   * Web Browser : gnome-open
   * File Explorer : gnome-open
   * Texte Editor : gedit
   * Image Editor : gimp
   * Image Viewer : gnome-open
   * Screen Shot : import

A command like grep -q "DISTRIB_ID=Ubuntu" /etc/lsb-release # then #
should work apparently (sorry i'm not a developer i've read that on
the web!)

I've also read that the platform module could be helpful

>>> platform.__doc__
 This module tries to retrieve as much platform-identifying data as
   possible. It makes this information available via function APIs.

   If called from the command line, it prints the platform
   information concatenated as single string to stdout. The output
   format is useable as part of a filename.

http://docs.python.org/library/platform.html

Note that it seems that the platform module needs Py >= 2.6 to work
correctly (http://bugs.python.org/issue3937 )

b) Stock icons, System tray
KeepNote could also automatically select "Use GTK stock icons on
toolbar" and deselect "Use system tray icon" (which goes against GNOME
HIG see
http://developer.gnome.org/projects/gup/hig/draft_hig_new/desktop-notification-a
rea.html
)

That would be a great improvement for non-geek users

c) Menus

c-1) And if you want KeepNote to fit perfectly into GNOME, we could
imagine another change : having the Option>KeepNote options menu in
Edition>Preferences

c-2) Besides Horizontal/vertical layout should sit in View menu

c-3) concerning the Spellcheck entry, it could :
- sit in a new Tool menu that would replace the current Options menu
(but from GNOME HIG "single-item menus offer poor usability"
- be a KeepNote option (in Edition>Preferences) but we loose direct
access unless we use a key combination which may not be discoverable
- be in View menu (since Spellcheck function is dual : highlighting
errors and suggestion the correct word. User may want to unable the
highlighting and having it in View menu is not totally illogical)
It's not easy to choose but i guess that the 1st proposal (having
Spellcheck entry sitting in a new Tool menu)  is the best because it's
the most discoverable

c-4) Menus order could be rearranged : File Edit View come first, then
i guess Format,  Search (Search should be in Edit menu but i guess we
can consider that menu to be an application-specific menu) and Tool
(if it contains Spellcheck entry - see above) , then Go and Help

You can read "Standard Menus" in GNOME HIG
http://developer.gnome.org/projects/gup/hig/draft_hig_new/menus-standard.html

Many thanks for that great application

Original issue reported on code.google.com by thibaut....@gmail.com on 4 Mar 2009 at 12:51

GoogleCodeExporter commented 8 years ago
i think that priority can be set to low for this task
i'd understand if it was set to WONTFIX also

Original comment by thibaut....@gmail.com on 11 Mar 2009 at 4:26

GoogleCodeExporter commented 8 years ago
note that gnome-open can be replaced with xdg-open which "universally" works 
(KDE,
Xfce, GNOME)
http://portland.freedesktop.org/xdg-utils-1.0/xdg-open.html
it requires xdg-utils package.
http://portland.freedesktop.org/xdg-utils-1.0/

It seems that xdg-open makes uses of gnome-open with GNOME, kfmclient exec with 
KDE
and exo-open with xfce
http://www.sfr-fresh.com/linux/misc/xdg-utils-1.0.2.tgz:a/xdg-utils-1.0.2/script
s/xdg-open

BTW, from the above link, here is an interesting part :

#--------------------------------------
  299 # Checks for known desktop environments
  300 # set variable DE to the desktop environments name, lowercase
  301 
  302 detectDE()
  303 {
  304     if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
  305     elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
  306     elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then
DE=xfce;
  307     fi
  308 }

Original comment by thibaut....@gmail.com on 24 Mar 2009 at 2:28

GoogleCodeExporter commented 8 years ago
To sum up things concerning Helper applications :
It would be cool if KeepNote could be smart enough to automatically set Helper
applications. 

1) First KeepNote could detect if it is running on Linux 
Maybe by using python platform.system()
http://docs.python.org/library/platform.html

2) if KeepNote is running on Linux, it could set Helper applications like that :
   * Web Browser : xdg-open
   * File Explorer : xdg-open
   * Texte Editor : the result of the command "xdg-mime query default text/plain"
   * Image Editor : 
   * Image Viewer : xdg-open
   * Screen Shot : import

KeepNote would need xdg-utils and imagemagick as dependencies

Then the helper applications entry in KeepNote options could be suppressed. 
Except
maybe to set Image Editor application

Original comment by thibaut....@gmail.com on 31 Mar 2009 at 12:22

GoogleCodeExporter commented 8 years ago
concerning Stock icons : for exemple if KeepNote is running on Linux with GNOME
desktop, KeepNote could be smart by making automatically use of GTK Stock icons.
You could use the code given above (comment 2) to let KeepNote know if it's 
running
on GNOME or not.

I'm speaking about GNOME since it's what i use but maybe GTK Stock icons option 
has
to be set for other desktops.

I'm not a developper therefore i apologize if i've said non-senses...

Original comment by thibaut....@gmail.com on 31 Mar 2009 at 12:28

GoogleCodeExporter commented 8 years ago
also, KeepNote >= 0.5.2 could make use of tango color palette on GNOME desktops 
for
customizable node icons http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines

Original comment by thibaut....@gmail.com on 31 Mar 2009 at 7:46

GoogleCodeExporter commented 8 years ago
concerning Helper applications : 

1°) Image Editor

I don't think it's possible to select a default image editor on Linux.

But we could imagine that KeepNote would automatically select GIMP if it's 
already
installed since there is large probabilities that GIMP would then be ACTUALLY 
the
default image editor on that system. 
Of course user would have the possibilty to change it. 

2°) Settings through a GUI or a configuration file

BTW, since it seems to be settings for advance users, KeepNote doesn't need a 
GUI for
setting Helper applications. Advance users could modify a configuration file.

Original comment by thibaut....@gmail.com on 31 Mar 2009 at 5:23

GoogleCodeExporter commented 8 years ago
Thanks for the xdg-open reference, I will be using this for the upcoming attach 
file
feature.  Your other ideas are also very good.  I'm reply to let you know that 
I am
reading what you have written :).  It will just take some time to evaluation and
implement them all.  Thanks for you continued interest and feedback.

Original comment by matt.rasmus@gmail.com on 13 May 2009 at 6:51

GoogleCodeExporter commented 8 years ago

Original comment by matt.rasmus@gmail.com on 13 May 2009 at 12:49

GoogleCodeExporter commented 8 years ago
« BTW, since it seems to be settings for advance users, KeepNote doesn't need 
a GUI for
setting Helper applications. Advance users could modify a configuration file. »

I don't agree. Some advanced users (like me) or less advance users prefer a GUI 
for
setting configuration.

Original comment by acott...@gmail.com on 2 Jun 2009 at 5:49

GoogleCodeExporter commented 8 years ago
But, in this specific case, would you set up other helper applications than 
these
already set up for the whole system ?
I'm not sure that the case may happen often
If this case is rare, don't clutter the preferences window

Original comment by thibaut....@gmail.com on 2 Jun 2009 at 10:07

GoogleCodeExporter commented 8 years ago
KeepNote 0.6 has KeepNote options in Edit menu within Ubuntu Karmic (GNOME) 
which is
great !
It could also be renamed "Preference"s instead of "KeepNote options" ?

Another idea to better match GNOME desktop : setting "Use GTK stock icons on
toolbar" could provide a different set of node icons that could match Tango 
guideline

Do you want me to try to work on that idea ?

references :
http://rasm.ods.org/keepnote/manual.shtml#icons
http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines

Original comment by thibaut....@gmail.com on 8 Nov 2009 at 12:07