desktop: move to a different folder

For a better structured hierarchy.

https://bugzilla.gnome.org/show_bug.cgi?id=712620
This commit is contained in:
Carlos Soriano 2016-04-15 10:35:34 +02:00
parent d1a1c798e6
commit 73e10fadc9
29 changed files with 152 additions and 104 deletions

View file

@ -6,6 +6,7 @@ DIRS = \
libgd \
libnautilus-private \
src \
nautilus-desktop \
test \
po \
data \

View file

@ -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
])

View file

@ -80,18 +80,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 \

View file

@ -0,0 +1,58 @@
include $(top_srcdir)/Makefile.shared
bin_PROGRAMS= \
nautilus-desktop \
$(NULL)
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/libnautilus-private \
-I$(top_builddir)/libnautilus-private \
-I$(top_srcdir)/libgd \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \
$(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)
LDADD =\
$(top_builddir)/src/libnautilus.la \
$(NULL)
nautilus_desktop_SOURCES= \
main-desktop.c \
nautilus-desktop-application.c \
nautilus-desktop-application.h \
nautilus-desktop-canvas-view.c \
nautilus-desktop-canvas-view.h \
nautilus-desktop-canvas-view-container.c \
nautilus-desktop-canvas-view-container.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-link.c \
nautilus-desktop-link.h \
nautilus-desktop-link-monitor.c \
nautilus-desktop-link-monitor.h \
nautilus-desktop-metadata.c \
nautilus-desktop-metadata.h \
nautilus-desktop-window.c \
nautilus-desktop-window.h \
nautilus-desktop-window-slot.c \
nautilus-desktop-window-slot.h \
$(NULL)
-include $(top_srcdir)/git.mk

View file

@ -1,6 +1,7 @@
#include <config.h>
#include "nautilus-desktop-application.h"
#include <src/nautilus-resources.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
@ -25,6 +26,7 @@ main (int argc, char *argv[])
g_set_prgname ("nautilus-desktop");
nautilus_register_resource ();
application = nautilus_desktop_application_new ();
retval = g_application_run (G_APPLICATION (application),

View file

@ -27,9 +27,9 @@
#include "nautilus-desktop-canvas-view.h"
#include "nautilus-canvas-view-container.h"
#include "nautilus-desktop-canvas-view-container.h"
#include "nautilus-files-view.h"
#include "nautilus-desktop-icon-file.h"
#include "nautilus-desktop-directory.h"
#include <X11/Xatom.h>
#include <gtk/gtk.h>
@ -39,8 +39,6 @@
#include <fcntl.h>
#include <gdk/gdkx.h>
#include <glib/gi18n.h>
#include <libnautilus-private/nautilus-desktop-icon-file.h>
#include <libnautilus-private/nautilus-desktop-directory.h>
#include <libnautilus-private/nautilus-directory-notify.h>
#include <libnautilus-private/nautilus-file-changes-queue.h>
#include <libnautilus-private/nautilus-file-operations.h>
@ -52,6 +50,7 @@
#include <libnautilus-private/nautilus-monitor.h>
#include <libnautilus-private/nautilus-program-choosing.h>
#include <libnautilus-private/nautilus-trash-monitor.h>
#include <src/nautilus-files-view.h>
#include <limits.h>
#include <stddef.h>
#include <stdio.h>

View file

@ -22,16 +22,17 @@
#include <config.h>
#include "nautilus-desktop-directory-file.h"
#include "nautilus-desktop-metadata.h"
#include "nautilus-directory-notify.h"
#include "nautilus-directory-private.h"
#include "nautilus-file-attributes.h"
#include "nautilus-file-private.h"
#include "nautilus-file-utilities.h"
#include <eel/eel-glib-extensions.h>
#include "nautilus-desktop-directory.h"
#include "nautilus-metadata.h"
#include <libnautilus-private/nautilus-directory-notify.h>
#include <libnautilus-private/nautilus-directory-private.h>
#include <libnautilus-private/nautilus-file-attributes.h>
#include <libnautilus-private/nautilus-file-private.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-metadata.h>
#include <eel/eel-glib-extensions.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <string.h>

View file

@ -25,11 +25,11 @@
#include "nautilus-desktop-directory.h"
#include "nautilus-desktop-directory-file.h"
#include "nautilus-directory-private.h"
#include "nautilus-file.h"
#include "nautilus-file-private.h"
#include "nautilus-file-utilities.h"
#include "nautilus-global-preferences.h"
#include <libnautilus-private/nautilus-directory-private.h>
#include <libnautilus-private/nautilus-file.h>
#include <libnautilus-private/nautilus-file-private.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <gtk/gtk.h>
struct NautilusDesktopDirectoryDetails {

View file

@ -1,40 +1,41 @@
/*
nautilus-desktop-icon-file.c: Subclass of NautilusFile to help implement the
virtual desktop icons.
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>
*/
#include <config.h>
#include "nautilus-desktop-icon-file.h"
#include "nautilus-desktop-metadata.h"
#include "nautilus-desktop-directory-file.h"
#include "nautilus-directory-notify.h"
#include "nautilus-directory-private.h"
#include "nautilus-file-attributes.h"
#include "nautilus-file-private.h"
#include "nautilus-file-utilities.h"
#include "nautilus-file-operations.h"
#include "nautilus-link.h"
#include "nautilus-file-undo-manager.h"
#include <eel/eel-glib-extensions.h>
#include "nautilus-desktop-directory.h"
#include <libnautilus-private/nautilus-directory-notify.h>
#include <libnautilus-private/nautilus-directory-private.h>
#include <libnautilus-private/nautilus-file-attributes.h>
#include <libnautilus-private/nautilus-file-private.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-file-operations.h>
#include <libnautilus-private/nautilus-link.h>
#include <libnautilus-private/nautilus-file-undo-manager.h>
#include <eel/eel-glib-extensions.h>
#include <glib/gi18n.h>
#include <string.h>
#include <gio/gio.h>
@ -95,7 +96,7 @@ desktop_icon_file_check_if_ready (NautilusFile *file,
}
static gboolean
desktop_icon_file_get_item_count (NautilusFile *file,
desktop_icon_file_get_item_count (NautilusFile *file,
guint *count,
gboolean *count_unreadable)
{
@ -165,9 +166,9 @@ update_info_from_link (NautilusDesktopIconFile *icon_file)
NautilusDesktopLink *link;
char *display_name;
GMount *mount;
file = NAUTILUS_FILE (icon_file);
link = icon_file->details->link;
if (link == NULL) {
@ -194,7 +195,7 @@ update_info_from_link (NautilusDesktopIconFile *icon_file)
file->details->can_unmount = g_mount_can_unmount (mount);
file->details->can_eject = g_mount_can_eject (mount);
}
file->details->file_info_is_up_to_date = TRUE;
display_name = nautilus_desktop_link_get_display_name (link);
@ -220,7 +221,7 @@ void
nautilus_desktop_icon_file_update (NautilusDesktopIconFile *icon_file)
{
NautilusFile *file;
update_info_from_link (icon_file);
file = NAUTILUS_FILE (icon_file);
nautilus_file_changed (file);
@ -235,22 +236,22 @@ nautilus_desktop_icon_file_remove (NautilusDesktopIconFile *icon_file)
icon_file->details->link = NULL;
file = NAUTILUS_FILE (icon_file);
/* ref here because we might be removing the last ref when we
* mark the file gone below, but we need to keep a ref at
* least long enough to send the change notification.
* least long enough to send the change notification.
*/
nautilus_file_ref (file);
file->details->is_gone = TRUE;
list.data = file;
list.next = NULL;
list.prev = NULL;
nautilus_directory_remove_file (file->details->directory, file);
nautilus_directory_emit_change_signals (file->details->directory, &list);
nautilus_file_unref (file);
}
@ -314,7 +315,7 @@ nautilus_desktop_icon_file_unmount (NautilusFile *file,
{
NautilusDesktopIconFile *desktop_file;
GMount *mount;
desktop_file = NAUTILUS_DESKTOP_ICON_FILE (file);
if (desktop_file) {
mount = nautilus_desktop_link_get_mount (desktop_file->details->link);
@ -322,7 +323,7 @@ nautilus_desktop_icon_file_unmount (NautilusFile *file,
nautilus_file_operations_unmount_mount (NULL, mount, FALSE, TRUE);
}
}
}
static void
@ -334,7 +335,7 @@ nautilus_desktop_icon_file_eject (NautilusFile *file,
{
NautilusDesktopIconFile *desktop_file;
GMount *mount;
desktop_file = NAUTILUS_DESKTOP_ICON_FILE (file);
if (desktop_file) {
mount = nautilus_desktop_link_get_mount (desktop_file->details->link);

View file

@ -1,30 +1,31 @@
/*
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>
*/
#ifndef NAUTILUS_DESKTOP_ICON_FILE_H
#define NAUTILUS_DESKTOP_ICON_FILE_H
#include "nautilus-desktop-link.h"
#include <libnautilus-private/nautilus-file.h>
#include <libnautilus-private/nautilus-desktop-link.h>
#define NAUTILUS_TYPE_DESKTOP_ICON_FILE nautilus_desktop_icon_file_get_type()
#define NAUTILUS_DESKTOP_ICON_FILE(obj) \

View file

@ -23,9 +23,7 @@
#include "nautilus-desktop-link-monitor.h"
#include "nautilus-desktop-link.h"
#include "nautilus-desktop-icon-file.h"
#include "nautilus-directory.h"
#include "nautilus-desktop-directory.h"
#include "nautilus-global-preferences.h"
#include <eel/eel-debug.h>
#include <eel/eel-vfs-extensions.h>
@ -33,7 +31,11 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <libnautilus-private/nautilus-trash-monitor.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <libnautilus-private/nautilus-directory.h>
#include <string.h>
struct NautilusDesktopLinkMonitorDetails {

View file

@ -23,7 +23,7 @@
#define NAUTILUS_DESKTOP_LINK_MONITOR_H
#include <gtk/gtk.h>
#include <libnautilus-private/nautilus-desktop-link.h>
#include "nautilus-desktop-link.h"
#define NAUTILUS_TYPE_DESKTOP_LINK_MONITOR nautilus_desktop_link_monitor_get_type()
#define NAUTILUS_DESKTOP_LINK_MONITOR(obj) \

View file

@ -20,17 +20,21 @@
*/
#include <config.h>
#include "nautilus-desktop-link.h"
#include "nautilus-desktop-link-monitor.h"
#include "nautilus-desktop-icon-file.h"
#include "nautilus-directory-private.h"
#include "nautilus-desktop-directory.h"
#include "nautilus-icon-names.h"
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-trash-monitor.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <libnautilus-private/nautilus-icon-names.h>
#include <string.h>
struct NautilusDesktopLinkDetails {

View file

@ -24,8 +24,8 @@
#include "nautilus-desktop-metadata.h"
#include "nautilus-file-utilities.h"
#include "nautilus-keyfile-metadata.h"
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-keyfile-metadata.h>
static gchar *
get_keyfile_path (void)

View file

@ -18,8 +18,8 @@
#ifndef NAUTILUS_DESKTOP_WINDOW_SLOT_H
#define NAUTILUS_DESKTOP_WINDOW_SLOT_H
#include "nautilus-window-slot.h"
#include "nautilus-window.h"
#include <src/nautilus-window-slot.h>
#include <src/nautilus-window.h>
G_BEGIN_DECLS

View file

@ -21,10 +21,10 @@
*/
#include <config.h>
#include "nautilus-desktop-window.h"
#include "nautilus-window.h"
#include "nautilus-application.h"
#include "nautilus-desktop-window-slot.h"
#include "nautilus-desktop-link-monitor.h"
#include <X11/Xatom.h>
#include <gdk/gdkx.h>
@ -33,10 +33,11 @@
#include <glib/gi18n.h>
#include <eel/eel-vfs-extensions.h>
#include <libnautilus-private/nautilus-desktop-link-monitor.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-icon-names.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <src/nautilus-window.h>
#include <src/nautilus-application.h>
struct NautilusDesktopWindowDetails {
gulong size_changed_id;

View file

@ -26,7 +26,7 @@
#ifndef NAUTILUS_DESKTOP_WINDOW_H
#define NAUTILUS_DESKTOP_WINDOW_H
#include "nautilus-window.h"
#include <src/nautilus-window.h>
#define NAUTILUS_TYPE_DESKTOP_WINDOW nautilus_desktop_window_get_type()
#define NAUTILUS_DESKTOP_WINDOW(obj) \

View file

@ -1,11 +1,14 @@
include $(top_srcdir)/Makefile.shared
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS= \
nautilus \
nautilus-desktop \
nautilus-autorun-software \
$(NULL)
noinst_LTLIBRARIES=libnautilus.la
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/libnautilus-private \
@ -26,6 +29,10 @@ AM_CPPFLAGS = \
$(NULL)
LDADD =\
libnautilus.la \
$(NULL)
libnautilus_la_LIBADD =\
$(top_builddir)/libnautilus-private/libnautilus-private.la \
$(top_builddir)/libgd/libgd.la \
$(BASE_LIBS) \
@ -82,9 +89,9 @@ headers = \
resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir)/resources --generate-dependencies $(srcdir)/resources/nautilus.gresource.xml)
nautilus-resources.c: resources/nautilus.gresource.xml $(resource_files)
glib-compile-resources --target=$@ --sourcedir=$(srcdir)/resources --generate-source --c-name nautilus $(srcdir)/resources/nautilus.gresource.xml
glib-compile-resources --manual-register --target=$@ --sourcedir=$(srcdir)/resources --generate-source --c-name nautilus $(srcdir)/resources/nautilus.gresource.xml
nautilus-resources.h: resources/nautilus.gresource.xml $(resource_files)
glib-compile-resources --target=$@ --sourcedir=$(srcdir)/resources --generate-header --c-name nautilus $(srcdir)/resources/nautilus.gresource.xml
glib-compile-resources --manual-register --target=$@ --sourcedir=$(srcdir)/resources --generate-header --c-name nautilus $(srcdir)/resources/nautilus.gresource.xml
nautilus-enum-types.h: stamp-nautilus-enum-types.h
$(AM_V_GEN)true
@ -150,16 +157,8 @@ nautilus_no_main_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-canvas-view-container.c \
nautilus-desktop-canvas-view-container.h \
nautilus-desktop-item-properties.c \
nautilus-desktop-item-properties.h \
nautilus-desktop-window.c \
nautilus-desktop-window.h \
nautilus-desktop-window-slot.c \
nautilus-desktop-window-slot.h \
nautilus-error-reporting.c \
nautilus-error-reporting.h \
nautilus-preferences-window.c \
@ -227,26 +226,15 @@ nautilus_no_main_sources = \
nautilus-x-content-bar.h \
$(NULL)
nodist_libnautilus_la_SOURCES = \
$(nautilus_built_sources) \
$(nautilus_no_main_sources) \
$(NULL)
nautilus_SOURCES = \
$(nautilus_no_main_sources) \
nautilus-main.c \
$(NULL)
nautilus_desktop_SOURCES= \
$(nautilus_no_main_sources) \
main-desktop.c \
nautilus-desktop-application.c \
nautilus-desktop-application.h \
$(NULL)
nodist_nautilus_SOURCES = \
$(nautilus_built_sources) \
$(NULL)
nodist_nautilus_desktop_SOURCES = \
$(nautilus_built_sources) \
$(NULL)
EMPTY_VIEW_SOURCES = \
nautilus-empty-view.c \
nautilus-empty-view.h

View file

@ -29,6 +29,7 @@
#include <config.h>
#include "nautilus-application.h"
#include "nautilus-resources.h"
#include <libnautilus-private/nautilus-debug.h>
#include <eel/eel-debug.h>
@ -87,7 +88,7 @@ main (int argc, char *argv[])
#ifdef HAVE_EXEMPI
xmp_init();
#endif
nautilus_register_resource ();
/* Run the nautilus application. */
application = nautilus_application_new ();