diff options
-rw-r--r-- | ChangeLog | 25 | ||||
-rwxr-xr-x | lib/egg/egg-editable-toolbar.c | 55 | ||||
-rwxr-xr-x | lib/egg/egg-editable-toolbar.h | 4 | ||||
-rwxr-xr-x | lib/egg/egg-toolbar-editor.c | 47 | ||||
-rwxr-xr-x | lib/egg/egg-toolbar-editor.h | 2 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarksbar.c | 4 | ||||
-rwxr-xr-x | src/toolbar.c | 2 |
7 files changed, 81 insertions, 58 deletions
@@ -1,5 +1,30 @@ 2004-08-09 Christian Persch <chpe@cvs.gnome.org> + * lib/egg/egg-editable-toolbar.c: (find_action), + (egg_editable_toolbar_construct), (egg_editable_toolbar_set_model), + (egg_editable_toolbar_set_ui_manager), + (egg_editable_toolbar_set_property), + (egg_editable_toolbar_get_property), + (egg_editable_toolbar_class_init), (egg_editable_toolbar_finalize), + (egg_editable_toolbar_new), (egg_editable_toolbar_new_with_model), + (egg_editable_toolbar_get_model): + * lib/egg/egg-editable-toolbar.h: + * lib/egg/egg-toolbar-editor.c: (find_action), + (egg_toolbar_editor_set_ui_manager), + (egg_toolbar_editor_set_property), + (egg_toolbar_editor_get_property), (egg_toolbar_editor_class_init), + (egg_toolbar_editor_finalize), (egg_toolbar_editor_new), + (egg_toolbar_editor_init): + * lib/egg/egg-toolbar-editor.h: + * src/bookmarks/ephy-bookmarksbar.c: + (ephy_bookmarksbar_set_window): + * src/toolbar.c: (toolbar_new): + + Fix object property naming leftover from EggMenuMerge days, to + UI manager. + +2004-08-09 Christian Persch <chpe@cvs.gnome.org> + * lib/egg/egg-editable-toolbar.c: (egg_editable_toolbar_deconstruct): diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c index 3e0b7e900..3aecb5b8c 100755 --- a/lib/egg/egg-editable-toolbar.c +++ b/lib/egg/egg-editable-toolbar.c @@ -58,7 +58,7 @@ enum { PROP_0, PROP_TOOLBARS_MODEL, - PROP_MENU_MERGE + PROP_UI_MANAGER }; enum @@ -75,7 +75,7 @@ static GObjectClass *parent_class = NULL; struct EggEditableToolbarPrivate { - GtkUIManager *merge; + GtkUIManager *manager; EggToolbarsModel *model; gboolean edit_mode; GtkWidget *selected_toolbar; @@ -178,7 +178,7 @@ find_action (EggEditableToolbar *t, GList *l; GtkAction *action = NULL; - l = gtk_ui_manager_get_action_groups (t->priv->merge); + l = gtk_ui_manager_get_action_groups (t->priv->manager); g_return_val_if_fail (name != NULL, NULL); @@ -902,7 +902,7 @@ egg_editable_toolbar_construct (EggEditableToolbar *t) EggToolbarsModel *model = t->priv->model; g_return_if_fail (model != NULL); - g_return_if_fail (t->priv->merge != NULL); + g_return_if_fail (t->priv->manager != NULL); n_toolbars = egg_toolbars_model_n_toolbars (model); @@ -1003,7 +1003,7 @@ egg_editable_toolbar_set_model (EggEditableToolbar *toolbar, g_return_if_fail (EGG_IS_TOOLBARS_MODEL (model)); g_return_if_fail (EGG_IS_EDITABLE_TOOLBAR (toolbar)); - g_return_if_fail (toolbar->priv->merge); + g_return_if_fail (toolbar->priv->manager); if (toolbar->priv->model == model) return; @@ -1032,13 +1032,12 @@ egg_editable_toolbar_set_model (EggEditableToolbar *toolbar, } static void -egg_editable_toolbar_set_merge (EggEditableToolbar *t, - GtkUIManager *merge) +egg_editable_toolbar_set_ui_manager (EggEditableToolbar *t, + GtkUIManager *manager) { - g_return_if_fail (GTK_IS_UI_MANAGER (merge)); - g_return_if_fail (EGG_IS_EDITABLE_TOOLBAR (t)); + g_return_if_fail (GTK_IS_UI_MANAGER (manager)); - t->priv->merge = g_object_ref (merge); + t->priv->manager = g_object_ref (manager); } static void @@ -1051,8 +1050,8 @@ egg_editable_toolbar_set_property (GObject *object, switch (prop_id) { - case PROP_MENU_MERGE: - egg_editable_toolbar_set_merge (t, g_value_get_object (value)); + case PROP_UI_MANAGER: + egg_editable_toolbar_set_ui_manager (t, g_value_get_object (value)); break; case PROP_TOOLBARS_MODEL: egg_editable_toolbar_set_model (t, g_value_get_object (value)); @@ -1073,8 +1072,8 @@ egg_editable_toolbar_get_property (GObject *object, switch (prop_id) { - case PROP_MENU_MERGE: - g_value_set_object (value, t->priv->merge); + case PROP_UI_MANAGER: + g_value_set_object (value, t->priv->manager); break; case PROP_TOOLBARS_MODEL: g_value_set_object (value, t->priv->model); @@ -1105,16 +1104,16 @@ egg_editable_toolbar_class_init (EggEditableToolbarClass *klass) G_TYPE_NONE, 1, G_TYPE_STRING); g_object_class_install_property (object_class, - PROP_MENU_MERGE, - g_param_spec_object ("MenuMerge", - "MenuMerge", - "Menu merge", + PROP_UI_MANAGER, + g_param_spec_object ("ui-manager", + "UI-Mmanager", + "UI Manager", GTK_TYPE_UI_MANAGER, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_TOOLBARS_MODEL, - g_param_spec_object ("ToolbarsModel", - "ToolbarsModel", + g_param_spec_object ("model", + "Model", "Toolbars Model", EGG_TYPE_TOOLBARS_MODEL, G_PARAM_READWRITE)); @@ -1138,9 +1137,9 @@ egg_editable_toolbar_finalize (GObject *object) g_object_unref (t->priv->fixed_toolbar); } - if (t->priv->merge) + if (t->priv->manager) { - g_object_unref (t->priv->merge); + g_object_unref (t->priv->manager); } if (t->priv->model) @@ -1153,22 +1152,23 @@ egg_editable_toolbar_finalize (GObject *object) } GtkWidget * -egg_editable_toolbar_new (GtkUIManager *merge) +egg_editable_toolbar_new (GtkUIManager *manager) { return GTK_WIDGET (g_object_new (EGG_TYPE_EDITABLE_TOOLBAR, - "MenuMerge", merge, + "ui-manager", manager, NULL)); } GtkWidget * -egg_editable_toolbar_new_with_model (GtkUIManager *merge, +egg_editable_toolbar_new_with_model (GtkUIManager *manager, EggToolbarsModel *model) { return GTK_WIDGET (g_object_new (EGG_TYPE_EDITABLE_TOOLBAR, - "MenuMerge", merge, - "ToolbarsModel", model, + "ui-manager", manager, + "model", model, NULL)); } + gboolean egg_editable_toolbar_get_edit_mode (EggEditableToolbar *etoolbar) { @@ -1470,4 +1470,3 @@ egg_editable_toolbar_get_model (EggEditableToolbar *etoolbar) { return etoolbar->priv->model; } - diff --git a/lib/egg/egg-editable-toolbar.h b/lib/egg/egg-editable-toolbar.h index d0dfb9811..2aa087b5f 100755 --- a/lib/egg/egg-editable-toolbar.h +++ b/lib/egg/egg-editable-toolbar.h @@ -62,8 +62,8 @@ struct EggEditableToolbarClass }; GType egg_editable_toolbar_get_type (void); -GtkWidget *egg_editable_toolbar_new (GtkUIManager *merge); -GtkWidget *egg_editable_toolbar_new_with_model (GtkUIManager *merge, +GtkWidget *egg_editable_toolbar_new (GtkUIManager *manager); +GtkWidget *egg_editable_toolbar_new_with_model (GtkUIManager *manager, EggToolbarsModel *model); void egg_editable_toolbar_set_model (EggEditableToolbar *etoolbar, EggToolbarsModel *model); diff --git a/lib/egg/egg-toolbar-editor.c b/lib/egg/egg-toolbar-editor.c index 33c6c82e9..f3ba1e94d 100755 --- a/lib/egg/egg-toolbar-editor.c +++ b/lib/egg/egg-toolbar-editor.c @@ -52,7 +52,7 @@ static void update_editor_sheet (EggToolbarEditor *editor); enum { PROP_0, - PROP_MENU_MERGE, + PROP_UI_MANAGER, PROP_TOOLBARS_MODEL }; @@ -62,7 +62,7 @@ static GObjectClass *parent_class = NULL; struct EggToolbarEditorPrivate { - GtkUIManager *merge; + GtkUIManager *manager; EggToolbarsModel *model; GtkWidget *table; @@ -130,7 +130,7 @@ find_action (EggToolbarEditor *t, GList *l; GtkAction *action = NULL; - l = gtk_ui_manager_get_action_groups (t->priv->merge); + l = gtk_ui_manager_get_action_groups (t->priv->manager); g_return_val_if_fail (EGG_IS_TOOLBAR_EDITOR (t), NULL); g_return_val_if_fail (name != NULL, NULL); @@ -148,13 +148,12 @@ find_action (EggToolbarEditor *t, } static void -egg_toolbar_editor_set_merge (EggToolbarEditor *t, - GtkUIManager *merge) +egg_toolbar_editor_set_ui_manager (EggToolbarEditor *t, + GtkUIManager *manager) { - g_return_if_fail (GTK_IS_UI_MANAGER (merge)); - g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (t)); + g_return_if_fail (GTK_IS_UI_MANAGER (manager)); - t->priv->merge = g_object_ref (merge); + t->priv->manager = g_object_ref (manager); } static void @@ -188,8 +187,8 @@ egg_toolbar_editor_set_property (GObject *object, switch (prop_id) { - case PROP_MENU_MERGE: - egg_toolbar_editor_set_merge (t, g_value_get_object (value)); + case PROP_UI_MANAGER: + egg_toolbar_editor_set_ui_manager (t, g_value_get_object (value)); break; case PROP_TOOLBARS_MODEL: egg_toolbar_editor_set_model (t, g_value_get_object (value)); @@ -207,8 +206,8 @@ egg_toolbar_editor_get_property (GObject *object, switch (prop_id) { - case PROP_MENU_MERGE: - g_value_set_object (value, t->priv->merge); + case PROP_UI_MANAGER: + g_value_set_object (value, t->priv->manager); break; case PROP_TOOLBARS_MODEL: g_value_set_object (value, t->priv->model); @@ -228,17 +227,17 @@ egg_toolbar_editor_class_init (EggToolbarEditorClass *klass) object_class->get_property = egg_toolbar_editor_get_property; g_object_class_install_property (object_class, - PROP_MENU_MERGE, - g_param_spec_object ("MenuMerge", - "MenuMerge", - "Menu merge", + PROP_UI_MANAGER, + g_param_spec_object ("ui-manager", + "UI-Manager", + "UI Manager", GTK_TYPE_UI_MANAGER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_TOOLBARS_MODEL, - g_param_spec_object ("ToolbarsModel", - "ToolbarsModel", + g_param_spec_object ("model", + "Model", "Toolbars Model", EGG_TYPE_TOOLBARS_MODEL, G_PARAM_READWRITE | @@ -252,9 +251,9 @@ egg_toolbar_editor_finalize (GObject *object) { EggToolbarEditor *editor = EGG_TOOLBAR_EDITOR (object); - if (editor->priv->merge) + if (editor->priv->manager) { - g_object_unref (editor->priv->merge); + g_object_unref (editor->priv->manager); } if (editor->priv->model) @@ -269,12 +268,12 @@ egg_toolbar_editor_finalize (GObject *object) } GtkWidget * -egg_toolbar_editor_new (GtkUIManager *merge, +egg_toolbar_editor_new (GtkUIManager *manager, EggToolbarsModel *model) { return GTK_WIDGET (g_object_new (EGG_TYPE_TOOLBAR_EDITOR, - "MenuMerge", merge, - "ToolbarsModel", model, + "ui-manager", manager, + "model", model, NULL)); } @@ -594,7 +593,7 @@ egg_toolbar_editor_init (EggToolbarEditor *t) { t->priv = EGG_TOOLBAR_EDITOR_GET_PRIVATE (t); - t->priv->merge = NULL; + t->priv->manager = NULL; t->priv->default_actions_list = NULL; t->priv->actions_list = NULL; diff --git a/lib/egg/egg-toolbar-editor.h b/lib/egg/egg-toolbar-editor.h index 4855408f5..e1e1f35ab 100755 --- a/lib/egg/egg-toolbar-editor.h +++ b/lib/egg/egg-toolbar-editor.h @@ -54,7 +54,7 @@ struct EggToolbarEditorClass GType egg_toolbar_editor_get_type (void); -GtkWidget *egg_toolbar_editor_new (GtkUIManager *merge, +GtkWidget *egg_toolbar_editor_new (GtkUIManager *manager, EggToolbarsModel *model); void egg_toolbar_editor_load_actions (EggToolbarEditor *editor, const char *xml_file); diff --git a/src/bookmarks/ephy-bookmarksbar.c b/src/bookmarks/ephy-bookmarksbar.c index 69f841b90..f6d6a49f3 100644 --- a/src/bookmarks/ephy-bookmarksbar.c +++ b/src/bookmarks/ephy-bookmarksbar.c @@ -299,8 +299,8 @@ ephy_bookmarksbar_set_window (EphyBookmarksBar *toolbar, toolbar->priv->action_group, -1); g_object_set (G_OBJECT (toolbar), - "MenuMerge", manager, - "ToolbarsModel", model, + "ui-manager", manager, + "model", model, NULL); g_signal_connect_after (model, "toolbar_added", diff --git a/src/toolbar.c b/src/toolbar.c index bcff8f91f..55e9b3dfb 100755 --- a/src/toolbar.c +++ b/src/toolbar.c @@ -470,7 +470,7 @@ toolbar_new (EphyWindow *window) { return EPHY_TOOLBAR (g_object_new (EPHY_TYPE_TOOLBAR, "window", window, - "MenuMerge", window->ui_merge, + "ui-manager", window->ui_merge, NULL)); } |