Skip to content
Commits on Source (219)
......@@ -10,7 +10,7 @@ stages:
.vars-devel:
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Nautilus.yml"
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Nautilus.json"
FLATPAK_MODULE: "nautilus"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
APP_ID: "org.gnome.NautilusDevel"
......
Major changes in 43.2
Major changes in 44.alpha
=========================
* Regressions addressed:
- Launch search from shell correctly (Corey Berla)
- Make nautilus-autorun-software work again (António Fernandes)
- Restore 2-dimensional navigation from sushi (António Fernandes)
- Resolve stuttering scrolling (Corey Berla)
* Enhancements:
- Allow expanding subfolders in the list (António Fernandes, Corey Berla)
- Enrich tab context menus (Corey Berla)
- Allow pasting image data into new PNG file (Corey Berla)
- Use pregenerated thumbnails when available, e.g. MTP (Ondrej Holy)
- Add shortcut for Preferences (Sabri Ünal)
- Show full filename in grid, using tooltips (António Fernandes)
- Reintroduce 64px icon size for grid view (António Fernandes)
- Show full filename again in grid, using tooltips (António Fernandes)
- Remove upper limit on thumbnailing file size range (Peter Eisenmann)
- Reword "application" to "app" (sunflowerskater)
- Other papercuts (António Fernandes, Hari Rana, sunflowerskater)
* Other bugfixes:
- Avoid a many crashes (Corey Berla, Gary li, António Fernandes)
- Avoid many crashes (Corey Berla, Gary li, António Fernandes, Aleksandar Dezelin)
- Fix and improve autorun support (Will Thompson, António Fernandes)
- Fix some drag-and-drop issues (Corey Berla, Liu Yuyang)
- Fix some view focus and selection issues (Corey Berla, António Fernandes)
- Fix properties extensions bugs (António Fernandes)
- Fix memory leaks (Ignacy Kuchciński, António Fernandes)
- Fix building on certain cases (Leonardo Hernández)
- Fix bugs with file operations (Corey Berla, Gary Li, Bastien Nocera)
- Resolve some performance issues (Corey Berla, Jeff Fortin Tam)
- Resolve stuttering scrolling (Corey Berla)
- Save and restore sort column (Corey Berla)
- Launch search from shell correctly (Corey Berla)
- Reimplement view navigation from the previewer (António Fernandes)
- Stop showing � in the type on Properties (Aleksandar Dezelin)
- Show rename error dialogs again (Corey Berla)
- Handle X11-only drag-and-drop quirks (Corey Berla)
- Allow autorun.sh without executable bit (Will Thompson)
- Improve selection-setting (Corey Berla)
- Restrict DND actions over drag source (Corey Berla)
- Focus replaces files (Corey Berla)
- Improve keyboard focus navigation on the new views (António Fernandes)
- Stop blocking on the tracker connection (Corey Berla)
- Don't add missing emblems (António Fernandes)
* Translation updates (GNOME Translation Project contributors)
Major changes in 43.1
=========================
* Bugfixes
- Actually reset metadata when reseting to default columns (Corey Berla)
- Don't allow hiding name column (Corey Berla)
- Keep track of column sorting changes (Corey Berla)
- Fix view focus navigation (António Fernandes)
- Reimplement view navigation from the previewer (António Fernandes)
- Don't accept drops into search directory (Liu Yuyang)
- Share settings with GTK4 filechooser (Colin Sane)
- Fix a properties extensions bugs (António Fernandes)
- Fix various Drag-and-Drop bugs (Corey Berla)
- Remove dead shortcut from Keyboard Shortcut (Jake Dane)
- Add missing trailing ellipsis and mnemonics in menus (Gotam Gorabh, Peter Eisenmann)
- Allow opening current view in new tab from sidebar (Colin Kinloch)
- Fix crashes (Corey Berla, Aleksandar Dezelin)
* Performance improvements
- Optimize sorting during directory loading (Corey Berla)
- Minimize column factories (Corey Berla)
- Increase search timeout (Jeff Fortin Tam)
- Minimize and optimize menu updates (Corey Berla)
* Build fixes
- Make header prototypes match definitions (Leonardo Hernández)
- Share settings with GTK4 filechooser (Colin Sane)
- Don't allow hiding name column (Corey Berla)
* Code cleanups
- Drop workarounds for resolved GTK4 issues (Corey Berla)
- Use fewer deprecated GTK 4 API (Corey Berla, Peter Eisenmann)
- Don't use deprecated GLib API (Corey Berla)
- Remove unused obsolete code (Peter Eisenmann, Benjamin Otte, Corey Berla, Antóino Fernandes, Sabri Ünal)
* Translation updates (GNOME Translation Project contributors)
Major changes in 43.0
......
......@@ -13,6 +13,8 @@ To build the development version of the Files app and hack on the code
see the [general guide](https://wiki.gnome.org/Newcomers/BuildProject)
for building GNOME apps with Flatpak and GNOME Builder.
Commit messages should follow the expected format [detailed here](https://wiki.gnome.org/Git/CommitMessages).
## Runtime dependencies
- [Bubblewrap](https://github.com/projectatomic/bubblewrap) installed. Used for security reasons.
- [Tracker (including tracker-miners)](https://gitlab.gnome.org/GNOME/tracker) properly set up and with all features enabled. Used for fast search and metadata extraction, starred files and batch renaming.
......
......@@ -125,7 +125,9 @@
"builddir": true,
"config-opts": [
"-Ddocs=false",
"-Dbackends=gtk4",
"-Dbackend-gtk4=enabled",
"-Dbackend-gtk3=disabled",
"-Dbackend-qt5=disabled",
"--libdir=/app/lib",
"--buildtype=debugoptimized"
],
......@@ -133,7 +135,7 @@
{
"type": "git",
"url": "https://github.com/flatpak/libportal.git",
"tag": "0.6"
"branch": "main"
}
]
},
......
---
app-id: org.gnome.NautilusDevel
runtime: org.gnome.Platform
runtime-version: "master"
sdk: org.gnome.Sdk
command: nautilus
tags:
- devel
- development
- nightly
finish-args:
- "--device=dri"
- "--share=ipc"
- "--socket=x11"
- "--socket=wayland"
- "--talk-name=org.gnome.OnlineAccounts"
- "--filesystem=host"
- "--filesystem=/tmp"
- "--talk-name=org.gtk.vfs"
- "--talk-name=org.gtk.vfs.*"
- "--talk-name=org.gtk.MountOperationHandler"
- "--filesystem=xdg-run/gvfsd"
- "--filesystem=xdg-run/dconf"
- "--filesystem=~/.config/dconf:ro"
- "--talk-name=ca.desrt.dconf"
- "--talk-name=org.gnome.NautilusPreviewer"
- "--talk-name=org.gnome.DiskUtility"
- "--talk-name=org.gnome.Settings"
- "--talk-name=org.gnome.Console"
- "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
# Access to host Tracker Miners
- "--add-policy=Tracker3.dbus:org.freedesktop.Tracker3.Miner.Files=tracker:FileSystem;tracker:Documents"
modules:
- name: exiv2
config-opts:
- "-DCMAKE_INSTALL_PREFIX=/app"
- "-DCMAKE_INSTALL_LIBDIR=/app/lib"
buildsystem: cmake-ninja
sources:
- type: git
url: https://github.com/Exiv2/exiv2.git
branch: 0.27-maintenance
- name: gexiv2
buildsystem: meson
builddir: true
config-opts:
- "--libdir=/app/lib"
- "-Dintrospection=false"
- "-Dvapi=false"
- "-Dpython3=false"
- "-Dpython3_girdir=no"
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/gexiv2.git
tag: gexiv2-0.14
- name: tracker-miners
buildsystem: meson
cleanup:
- "/etc"
- "/libexec/tracker-3"
- "/share/dbus-1/services/org.freedesktop.Tracker3.Miner.Extract.service"
- "/share/dbus-1/services/org.freedesktop.Tracker3.Miner.Files.service"
- "/share/dbus-1/services/org.freedesktop.Tracker3.Miner.Files.Control.service"
config-opts:
- "-Dextract=true"
- "-Dgeneric_media_extractor=none"
- "-Dman=false"
- "-Dminer_fs=true"
- "-Dminer_rss=false"
- "-Dsystemd_user_services=false"
- "-Dwriteback=false"
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/tracker-miners.git
branch: master
- name: gnome-desktop
buildsystem: meson
config-opts:
- "-Ddebug_tools=false"
- "-Ddesktop_docs=false"
- "-Dudev=disabled"
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/gnome-desktop.git
- name: gnome-autoar
buildsystem: meson
builddir: true
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/gnome-autoar.git
- name: libportal
buildsystem: meson
builddir: true
config-opts:
- "-Ddocs=false"
- "-Dbackends=gtk4"
- "--libdir=/app/lib"
- "--buildtype=debugoptimized"
sources:
- type: git
url: https://github.com/flatpak/libportal.git
tag: 0.6
- name: libcloudproviders
buildsystem: meson
builddir: true
sources:
- type: git
url: https://gitlab.gnome.org/World/libcloudproviders.git
- buildsystem: meson
builddir: true
name: nautilus
config-opts:
- "--libdir=/app/lib"
- "-Dprofile=Devel"
- "-Dtests=all"
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/nautilus.git
......@@ -12,7 +12,7 @@
<p>
Nautilus supports all the basic functions of a file manager and more.
It can search and manage your files and folders, both locally and on a network,
read and write data to and from removable media, run scripts, and launch applications.
read and write data to and from removable media, run scripts, and launch apps.
It has three views: Icon Grid, Icon List, and Tree List.
Its functions can be extended with plugins and scripts.
</p>
......@@ -27,7 +27,7 @@
<url type="translate">https://wiki.gnome.org/TranslationProject</url>
<launchable type="desktop-id">@appid@.desktop</launchable>
<releases>
<release version="43.2" date="2023-01-08" />
<release version="44.alpha" date="2023-01-10" />
</releases>
<project_group>GNOME</project_group>
<project_license>GPL-3.0-or-later</project_license>
......
......@@ -111,7 +111,7 @@
<key type="b" name="install-mime-activation">
<default>true</default>
<summary>Show the package installer for unknown MIME types</summary>
<description>Whether to show the user a package installer dialog in case an unknown MIME type is opened, in order to search for an application to handle it.</description>
<description>Whether to show the user a package installer dialog in case an unknown MIME type is opened, in order to search for an app to handle it.</description>
</key>
<key type="b" name="mouse-use-extra-buttons">
<default>true</default>
......@@ -135,7 +135,6 @@
<description>Speed trade-off for when to show a file as a thumbnail. If set to “always” then always thumbnail, even if the folder is on a remote server. If set to “local-only” then only show thumbnails for local file systems. If set to “never” then never bother to thumbnail files, just use a generic icon. Despite what the name may suggest, this applies to any previewable file type.</description>
</key>
<key type="t" name="thumbnail-limit">
<range max="5000"/>
<default>50</default>
<summary>Maximum image size for thumbnailing</summary>
<description>Images over this size (in megabytes) won’t be thumbnailed. The purpose of this setting is to avoid thumbnailing large images that may take a long time to load or use lots of memory.</description>
......@@ -171,6 +170,8 @@
</key>
<key type="b" name="migrated-gtk-settings">
<default>false</default>
<summary>Whether GTK 4 settings migration happened</summary>
<description>Whether settings shared with GtkFileChooser have been migrated from their GTK 3 key to the GTK 4 ones.</description>
</key>
<key name="search-view" enum="org.gnome.nautilus.FolderView">
<default>'list-view'</default>
......@@ -242,17 +243,12 @@
<key type="(ii)" name="initial-size">
<default>(890, 550)</default>
<summary>Initial size of the window</summary>
<description>A tuple containing the initial width and height of the application window.</description>
<description>A tuple containing the initial width and height of the app window.</description>
</key>
<key type="b" name="maximized">
<default>false</default>
<summary>Whether the navigation window should be maximized</summary>
<description>Whether the navigation window should be maximized by default.</description>
</key>
<key type="b" name="start-with-location-bar">
<default>true</default>
<summary>Show location bar in new windows</summary>
<description>If set to true, newly opened windows will have the location bar visible.</description>
</key>
</schema>
</schemalist>
......@@ -22,7 +22,6 @@
#include <config.h>
#include <eel/eel-debug.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-lib-self-check-functions.h>
#include <eel/eel-self-checks.h>
#include <gdk/gdk.h>
......
/* eel-art-extensions.c - implementation of libart extension functions.
*
* Copyright (C) 2000 Eazel, Inc.
*
* The Gnome Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* The Gnome Library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the Gnome Library; see the file COPYING.LIB. If not,
* see <http://www.gnu.org/licenses/>.
*
* Authors: Darin Adler <darin@eazel.com>
* Ramiro Estrugo <ramiro@eazel.com>
*/
#include <config.h>
#include "eel-art-extensions.h"
#include "eel-lib-self-check-functions.h"
#include <math.h>
const EelDRect eel_drect_empty = { 0.0, 0.0, 0.0, 0.0 };
const EelIRect eel_irect_empty = { 0, 0, 0, 0 };
static void
eel_irect_copy (EelIRect *dest,
const EelIRect *src)
{
dest->x0 = src->x0;
dest->y0 = src->y0;
dest->x1 = src->x1;
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,
const EelIRect *src2)
{
if (eel_irect_is_empty (src1))
{
eel_irect_copy (dest, src2);
}
else if (eel_irect_is_empty (src2))
{
eel_irect_copy (dest, src1);
}
else
{
dest->x0 = MIN (src1->x0, src2->x0);
dest->y0 = MIN (src1->y0, src2->y0);
dest->x1 = MAX (src1->x1, src2->x1);
dest->y1 = MAX (src1->y1, src2->y1);
}
}
static void
eel_irect_intersect (EelIRect *dest,
const EelIRect *src1,
const EelIRect *src2)
{
dest->x0 = MAX (src1->x0, src2->x0);
dest->y0 = MAX (src1->y0, src2->y0);
dest->x1 = MIN (src1->x1, src2->x1);
dest->y1 = MIN (src1->y1, src2->y1);
}
/**
* eel_irect_get_width:
*
* @rectangle: An EelIRect.
*
* Returns: The width of the rectangle.
*
*/
int
eel_irect_get_width (EelIRect rectangle)
{
return rectangle.x1 - rectangle.x0;
}
/**
* eel_irect_get_height:
*
* @rectangle: An EelIRect.
*
* Returns: The height of the rectangle.
*
*/
int
eel_irect_get_height (EelIRect rectangle)
{
return rectangle.y1 - rectangle.y0;
}
static void
eel_drect_copy (EelDRect *dest,
const EelDRect *src)
{
dest->x0 = src->x0;
dest->y0 = src->y0;
dest->x1 = src->x1;
dest->y1 = src->y1;
}
static gboolean
eel_drect_is_empty (const EelDRect *src)
{
return (src->x1 <= src->x0 || src->y1 <= src->y0);
}
void
eel_drect_union (EelDRect *dest,
const EelDRect *src1,
const EelDRect *src2)
{
if (eel_drect_is_empty (src1))
{
eel_drect_copy (dest, src2);
}
else if (eel_drect_is_empty (src2))
{
eel_drect_copy (dest, src1);
}
else
{
dest->x0 = MIN (src1->x0, src2->x0);
dest->y0 = MIN (src1->y0, src2->y0);
dest->x1 = MAX (src1->x1, src2->x1);
dest->y1 = MAX (src1->y1, src2->y1);
}
}
gboolean
eel_irect_hits_irect (EelIRect rectangle_a,
EelIRect rectangle_b)
{
EelIRect intersection;
eel_irect_intersect (&intersection, &rectangle_a, &rectangle_b);
return !eel_irect_is_empty (&intersection);
}
gboolean
eel_irect_equal (EelIRect rectangle_a,
EelIRect rectangle_b)
{
return rectangle_a.x0 == rectangle_b.x0
&& rectangle_a.y0 == rectangle_b.y0
&& rectangle_a.x1 == rectangle_b.x1
&& rectangle_a.y1 == rectangle_b.y1;
}
EelIRect
eel_irect_offset_by (EelIRect rectangle,
int x,
int y)
{
rectangle.x0 += x;
rectangle.x1 += x;
rectangle.y0 += y;
rectangle.y1 += y;
return rectangle;
}
EelIRect
eel_irect_scale_by (EelIRect rectangle,
double scale)
{
rectangle.x0 *= scale;
rectangle.x1 *= scale;
rectangle.y0 *= scale;
rectangle.y1 *= scale;
return rectangle;
}
/* eel-art-extensions.h - interface of libart extension functions.
Copyright (C) 2000 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
see <http://www.gnu.org/licenses/>.
Authors: Darin Adler <darin@eazel.com>
Ramiro Estrugo <ramiro@eazel.com>
*/
#pragma once
#include <glib.h>
G_BEGIN_DECLS
typedef struct {
double x0, y0, x1, y1;
} EelDRect;
typedef struct {
/*< public >*/
int x0, y0, x1, y1;
} EelIRect;
extern const EelDRect eel_drect_empty;
extern const EelIRect eel_irect_empty;
void eel_irect_union (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,
EelIRect rectangle_b);
EelIRect eel_irect_offset_by (EelIRect rectangle,
int x,
int y);
EelIRect eel_irect_scale_by (EelIRect rectangle,
double scale);
int eel_irect_get_width (EelIRect rectangle);
int eel_irect_get_height (EelIRect rectangle);
void eel_drect_union (EelDRect *dest,
const EelDRect *src1,
const EelDRect *src2);
G_END_DECLS
\ No newline at end of file
/* eel-glib-extensions.h - interface for new functions that conceptually
belong in glib. Perhaps some of these will be
actually rolled into glib someday.
Copyright (C) 2000 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
see <http://www.gnu.org/licenses/>.
Authors: John Sullivan <sullivan@eazel.com>
*/
#pragma once
#include <glib.h>
/* A gboolean variant for bit fields. */
typedef guint eel_boolean_bit;
/* Eel - pixbuf manipulation routines for graphical effects.
*
* Copyright (C) 2000 Eazel, Inc
*
* Author: Andy Hertzfeld <andy@eazel.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
/* This file contains pixbuf manipulation routines used for graphical effects like pre-lighting
* and selection hilighting */
#include <config.h>
#include "eel-graphic-effects.h"
#include "eel-glib-extensions.h"
#include <math.h>
#include <string.h>
/* shared utility to create a new pixbuf from the passed-in one */
static GdkPixbuf *
create_new_pixbuf (GdkPixbuf *src)
{
g_assert (gdk_pixbuf_get_colorspace (src) == GDK_COLORSPACE_RGB);
g_assert ((!gdk_pixbuf_get_has_alpha (src)
&& gdk_pixbuf_get_n_channels (src) == 3)
|| (gdk_pixbuf_get_has_alpha (src)
&& gdk_pixbuf_get_n_channels (src) == 4));
return gdk_pixbuf_new (gdk_pixbuf_get_colorspace (src),
gdk_pixbuf_get_has_alpha (src),
gdk_pixbuf_get_bits_per_sample (src),
gdk_pixbuf_get_width (src),
gdk_pixbuf_get_height (src));
}
/* utility routine to bump the level of a color component with pinning */
const int HOVER_COMPONENT_ADDITION = 15;
static guchar
lighten_component (guchar cur_value)
{
int new_value = cur_value;
new_value = cur_value + HOVER_COMPONENT_ADDITION;
if (new_value > 255)
{
new_value = 255;
}
return (guchar) new_value;
}
GdkPixbuf *
eel_create_spotlight_pixbuf (GdkPixbuf *src)
{
GdkPixbuf *dest;
int i, j;
int width, height, has_alpha, src_row_stride, dst_row_stride;
guchar *target_pixels, *original_pixels;
guchar *pixsrc, *pixdest;
g_return_val_if_fail (gdk_pixbuf_get_colorspace (src) == GDK_COLORSPACE_RGB, NULL);
g_return_val_if_fail ((!gdk_pixbuf_get_has_alpha (src)
&& gdk_pixbuf_get_n_channels (src) == 3)
|| (gdk_pixbuf_get_has_alpha (src)
&& gdk_pixbuf_get_n_channels (src) == 4), NULL);
g_return_val_if_fail (gdk_pixbuf_get_bits_per_sample (src) == 8, NULL);
dest = create_new_pixbuf (src);
has_alpha = gdk_pixbuf_get_has_alpha (src);
width = gdk_pixbuf_get_width (src);
height = gdk_pixbuf_get_height (src);
dst_row_stride = gdk_pixbuf_get_rowstride (dest);
src_row_stride = gdk_pixbuf_get_rowstride (src);
target_pixels = gdk_pixbuf_get_pixels (dest);
original_pixels = gdk_pixbuf_get_pixels (src);
for (i = 0; i < height; i++)
{
pixdest = target_pixels + i * dst_row_stride;
pixsrc = original_pixels + i * src_row_stride;
for (j = 0; j < width; j++)
{
*pixdest++ = lighten_component (*pixsrc++);
*pixdest++ = lighten_component (*pixsrc++);
*pixdest++ = lighten_component (*pixsrc++);
if (has_alpha)
{
*pixdest++ = *pixsrc++;
}
}
}
return dest;
}
/* This routine colorizes %src by multiplying each pixel with colors in %dest. */
GdkPixbuf *
eel_create_colorized_pixbuf (GdkPixbuf *src,
GdkPixbuf *dest)
{
int i, j;
int width, height, has_alpha, src_row_stride, dst_row_stride;
guchar *target_pixels;
guchar *original_pixels;
guchar *pixsrc;
guchar *pixdest;
g_return_val_if_fail (gdk_pixbuf_get_colorspace (src) == GDK_COLORSPACE_RGB, NULL);
g_return_val_if_fail (gdk_pixbuf_get_colorspace (dest) == GDK_COLORSPACE_RGB, NULL);
g_return_val_if_fail ((!gdk_pixbuf_get_has_alpha (src)
&& gdk_pixbuf_get_n_channels (src) == 3)
|| (gdk_pixbuf_get_has_alpha (src)
&& gdk_pixbuf_get_n_channels (src) == 4), NULL);
g_return_val_if_fail ((!gdk_pixbuf_get_has_alpha (dest)
&& gdk_pixbuf_get_n_channels (dest) == 3)
|| (gdk_pixbuf_get_has_alpha (dest)
&& gdk_pixbuf_get_n_channels (dest) == 4), NULL);
g_return_val_if_fail (gdk_pixbuf_get_bits_per_sample (src) == 8, NULL);
g_return_val_if_fail (gdk_pixbuf_get_bits_per_sample (dest) == 8, NULL);
has_alpha = gdk_pixbuf_get_has_alpha (src);
width = gdk_pixbuf_get_width (src);
height = gdk_pixbuf_get_height (src);
src_row_stride = gdk_pixbuf_get_rowstride (src);
dst_row_stride = gdk_pixbuf_get_rowstride (dest);
target_pixels = gdk_pixbuf_get_pixels (dest);
original_pixels = gdk_pixbuf_get_pixels (src);
for (i = 0; i < height; i++)
{
pixdest = target_pixels + i * dst_row_stride;
pixsrc = original_pixels + i * src_row_stride;
for (j = 0; j < width; j++)
{
*pixdest = ((*pixsrc++) * (*pixdest)) >> 8;
pixdest++;
*pixdest = ((*pixsrc++) * (*pixdest)) >> 8;
pixdest++;
*pixdest = ((*pixsrc++) * (*pixdest)) >> 8;
pixdest++;
if (has_alpha)
{
*pixdest++ = *pixsrc++;
}
}
}
return dest;
}
/*
eel-graphic-effects.h: Pixmap manipulation routines for graphical effects.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; if not, see <http://www.gnu.org/licenses/>.
Authors: Andy Hertzfeld <andy@eazel.com>
*/
#pragma once
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
/* return a lightened pixbuf for pre-lighting */
GdkPixbuf *eel_create_spotlight_pixbuf (GdkPixbuf *source_pixbuf);
/* return a pixbuf colorized with the color specified by the parameters */
GdkPixbuf* eel_create_colorized_pixbuf (GdkPixbuf *source_pixbuf,
GdkPixbuf *dest);
......@@ -110,32 +110,6 @@ eel_check_boolean_result (gboolean result,
eel_after_check ();
}
void
eel_check_rectangle_result (EelIRect result,
int expected_x0,
int expected_y0,
int expected_x1,
int expected_y1)
{
if (result.x0 != expected_x0
|| result.y0 != expected_y0
|| result.x1 != expected_x1
|| result.y1 != expected_y1)
{
eel_report_check_failure (g_strdup_printf ("x0=%d, y0=%d, x1=%d, y1=%d",
result.x0,
result.y0,
result.x1,
result.y1),
g_strdup_printf ("x0=%d, y0=%d, x1=%d, y1=%d",
expected_x0,
expected_y0,
expected_x1,
expected_y1));
}
eel_after_check ();
}
void
eel_check_integer_result (long result,
long expected)
......@@ -148,18 +122,6 @@ eel_check_integer_result (long result,
eel_after_check ();
}
void
eel_check_double_result (double result,
double expected)
{
if (result != expected)
{
eel_report_check_failure (g_strdup_printf ("%f", result),
g_strdup_printf ("%f", expected));
}
eel_after_check ();
}
void
eel_check_string_result (char *result,
const char *expected)
......
......@@ -22,7 +22,6 @@
#pragma once
#include <glib.h>
#include <eel/eel-art-extensions.h>
#define EEL_CHECK_RESULT(type, expression, expected_value) \
G_STMT_START { \
......@@ -34,15 +33,8 @@ G_STMT_START { \
EEL_CHECK_RESULT(boolean, expression, expected_value)
#define EEL_CHECK_INTEGER_RESULT(expression, expected_value) \
EEL_CHECK_RESULT(integer, expression, expected_value)
#define EEL_CHECK_DOUBLE_RESULT(expression, expected_value) \
EEL_CHECK_RESULT(double, expression, expected_value)
#define EEL_CHECK_STRING_RESULT(expression, expected_value) \
EEL_CHECK_RESULT(string, expression, expected_value)
#define EEL_CHECK_RECTANGLE_RESULT(expression, expected_x0, expected_y0, expected_x1, expected_y1) \
G_STMT_START { \
eel_before_check (#expression, __FILE__, __LINE__); \
eel_check_rectangle_result (expression, expected_x0, expected_y0, expected_x1, expected_y1); \
} G_STMT_END
void eel_exit_if_self_checks_failed (void);
void eel_before_check_function (const char *name);
......@@ -59,13 +51,6 @@ void eel_check_boolean_result (gboolean result,
gboolean expected_value);
void eel_check_integer_result (long result,
long expected_value);
void eel_check_double_result (double result,
double expected_value);
void eel_check_rectangle_result (EelIRect result,
int expected_x0,
int expected_y0,
int expected_x1,
int expected_y1);
void eel_check_string_result (char *result,
const char *expected_value);
......
......@@ -22,8 +22,6 @@
#include <config.h>
#include "eel-stock-dialogs.h"
#include "eel-glib-extensions.h"
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <libadwaita-1/adwaita.h>
......
......@@ -27,7 +27,6 @@
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <eel-glib-extensions.h>
#if !defined (EEL_OMIT_SELF_CHECK)
#include "eel-lib-self-check-functions.h"
......
......@@ -25,7 +25,6 @@
#include <config.h>
#include "eel-vfs-extensions.h"
#include "eel-glib-extensions.h"
#include "eel-lib-self-check-functions.h"
#include <glib.h>
......@@ -75,38 +74,6 @@ eel_uri_is_other_locations (const char *uri)
return g_str_has_prefix (uri, "other-locations:");
}
gboolean
eel_uri_is_in_xdg_dirs (const gchar *uri)
{
GUserDirectory dir;
g_autoptr (GFile) location = NULL;
gboolean has_prefix = FALSE;
location = g_file_new_for_uri (uri);
for (dir = 0; dir < G_USER_N_DIRECTORIES; dir++)
{
g_autoptr (GFile) xdg_dir_location = NULL;
const gchar *path;
path = g_get_user_special_dir (dir);
if (path == NULL)
{
continue;
}
xdg_dir_location = g_file_new_for_path (path);
has_prefix = g_file_has_prefix (location, xdg_dir_location) ||
g_file_equal (location, xdg_dir_location);
if (has_prefix)
{
break;
}
}
return has_prefix;
}
/**
* eel_filename_get_extension_offset:
* @filename: a null-terminated string representing the basename of a file, with
......
......@@ -39,7 +39,6 @@ gboolean eel_uri_is_trash_root (const char *
gboolean eel_uri_is_search (const char *uri);
gboolean eel_uri_is_other_locations (const char *uri);
gboolean eel_uri_is_recent (const char *uri);
gboolean eel_uri_is_in_xdg_dirs (const char *uri);
char * eel_filename_strip_extension (const char *filename);
void eel_filename_get_rename_region (const char *filename,
......
/* eel.h
Copyright (C) 2001 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
see <http://www.gnu.org/licenses/>.
Authors: Maciej Stachowiak <mjs@eazel.com>
*/
#pragma once
#include <eel/eel-art-extensions.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-graphic-effects.h>
#include <eel/eel-self-checks.h>
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-string.h>
#include <eel/eel-vfs-extensions.h>