[nautilus/wip/csoriano/desktop-split] general: move nautilus desktop to another directory
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/csoriano/desktop-split] general: move nautilus desktop to another directory
- Date: Fri, 11 Mar 2016 23:02:47 +0000 (UTC)
commit cc2ea301cfb64c16744e7d08bdb338c8d98423a4
Author: Carlos Soriano <csoriano gnome org>
Date: Fri Mar 11 22:17:51 2016 +0100
general: move nautilus desktop to another directory
First step to split desktop handling. Here we just move the desktop
files to another directory and modify the path for the linkage.
Makefile.am | 1 +
configure.ac | 1 +
libnautilus-private/Makefile.am | 14 +-----
libnautilus-private/nautilus-directory.c | 2 +-
libnautilus-private/nautilus-file-dnd.c | 3 +-
libnautilus-private/nautilus-file-operations.c | 2 -
nautilus-desktop/Makefile.am | 48 ++++++++++++++++++++
.../nautilus-desktop-canvas-view.c | 0
.../nautilus-desktop-canvas-view.h | 0
.../nautilus-desktop-directory-file.c | 0
.../nautilus-desktop-directory-file.h | 0
.../nautilus-desktop-directory.c | 0
.../nautilus-desktop-directory.h | 0
.../nautilus-desktop-icon-file.c | 0
.../nautilus-desktop-icon-file.h | 12 +++---
.../nautilus-desktop-item-properties.c | 0
.../nautilus-desktop-item-properties.h | 0
.../nautilus-desktop-link-monitor.c | 0
.../nautilus-desktop-link-monitor.h | 0
.../nautilus-desktop-link.c | 0
.../nautilus-desktop-link.h | 0
.../nautilus-desktop-metadata.c | 0
.../nautilus-desktop-metadata.h | 0
.../nautilus-desktop-window.c | 0
.../nautilus-desktop-window.h | 0
src/Makefile.am | 8 +---
src/nautilus-application.c | 3 +-
src/nautilus-canvas-view-container.c | 3 +-
src/nautilus-canvas-view.c | 2 -
src/nautilus-files-view.c | 9 ++--
src/nautilus-mime-actions.c | 4 +-
src/nautilus-properties-window.c | 3 +-
src/nautilus-window-slot.c | 11 +---
33 files changed, 77 insertions(+), 49 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index ee62eca..b721fcb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,7 @@ DIRS = \
libnautilus-extension \
libgd \
libnautilus-private \
+ nautilus-desktop \
src \
test \
po \
diff --git a/configure.ac b/configure.ac
index ae2ffec..955a6bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -318,6 +318,7 @@ libnautilus-extension/libnautilus-extension-uninstalled.pc
libgd/Makefile
po/Makefile.in
src/Makefile
+nautilus-desktop/Makefile
nautilus-sendto-extension/Makefile
test/Makefile
])
diff --git a/libnautilus-private/Makefile.am b/libnautilus-private/Makefile.am
index ea7315b..73a8976 100644
--- a/libnautilus-private/Makefile.am
+++ b/libnautilus-private/Makefile.am
@@ -6,6 +6,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_srcdir)/libgd \
+ -I$(top_srcdir)/nautilus-desktop \
+ -I$(top_builddir)/nautilus-desktop \
$(BASE_CFLAGS) \
$(COMMON_CFLAGS) \
$(NAUTILUS_CFLAGS) \
@@ -80,18 +82,6 @@ libnautilus_private_la_SOURCES = \
nautilus-debug.h \
nautilus-default-file-icon.c \
nautilus-default-file-icon.h \
- nautilus-desktop-directory-file.c \
- nautilus-desktop-directory-file.h \
- nautilus-desktop-directory.c \
- nautilus-desktop-directory.h \
- nautilus-desktop-icon-file.c \
- nautilus-desktop-icon-file.h \
- nautilus-desktop-link-monitor.c \
- nautilus-desktop-link-monitor.h \
- nautilus-desktop-link.c \
- nautilus-desktop-link.h \
- nautilus-desktop-metadata.c \
- nautilus-desktop-metadata.h \
nautilus-directory-async.c \
nautilus-directory-notify.h \
nautilus-directory-private.h \
diff --git a/libnautilus-private/nautilus-directory.c b/libnautilus-private/nautilus-directory.c
index d9b2575..a1a24a9 100644
--- a/libnautilus-private/nautilus-directory.c
+++ b/libnautilus-private/nautilus-directory.c
@@ -32,12 +32,12 @@
#include "nautilus-lib-self-check-functions.h"
#include "nautilus-metadata.h"
#include "nautilus-profile.h"
-#include "nautilus-desktop-directory.h"
#include "nautilus-vfs-directory.h"
#include <eel/eel-glib-extensions.h>
#include <eel/eel-string.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <nautilus-desktop/nautilus-desktop-directory.h>
enum {
FILES_ADDED,
diff --git a/libnautilus-private/nautilus-file-dnd.c b/libnautilus-private/nautilus-file-dnd.c
index 1160255..6f47edc 100644
--- a/libnautilus-private/nautilus-file-dnd.c
+++ b/libnautilus-private/nautilus-file-dnd.c
@@ -24,13 +24,14 @@
#include <config.h>
#include "nautilus-file-dnd.h"
-#include "nautilus-desktop-icon-file.h"
#include "nautilus-dnd.h"
#include "nautilus-directory.h"
#include "nautilus-file-utilities.h"
#include <string.h>
+#include <nautilus-desktop/nautilus-desktop-icon-file.h>
+
static gboolean
nautilus_drag_can_accept_files (NautilusFile *drop_target_item)
{
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index a343098..c7892eb 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -54,8 +54,6 @@
#include <glib.h>
#include "nautilus-file-changes-queue.h"
#include "nautilus-file-private.h"
-#include "nautilus-desktop-icon-file.h"
-#include "nautilus-desktop-link-monitor.h"
#include "nautilus-global-preferences.h"
#include "nautilus-link.h"
#include "nautilus-trash-monitor.h"
diff --git a/nautilus-desktop/Makefile.am b/nautilus-desktop/Makefile.am
new file mode 100644
index 0000000..026c004
--- /dev/null
+++ b/nautilus-desktop/Makefile.am
@@ -0,0 +1,48 @@
+include $(top_srcdir)/Makefile.shared
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/libnautilus-private \
+ -I$(top_builddir)/libnautilus-private \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
+ -I$(top_srcdir)/libgd \
+ $(BASE_CFLAGS) \
+ $(COMMON_CFLAGS) \
+ $(NAUTILUS_CFLAGS) \
+ $(WARNING_CFLAGS) \
+ $(EXIF_CFLAGS) \
+ $(EXEMPI_CFLAGS) \
+ -DDATADIR=\""$(datadir)"\" \
+ -DLIBDIR=\""$(libdir)"\" \
+ -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
+ -DPREFIX=\""$(prefix)"\" \
+ -DVERSION="\"$(VERSION)\"" \
+ $(DISABLE_DEPRECATED) \
+ $(NULL)
+
+nautilus_SOURCES = \
+ nautilus-desktop-canvas-view.c \
+ nautilus-desktop-canvas-view.h \
+ nautilus-desktop-directory.c \
+ nautilus-desktop-directory.h \
+ nautilus-desktop-directory-file.c \
+ nautilus-desktop-directory-file.h \
+ nautilus-desktop-icon-file.c \
+ nautilus-desktop-icon-file.h \
+ nautilus-desktop-item-properties.c \
+ nautilus-desktop-item-properties.h \
+ nautilus-desktop-link.c \
+ nautilus-desktop-link.h \
+ nautilus-desktop-link-monitor.c \
+ nautilus-desktop-link-monitor.h \
+ nautilus-desktop-medadata.c \
+ nautilus-desktop-medadata.h \
+ nautilus-desktop-window.c \
+ nautilus-desktop-window.h \
+ $(NULL)
+
+ INTLTOOL_SERVER_RULE@
+
+-include $(top_srcdir)/git.mk
+
diff --git a/src/nautilus-desktop-canvas-view.c b/nautilus-desktop/nautilus-desktop-canvas-view.c
similarity index 100%
rename from src/nautilus-desktop-canvas-view.c
rename to nautilus-desktop/nautilus-desktop-canvas-view.c
diff --git a/src/nautilus-desktop-canvas-view.h b/nautilus-desktop/nautilus-desktop-canvas-view.h
similarity index 100%
rename from src/nautilus-desktop-canvas-view.h
rename to nautilus-desktop/nautilus-desktop-canvas-view.h
diff --git a/libnautilus-private/nautilus-desktop-directory-file.c
b/nautilus-desktop/nautilus-desktop-directory-file.c
similarity index 100%
rename from libnautilus-private/nautilus-desktop-directory-file.c
rename to nautilus-desktop/nautilus-desktop-directory-file.c
diff --git a/libnautilus-private/nautilus-desktop-directory-file.h
b/nautilus-desktop/nautilus-desktop-directory-file.h
similarity index 100%
rename from libnautilus-private/nautilus-desktop-directory-file.h
rename to nautilus-desktop/nautilus-desktop-directory-file.h
diff --git a/libnautilus-private/nautilus-desktop-directory.c b/nautilus-desktop/nautilus-desktop-directory.c
similarity index 100%
rename from libnautilus-private/nautilus-desktop-directory.c
rename to nautilus-desktop/nautilus-desktop-directory.c
diff --git a/libnautilus-private/nautilus-desktop-directory.h b/nautilus-desktop/nautilus-desktop-directory.h
similarity index 100%
rename from libnautilus-private/nautilus-desktop-directory.h
rename to nautilus-desktop/nautilus-desktop-directory.h
diff --git a/libnautilus-private/nautilus-desktop-icon-file.c b/nautilus-desktop/nautilus-desktop-icon-file.c
similarity index 100%
rename from libnautilus-private/nautilus-desktop-icon-file.c
rename to nautilus-desktop/nautilus-desktop-icon-file.c
diff --git a/libnautilus-private/nautilus-desktop-icon-file.h b/nautilus-desktop/nautilus-desktop-icon-file.h
similarity index 97%
rename from libnautilus-private/nautilus-desktop-icon-file.h
rename to nautilus-desktop/nautilus-desktop-icon-file.h
index 9d8f438..9cd76d9 100644
--- a/libnautilus-private/nautilus-desktop-icon-file.h
+++ b/nautilus-desktop/nautilus-desktop-icon-file.h
@@ -2,22 +2,22 @@
nautilus-desktop-file.h: Subclass of NautilusFile to implement the
the case of a desktop icon file
-
+
Copyright (C) 2003 Red Hat, Inc.
-
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public
License along with this program; if not, see <http://www.gnu.org/licenses/>.
-
+
Author: Alexander Larsson <alexl redhat com>
*/
@@ -25,7 +25,7 @@
#define NAUTILUS_DESKTOP_ICON_FILE_H
#include <libnautilus-private/nautilus-file.h>
-#include <libnautilus-private/nautilus-desktop-link.h>
+#include "nautilus-desktop-link.h"
#define NAUTILUS_TYPE_DESKTOP_ICON_FILE nautilus_desktop_icon_file_get_type()
#define NAUTILUS_DESKTOP_ICON_FILE(obj) \
diff --git a/src/nautilus-desktop-item-properties.c b/nautilus-desktop/nautilus-desktop-item-properties.c
similarity index 100%
rename from src/nautilus-desktop-item-properties.c
rename to nautilus-desktop/nautilus-desktop-item-properties.c
diff --git a/src/nautilus-desktop-item-properties.h b/nautilus-desktop/nautilus-desktop-item-properties.h
similarity index 100%
rename from src/nautilus-desktop-item-properties.h
rename to nautilus-desktop/nautilus-desktop-item-properties.h
diff --git a/libnautilus-private/nautilus-desktop-link-monitor.c
b/nautilus-desktop/nautilus-desktop-link-monitor.c
similarity index 100%
rename from libnautilus-private/nautilus-desktop-link-monitor.c
rename to nautilus-desktop/nautilus-desktop-link-monitor.c
diff --git a/libnautilus-private/nautilus-desktop-link-monitor.h
b/nautilus-desktop/nautilus-desktop-link-monitor.h
similarity index 100%
rename from libnautilus-private/nautilus-desktop-link-monitor.h
rename to nautilus-desktop/nautilus-desktop-link-monitor.h
diff --git a/libnautilus-private/nautilus-desktop-link.c b/nautilus-desktop/nautilus-desktop-link.c
similarity index 100%
rename from libnautilus-private/nautilus-desktop-link.c
rename to nautilus-desktop/nautilus-desktop-link.c
diff --git a/libnautilus-private/nautilus-desktop-link.h b/nautilus-desktop/nautilus-desktop-link.h
similarity index 100%
rename from libnautilus-private/nautilus-desktop-link.h
rename to nautilus-desktop/nautilus-desktop-link.h
diff --git a/libnautilus-private/nautilus-desktop-metadata.c b/nautilus-desktop/nautilus-desktop-metadata.c
similarity index 100%
rename from libnautilus-private/nautilus-desktop-metadata.c
rename to nautilus-desktop/nautilus-desktop-metadata.c
diff --git a/libnautilus-private/nautilus-desktop-metadata.h b/nautilus-desktop/nautilus-desktop-metadata.h
similarity index 100%
rename from libnautilus-private/nautilus-desktop-metadata.h
rename to nautilus-desktop/nautilus-desktop-metadata.h
diff --git a/src/nautilus-desktop-window.c b/nautilus-desktop/nautilus-desktop-window.c
similarity index 100%
rename from src/nautilus-desktop-window.c
rename to nautilus-desktop/nautilus-desktop-window.c
diff --git a/src/nautilus-desktop-window.h b/nautilus-desktop/nautilus-desktop-window.h
similarity index 100%
rename from src/nautilus-desktop-window.h
rename to nautilus-desktop/nautilus-desktop-window.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 608e6a6..407918a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,6 +9,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/libnautilus-private \
-I$(top_builddir)/libnautilus-private \
+ -I$(top_srcdir)/nautilus-desktop \
+ -I$(top_builddir)/nautilus-desktop \
-I$(top_srcdir)/libgd \
$(BASE_CFLAGS) \
$(COMMON_CFLAGS) \
@@ -149,12 +151,6 @@ nautilus_SOURCES = \
nautilus-canvas-view-container.h \
nautilus-dbus-manager.c \
nautilus-dbus-manager.h \
- nautilus-desktop-canvas-view.c \
- nautilus-desktop-canvas-view.h \
- nautilus-desktop-item-properties.c \
- nautilus-desktop-item-properties.h \
- nautilus-desktop-window.c \
- nautilus-desktop-window.h \
nautilus-error-reporting.c \
nautilus-error-reporting.h \
nautilus-preferences-window.c \
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 803d181..13240ba 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -30,7 +30,6 @@
#include "nautilus-application.h"
#include "nautilus-dbus-manager.h"
-#include "nautilus-desktop-window.h"
#include "nautilus-freedesktop-dbus.h"
#include "nautilus-image-properties-page.h"
#include "nautilus-previewer.h"
@@ -52,6 +51,8 @@
#include <libnautilus-private/nautilus-ui-utilities.h>
#include <libnautilus-extension/nautilus-menu-provider.h>
+#include <nautilus-desktop/nautilus-desktop-window.h>
+
#define DEBUG_FLAG NAUTILUS_DEBUG_APPLICATION
#include <libnautilus-private/nautilus-debug.h>
diff --git a/src/nautilus-canvas-view-container.c b/src/nautilus-canvas-view-container.c
index 55b4980..4d4bd83 100644
--- a/src/nautilus-canvas-view-container.c
+++ b/src/nautilus-canvas-view-container.c
@@ -31,7 +31,8 @@
#include <libnautilus-private/nautilus-global-preferences.h>
#include <libnautilus-private/nautilus-file-attributes.h>
#include <libnautilus-private/nautilus-thumbnails.h>
-#include <libnautilus-private/nautilus-desktop-icon-file.h>
+
+#include <nautilus-desktop/nautilus-desktop-icon-file.h>
G_DEFINE_TYPE (NautilusCanvasViewContainer, nautilus_canvas_view_container, NAUTILUS_TYPE_CANVAS_CONTAINER);
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index da33aa8..fede228 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -26,7 +26,6 @@
#include "nautilus-canvas-view.h"
#include "nautilus-canvas-view-container.h"
-#include "nautilus-desktop-canvas-view.h"
#include "nautilus-error-reporting.h"
#include "nautilus-files-view-dnd.h"
#include "nautilus-toolbar.h"
@@ -49,7 +48,6 @@
#include <libnautilus-private/nautilus-link.h>
#include <libnautilus-private/nautilus-metadata.h>
#include <libnautilus-private/nautilus-clipboard.h>
-#include <libnautilus-private/nautilus-desktop-icon-file.h>
#define DEBUG_FLAG NAUTILUS_DEBUG_CANVAS_VIEW
#include <libnautilus-private/nautilus-debug.h>
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 97c6ea7..f6698a6 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -28,7 +28,6 @@
#include "nautilus-files-view.h"
#include "nautilus-application.h"
-#include "nautilus-desktop-canvas-view.h"
#include "nautilus-error-reporting.h"
#include "nautilus-floating-bar.h"
#include "nautilus-list-view.h"
@@ -69,8 +68,6 @@
#include <libnautilus-extension/nautilus-menu-provider.h>
#include <libnautilus-private/nautilus-clipboard.h>
#include <libnautilus-private/nautilus-clipboard-monitor.h>
-#include <libnautilus-private/nautilus-desktop-icon-file.h>
-#include <libnautilus-private/nautilus-desktop-directory.h>
#include <libnautilus-private/nautilus-search-directory.h>
#include <libnautilus-private/nautilus-directory.h>
#include <libnautilus-private/nautilus-dnd.h>
@@ -90,10 +87,12 @@
#include <libnautilus-private/nautilus-ui-utilities.h>
#include <libnautilus-private/nautilus-signaller.h>
#include <libnautilus-private/nautilus-icon-names.h>
-
-#define GNOME_DESKTOP_USE_UNSTABLE_API
#include <gdesktop-enums.h>
+#include <nautilus-desktop/nautilus-desktop-icon-file.h>
+#include <nautilus-desktop/nautilus-desktop-directory.h>
+#include <nautilus-desktop/nautilus-desktop-canvas-view.h>
+
#define DEBUG_FLAG NAUTILUS_DEBUG_DIRECTORY_VIEW
#include <libnautilus-private/nautilus-debug.h>
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index cd750b7..8307894 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -42,7 +42,6 @@
#include <libnautilus-private/nautilus-file-operations.h>
#include <libnautilus-private/nautilus-metadata.h>
#include <libnautilus-private/nautilus-program-choosing.h>
-#include <libnautilus-private/nautilus-desktop-icon-file.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <libnautilus-private/nautilus-signaller.h>
@@ -676,8 +675,7 @@ get_default_executable_text_file_action (void)
gboolean
nautilus_mime_file_opens_in_view (NautilusFile *file)
{
- return (nautilus_file_is_directory (file) ||
- NAUTILUS_IS_DESKTOP_ICON_FILE (file));
+ return nautilus_file_is_directory (file);
}
static ActivationAction
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 1214752..1ec7030 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -52,13 +52,14 @@
#include <libnautilus-private/nautilus-file-attributes.h>
#include <libnautilus-private/nautilus-file-operations.h>
#include <libnautilus-private/nautilus-file-utilities.h>
-#include <libnautilus-private/nautilus-desktop-icon-file.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <libnautilus-private/nautilus-link.h>
#include <libnautilus-private/nautilus-metadata.h>
#include <libnautilus-private/nautilus-mime-application-chooser.h>
#include <libnautilus-private/nautilus-module.h>
+#include <nautilus-desktop/nautilus-desktop-icon-file.h>
+
#if HAVE_SYS_VFS_H
#include <sys/vfs.h>
#elif HAVE_SYS_MOUNT_H
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 83b5405..7731af0 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -26,8 +26,6 @@
#include "nautilus-application.h"
#include "nautilus-canvas-view.h"
-#include "nautilus-desktop-window.h"
-#include "nautilus-desktop-canvas-view.h"
#include "nautilus-list-view.h"
#include "nautilus-mime-actions.h"
#include "nautilus-places-view.h"
@@ -48,6 +46,9 @@
#include <libnautilus-private/nautilus-profile.h>
#include <libnautilus-extension/nautilus-location-widget-provider.h>
+#include <nautilus-desktop/nautilus-desktop-window.h>
+#include <nautilus-desktop/nautilus-desktop-canvas-view.h>
+
G_DEFINE_TYPE (NautilusWindowSlot, nautilus_window_slot, GTK_TYPE_BOX);
enum {
@@ -739,12 +740,6 @@ nautilus_window_slot_init (NautilusWindowSlot *slot)
#define DEBUG_FLAG NAUTILUS_DEBUG_WINDOW
#include <libnautilus-private/nautilus-debug.h>
-/* FIXME bugzilla.gnome.org 41243:
- * We should use inheritance instead of these special cases
- * for the desktop window.
- */
-#include "nautilus-desktop-window.h"
-
static void begin_location_change (NautilusWindowSlot *slot,
GFile *location,
GFile *previous_location,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]