Commit 6584c178 authored by Carlos Soriano 's avatar Carlos Soriano

Merge branch 'wip/ernestask/long-live-the-desktop' into 'master'

remove the desktop

Closes #158

See merge request !46
parents f3f2cd1d d48db627
Pipeline #1780 canceled with stage
......@@ -6,9 +6,9 @@ stages:
before_script:
- dnf install -y gcc meson gettext itstool redhat-rpm-config git
gtk3-devel gnome-autoar-devel gnome-desktop3-devel
gobject-introspection-devel gsettings-desktop-schemas-devel
libselinux-devel libxml2-devel tracker-devel
desktop-file-utils libgexiv2-devel
gobject-introspection-devel libselinux-devel
libxml2-devel tracker-devel desktop-file-utils
libgexiv2-devel
- pip install meson
build-nautilus:
......
......@@ -84,7 +84,6 @@
"builddir": true,
"name": "nautilus",
"config-opts": [
"-Denable-desktop=false",
"-Denable-selinux=false",
"--libdir=/app/lib"
],
......
#mesondefine VERSION
#mesondefine PACKAGE_VERSION
#mesondefine GETTEXT_PACKAGE
#mesondefine HAVE_EXEMPI
#mesondefine HAVE_SELINUX
#mesondefine ENABLE_DESKTOP
#mesondefine ENABLE_PACKAGEKIT
#mesondefine LOCALEDIR
#mesondefine NAUTILUS_DATADIR
#mesondefine NAUTILUS_EXTENSIONDIR
/lineup-parameters
/nautilus-autorun-software.desktop
/nautilus-autostart.desktop
/nautilus-classic.desktop
/org.freedesktop.FileManager1.service
/org.gnome.Nautilus.appdata.xml
/org.gnome.Nautilus.desktop
......
install_subdir ('hicolor',
install_dir: icondir)
subdir ('icons')
install_subdir(
join_paths('icons', 'hicolor'),
install_dir: join_paths(datadir, 'icons')
)
po_dir = join_paths (meson.source_root (), 'po')
po_dir = join_paths(meson.source_root(), 'po')
line_up_parameters = executable ('lineup-parameters',
'lineup-parameters.c',
dependencies: [gio, gio_unix])
line_up_parameters = executable(
'lineup-parameters',
'lineup-parameters.c',
dependencies: [
gio,
gio_unix,
]
)
desktop = i18n.merge_file ('desktop',
input: 'org.gnome.Nautilus.desktop.in',
output: 'org.gnome.Nautilus.desktop',
install: true,
install_dir: desktopdir,
po_dir: po_dir,
type: 'desktop')
desktop = i18n.merge_file(
'desktop',
input: 'org.gnome.Nautilus.desktop.in',
output: 'org.gnome.Nautilus.desktop',
install: true,
install_dir: desktopdir,
po_dir: po_dir,
type: 'desktop'
)
desktop_autorun_software = i18n.merge_file ('desktop-autorun-software',
input: 'nautilus-autorun-software.desktop.in',
output: 'nautilus-autorun-software.desktop',
install: true,
install_dir: desktopdir,
po_dir: po_dir,
type: 'desktop')
desktop_autorun_software = i18n.merge_file(
'desktop-autorun-software',
input: 'nautilus-autorun-software.desktop.in',
output: 'nautilus-autorun-software.desktop',
install: true,
install_dir: desktopdir,
po_dir: po_dir,
type: 'desktop'
)
desktop_autostart = i18n.merge_file ('desktop-autostart',
input: 'nautilus-autostart.desktop.in',
output: 'nautilus-autostart.desktop',
install: true,
install_dir: join_paths (sysconfdir, 'xdg', 'autostart'),
po_dir: po_dir,
type: 'desktop')
appdata = i18n.merge_file(
'appdata',
input: 'org.gnome.Nautilus.appdata.xml.in',
output: 'org.gnome.Nautilus.appdata.xml',
install: true,
install_dir: join_paths(datadir, 'appdata'),
po_dir: po_dir
)
if get_option ('enable-desktop')
desktop_classic = i18n.merge_file ('desktop-classic',
input: 'nautilus-classic.desktop.in',
output: 'nautilus-classic.desktop',
install: true,
install_dir: desktopdir,
po_dir: po_dir,
type: 'desktop')
endif
appdata = i18n.merge_file ('appdata',
input: 'org.gnome.Nautilus.appdata.xml.in',
output: 'org.gnome.Nautilus.appdata.xml',
install: true,
install_dir: appdatadir,
po_dir: po_dir,)
service_conf = configuration_data ()
service_conf.set ('bindir', join_paths (prefix, bindir))
service_conf = configuration_data()
service_conf.set('bindir', join_paths(prefix, bindir))
configure_file (input: 'org.gnome.Nautilus.service.in',
output: 'org.gnome.Nautilus.service',
configuration: service_conf,
install_dir: servicedir)
configure_file(
input: 'org.gnome.Nautilus.service.in',
output: 'org.gnome.Nautilus.service',
configuration: service_conf,
install_dir: servicedir
)
configure_file (input: 'org.freedesktop.FileManager1.service.in',
output: 'org.freedesktop.FileManager1.service',
configuration: service_conf,
install_dir: servicedir)
configure_file(
input: 'org.freedesktop.FileManager1.service.in',
output: 'org.freedesktop.FileManager1.service',
configuration: service_conf,
install_dir: servicedir
)
install_data ('nautilus-search-provider.ini',
install_dir: searchproviderdir)
install_data(
'nautilus-search-provider.ini',
install_dir: join_paths(datadir, 'gnome-shell', 'search-providers')
)
install_data ('org.gnome.nautilus.gschema.xml',
install_dir: schemadir)
install_data(
'org.gnome.nautilus.gschema.xml',
install_dir: join_paths(datadir, 'glib-2.0', 'schemas')
)
desktop_file_validate = find_program ('desktop-file-validate', required: false)
if desktop_file_validate.found ()
test ('validate-desktop', desktop_file_validate,
args: [desktop.full_path ()])
test ('validate-desktop-autorun-software', desktop_file_validate,
args: [desktop_autorun_software.full_path ()])
test ('validate-desktop-autostart', desktop_file_validate,
args: [desktop_autostart.full_path ()])
if get_option ('enable-desktop')
test ('validate-desktop-classic', desktop_file_validate,
args: [desktop_classic.full_path ()])
endif
desktop_file_validate = find_program('desktop-file-validate', required: false)
if desktop_file_validate.found()
test(
'validate-desktop',
desktop_file_validate,
args: [
desktop.full_path()
]
)
test(
'validate-desktop-autorun-software',
desktop_file_validate,
args: [
desktop_autorun_software.full_path()
]
)
endif
appstream_util = find_program ('appstream-util', required: false)
if appstream_util.found ()
test ('validate-appdata', appstream_util,
args: ['validate-relax', appdata.full_path ()])
appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
test(
'validate-appdata', appstream_util,
args: [
'validate-relax', appdata.full_path()
]
)
endif
[Desktop Entry]
Type=Application
Name=Files
Exec=nautilus-desktop
OnlyShowIn=GNOME;Unity;
AutostartCondition=GSettings org.gnome.desktop.background show-desktop-icons
NoDisplay=true
[Desktop Entry]
Type=Application
Name=Desktop Icons
Comment=Classic session desktop file for desktop icons
Exec=nautilus-desktop --force
OnlyShowIn=GNOME;
NoDisplay=true
X-GNOME-Autostart-Phase=Desktop
X-GNOME-Autostart-Notify=true
X-GNOME-AutoRestart=true
X-GNOME-Provides=filemanager
......@@ -68,7 +68,6 @@
<child schema="org.gnome.nautilus.compression" name="compression"/>
<child schema="org.gnome.nautilus.icon-view" name="icon-view"/>
<child schema="org.gnome.nautilus.list-view" name="list-view"/>
<child schema="org.gnome.nautilus.desktop" name="desktop"/>
<child schema="org.gnome.nautilus.window-state" name="window-state"/>
</schema>
......@@ -231,7 +230,7 @@
<key type="as" name="captions">
<default>[ 'none', 'none', 'none' ]</default>
<summary>List of possible captions on icons</summary>
<description>A list of captions below an icon in the icon view and the desktop. The actual number of captions shown depends on the zoom level. Some possible values are: “size”, “type”, “date_modified”, “owner”, “group”, “permissions”, and “mime_type”.</description>
<description>A list of captions below an icon in the icon view. The actual number of captions shown depends on the zoom level. Some possible values are: “size”, “type”, “date_modified”, “owner”, “group”, “permissions”, and “mime_type”.</description>
</key>
<key name="default-zoom-level" enum="org.gnome.nautilus.CanvasZoomLevel">
<default>'large'</default>
......@@ -269,59 +268,6 @@
</key>
</schema>
<schema path="/org/gnome/nautilus/desktop/" id="org.gnome.nautilus.desktop" gettext-domain="nautilus">
<key type="s" name="font">
<default l10n="messages" context="desktop-font">''</default>
<summary>Desktop font</summary>
<description>The font description used for the icons on the desktop.</description>
</key>
<key type="b" name="home-icon-visible">
<default>true</default>
<summary>Home icon visible on desktop</summary>
<description>If this is set to true, an icon linking to the home folder will be put on the desktop.</description>
</key>
<key type="b" name="trash-icon-visible">
<default>true</default>
<summary>Trash icon visible on desktop</summary>
<description>If this is set to true, an icon linking to the Trash will be put on the desktop.</description>
</key>
<key type="b" name="volumes-visible">
<default>true</default>
<summary>Show mounted volumes on the desktop</summary>
<description>If this is set to true, icons linking to mounted volumes will be put on the desktop.</description>
</key>
<key type="b" name="network-icon-visible">
<default>false</default>
<summary>Network Servers icon visible on the desktop</summary>
<description>If this is set to true, an icon linking to the Network Servers view will be put on the desktop.</description>
</key>
<key type="s" name="home-icon-name">
<default l10n="messages" context="home-icon-name">'Home'</default>
<summary>Desktop home icon name</summary>
<description>This name can be set if you want a custom name for the home icon on the desktop.</description>
</key>
<key type="s" name="trash-icon-name">
<default l10n="messages" context="trash-icon-name">'Trash'</default>
<summary>Desktop Trash icon name</summary>
<description>This name can be set if you want a custom name for the Trash icon on the desktop.</description>
</key>
<key type="s" name="network-icon-name">
<default l10n="messages" context="network-icon-name">'Network Servers'</default>
<summary>Network servers icon name</summary>
<description>This name can be set if you want a custom name for the network servers icon on the desktop.</description>
</key>
<key type="i" name="text-ellipsis-limit">
<default>3</default>
<summary>Text Ellipsis Limit</summary>
<description>An integer specifying how parts of overlong file names should be replaced by ellipses on the desktop. If the number is larger than 0, the file name will not exceed the given number of lines. If the number is 0 or smaller, no limit is imposed on the number of displayed lines.</description>
</key>
<key type="b" name="background-fade">
<default>true</default>
<summary>Fade the background on change</summary>
<description>If set to true, then Nautilus will use a fade effect to change the desktop background.</description>
</key>
</schema>
<schema path="/org/gnome/nautilus/window-state/" id="org.gnome.nautilus.window-state" gettext-domain="nautilus">
<key type="s" name="geometry">
<default>''</default>
......
......@@ -2,7 +2,7 @@
DATA=$(dirname "$BASH_SOURCE")
if [ -x "$DATA/lineup-parameters" ];
then
for DIR in "$DATA/../"{src,nautilus-desktop,test,libnautilus-extension,eel,nautilus-sendto-extension}
for DIR in "$DATA/../"{src,test,libnautilus-extension,eel,nautilus-sendto-extension}
do
for FILE in $(find "$DIR" -name "*.c")
do
......
install_man ('nautilus.1')
install_man('nautilus.1')
subdir ('reference')
subdir('reference')
......@@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH Nautilus 1 "23 September 2016"
.TH Nautilus 1 "12 December 2017"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
......@@ -50,11 +50,6 @@ Always open a new window for browsing specified URIs.
.BR \-n ", " \-\-no-default-window
Only create windows for explicitly specified URIs.
.TP
.B \-\-no-desktop
Never manage the desktop (ignore the GSettings preference). \fBDeprecated\fR - the
desktop is managed in a separate binary.
.TP
.BR \-q ", " \-\-quit
Quit Nautilus.
......
docs_conf = configuration_data ()
docs_conf.set ('NAUTILUS_EXTENSION_VERSION_INFO', nautilus_extension_version)
docs_conf = configuration_data()
docs_conf.set('NAUTILUS_EXTENSION_VERSION_INFO', nautilus_extension_version)
docs_version = configure_file (input: 'version.xml.in',
output: 'version.xml',
configuration: docs_conf)
configure_file(
input: 'version.xml.in',
output: 'version.xml',
configuration: docs_conf
)
gnome.gtkdoc ('libnautilus-extension',
main_xml: 'libnautilus-extension-docs.xml',
src_dir: join_paths (meson.source_root (), 'libnautilus-extension'),
dependencies: nautilus_extension,
gobject_typesfile: 'libnautilus-extension.types',
install: true,
scan_args: ['--ignore-headers=nautilus-extension-private.h',
'--rebuild-types'])
gnome.gtkdoc(
'libnautilus-extension',
main_xml: 'libnautilus-extension-docs.xml',
src_dir: join_paths(meson.source_root(), 'libnautilus-extension'),
dependencies: nautilus_extension,
gobject_typesfile: 'libnautilus-extension.types',
install: true,
scan_args: [
'--ignore-headers=nautilus-extension-private.h',
'--rebuild-types'
]
)
subdir ('libnautilus-extension')
subdir('libnautilus-extension')
......@@ -64,7 +64,7 @@ get_quark_gobject (void)
*
* Return value: the accessible's associated GObject
**/
gpointer
static gpointer
eel_accessibility_get_gobject (AtkObject *object)
{
return g_object_get_qdata (G_OBJECT (object), get_quark_gobject ());
......
......@@ -31,8 +31,6 @@
void eel_accessibility_set_up_label_widget_relation (GtkWidget *label, GtkWidget *widget);
gpointer eel_accessibility_get_gobject (AtkObject *object);
char* eel_accessibility_text_get_text (AtkText *text,
gint start_pos,
gint end_pos);
......
......@@ -29,7 +29,7 @@
const EelDRect eel_drect_empty = { 0.0, 0.0, 0.0, 0.0 };
const EelIRect eel_irect_empty = { 0, 0, 0, 0 };
void
static void
eel_irect_copy (EelIRect *dest,
const EelIRect *src)
{
......@@ -39,6 +39,13 @@ eel_irect_copy (EelIRect *dest,
dest->y1 = src->y1;
}
static gboolean
eel_irect_is_empty (const EelIRect *src)
{
return (src->x1 <= src->x0 ||
src->y1 <= src->y0);
}
void
eel_irect_union (EelIRect *dest,
const EelIRect *src1,
......@@ -61,7 +68,7 @@ eel_irect_union (EelIRect *dest,
}
}
void
static void
eel_irect_intersect (EelIRect *dest,
const EelIRect *src1,
const EelIRect *src2)
......@@ -72,13 +79,6 @@ eel_irect_intersect (EelIRect *dest,
dest->y1 = MIN (src1->y1, src2->y1);
}
gboolean
eel_irect_is_empty (const EelIRect *src)
{
return (src->x1 <= src->x0 ||
src->y1 <= src->y0);
}
/**
* eel_irect_get_width:
*
......@@ -146,29 +146,6 @@ eel_drect_union (EelDRect *dest,
}
}
/**
* eel_irect_contains_point:
*
* @rectangle: An EelIRect.
* @x: X coordinate to test.
* @y: Y coordinate to test.
*
* Returns: A boolean value indicating whether the rectangle
* contains the x,y coordinate.
*
*/
gboolean
eel_irect_contains_point (EelIRect rectangle,
int x,
int y)
{
return x >= rectangle.x0
&& x <= rectangle.x1
&& y >= rectangle.y0
&& y <= rectangle.y1;
}
gboolean
eel_irect_hits_irect (EelIRect rectangle_a,
EelIRect rectangle_b)
......
......@@ -40,14 +40,9 @@ typedef struct {
extern const EelDRect eel_drect_empty;
extern const EelIRect eel_irect_empty;
void eel_irect_copy (EelIRect *dest,
const EelIRect *src);
void eel_irect_union (EelIRect *dest,
const EelIRect *src1,
const EelIRect *src2);
void eel_irect_intersect (EelIRect *dest,
const EelIRect *src1,
const EelIRect *src2);
gboolean eel_irect_equal (EelIRect rectangle_a,
EelIRect rectangle_b);
gboolean eel_irect_hits_irect (EelIRect rectangle_a,
......@@ -57,10 +52,6 @@ EelIRect eel_irect_offset_by (EelIRect rectangle,
int y);
EelIRect eel_irect_scale_by (EelIRect rectangle,
double scale);
gboolean eel_irect_is_empty (const EelIRect *rectangle);
gboolean eel_irect_contains_point (EelIRect outer_rectangle,
int x,
int y);
int eel_irect_get_width (EelIRect rectangle);
int eel_irect_get_height (EelIRect rectangle);
......
......@@ -37,10 +37,6 @@
*
* - Allow to specify whether EelCanvasImage sizes are in units or pixels (scale or don't scale).
*
* - Implement a flag for eel_canvas_item_reparent() that tells the function to keep the item
* visually in the same place, that is, to keep it in the same place with respect to the canvas
* origin.
*
* - GC put functions for items.
*
* - Widget item (finish it).
......@@ -81,12 +77,10 @@ static void redraw_and_repick_if_mapped (EelCanvasItem *item);
/* Some convenience stuff */
#define GCI_UPDATE_MASK (EEL_CANVAS_UPDATE_REQUESTED | EEL_CANVAS_UPDATE_DEEP)
#define GCI_EPSILON 1e-18
enum
{
ITEM_PROP_0,
ITEM_PROP_PARENT,
ITEM_PROP_VISIBLE
};
......@@ -154,6 +148,17 @@ eel_canvas_item_init (EelCanvasItem *item)
item->flags |= EEL_CANVAS_ITEM_VISIBLE;
}
/* Performs post-creation operations on a canvas item (adding it to its parent
* group, etc.)
*/
static void
item_post_create_setup (EelCanvasItem *item)
{
group_add (EEL_CANVAS_GROUP (item->parent), item);
redraw_and_repick_if_mapped (item);
}
/**
* eel_canvas_item_new:
* @parent: The parent group for the new item.
......@@ -185,23 +190,16 @@ eel_canvas_item_new (EelCanvasGroup *parent,
item = EEL_CANVAS_ITEM (g_object_new (type, NULL));
item->parent = EEL_CANVAS_ITEM (parent);
item->canvas = item->parent->canvas;
va_start (args, first_arg_name);
eel_canvas_item_construct (item, parent, first_arg_name, args);
g_object_set_valist (G_OBJECT (item), first_arg_name, args);
va_end (args);
return item;
}
/* Performs post-creation operations on a canvas item (adding it to its parent
* group, etc.)
*/
static void
item_post_create_setup (EelCanvasItem *item)
{
group_add (EEL_CANVAS_GROUP (item->parent), item);
item_post_create_setup (item);
redraw_and_repick_if_mapped (item);
return item;
}
/* Set_property handler for canvas items */
......@@ -219,22 +217,6 @@ eel_canvas_item_set_property (GObject *gobject,
switch (param_id)
{
case ITEM_PROP_PARENT:
{
if (item->parent != NULL)
{
g_warning ("Cannot set `parent' argument after item has "
"already been constructed.");
}
else if (g_value_get_object (value))
{
item->parent = EEL_CANVAS_ITEM (g_value_get_object (value));
item->canvas = item->parent->canvas;
item_post_create_setup (item);
}
}
break;
case ITEM_PROP_VISIBLE:
{
if (g_value_get_boolean (value))
......@@ -285,33 +267,6 @@ eel_canvas_item_get_property (GObject *gobject,
}
}
/**
* eel_canvas_item_construct:
* @item: An unconstructed canvas item.
* @parent: The parent group for the item.
* @first_arg_name: The name of the first argument for configuring the item.
* @args: The list of arguments used to configure the item.
*
* Constructs a canvas item; meant for use only by item implementations.
**/
void
eel_canvas_item_construct (EelCanvasItem *item,
EelCanvasGroup *parent,
const gchar *first_arg_name,
va_list args)
{
g_return_if_fail (EEL_IS_CANVAS_GROUP (parent));
g_return_if_fail (EEL_IS_CANVAS_ITEM (item));
item->parent = EEL_CANVAS_ITEM (parent);
item->canvas = item->parent->canvas;
g_object_set_valist (G_OBJECT (item), first_arg_name, args);
item_post_create_setup (item);
}
static void
redraw_and_repick_if_mapped (EelCanvasItem *item)
{
......@@ -539,33 +494,12 @@ eel_canvas_item_set (EelCanvasItem *item,
va_list args;
va_start (args, first_arg_name);
eel_canvas_item_set_valist (item, first_arg_name, args);
va_end (args);
}
/**
* eel_canvas_item_set_valist:
* @item: A canvas item.
* @first_arg_name: The name of the first argument used to configure the item.
* @args: The list of object argument name/value pairs used to configure the item.
*
* Configures a canvas item. The arguments in the item are set to the specified
* values, and the item is repainted as appropriate.
**/
void
eel_canvas_item_set_valist (EelCanvasItem *item,
const gchar *first_arg_name,
va_list args)
{
g_return_if_fail (EEL_IS_CANVAS_ITEM (item));
g_object_set_valist (G_OBJECT (item), first_arg_name, args);
va_end (args);
item->canvas->need_repick = TRUE;
}
/**
* eel_canvas_item_move:
* @item: A canvas item.
......@@ -1078,38 +1012,6 @@ eel_canvas_item_ungrab (EelCanvasItem *item)
gdk_seat_ungrab (seat);
}
/**
* eel_canvas_item_w2i:
* @item: A canvas item.
* @x: X coordinate to convert (input/output value).
* @y: Y coordinate to convert (input/output value).
*
* Converts a coordinate pair from world coordinates to item-relative
* coordinates.
**/
void
eel_canvas_item_w2i (EelCanvasItem *item,
double *x,
double *y)
{
g_return_if_fail (EEL_IS_CANVAS_ITEM (item));
g_return_if_fail (x != NULL);
g_return_if_fail (y != NULL);
item = item->parent;
while (item)
{
if (EEL_IS_CANVAS_GROUP (item))
{
*x -= EEL_CANVAS_GROUP (item)->xpos;
*y -= EEL_CANVAS_GROUP (item)->ypos;
}
item = item->parent;
}
}
/**
* eel_canvas_item_i2w:
* @item: A canvas item.
......@@ -1157,48 +1059,6 @@ is_descendant (EelCanvasItem *item,
return FALSE;
}
/**
* eel_canvas_item_reparent:
* @item: A canvas item.