summaryrefslogtreecommitdiff
path: root/src/nautilus-desktop-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nautilus-desktop-window.c')
-rw-r--r--src/nautilus-desktop-window.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index 399fb9f92..862f5db37 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -24,7 +24,6 @@
#include <config.h>
#include "nautilus-desktop-window.h"
#include "nautilus-window-private.h"
-#include "nautilus-actions.h"
#include <X11/Xatom.h>
#include <gdk/gdkx.h>
@@ -75,25 +74,22 @@ nautilus_desktop_window_finalize (GObject *obj)
static void
nautilus_desktop_window_init_actions (NautilusDesktopWindow *window)
{
- GtkAction *action;
- GtkActionGroup *action_group;
-
- action_group = nautilus_window_get_main_action_group (NAUTILUS_WINDOW (window));
+ GAction *action;
/* Don't allow close action on desktop */
- action = gtk_action_group_get_action (action_group,
- NAUTILUS_ACTION_CLOSE);
- gtk_action_set_sensitive (action, FALSE);
+ action = g_action_map_lookup_action (G_ACTION_MAP (window),
+ "close-current-view");
+ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
/* Don't allow new tab on desktop */
- action = gtk_action_group_get_action (action_group,
- NAUTILUS_ACTION_NEW_TAB);
- gtk_action_set_sensitive (action, FALSE);
+ action = g_action_map_lookup_action (G_ACTION_MAP (window),
+ "new-tab");
+ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
/* Don't allow search on desktop */
- action = gtk_action_group_get_action (action_group,
- NAUTILUS_ACTION_SEARCH);
- gtk_action_set_sensitive (action, FALSE);
+ action = g_action_map_lookup_action (G_ACTION_MAP (window),
+ "toggle-search");
+ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
}
static void