After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 480975 - Feature request : EOG lack an option to reset toolbars
Feature request : EOG lack an option to reset toolbars
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Felix Riemann
EOG Maintainers
Depends on: 493149
Blocks:
 
 
Reported: 2007-09-27 14:55 UTC by Pedro Villavicencio
Modified: 2007-12-04 10:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
first try to implement it (POC) (1.31 KB, patch)
2007-10-01 17:16 UTC, Felix Riemann
needs-work Details | Review
nearly complete patch (6.07 KB, patch)
2007-11-03 17:46 UTC, Felix Riemann
none Details | Review

Description Pedro Villavicencio 2007-09-27 14:55:15 UTC
This bug has been filled here:

https://bugs.launchpad.net/ubuntu/+source/eog/+bug/145327

"Eye of GNOME, Evince and Epiphany have configurable toolbars which is really, reallly, reallly great.

But once the user has played with it, he may want to reset toolbar to get back defaut toolbar (since he may have made a mistake).

Therefore, i think these softwares should propose an option to reset toolbars (see Audacity for an exemple of it)

Also, maybe the method to configure toolbars should be unified :
Evince : go to Edition>toolbars menu
New Eye of GNOME (v. 2.20) : go to Edition>toolbars menu (same as Evince)
Epiphany : go to view>toolbar>personalize toolbar (same as Firefox which is non a "gnome software" but is an "ubuntu software")"

Thanks!,
Comment 1 Felix Riemann 2007-09-27 15:37:53 UTC
Good idea!

I guess we need to split that into two parts.

1. The GUI part, aka "the reset button", would have to be implemented in libegg (EggToolbarEditor).

2. The actual resetting part must be implemented ob the application level (EOG, Evince, Epiphany) as the apps do the saving on their own.
Comment 2 Felix Riemann 2007-09-27 15:43:45 UTC
(In reply to comment #1)
>
> 1. The GUI part, aka "the reset button", would have to be implemented in libegg
> (EggToolbarEditor).
> 

I just opened a bug for this on libegg: bug 480994. 

Let's keep this (this one here) open until we implemented everything necessary in EOG.


Comment 3 Felix Riemann 2007-10-01 17:12:41 UTC
Well, I guess I was a little off when I made the split-up here. The EggToolbarEditor widget is in fact only the drag-area. So, for now everything needs to be implemented in EOG (proof-of-concept patch follows).
Comment 4 Felix Riemann 2007-10-01 17:16:45 UTC
Created attachment 96476 [details] [review]
first try to implement it (POC)

So, this is basically a proof-of-concept patch.  It works pretty well so far except that the resetting feels a little slow.
Comment 5 Felix Riemann 2007-10-18 16:11:21 UTC
Okay, the slowness seems to come from the habit of the editor to redraw it's UI upon removing or adding an item to it. I just need to find a nice way to avoid that. (Blocking the signal is not yet an option as that produces incorrect output).
Comment 6 Felix Riemann 2007-11-03 17:46:42 UTC
Created attachment 98465 [details] [review]
nearly complete patch

Okay, let's do it differently. :-)

This time the EggToolbarsModel is simply replaced with the default one once the reset button is clicked. The speed issue is nicely worked-around by that. :-)

I consider this practically complete now and only need check the signal handler disconnection in EggToolbarEditors as they need special handling (they are connected with g_signal_connect_object). So, if nothing gets in my way I'll commit this once I have the libegg part completed and into SVN. But feel free to give it a test ride in the meantime.
Comment 7 Felix Riemann 2007-11-03 22:44:18 UTC
Committed with two little changes:

1. Make sure the toolbar stays editable after resetting it.
2. Add a mnemonic (_R) to the reset button.

2007-11-03  Felix Riemann  <>

	* src/eog-application.c: (eog_application_reset_toolbars_model):
	* src/eog-application.h:
	* src/eog-window.c: (eog_window_cmd_edit_toolbar_cb),
	(eog_window_cmd_edit_toolbar):
	Support resetting the toolbar to its default state. Fixes bug #480975.

------

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 8 antistress 2007-12-04 10:50:31 UTC
Thank YOU