GNOME Bugzilla – Bug 493149
[toolbareditor] allow changing the active model
Last modified: 2007-11-03 22:24:19 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.
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.
- G_PARAM_CONSTRUCT_ONLY)); Let's use G_PARAM_CONSTRUCT at least here. Please also update epiphany's copy of this file.
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.