aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-04-19 18:31:36 +0800
committerChristian Persch <chpe@src.gnome.org>2005-04-19 18:31:36 +0800
commitaf383e7037101bcbe21e3da8f33159a66839a220 (patch)
tree174f85cf948874d10f4116ae303d8550c796f6e8
parent033f0ac34a64aebbfb42878d0243b08c631e8042 (diff)
downloadgsoc2013-epiphany-af383e7037101bcbe21e3da8f33159a66839a220.tar
gsoc2013-epiphany-af383e7037101bcbe21e3da8f33159a66839a220.tar.gz
gsoc2013-epiphany-af383e7037101bcbe21e3da8f33159a66839a220.tar.bz2
gsoc2013-epiphany-af383e7037101bcbe21e3da8f33159a66839a220.tar.lz
gsoc2013-epiphany-af383e7037101bcbe21e3da8f33159a66839a220.tar.xz
gsoc2013-epiphany-af383e7037101bcbe21e3da8f33159a66839a220.tar.zst
gsoc2013-epiphany-af383e7037101bcbe21e3da8f33159a66839a220.zip
Use gtk_action_set_[sensitive|visible] instead of g_object_set.
2005-04-19 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_update_menu): * src/ephy-encoding-menu.c: (update_encoding_menu_cb): * src/ephy-history-window.c: (ephy_history_window_update_menu): * src/ephy-toolbar.c: (ephy_toolbar_set_zoom): * src/ephy-window.c: (update_edit_actions_sensitivity), (enable_edit_actions_sensitivity), (sync_tab_load_status), (sync_tab_zoom), (show_embed_popup), (update_tabs_menu_sensitivity): * src/ppview-toolbar.c: (toolbar_update_sensitivity): Use gtk_action_set_[sensitive|visible] instead of g_object_set.
-rw-r--r--ChangeLog15
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c26
-rw-r--r--src/ephy-encoding-menu.c2
-rw-r--r--src/ephy-history-window.c22
-rwxr-xr-xsrc/ephy-toolbar.c6
-rw-r--r--src/ephy-window.c50
-rwxr-xr-xsrc/ppview-toolbar.c8
7 files changed, 76 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f1c94005..6061bd65d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2005-04-19 Christian Persch <chpe@cvs.gnome.org>
+ * src/bookmarks/ephy-bookmarks-editor.c:
+ (ephy_bookmarks_editor_update_menu):
+ * src/ephy-encoding-menu.c: (update_encoding_menu_cb):
+ * src/ephy-history-window.c: (ephy_history_window_update_menu):
+ * src/ephy-toolbar.c: (ephy_toolbar_set_zoom):
+ * src/ephy-window.c: (update_edit_actions_sensitivity),
+ (enable_edit_actions_sensitivity), (sync_tab_load_status),
+ (sync_tab_zoom), (show_embed_popup),
+ (update_tabs_menu_sensitivity):
+ * src/ppview-toolbar.c: (toolbar_update_sensitivity):
+
+ Use gtk_action_set_[sensitive|visible] instead of g_object_set.
+
+2005-04-19 Christian Persch <chpe@cvs.gnome.org>
+
* lib/ephy-prefs.h:
* src/Makefile.am:
A src/ephy-action-helper.c:
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 468dae4ab..5ff95844d 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -1261,28 +1261,28 @@ ephy_bookmarks_editor_update_menu (EphyBookmarksEditor *editor)
action_group = editor->priv->action_group;
action = gtk_action_group_get_action (action_group, "OpenInWindow");
- g_object_set (action, "sensitive", open_in_window,
- "label", open_in_window_label, NULL);
+ gtk_action_set_sensitive (action, open_in_window);
+ g_object_set (action, "label", open_in_window_label, NULL);
action = gtk_action_group_get_action (action_group, "OpenInTab");
- g_object_set (action, "sensitive", open_in_tab,
- "label", open_in_tab_label, NULL);
+ gtk_action_set_sensitive (action, open_in_tab);
+ g_object_set (action, "label", open_in_tab_label, NULL);
action = gtk_action_group_get_action (action_group, "Rename");
- g_object_set (action, "sensitive", rename, NULL);
+ gtk_action_set_sensitive (action, rename);
action = gtk_action_group_get_action (action_group, "Delete");
- g_object_set (action, "sensitive", delete, NULL);
+ gtk_action_set_sensitive (action, delete);
action = gtk_action_group_get_action (action_group, "Properties");
- g_object_set (action, "sensitive", properties, NULL);
+ gtk_action_set_sensitive (action, properties);
action = gtk_action_group_get_action (action_group, "Cut");
- g_object_set (action, "sensitive", cut, NULL);
+ gtk_action_set_sensitive (action, cut);
action = gtk_action_group_get_action (action_group, "Copy");
- g_object_set (action, "sensitive", copy,
- "label", copy_label, NULL);
+ gtk_action_set_sensitive (action, copy);
+ g_object_set (action, "label", copy_label, NULL);
action = gtk_action_group_get_action (action_group, "Paste");
- g_object_set (action, "sensitive", paste, NULL);
+ gtk_action_set_sensitive (action, paste);
action = gtk_action_group_get_action (action_group, "SelectAll");
- g_object_set (action, "sensitive", select_all, NULL);
+ gtk_action_set_sensitive (action, select_all);
action = gtk_action_group_get_action (action_group, "ShowInBookmarksBar");
- g_object_set (action, "sensitive", can_show_in_bookmarks_bar, NULL);
+ gtk_action_set_sensitive (action, can_show_in_bookmarks_bar);
g_signal_handlers_block_by_func
(G_OBJECT (GTK_TOGGLE_ACTION (action)),
diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c
index 58862fdda..37ddd6337 100644
--- a/src/ephy-encoding-menu.c
+++ b/src/ephy-encoding-menu.c
@@ -172,7 +172,7 @@ update_encoding_menu_cb (GtkAction *dummy, EphyEncodingMenu *menu)
action = gtk_action_group_get_action (p->action_group,
"ViewEncodingAutomatic");
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), is_automatic);
- g_object_set (G_OBJECT (action), "sensitive", !is_automatic, NULL);
+ gtk_action_set_sensitive (action, !is_automatic);
/* set the encodings group's active member */
g_snprintf (name, sizeof (name), "Encoding%s", encoding);
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 1147db4af..e499a19f8 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -731,24 +731,24 @@ ephy_history_window_update_menu (EphyHistoryWindow *editor)
action_group = editor->priv->action_group;
action = gtk_action_group_get_action (action_group, "OpenInWindow");
- g_object_set (action, "sensitive", open_in_window,
- "label", open_in_window_label, NULL);
+ gtk_action_set_sensitive (action, open_in_window);
+ g_object_set (action, "label", open_in_window_label, NULL);
action = gtk_action_group_get_action (action_group, "OpenInTab");
- g_object_set (action, "sensitive", open_in_tab,
- "label", open_in_tab_label, NULL);
+ gtk_action_set_sensitive (action, open_in_tab);
+ g_object_set (action, "label", open_in_tab_label, NULL);
action = gtk_action_group_get_action (action_group, "Cut");
- g_object_set (action, "sensitive", cut, NULL);
+ gtk_action_set_sensitive (action, cut);
action = gtk_action_group_get_action (action_group, "Copy");
- g_object_set (action, "sensitive", copy,
- "label", copy_label, NULL);
+ gtk_action_set_sensitive (action, copy);
+ g_object_set (action, "label", copy_label, NULL);
action = gtk_action_group_get_action (action_group, "Paste");
- g_object_set (action, "sensitive", paste, NULL);
+ gtk_action_set_sensitive (action, paste);
action = gtk_action_group_get_action (action_group, "SelectAll");
- g_object_set (action, "sensitive", select_all, NULL);
+ gtk_action_set_sensitive (action, select_all);
action = gtk_action_group_get_action (action_group, "Delete");
- g_object_set (action, "sensitive", delete, NULL);
+ gtk_action_set_sensitive (action, delete);
action = gtk_action_group_get_action (action_group, "BookmarkLink");
- g_object_set (action, "sensitive", bookmark_page, NULL);
+ gtk_action_set_sensitive (action, bookmark_page);
}
static void
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index 0137a477e..237ea5db9 100755
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -515,10 +515,8 @@ ephy_toolbar_set_zoom (EphyToolbar *toolbar,
{
EphyToolbarPrivate *priv = toolbar->priv;
- g_object_set (priv->actions[ZOOM_ACTION],
- "zoom", can_zoom ? zoom : 1.0,
- "sensitive", can_zoom,
- NULL);
+ gtk_action_set_sensitive (priv->actions[ZOOM_ACTION], can_zoom);
+ g_object_set (priv->actions[ZOOM_ACTION], "zoom", can_zoom ? zoom : 1.0, NULL);
}
/* Class implementation */
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 9fa62e69c..642e9a8eb 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -840,15 +840,20 @@ update_edit_actions_sensitivity (EphyWindow *window, gboolean hide)
action_group = window->priv->action_group;
action = gtk_action_group_get_action (action_group, "EditCopy");
- g_object_set (action, "sensitive", can_copy, "visible", !hide || can_copy, NULL);
+ gtk_action_set_sensitive (action, can_copy);
+ gtk_action_set_visible (action, !hide || can_copy);
action = gtk_action_group_get_action (action_group, "EditCut");
- g_object_set (action, "sensitive", can_cut, "visible", !hide || can_cut, NULL);
+ gtk_action_set_sensitive (action, can_cut);
+ gtk_action_set_visible (action, !hide || can_cut);
action = gtk_action_group_get_action (action_group, "EditPaste");
- g_object_set (action, "sensitive", can_paste, "visible", !hide || can_paste, NULL);
+ gtk_action_set_sensitive (action, can_paste);
+ gtk_action_set_visible (action, !hide || can_paste);
action = gtk_action_group_get_action (action_group, "EditUndo");
- g_object_set (action, "sensitive", can_undo, "visible", !hide || can_undo, NULL);
+ gtk_action_set_sensitive (action, can_undo);
+ gtk_action_set_visible (action, !hide || can_undo);
action = gtk_action_group_get_action (action_group, "EditRedo");
- g_object_set (action, "sensitive", can_redo, "visible", !hide || can_redo, NULL);
+ gtk_action_set_sensitive (action, can_redo);
+ gtk_action_set_visible (action, !hide || can_redo);
}
static void
@@ -860,15 +865,20 @@ enable_edit_actions_sensitivity (EphyWindow *window)
action_group = window->priv->action_group;
action = gtk_action_group_get_action (action_group, "EditCopy");
- g_object_set (action, "sensitive", TRUE, "visible", TRUE, NULL);
+ gtk_action_set_sensitive (action, TRUE);
+ gtk_action_set_visible (action, TRUE);
action = gtk_action_group_get_action (action_group, "EditCut");
- g_object_set (action, "sensitive", TRUE, "visible", TRUE, NULL);
+ gtk_action_set_sensitive (action, TRUE);
+ gtk_action_set_visible (action, TRUE);
action = gtk_action_group_get_action (action_group, "EditPaste");
- g_object_set (action, "sensitive", TRUE, "visible", TRUE, NULL);
+ gtk_action_set_sensitive (action, TRUE);
+ gtk_action_set_visible (action, TRUE);
action = gtk_action_group_get_action (action_group, "EditUndo");
- g_object_set (action, "sensitive", TRUE, "visible", TRUE, NULL);
+ gtk_action_set_sensitive (action, TRUE);
+ gtk_action_set_visible (action, TRUE);
action = gtk_action_group_get_action (action_group, "EditRedo");
- g_object_set (action, "sensitive", TRUE, "visible", TRUE, NULL);
+ gtk_action_set_sensitive (action, TRUE);
+ gtk_action_set_visible (action, TRUE);
}
static void
@@ -1391,7 +1401,7 @@ sync_tab_load_status (EphyTab *tab,
loading = ephy_tab_get_load_status (tab);
action = gtk_action_group_get_action (action_group, "ViewStop");
- g_object_set (action, "sensitive", loading, NULL);
+ gtk_action_set_sensitive (action, loading);
/* disable print while loading, see bug #116344 */
action = gtk_action_group_get_action (action_group, "FilePrintPreview");
@@ -1485,11 +1495,11 @@ sync_tab_zoom (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
action_group = window->priv->action_group;
action = gtk_action_group_get_action (action_group, "ViewZoomIn");
- g_object_set (action, "sensitive", can_zoom_in && can_zoom, NULL);
+ gtk_action_set_sensitive (action, can_zoom_in && can_zoom);
action = gtk_action_group_get_action (action_group, "ViewZoomOut");
- g_object_set (action, "sensitive", can_zoom_out && can_zoom, NULL);
+ gtk_action_set_sensitive (action, can_zoom_out && can_zoom);
action = gtk_action_group_get_action (action_group, "ViewZoomNormal");
- g_object_set (action, "sensitive", can_zoom_normal && can_zoom, NULL);
+ gtk_action_set_sensitive (action, can_zoom_normal && can_zoom);
}
static void
@@ -1727,10 +1737,10 @@ show_embed_popup (EphyWindow *window,
action_group = window->priv->popups_action_group;
action = gtk_action_group_get_action (action_group, "SaveBackgroundAs");
ephy_action_change_sensitivity_flags (action, SENS_FLAG_CONTEXT, !has_background);
- g_object_set (action, "visible", has_background, NULL);
+ gtk_action_set_visible (action, has_background);
action = gtk_action_group_get_action (action_group, "OpenLinkInNewWindow");
- g_object_set (action, "sensitive", can_open_in_new, FALSE);
+ gtk_action_set_sensitive (action, can_open_in_new);
action = gtk_action_group_get_action (action_group, "OpenLinkInNewTab");
ephy_action_change_sensitivity_flags (action, SENS_FLAG_CONTEXT, !can_open_in_new);
@@ -1983,13 +1993,13 @@ update_tabs_menu_sensitivity (EphyWindow *window)
action_group = window->priv->action_group;
action = gtk_action_group_get_action (action_group, "TabsPrevious");
- g_object_set (action, "sensitive", prev_tab, NULL);
+ gtk_action_set_sensitive (action, prev_tab);
action = gtk_action_group_get_action (action_group, "TabsNext");
- g_object_set (action, "sensitive", next_tab, NULL);
+ gtk_action_set_sensitive (action, next_tab);
action = gtk_action_group_get_action (action_group, "TabsMoveLeft");
- g_object_set (action, "sensitive", move_left, NULL);
+ gtk_action_set_sensitive (action, move_left);
action = gtk_action_group_get_action (action_group, "TabsMoveRight");
- g_object_set (action, "sensitive", move_right, NULL);
+ gtk_action_set_sensitive (action, move_right);
action = gtk_action_group_get_action (action_group, "TabsDetach");
ephy_action_change_sensitivity_flags (action, SENS_FLAG_CHROME, !detach);
}
diff --git a/src/ppview-toolbar.c b/src/ppview-toolbar.c
index f2637252c..d2749094d 100755
--- a/src/ppview-toolbar.c
+++ b/src/ppview-toolbar.c
@@ -212,13 +212,13 @@ toolbar_update_sensitivity (PPViewToolbar *t)
c_page = t->priv->current_page;
action = gtk_action_group_get_action (action_group, "PPVGoBack");
- g_object_set (action, "sensitive", c_page > 1, NULL);
+ gtk_action_set_sensitive (action, c_page > 1);
action = gtk_action_group_get_action (action_group, "PPVGotoFirst");
- g_object_set (action, "sensitive", c_page > 1, NULL);
+ gtk_action_set_sensitive (action, c_page > 1);
action = gtk_action_group_get_action (action_group, "PPVGoForward");
- g_object_set (action, "sensitive", c_page < pages, NULL);
+ gtk_action_set_sensitive (action, c_page < pages);
action = gtk_action_group_get_action (action_group, "PPVGotoLast");
- g_object_set (action, "sensitive", c_page < pages, NULL);
+ gtk_action_set_sensitive (action, c_page < pages);
}
static void