Commit 0733b8d3 authored by madmurphy's avatar madmurphy
Browse files

Commit #12

parent 148e7f38
madmurphy333@gmail.com
madmurphy333 AT gmail DOT com
......@@ -2,6 +2,13 @@ Change Log
==========
## 1.0.0
Changes:
* Package review and fix this as the first stable major release (1.0.0)
## 0.1.6
Changes:
......
......@@ -25,6 +25,7 @@ EXTRA_DIST = \
README.md \
bootstrap \
package.json \
.editorconfig \
$(INTLTOOL_FILES)
DISTCLEANFILES = \
......@@ -34,6 +35,11 @@ DISTCLEANFILES = \
po/.intltool-merge-cache
# Shell expansion is supported here
_distclean_dirs_ = \
'po/backups'
if NLS_ENABLED
SUBDIRS += \
......@@ -52,5 +58,19 @@ uninstall-local:
-rm -r '$(DESTDIR)$(docdir)'
distclean-local:
-rm -rf $(_distclean_dirs_);
# Update translations
.PHONY: i18n-update
i18n-update:
(cd 'po' && intltool-update -p --gettext-package='$(PACKAGE_TARNAME)' \
&& mkdir -p 'backups' && grep -o '^\s*\w\S\+' 'LINGUAS' | while read \
coin; do mv "$${coin}.po" "$${coin}.po.bak" && msgmerge \
"$${coin}.po.bak" '$(PACKAGE_TARNAME).pot' > "$${coin}.po" && mv \
"$${coin}.po.bak" 'backups'; done; rm '$(PACKAGE_TARNAME).pot')
# EOF
......@@ -25,7 +25,7 @@ commands:
cd nautilus-bluetooth/po
intltool-update -p
msginit -l nl
rm nautilus-bluetooth.pot
rm NautilusBluetooth.pot
```
Now edit the `po/LINGUAS` file and add a new line containing the abbreviated
......@@ -34,6 +34,16 @@ name of the new language (`nl`).
Finally, open the file `po/nl.po` and translate the two strings above. All you
have to do now is to commit your changes.
If you want to update an existing Dutch translation to the most recent changes
in the extension source code, launch
``` sh
cd nautilus-bluetooth/po
intltool-update -p
mv nl.po nl.po.bak && msgmerge nl.po.bak NautilusBluetooth.pot > nl.po
rm NautilusBluetooth.pot nl.po.bak
```
For any issue, [drop me a message][1].
......
......@@ -9,7 +9,7 @@ dnl ***************************************************************************
AC_PREREQ([2.69])
AC_INIT([Nautilus Bluetooth],
[0.1.6],
[1.0.0],
[madmurphy333@gmail.com],
[nautilus-bluetooth],
[https://gitlab.gnome.org/madmurphy/nautilus-bluetooth])
......@@ -36,7 +36,8 @@ PKG_CHECK_MODULES([NAUTILUS_BLUETOOTH], [glib-2.0 libnautilus-extension])
AC_CHECK_PROG([HAVE_PKGCONFIG], [pkg-config], [yes], [no])
AS_IF([test "x${HAVE_PKGCONFIG}" = xno], [AC_MSG_ERROR([you need to have pkgconfig installed!])])
AS_IF([test "x${HAVE_PKGCONFIG}" = xno],
[AC_MSG_ERROR([you need to have pkgconfig installed!])])
dnl ***************************************************************************
......@@ -49,17 +50,24 @@ dnl BLUETOOTH_SENDTO argument variable
AC_DEFUN([DEFAULT_BLUETOOTH_SENDTO_PROG], [bluetooth-sendto])
dnl Register the BLUETOOTH_SENDTO argument variable...
AC_ARG_VAR([BLUETOOTH_SENDTO], [Bluetooth file sharing command; it must support the syntax BLUETOOTH_SENDTO file1 file2 file3 ... etc. @<:@default=BINDIR/]DEFAULT_BLUETOOTH_SENDTO_PROG[@:>@])
AC_ARG_VAR([BLUETOOTH_SENDTO],
[Bluetooth file sharing command; it must support the syntax BLUETOOTH_SENDTO file1 file2 file3 ... etc. @<:@default=BINDIR/]DEFAULT_BLUETOOTH_SENDTO_PROG[@:>@])
dnl First check whether a BLUETOOTH_SENDTO argument variable has been given; if
dnl not, check whether DEFAULT_BLUETOOTH_SENDTO_PROG is present in the system;
dnl if not, print an error message and stop configuring.
AS_IF([test "x${BLUETOOTH_SENDTO}" = x],
[AC_PATH_PROG([AUTO_BLUETOOTH_SENDTO_CMD], DEFAULT_BLUETOOTH_SENDTO_PROG)
AS_IF([test "x${BLUETOOTH_SENDTO}" = x], [
AC_PATH_PROG([AUTO_BLUETOOTH_SENDTO_CMD], DEFAULT_BLUETOOTH_SENDTO_PROG)
AS_IF([test "x${AUTO_BLUETOOTH_SENDTO_CMD}" = x],
[AC_MSG_ERROR(DEFAULT_BLUETOOTH_SENDTO_PROG[ utility not found. Please specify a BLUETOOTH_SENDTO argument variable before launching this configure script. For more information see ./configure --help])],
[AC_DEFINE_UNQUOTED([NAUTILUS_BLUETOOTH_SENDTO_CMD], ["${AUTO_BLUETOOTH_SENDTO_CMD}"], [Command invoked to send files via Bluetooth])])],
[AC_DEFINE_UNQUOTED([NAUTILUS_BLUETOOTH_SENDTO_CMD], ["${BLUETOOTH_SENDTO}"], [Command invoked to send files via Bluetooth])])
[AC_DEFINE_UNQUOTED([NAUTILUS_BLUETOOTH_SENDTO_CMD],
["${AUTO_BLUETOOTH_SENDTO_CMD}"],
[Command invoked to send files via Bluetooth])])
], [
AC_DEFINE_UNQUOTED([NAUTILUS_BLUETOOTH_SENDTO_CMD],
["${BLUETOOTH_SENDTO}"],
[Command invoked to send files via Bluetooth])
])
dnl ***************************************************************************
......@@ -71,11 +79,13 @@ IT_PROG_INTLTOOL([0.35.0])
AM_CONDITIONAL([NLS_ENABLED], [test "x${USE_NLS}" != xno])
AM_COND_IF([NLS_ENABLED],
[AC_SUBST([GETTEXT_PACKAGE], AC_PACKAGE_TARNAME)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [GETTEXT package name])
AM_COND_IF([NLS_ENABLED], [
AC_SUBST([GETTEXT_PACKAGE], AC_PACKAGE_TARNAME)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
["${GETTEXT_PACKAGE}"], [GETTEXT package name])
AM_GLIB_GNU_GETTEXT
AM_GLIB_DEFINE_LOCALEDIR([NAUTILUS_BLUETOOTH_LOCALEDIR])])
AM_GLIB_DEFINE_LOCALEDIR([NAUTILUS_BLUETOOTH_LOCALEDIR])
])
......@@ -84,7 +94,8 @@ dnl F I N A L I Z A T I O N
dnl ***************************************************************************
AC_SUBST([NAUTILUS_EXTENSION_DIR], [$($PKG_CONFIG --variable=extensiondir libnautilus-extension)])
AC_SUBST([NAUTILUS_EXTENSION_DIR],
["$($PKG_CONFIG --variable=extensiondir libnautilus-extension)"])
LT_INIT([disable-static])
......
{
"name": "nautilus-bluetooth",
"version": "0.1.6",
"version": "1.0.0",
"description": "A simple Nautilus extension that adds a \"Send via Bluetooth\" entry to Nautilus' right-click menu",
"homepage": "https://gitlab.gnome.org/madmurphy/nautilus-bluetooth",
"author": "madmurphy333@gmail.com",
......
# German translations for nautilus-bluetooth package.
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Copyright (C) 2019 <madmurphy333@gmail.com>
# This file is distributed under the same license as the nautilus-bluetooth
# package.
# Jannis Schmidt <jschmidt@posteo.de>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"Project-Id-Version: 1.0.0\n"
"Report-Msgid-Bugs-To: <madmurphy333@gmail.com>\n"
"POT-Creation-Date: 2019-09-05 19:47+0100\n"
"PO-Revision-Date: 2019-09-01 00:19+0200\n"
"Last-Translator: Jannis Schmidt <jschmidt@posteo.de>\n"
......
# Spanish translations for nautilus-bluetooth package.
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the nautilus-bluetooth package.
# Copyright (C) 2019 <madmurphy333@gmail.com>
# This file is distributed under the same license as the nautilus-bluetooth
# package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"Project-Id-Version: 1.0.0\n"
"Report-Msgid-Bugs-To: <madmurphy333@gmail.com>\n"
"POT-Creation-Date: 2019-09-05 19:47+0100\n"
"PO-Revision-Date: 2019-08-28 13:59+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
......
# French translations for nautilus-bluetooth package.
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the nautilus-bluetooth package.
# Copyright (C) 2019 <madmurphy333@gmail.com>
# This file is distributed under the same license as the nautilus-bluetooth
# package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"Project-Id-Version: 1.0.0\n"
"Report-Msgid-Bugs-To: <madmurphy333@gmail.com>\n"
"POT-Creation-Date: 2019-09-05 19:47+0100\n"
"PO-Revision-Date: 2019-08-28 13:59+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
......
# Italian translations for nautilus-bluetooth package.
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the nautilus-bluetooth package.
# Copyright (C) 2019 <madmurphy333@gmail.com>
# This file is distributed under the same license as the nautilus-bluetooth
# package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"Project-Id-Version: 1.0.0\n"
"Report-Msgid-Bugs-To: <madmurphy333@gmail.com>\n"
"POT-Creation-Date: 2019-09-05 19:47+0100\n"
"PO-Revision-Date: 2019-08-26 17:05+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
......
# Latin translations for nautilus-bluetooth package.
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the nautilus-bluetooth package.
# Copyright (C) 2019 <madmurphy333@gmail.com>
# This file is distributed under the same license as the nautilus-bluetooth
# package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"Project-Id-Version: 1.0.0\n"
"Report-Msgid-Bugs-To: <madmurphy333@gmail.com>\n"
"POT-Creation-Date: 2019-09-05 19:47+0100\n"
"PO-Revision-Date: 2019-08-28 02:30+0100\n"
"PO-Revision-Date: 2021-05-02 23:19+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Latin\n"
"Language: la\n"
......@@ -18,8 +19,8 @@ msgstr ""
#: ../src/nautilus-bluetooth.c:141
msgid "Send via Bluetooth"
msgstr "Mitte per Bluetooth"
msgstr "Mittere per Bluetooth"
#: ../src/nautilus-bluetooth.c:142
msgid "Send the selected files to a Bluetooth device"
msgstr "Mitte electos codicillos ad Bluetooth apparatum"
msgstr "Mittere electos codicillos ad Bluetooth apparatum"
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Turkish translations for nautilus-bluetooth package.
# Copyright (C) 2019 <madmurphy333@gmail.com>
# This file is distributed under the same license as the nautilus-bluetooth
# package.
# Cihan Alkan, 2020.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"Project-Id-Version: 1.0.0\n"
"Report-Msgid-Bugs-To: <madmurphy333@gmail.com>\n"
"POT-Creation-Date: 2020-07-11 15:03+0300\n"
"PO-Revision-Date: 2020-07-11 15:05+0300\n"
"Last-Translator: Cihan Alkan\n"
"Language-Team: Turkish <gnome-turk@gnome.org>\n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Last-Translator: Cihan Alkan\n"
"Language-Team: Turkish <gnome-turk@gnome.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.3.1\n"
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/* Please make sure that the TAB width in your editor is set to 4 spaces */
/*\
|*|
|*| nautilus-bluetooth.c
|*| nautilus-bluetooth.c
|*|
|*| https://gitlab.gnome.org/madmurphy/nautilus-bluetooth
|*| Copyright (C) 2019 Stefano Gioffr&eacute; <madmurphy333@gmail.com>
|*| https://gitlab.gnome.org/madmurphy/nautilus-bluetooth
|*|
|*| nautilus-bluetooth 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.
|*| Copyright (C) 2019 <madmurphy333@gmail.com>
|*|
|*| nautilus-bluetooth 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.
|*| **Nautilus Bluetooth** 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.
|*|
|*| You should have received a copy of the GNU General Public License along
|*| with this program. If not, see <http://www.gnu.org/licenses/>.
|*| **Nautilus Bluetooth** 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/>.
|*|
\*/
......@@ -33,17 +35,20 @@
#ifdef ENABLE_NLS
#include <glib/gi18n-lib.h>
#define I18N_INIT() \
bindtextdomain(GETTEXT_PACKAGE, NAUTILUS_BLUETOOTH_LOCALEDIR)
#else
#define _(STRING) STRING
#define I18N_INIT()
#endif
/*
GLOBAL TYPES AND VARIABLES
*/
/*\
|*|
|*| GLOBAL TYPES AND VARIABLES
|*|
\*/
typedef struct {
......@@ -60,11 +65,11 @@ static GObjectClass * parent_class;
/*
FUNCTIONS
*/
/*\
|*|
|*| FUNCTIONS
|*|
\*/
static void nautilus_bluetooth_sendto (
......@@ -72,8 +77,9 @@ static void nautilus_bluetooth_sendto (
gpointer v_unused
) {
GList * const file_selection = g_object_get_data((GObject *) menu_item, "nautilus_bluetooth_files");
const gsize argv_last = g_list_length(file_selection) + 1;
GList * const file_selection =
g_object_get_data((GObject *) menu_item, "nautilus_bluetooth_files");
const guint argv_last = g_list_length(file_selection) + 1;
gchar ** const argv = g_malloc((argv_last + 1) * sizeof(gchar *));
gsize idx = 1;
GError * spawnerr = NULL;
......@@ -87,7 +93,18 @@ static void nautilus_bluetooth_sendto (
}
if (!g_spawn_async(NULL, argv, NULL, G_SPAWN_DEFAULT, NULL, NULL, NULL, &spawnerr)) {
if (
!g_spawn_async(
NULL,
argv,
NULL,
G_SPAWN_DEFAULT,
NULL,
NULL,
NULL,
&spawnerr
)
) {
fprintf(stderr, "%s\n", spawnerr->message);
g_error_free(spawnerr);
......@@ -101,23 +118,6 @@ static void nautilus_bluetooth_sendto (
}
GType nautilus_bluetooth_get_type (void) {
return nautilus_bluetooth_type;
}
static void nautilus_bluetooth_class_init (
NautilusBluetoothClass * const nautilus_bluetooth_class,
gpointer class_data
) {
parent_class = g_type_class_peek_parent(nautilus_bluetooth_class);
}
static GList * nautilus_bluetooth_get_file_items (
NautilusMenuProvider * const provider,
GtkWidget * const window,
......@@ -151,7 +151,8 @@ static GList * nautilus_bluetooth_get_file_items (
);
g_object_set_data_full(
(GObject *) menu_item, "nautilus_bluetooth_files",
(GObject *) menu_item,
"nautilus_bluetooth_files",
nautilus_file_info_list_copy(file_selection),
(GDestroyNotify) nautilus_file_info_list_free
);
......@@ -163,7 +164,7 @@ static GList * nautilus_bluetooth_get_file_items (
static void nautilus_bluetooth_menu_provider_iface_init (
NautilusMenuProviderIface * const iface,
gpointer iface_data
gpointer const iface_data
) {
iface->get_file_items = nautilus_bluetooth_get_file_items;
......@@ -171,7 +172,19 @@ static void nautilus_bluetooth_menu_provider_iface_init (
}
static void nautilus_bluetooth_register_type (GTypeModule * const module) {
static void nautilus_bluetooth_class_init (
NautilusBluetoothClass * const nautilus_bluetooth_class,
gpointer class_data
) {
parent_class = g_type_class_peek_parent(nautilus_bluetooth_class);
}
static void nautilus_bluetooth_register_type (
GTypeModule * const module
) {
static const GTypeInfo info = {
sizeof(NautilusBluetoothClass),
......@@ -183,6 +196,7 @@ static void nautilus_bluetooth_register_type (GTypeModule * const module) {
sizeof(NautilusBluetooth),
0,
(GInstanceInitFunc) NULL,
(GTypeValueTable * ) NULL
};
static const GInterfaceInfo menu_provider_iface_info = {
......@@ -209,12 +223,18 @@ static void nautilus_bluetooth_register_type (GTypeModule * const module) {
}
void nautilus_module_initialize (GTypeModule * const module) {
GType nautilus_bluetooth_get_type (void) {
return nautilus_bluetooth_type;
}
#ifdef ENABLE_NLS
bindtextdomain(GETTEXT_PACKAGE, NAUTILUS_BLUETOOTH_LOCALEDIR);
#endif
void nautilus_module_initialize (
GTypeModule * const module
) {
I18N_INIT();
nautilus_bluetooth_register_type(module);
*provider_types = nautilus_bluetooth_get_type();
......@@ -228,7 +248,9 @@ void nautilus_module_shutdown (void) {
}
void nautilus_module_list_types (const GType ** types, int * num_types) {
void nautilus_module_list_types (
const GType ** const types,
int * const num_types) {
*types = provider_types;
*num_types = G_N_ELEMENTS(provider_types);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment