GNOME Bugzilla – Bug 393586
[eog-ng] Editable toolbar for EOG
Last modified: 2007-04-30 20:51:25 UTC
We should have editable toolbar in EOG to provide more flexibility to our users.
Created attachment 82512 [details] [review] simple editable toolbar implementation So, let's kick the ball. This patch makes the toolbar in EOG editable. It's pretty simple and it's mostly based on the Evince code. It uses the libegg's editable toolbar, locally copied. It currently only allows you to edit the EogWindow's toolbar, but maybe we would want to make the fullscreen toolbar editable as well (this could need a bit of thinking because the customization of the toolbar is only possible with drag n drop from and to a dialog, which could be a bit hard when in fullscreen. Opinions?). We need to decide which items we want to leave by default, and which others will be available. So far, I simply left the current items by default, and left some others available, without thinking too much about it, so that's a topic to be discussed. (right clicking on the toolbar will give a warning. Please ignore it in this version of the patch).
> So, let's kick the ball. Good. :-) > This patch makes the toolbar in EOG editable. It's pretty simple and it's > mostly based on the Evince code. It uses the libegg's editable toolbar, locally > copied. <snip> > It currently only allows you to edit the EogWindow's toolbar, but maybe we > would want to make the fullscreen toolbar editable as well (this could need a > bit of thinking because the customization of the toolbar is only possible with > drag n drop from and to a dialog, which could be a bit hard when in fullscreen. > Opinions?). Fullscreen toolbar should be the same as the normal toolbar. Not the same case for slideshow toolbar which would be good to have commands like "Play/Pause" or changing the image switching animation (in the future). So, don't worry about this issue. > We need to decide which items we want to leave by default, and which others > will be available. So far, I simply left the current items by default, and left > some others available, without thinking too much about it, so that's a topic to > be discussed. Discussion about this should go on bug #310455. > (right clicking on the toolbar will give a warning. Please ignore it in this > version of the patch). Ok. Some (quick) suggested changes in the patch: - Put toolbar-editor in a cut-n-paste directory in the root directory (cut-n-paste/toolbar-editor); - "Toolbar" item in "Edit" menu should come before "Preferences"; - Rename "eog_dot_dir" to "eog_util_dot_dir"; - Indent "eog_util_dot_dir" like other functions in eog-util.h; - Add fullscreen and slideshow to the available items list. That's all for now. I didn't have time now for a deep review of the code. I'll do it tonight.
Created attachment 82779 [details] [review] updated patch I updated the patch according with your comments, and fixed some minor issues. Summary of changes: - Fix several compilation time warnings. - Add the toolbar popup which was causing a warning when right clicking in the toolbar. I don't like too much that single item. - Apply the changes suggested by Lucas Rocha in bugzilla. - Move the toolbar-editor directory inside a new cut-n-paste directory.
Made a bunch of fixes and commited in trunk. Thanks Claudio! 2007-04-29 Lucas Rocha <lucasr@gnome.org> Editable toolbar support. Patch from Claudio Saavedra. Fixes bug #393586. * src/eog-application.[ch] (eog_application_init, eog_application_dispose, eog_application_get_toolbars_model, eog_application_save_toolbars_model): add centralized toolbar model handling for all application windows. * src/eog-window.c (eog_window_construct_ui): use toolbar model and editable toolbar. eog_window_cmd_edit_toolbar, eog_window_cmd_edit_toolbar_cb) * src/eog-util.[ch] (eog_util_dot_dir): added function to get the user EOG's directory. * cut-n-paste/toolbar-editor/*: local copy of editable toolbar from libegg. * data/eog-ui.xml: added toolbar to Edit menu. * data/eog-toolbar.xml: new editable toolbar definition file. * configure.ac, Makefile.am, src/Makefile.am: added editable toolbar bits to the build.
Lucas, you forgot to 'svn add' the eog-toolbar.xml file. I've committed the one in my latest patch, if you had done any changes, please update it. (also marking that patch as committed)
Shame on me. Thanks! :-)