Skip to content
Commits on Source (174)
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
variables:
GIT_SUBMODULE_STRATEGY: normal
BUNDLE: "nautilus-dev.flatpak"
stages:
- image
- test
- deploy
flatpak:
extends: '.flatpak'
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Nautilus.yml"
FLATPAK_MODULE: "nautilus"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
APP_ID: "org.gnome.NautilusDevel"
nightly:
extends: '.publish_nightly'
dependencies:
- flatpak
style check:
image: registry.gitlab.gnome.org/gnome/nautilus:latest
stage: test
artifacts:
name: 'Style check artifacts'
expose_as: 'Get style check diff here'
when: on_failure
paths:
- 'uncrustify.diff'
expire_in: 14 days
script:
- LANG=C.utf8 data/run-uncrustify.sh
- git diff --exit-code | tee uncrustify.diff
except:
- /^gnome-.*$/
update image:
variables:
STORAGE_DRIVER: vfs
BUILDAH_FORMAT: docker
BUILDAH_ISOLATION: chroot
image: registry.fedoraproject.org/fedora:latest
stage: image
script:
- dnf install -y buildah runc
- sed -i '/^mountopt =.*/d' /etc/containers/storage.conf
- buildah bud --tag $CI_REGISTRY_IMAGE -f .gitlab/Dockerfile
- buildah tag $CI_REGISTRY_IMAGE "$CI_REGISTRY_IMAGE:v$CI_JOB_ID"
- buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD $CI_REGISTRY_IMAGE
- buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD "$CI_REGISTRY_IMAGE:v$CI_JOB_ID"
when: manual
only:
- web
- master
except:
variables:
- $CI_PROJECT_NAMESPACE != "GNOME"
FROM fedora:latest
RUN dnf install --nogpg -y dnf-plugins-core findutils git \
&& dnf builddep --nogpg -y uncrustify \
&& dnf clean all \
&& git clone --depth 1 https://github.com/uncrustify/uncrustify.git \
&& cd uncrustify \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr .. \
&& make \
&& make install \
&& cd ../.. \
&& rm -rf uncrustify
<!--
Please test if the issue has already been fixed in the Nightly version.
You can install the Nightly version in parallel with the regular version with these instructions:
1. Make sure that Flatpak is installed (see https://flatpak.org/setup )
2. Copy and run the following command in a Terminal:
flatpak install --from https://nightly.gnome.org/repo/appstream/org.gnome.NautilusDevel.flatpakref
3) The Nightly version can now be launched from Activities, or with this command: flatpak run org.gnome.NautilusDevel
-->
# Affected version
- Nightly flatpak: Yes / No / Can't test it because <!-- Delete the unwanted anwsers -->
- Other: <!-- Write the distribution you’re using and the version of the app. -->
# Steps to reproduce
<!--
Explain in detail the steps on how the issue can be reproduced.
-->
1.
2.
3.
# Current behavior
<!-- Describe the current behavior. -->
# Expected behavior
<!-- Describe the expected behavior. -->
# Additional information
<!--
Provide more information that could be relevant.
If the issue is a crash, provide a stack trace following the steps in:
https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces
-->
<!-- Ignore the text under this line. -->
/label ~"1. Bug"
### Use cases
<!-- Describe what problem(s) the user is experiencing and that this request
is trying to solve. -->
### Desired behavior
<!-- Describe the desired functionality. -->
### Benefits of the solution
<!-- List the possible benefits of the solution and how it fits in the project. -->
### Possible drawbacks
<!--
Describe possible drawbacks of the feature and list how it could affect
the project i.e. UI discoverability, complexity, impact in more or less
number of users, etc.
-->
<!-- Ignore the text under this line. -->
/label ~"1. Feature"
Major changes in 40.2
Major changes in 41.1
=====================
* Cache Scripts and New Document menus to avoid lags (António Fernandes)
* Ellipsize subtitle label in trash bar to reduce minimum width (António Fernandes)
* Fix build with meson 0.60.0 (Albert Vaca Cintora)
* Don't change action when unchecking in File Conflict dialog (António Fernandes)
* Fix progress reporting when skipping during extraction (Ondrej Holy)
* Offer skipping in case of extraction failure only when there are more files (Ondrej Holy)
* Remove leftover files after extraction failure (Ondrej Holy)
* Set keyboard focus on the row with the selected archive format (Clyde Laforge)
* Translation updates
Major changes in 41.0
=====================
* Translation updates
Major changes in 41.rc
=========================
* Disable background "Properties" while searching (Felipe Borges)
* Don't duplicate set wallpaper when not using portal (Barnabás Pőcze)
* Translation updates (GNOME Translation Project contributors)
Major changes in 41.beta
=========================
* Fix comma placement in the floating status bar (Nick Montalbano)
* Use standard::edit-name attribute where appropriate (Anubhav Tyagi)
* Bring "Open with..." options together in context menu (Luis Bosque)
* Fix "Compress..." acting on file that was not the selected one (Anubhav Tyagi)
* Redesign "Compress..." dialog (Ondrej Holy, Allan Day)
* Provide creation of password-protected ZIP archives (Ondrej Holy)
* Fix search by date not working with Tracker engine (Nishit Patel)
* Add link to Privacy Settings from Trash (Eric Daigle)
* Indicate whether trash automatic emptying is enabled (Eric Daigle)
* Translation updates (GNOME Translation Project contributors)
Major changes in 41.alpha
=========================
* Replace deprecated gexiv2 symbols (Ondrej Holy)
* Make NautilusWindowSlot non-derivable (António Fernandes, Ernestas Kulik)
* Prevent closing popover when "Show Hidden Files" is toggled (Rodrigo Pedro)
* Hand preview updating over to FilesView (António Fernandes)
* Provide source .svg icon (Jakub Steiner)
* Fix missing "Open Scripts Folder" menu item (Ondrej Holy)
* Prevent reopening of previewer on window focus (Felipe Borges)
* Keep working directory when executing scripts (António Fernandes)
......
......@@ -34,9 +34,9 @@
"buildsystem": "cmake-ninja",
"sources": [
{
"type": "archive",
"url": "https://github.com/Exiv2/exiv2/archive/v0.26.tar.gz",
"sha256": "51cffa8d19d67e1da6c1d0f570a75b8f6c814113367318c2c0407691888c5f01"
"type": "git",
"url": "https://github.com/Exiv2/exiv2.git",
"branch": "0.27-maintenance"
}
]
},
......@@ -46,13 +46,16 @@
"builddir": true,
"config-opts": [
"--libdir=/app/lib",
"-Ddisable-introspection=True"
"-Dintrospection=false",
"-Dvapi=false",
"-Dpython3=false",
"-Dpython3_girdir=no"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/gexiv2.git",
"tag": "gexiv2-0.10.10"
"branch": "gexiv2-0.12"
}
]
},
......@@ -100,6 +103,8 @@
},
{
"name": "gnome-autoar",
"buildsystem": "meson",
"builddir": true,
"sources": [
{
"type": "git",
......
......@@ -30,19 +30,22 @@ modules:
- "-DCMAKE_INSTALL_LIBDIR=/app/lib"
buildsystem: cmake-ninja
sources:
- type: archive
url: https://github.com/Exiv2/exiv2/archive/v0.26.tar.gz
sha256: 51cffa8d19d67e1da6c1d0f570a75b8f6c814113367318c2c0407691888c5f01
- type: git
url: https://github.com/Exiv2/exiv2.git
branch: 0.27-maintenance
- name: gexiv2
buildsystem: meson
builddir: true
config-opts:
- "--libdir=/app/lib"
- "-Ddisable-introspection=True"
- "-Dintrospection=false"
- "-Dvapi=false"
- "-Dpython3=false"
- "-Dpython3_girdir=no"
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/gexiv2.git
tag: gexiv2-0.10.10
tag: gexiv2-0.12
- name: tracker-miners
buildsystem: meson
cleanup:
......@@ -73,6 +76,8 @@ modules:
- 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
......
---
app-id: org.gnome.NautilusDevel
runtime: org.gnome.Platform
runtime-version: master
sdk: org.gnome.Sdk
command: nautilus
tags:
- devel
- development
- nightly
finish-args:
- "--share=ipc"
- "--socket=x11"
- "--socket=wayland"
- "--talk-name=org.gnome.OnlineAccounts"
- "--filesystem=host"
- "--talk-name=org.gtk.vfs"
- "--talk-name=org.gtk.vfs.*"
- "--filesystem=xdg-run/gvfsd"
- "--filesystem=xdg-run/dconf"
- "--filesystem=~/.config/dconf:ro"
- "--talk-name=ca.desrt.dconf"
- "--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: archive
url: https://github.com/Exiv2/exiv2/archive/v0.26.tar.gz
sha256: 51cffa8d19d67e1da6c1d0f570a75b8f6c814113367318c2c0407691888c5f01
- name: gexiv2
buildsystem: meson
builddir: true
config-opts:
- "--libdir=/app/lib"
- "-Dintrospection=false"
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/gexiv2.git
- 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
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/gnome-autoar.git
- name: libportal
buildsystem: meson
builddir: true
config-opts:
- "--libdir=/app/lib"
- "--buildtype=debugoptimized"
sources:
- type: git
url: https://github.com/flatpak/libportal.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
/lineup-parameters
/nautilus-autorun-software.desktop
/org.freedesktop.FileManager1.service
/org.gnome.Nautilus.appdata.xml
......
#!/usr/bin/env python3
#
# Copyright © 2019 Michael Catanzaro <mcatanzaro@gnome.org>
#
# 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 3 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/>.
# Based on original C lineup-parameters by Sébastien Wilmet <swilmet@gnome.org>
# Rewritten in Python to allow simple execution from source directory.
#
# Usage: lineup-parameters [file]
# If the file is not given, stdin is read.
# The result is printed to stdout.
#
# The restrictions:
# - The function name must be at column 0, followed by a space and an opening
# parenthesis;
# - One parameter per line;
# - A parameter must follow certain rules (see the regex in the code), but it
# doesn't accept all possibilities of the C language.
# - The opening curly brace ("{") of the function must also be at column 0.
#
# If one restriction is missing, the function declaration is not modified.
#
# Example:
#
# gboolean
# frobnitz (Frobnitz *frobnitz,
# gint magic_number,
# GError **error)
# {
# ...
# }
#
# Becomes:
#
# gboolean
# frobnitz (Frobnitz *frobnitz,
# gint magic_number,
# GError **error)
# {
# ...
# }
#
# TODO: support "..." vararg parameter
import argparse
import re
import sys
from typing import NamedTuple
# https://regexr.com/ is your friend.
functionNameRegex = re.compile(r'^(\w+) ?\(')
parameterRegex = re.compile(
r'^\s*(?P<type>(const\s+)?\w+)'
r'\s+(?P<stars>\**)'
r'\s*(?P<name>\w+)'
r'\s*(?P<end>,|\))'
r'\s*$')
openingCurlyBraceRegex = re.compile(r'^{\s*$')
def matchFunctionName(line):
match = functionNameRegex.match(line)
if match:
functionName = match.group(1)
firstParamPosition = match.end(0)
return (functionName, firstParamPosition)
return (None, 0)
class ParameterInfo(NamedTuple):
paramType: str
name: str
numStars: int
isLastParameter: bool
def matchParameter(line):
_, firstParamPosition = matchFunctionName(line)
match = parameterRegex.match(line[firstParamPosition:])
if match is None:
return None
paramType = match.group('type')
assert(paramType is not None)
name = match.group('name')
assert(name is not None)
stars = match.group('stars')
numStars = len(stars) if stars is not None else 0
end = match.group('end')
isLastParameter = True if end is not None and end == ')' else False
return ParameterInfo(paramType, name, numStars, isLastParameter)
def matchOpeningCurlyBrace(line):
return True if openingCurlyBraceRegex.match(line) is not None else False
# Length returned is number of lines the declaration takes up
def getFunctionDeclarationLength(remainingLines):
for i in range(len(remainingLines)):
currentLine = remainingLines[i]
parameterInfo = matchParameter(currentLine)
if parameterInfo is None:
return 0
if parameterInfo.isLastParameter:
if i + 1 == len(remainingLines):
return 0
nextLine = remainingLines[i + 1]
if not matchOpeningCurlyBrace(nextLine):
return 0
return i + 1
return 0
def getParameterInfos(remainingLines, length):
parameterInfos = []
for i in range(length):
parameterInfos.append(matchParameter(remainingLines[i]))
return parameterInfos
def computeSpacing(parameterInfos):
maxTypeLength = 0
maxStarsLength = 0
for parameterInfo in parameterInfos:
maxTypeLength = max(maxTypeLength, len(parameterInfo.paramType))
maxStarsLength = max(maxStarsLength, parameterInfo.numStars)
return (maxTypeLength, maxStarsLength)
def printParameter(parameterInfo, maxTypeLength, maxStarsLength, outfile):
outfile.write(f'{parameterInfo.paramType:<{maxTypeLength + 1}}')
paramNamePaddedWithStars = f'{parameterInfo.name:*>{parameterInfo.numStars + len(parameterInfo.name)}}'
outfile.write(f'{paramNamePaddedWithStars:>{maxStarsLength + len(parameterInfo.name)}}')
def printFunctionDeclaration(remainingLines, length, useTabs, outfile):
functionName, _ = matchFunctionName(remainingLines[0])
assert(functionName is not None)
outfile.write(f'{functionName} (')
numSpacesToParenthesis = len(functionName) + 2
whitespace = ''
if useTabs:
tabs = ''.ljust(numSpacesToParenthesis // 8, '\t')
spaces = ''.ljust(numSpacesToParenthesis % 8)
whitespace = tabs + spaces
else:
whitespace = ''.ljust(numSpacesToParenthesis)
parameterInfos = getParameterInfos(remainingLines, length)
maxTypeLength, maxStarsLength = computeSpacing(parameterInfos)
numParameters = len(parameterInfos)
for i in range(numParameters):
parameterInfo = parameterInfos[i]
if i != 0:
outfile.write(whitespace)
printParameter(parameterInfo, maxTypeLength, maxStarsLength, outfile)
if i + 1 != numParameters:
outfile.write(',\n')
outfile.write(')\n')
def parseContents(infile, useTabs, outfile):
lines = infile.readlines()
i = 0
while i < len(lines):
line = lines[i]
functionName, _ = matchFunctionName(line)
if functionName is None:
outfile.write(line)
i += 1
continue
remainingLines = lines[i:]
length = getFunctionDeclarationLength(remainingLines)
if length == 0:
outfile.write(line)
i += 1
continue
printFunctionDeclaration(remainingLines, length, useTabs, outfile)
i += length
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description='Line up parameters of C functions')
parser.add_argument('infile', nargs='?',
type=argparse.FileType('r'),
default=sys.stdin,
help='input C source file')
parser.add_argument('-o', metavar='outfile', nargs='?',
type=argparse.FileType('w'),
default=sys.stdout,
help='where to output modified file')
parser.add_argument('--tabs', action='store_true',
help='whether use tab characters in the output')
args = parser.parse_args()
parseContents(args.infile, args.tabs, args.o)
args.infile.close()
args.o.close()
/*
* This file is part of gnome-c-utils.
*
* Copyright © 2013 Sébastien Wilmet <swilmet@gnome.org>
*
* gnome-c-utils 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 3 of the License, or
* (at your option) any later version.
*
* gnome-c-utils 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 gnome-c-utils. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Line up parameters of function declarations.
*
* Usage: lineup-parameters [file]
* If the file is not given, stdin is read.
* The result is printed to stdout.
*
* The restrictions:
* - The function name must be at column 0, followed by a space and an opening
* parenthesis;
* - One parameter per line;
* - A paramater must follow certain rules (see the regex in the code), but it
* doesn't accept all possibilities of the C language.
* - The opening curly brace ("{") of the function must also be at column 0.
*
* If one restriction is missing, the function declaration is not modified.
*
* Example:
*
* gboolean
* frobnitz (Frobnitz *frobnitz,
* gint magic_number,
* GError **error)
* {
* ...
* }
*
* Becomes:
*
* gboolean
* frobnitz (Frobnitz *frobnitz,
* gint magic_number,
* GError **error)
* {
* ...
* }
*/
/*
* Use with Vim:
*
* Although this script can be used in Vim (or other text editors), a Vim plugin
* exists:
* http://damien.lespiau.name/blog/2009/12/07/aligning-c-function-parameters-with-vim/
*
* You can use a selection:
* - place the cursor at the function's name;
* - press V to start the line selection;
* - press ]] to go to the "{";
* - type ":" followed by "!lineup-parameters".
*
* Note: the "{" is required in the selection, to detect that we are in a
* function declaration.
*
* You can easily map these steps with a keybinding (F8 in the example below).
* Note that I'm not a Vim expert, so there is maybe a better way to configure
* this stuff.
*
* function! LineupParameters()
* let l:winview = winsaveview()
* execute "normal {V]]:!lineup-parameters\<CR>"
* call winrestview(l:winview)
* endfunction
*
* autocmd Filetype c map <F8> :call LineupParameters()<CR>
*/
/* TODO support "..." vararg parameter. */
#include <gio/gio.h>
#include <gio/gunixinputstream.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <unistd.h>
#define USE_TABS FALSE
typedef struct
{
gchar *type;
guint nb_stars;
gchar *name;
} ParameterInfo;
static void
parameter_info_free (ParameterInfo *param_info)
{
g_free (param_info->type);
g_free (param_info->name);
g_slice_free (ParameterInfo, param_info);
}
static gboolean
match_function_name (const gchar *line,
gchar **function_name,
gint *first_param_pos)
{
static GRegex *regex = NULL;
GMatchInfo *match_info;
gint end_pos;
gboolean match = FALSE;
if (G_UNLIKELY (regex == NULL))
regex = g_regex_new ("^(\\w+) ?\\(", G_REGEX_OPTIMIZE, 0, NULL);
g_regex_match (regex, line, 0, &match_info);
if (g_match_info_matches (match_info) &&
g_match_info_fetch_pos (match_info, 1, NULL, &end_pos) &&
g_match_info_fetch_pos (match_info, 0, NULL, first_param_pos))
{
match = TRUE;
if (function_name != NULL)
*function_name = g_strndup (line, end_pos);
}
g_match_info_free (match_info);
return match;
}
static gboolean
match_parameter (gchar *line,
ParameterInfo **info,
gboolean *is_last_parameter)
{
static GRegex *regex = NULL;
GMatchInfo *match_info;
gint start_pos = 0;
if (G_UNLIKELY (regex == NULL))
regex = g_regex_new ("^\\s*(?<type>(const\\s+)?\\w+)\\s+(?<stars>\\**)\\s*(?<name>\\w+)\\s*(?<end>,|\\))\\s*$",
G_REGEX_OPTIMIZE,
0,
NULL);
if (is_last_parameter != NULL)
*is_last_parameter = FALSE;
match_function_name (line, NULL, &start_pos);
g_regex_match (regex, line + start_pos, 0, &match_info);
if (!g_match_info_matches (match_info))
{
g_match_info_free (match_info);
return FALSE;
}
if (info != NULL)
{
gchar *stars;
*info = g_slice_new0 (ParameterInfo);
(*info)->type = g_match_info_fetch_named (match_info, "type");
(*info)->name = g_match_info_fetch_named (match_info, "name");
g_assert ((*info)->type != NULL);
g_assert ((*info)->name != NULL);
stars = g_match_info_fetch_named (match_info, "stars");
(*info)->nb_stars = strlen (stars);
g_free (stars);
}
if (is_last_parameter != NULL)
{
gchar *end = g_match_info_fetch_named (match_info, "end");
*is_last_parameter = g_str_equal (end, ")");
g_free (end);
}
g_match_info_free (match_info);
return TRUE;
}
static gboolean
match_opening_curly_brace (const gchar *line)
{
static GRegex *regex = NULL;
if (G_UNLIKELY (regex == NULL))
regex = g_regex_new ("^{\\s*$", G_REGEX_OPTIMIZE, 0, NULL);
return g_regex_match (regex, line, 0, NULL);
}
/* Returns the number of lines that take the function declaration.
* Returns 0 if not a function declaration. */
static guint
get_function_declaration_length (gchar **lines)
{
guint nb_lines = 1;
gchar **cur_line = lines;
while (*cur_line != NULL)
{
gboolean match_param;
gboolean is_last_param;
match_param = match_parameter (*cur_line, NULL, &is_last_param);
if (is_last_param)
{
gchar *next_line = *(cur_line + 1);
if (next_line == NULL ||
!match_opening_curly_brace (next_line))
return 0;
return nb_lines;
}
if (!match_param)
return 0;
nb_lines++;
cur_line++;
}
/* should not be reachable - but silences a compiler warning */
return 0;
}
static GSList *
get_list_parameter_infos (gchar **lines,
guint length)
{
GSList *list = NULL;
gint i;
for (i = length - 1; i >= 0; i--)
{
ParameterInfo *info = NULL;
match_parameter (lines[i], &info, NULL);
g_assert (info != NULL);
list = g_slist_prepend (list, info);
}
return list;
}
static void
compute_spacing (GSList *parameter_infos,
guint *max_type_length,
guint *max_stars_length)
{
GSList *l;
*max_type_length = 0;
*max_stars_length = 0;
for (l = parameter_infos; l != NULL; l = l->next)
{
ParameterInfo *info = l->data;
guint type_length = strlen (info->type);
if (type_length > *max_type_length)
*max_type_length = type_length;
if (info->nb_stars > *max_stars_length)
*max_stars_length = info->nb_stars;
}
}
static void
print_parameter (ParameterInfo *info,
guint max_type_length,
guint max_stars_length)
{
gint type_length;
gint nb_spaces;
gchar *spaces;
gchar *stars;
g_print ("%s", info->type);
type_length = strlen (info->type);
nb_spaces = max_type_length - type_length;
g_assert (nb_spaces >= 0);
spaces = g_strnfill (nb_spaces, ' ');
g_print ("%s ", spaces);
g_free (spaces);
nb_spaces = max_stars_length - info->nb_stars;
g_assert (nb_spaces >= 0);
spaces = g_strnfill (nb_spaces, ' ');
g_print ("%s", spaces);
g_free (spaces);
stars = g_strnfill (info->nb_stars, '*');
g_print ("%s", stars);
g_free (stars);
g_print ("%s", info->name);
}
static void
print_function_declaration (gchar **lines,
guint length)
{
gchar **cur_line = lines;
gchar *function_name;
gint nb_spaces_to_parenthesis;
GSList *parameter_infos;
GSList *l;
guint max_type_length;
guint max_stars_length;
gchar *spaces;
if (!match_function_name (*cur_line, &function_name, NULL))
g_error ("The line doesn't match a function name.");
g_print ("%s (", function_name);
nb_spaces_to_parenthesis = strlen (function_name) + 2;
if (USE_TABS)
{
gchar *tabs = g_strnfill (nb_spaces_to_parenthesis / 8, '\t');
gchar *spaces_after_tabs = g_strnfill (nb_spaces_to_parenthesis % 8, ' ');
spaces = g_strdup_printf ("%s%s", tabs, spaces_after_tabs);
g_free (tabs);
g_free (spaces_after_tabs);
}
else
{
spaces = g_strnfill (nb_spaces_to_parenthesis, ' ');
}
parameter_infos = get_list_parameter_infos (lines, length);
compute_spacing (parameter_infos, &max_type_length, &max_stars_length);
for (l = parameter_infos; l != NULL; l = l->next)
{
ParameterInfo *info = l->data;
if (l != parameter_infos)
g_print ("%s", spaces);
print_parameter (info, max_type_length, max_stars_length);
if (l->next != NULL)
g_print (",\n");
}
g_print (")\n");
g_free (function_name);
g_free (spaces);
g_slist_free_full (parameter_infos, (GDestroyNotify)parameter_info_free);
}
static void
parse_contents (gchar **lines)
{
gchar **cur_line = lines;
/* Skip the empty last line, to avoid adding an extra \n. */
for (cur_line = lines; cur_line[0] != NULL && cur_line[1] != NULL; cur_line++)
{
guint length;
if (!match_function_name (*cur_line, NULL, NULL))
{
g_print ("%s\n", *cur_line);
continue;
}
length = get_function_declaration_length (cur_line);
if (length == 0)
{
g_print ("%s\n", *cur_line);
continue;
}
print_function_declaration (cur_line, length);
cur_line += length - 1;
}
}
static gchar *
get_file_contents (gchar *arg)
{
GFile *file;
gchar *path;
gchar *contents;
GError *error = NULL;
file = g_file_new_for_commandline_arg (arg);
path = g_file_get_path (file);
g_file_get_contents (path, &contents, NULL, &error);
if (error != NULL)
g_error ("Impossible to get file contents: %s", error->message);
g_object_unref (file);
g_free (path);
return contents;
}
static gchar *
get_stdin_contents (void)
{
GInputStream *stream;
GString *string;
GError *error = NULL;
stream = g_unix_input_stream_new (STDIN_FILENO, FALSE);
string = g_string_new ("");
while (TRUE)
{
gchar buffer[4097] = { '\0' };
gssize nb_bytes_read = g_input_stream_read (stream, buffer, 4096, NULL, &error);
if (nb_bytes_read == 0)
break;
if (error != NULL)
g_error ("Impossible to read stdin: %s", error->message);
g_string_append (string, buffer);
}
g_input_stream_close (stream, NULL, NULL);
g_object_unref (stream);
return g_string_free (string, FALSE);
}
gint
main (gint argc,
gchar *argv[])
{
gchar *contents;
gchar **contents_lines;
setlocale (LC_ALL, "");
if (argc > 2)
{
g_printerr ("Usage: %s [file]\n", argv[0]);
return EXIT_FAILURE;
}
if (argc == 2)
contents = get_file_contents (argv[1]);
else
contents = get_stdin_contents ();
contents_lines = g_strsplit (contents, "\n", 0);
g_free (contents);
parse_contents (contents_lines);
return EXIT_SUCCESS;
}
......@@ -15,22 +15,11 @@ install_data(
po_dir = join_paths(meson.source_root(), 'po')
line_up_parameters = executable(
'lineup-parameters',
'lineup-parameters.c',
build_by_default: false,
dependencies: [
gio,
gio_unix,
]
)
desktop_conf = configuration_data()
desktop_conf.set('icon', application_id)
desktop = i18n.merge_file(
'desktop',
input: configure_file(
input: files('org.gnome.Nautilus.desktop.in.in'),
output: 'org.gnome.Nautilus.desktop.in',
......@@ -44,7 +33,6 @@ desktop = i18n.merge_file(
)
desktop_autorun_software = i18n.merge_file(
'desktop-autorun-software',
input: 'nautilus-autorun-software.desktop.in',
output: 'nautilus-autorun-software.desktop',
install: true,
......@@ -58,7 +46,6 @@ appdata_conf = configuration_data()
appdata_conf.set('appid', application_id)
appdata = i18n.merge_file(
'appdata',
input: configure_file(
input: files('org.gnome.Nautilus.appdata.xml.in.in'),
output: 'org.gnome.Nautilus.appdata.xml.in',
......
This diff is collapsed.
......@@ -27,7 +27,7 @@
<url type="translate">https://wiki.gnome.org/TranslationProject</url>
<launchable type="desktop-id">@appid@.desktop</launchable>
<releases>
<release version="40.2" date="2021-06-04" />
<release version="41.1" date="2021-10-30" />
</releases>
<project_group>GNOME</project_group>
<project_license>GPL-2.0+</project_license>
......
......@@ -65,6 +65,7 @@
<value value="0" nick="zip"/>
<value value="1" nick="tar.xz"/>
<value value="2" nick="7z"/>
<value value="3" nick="encrypted_zip"/>
</enum>
<schema path="/org/gnome/nautilus/" id="org.gnome.nautilus" gettext-domain="nautilus">
......@@ -174,7 +175,7 @@
</aliases>
<default>'icon-view'</default>
<summary>Default folder viewer</summary>
<description>When a folder is visited this viewer is used unless you have selected another view for that particular folder. Possible values are “list-view”, and “icon-view”.</description>
<description>When a folder is visited this viewer is used. Possible values are “list-view”, and “icon-view”.</description>
</key>
<key type="b" name="show-hidden-files">
<default>false</default>
......
......@@ -10,8 +10,7 @@ fi
if [ ! -x "$DATA/lineup-parameters" ];
then
echo "Script lineup-parameters does not exists here in (source directory)/data, probably because Nautilus was built in a different directory than the source directory.
Copy the program in the (build directory)/data/lineup-parameters here in (source directory)/data and run again run-uncrustify.sh."
echo "Script lineup-parameters does not exists."
exit 1
fi
......
nautilus (1:41.1-1ubuntu1) jammy; urgency=medium
* Resynchronize with Debian, remaining Ubuntu changes:
- debian/control.in:
+ Build-Depend on libunity-dev
+ lower gnome-sushi Recommends to a Suggests
- debian/changelog, debian/rules: set epoch number (which was added by
error)
- debian/source_nautilus.py,
debian/nautilus-data.install:
+ Apport hook to list versions of files in /usr/lib/nautilus and
reassign the crashes when they are not due to nautilus code directly
- debian/rules:
+ Build Unity support
+ Bump dbgsym migration version
- 04_suppress_umount_in_ltsp.patch:
+ Don't list unmount and eject actions on LTSP clients
- 12_unity_launcher_support.patch:
+ unity launcher integration (list bookmarks in the context menu,
display a bar on the icon during copies)
- 18_unity_icon_color.patch:
+ specify a background color for the unity launcher icon
- 19_unity_open_location_xid.patch:
+ Add a new dbus property to store the lists of opened locations
referenced by their parent nautilus window XID.
- ubuntu_infobars_color.patch:
+ set infobar type to "other" rather than "question" to avoid blue
cluebars
- ubuntu_backspace_behaviour.patch:
+ restore backspace behaviour to go back
* debian/patches: Refresh.
-- Sebastien Bacher <seb128@ubuntu.com> Thu, 11 Nov 2021 19:57:07 +0100
nautilus (41.1-1) unstable; urgency=medium
[ Jeremy Bicha ]
* New upstream release
* Drop patch since gexiv2 0.14 is in Debian
* debian/rules: fix incorrectly named meson build option
[ Laurent Bigonville ]
* debian/control.in: Bump libgexiv2-dev BD accordingly
-- Jeremy Bicha <jbicha@debian.org> Sun, 31 Oct 2021 15:49:05 -0400
nautilus (41.0-1) unstable; urgency=medium
* New upstream release
* debian/control.in: Bump minimum libgnome-autoar
* Add patch to revert a minor change that requires new gexiv2
-- Jeremy Bicha <jbicha@debian.org> Sat, 25 Sep 2021 21:13:46 -0400
nautilus (40.2-2) unstable; urgency=medium
* debian/rules: Set DPKG_GENSYMBOLS_CHECK_LEVEL = 4
* Release to unstable
-- Jeremy Bicha <jbicha@debian.org> Tue, 31 Aug 2021 07:30:19 -0400
nautilus (1:40.2-1ubuntu1) impish; urgency=medium
* Merge with Debian:
......
......@@ -7,7 +7,7 @@ Section: gnome
Priority: optional
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Uploaders: Dmitry Shachnev <mitya57@debian.org>, Jeremy Bicha <jbicha@debian.org>, Laurent Bigonville <bigon@debian.org>, Sebastien Bacher <seb128@debian.org>
Uploaders: Dmitry Shachnev <mitya57@debian.org>, Iain Lane <laney@debian.org>, Jeremy Bicha <jbicha@debian.org>, Laurent Bigonville <bigon@debian.org>, Sebastien Bacher <seb128@debian.org>
Build-Depends: appstream-util <!nocheck>,
dbus <!nocheck>,
debhelper-compat (= 13),
......@@ -18,11 +18,11 @@ Build-Depends: appstream-util <!nocheck>,
libatk1.0-dev (>= 1.32.0),
libfontconfig1-dev,
libgail-3-dev,
libgexiv2-dev (>= 0.10.0),
libgexiv2-dev (>= 0.12.2),
libgirepository1.0-dev (>= 0.10.7-1~),
libglib2.0-dev (>= 2.67.1),
libglib2.0-doc,
libgnome-autoar-0-dev (>= 0.3.0),
libgnome-autoar-0-dev (>= 0.4.0),
libgnome-desktop-3-dev (>= 3.10),
libgstreamer-plugins-base1.0-dev,
libgtk-3-dev (>= 3.22.27),
......
......@@ -14,11 +14,11 @@ Build-Depends: appstream-util <!nocheck>,
libatk1.0-dev (>= 1.32.0),
libfontconfig1-dev,
libgail-3-dev,
libgexiv2-dev (>= 0.10.0),
libgexiv2-dev (>= 0.12.2),
libgirepository1.0-dev (>= 0.10.7-1~),
libglib2.0-dev (>= 2.67.1),
libglib2.0-doc,
libgnome-autoar-0-dev (>= 0.3.0),
libgnome-autoar-0-dev (>= 0.4.0),
libgnome-desktop-3-dev (>= 3.10),
libgstreamer-plugins-base1.0-dev,
libgtk-3-dev (>= 3.22.27),
......
......@@ -2,7 +2,6 @@
pristine-tar = True
debian-branch = ubuntu/master
upstream-branch = upstream/latest
upstream-vcs-tag = %(version)s
debian-tag = ubuntu/%(version)s
[buildpackage]
......@@ -13,6 +12,7 @@ multimaint-merge = True
[import-orig]
postimport = dch -v%(version)s New upstream release; git add debian/changelog; debcommit
upstream-vcs-tag = %(version%~%.)s
[pq]
patch-numbers = False