Commit fb9c4e50 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Disable close action on desktop window (#160100)

2005-01-28  Alexander Larsson  <alexl@redhat.com>

	* src/nautilus-actions.h:
	* src/nautilus-desktop-window.c:
	(nautilus_desktop_window_instance_init):
	Disable close action on desktop window (#160100)
parent 846d2838
2005-01-28 Alexander Larsson <alexl@redhat.com>
* src/nautilus-actions.h:
* src/nautilus-desktop-window.c:
(nautilus_desktop_window_instance_init):
Disable close action on desktop window (#160100)
2005-01-27 Martin Wehner <martin.wehner@epost.de>
* src/nautilus-main.c: (register_icons):
......
......@@ -40,5 +40,6 @@
#define NAUTILUS_ACTION_ZOOM_IN "Zoom In"
#define NAUTILUS_ACTION_ZOOM_OUT "Zoom Out"
#define NAUTILUS_ACTION_ZOOM_NORMAL "Zoom Normal"
#define NAUTILUS_ACTION_CLOSE "Close"
#endif /* NAUTILUS_ACTIONS_H */
......@@ -25,6 +25,7 @@
#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>
......@@ -47,6 +48,8 @@ GNOME_CLASS_BOILERPLATE (NautilusDesktopWindow, nautilus_desktop_window,
static void
nautilus_desktop_window_instance_init (NautilusDesktopWindow *window)
{
GtkAction *action;
window->details = g_new0 (NautilusDesktopWindowDetails, 1);
gtk_window_move (GTK_WINDOW (window), 0, 0);
......@@ -62,6 +65,11 @@ nautilus_desktop_window_instance_init (NautilusDesktopWindow *window)
gtk_widget_hide (NAUTILUS_WINDOW (window)->details->statusbar);
gtk_widget_hide (NAUTILUS_WINDOW (window)->details->menubar);
/* Don't allow close action on desktop */
action = gtk_action_group_get_action (NAUTILUS_WINDOW (window)->details->main_action_group,
NAUTILUS_ACTION_CLOSE);
gtk_action_set_sensitive (action, FALSE);
}
static gint
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment