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 493149 - [toolbareditor] allow changing the active model
[toolbareditor] allow changing the active model
Status: RESOLVED FIXED
Product: libegg
Classification: Other
Component: other
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Libegg maintenance
Libegg maintenance
Depends on:
Blocks: 480975
 
 
Reported: 2007-11-03 19:14 UTC by Felix Riemann
Modified: 2007-11-03 22:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
allow switching models during runtime (3.88 KB, patch)
2007-11-03 19:19 UTC, Felix Riemann
committed Details | Review

Description Felix Riemann 2007-11-03 19:14:50 UTC
Currently the EggToolbarEditor uses a fixed EggToolbarsModel throughout it's lifetime. For my EOG patch to enable resetting the toolbar (see bug #480975) I changed that to be able to simply replace the model with the default one.
Theoretically this would allow applications to ship several presets and switch between them with the editor updating its view.

EggEditableToolbar already supported switching models.
Comment 1 Felix Riemann 2007-11-03 19:19:15 UTC
Created attachment 98471 [details] [review]
allow switching models during runtime

So, that's the patch allowing EggToolbarEditor to switch its model during runtime.

It also takes care of sanely disconnecting the signal handlers that are connected using g_signal_connect_object. I'm not sure if g_signal_connect_object is really necessary. If not we could use normal g_signal_connect calls and do the ref/unref in the callbacks themselves which would ease the signal disconnection a bit.
Comment 2 Christian Persch 2007-11-03 20:54:37 UTC
- G_PARAM_CONSTRUCT_ONLY));

Let's use G_PARAM_CONSTRUCT at least here.

Please also update epiphany's copy of this file.
Comment 3 Felix Riemann 2007-11-03 22:24:19 UTC
Okay, committed it with your change.

2007-11-03  Felix Riemann  <>

	* libegg/toolbareditor/egg-toolbar-editor.c:
	(egg_toolbar_editor_disconnect_model),
	(egg_toolbar_editor_set_model), (egg_toolbar_editor_class_init),
	(egg_toolbar_editor_finalize):
	* libegg/toolbareditor/egg-toolbar-editor.h:
	Make it possible to change an EggToolbarEditor's model during runtime.
	Should also fix some possibly leaking signal handlers. Fixes #493149.