Commit ee889667 authored by madmurphy's avatar madmurphy
Browse files

Commit #6

parent 53ac46c8
......@@ -2,6 +2,14 @@ Change Log
==========
0.1.3
-----
Changes:
* Code review
0.1.2
-----
......
## Process this file with automake to produce Makefile.in
# Process this file with automake to produce Makefile.in
SUBDIRS = \
src
SUBDIRS = src po
dist_doc_DATA = \
AUTHORS \
......@@ -9,10 +11,12 @@ dist_doc_DATA = \
NEWS \
README
INTLTOOL_FILES = intltool-extract.in \
intltool-merge.in \
intltool-update.in
EXTRA_DIST = \
ChangeLog.md \
INSTALL \
......@@ -22,17 +26,34 @@ EXTRA_DIST = \
package.json \
$(INTLTOOL_FILES)
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update \
po/.intltool-merge-cache
if NLS_ENABLED
SUBDIRS += \
po
else
EXTRA_DIST += \
po
endif
# Remove doc directory on uninstall
uninstall-local:
-rm -r $(docdir)
ACLOCAL_AMFLAGS = -I m4
## EOF
# EOF
......@@ -26,10 +26,6 @@ po/Makefile.in])
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
PKG_CHECK_MODULES([NAUTILUS_BLUETOOTH], [glib-2.0 libnautilus-extension])
AC_CHECK_PROG([HAVE_PKGCONFIG], [pkg-config], [yes], [no])
......@@ -67,13 +63,14 @@ dnl ***************************************************************************
IT_PROG_INTLTOOL([0.35.0])
AC_SUBST([GETTEXT_PACKAGE], ['nautilus-bluetooth'])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [GETTEXT package name])
AM_CONDITIONAL([NLS_ENABLED], [test "x${USE_NLS}" != xno])
AM_GLIB_GNU_GETTEXT
AM_COND_IF([NLS_ENABLED],
[AC_SUBST([GETTEXT_PACKAGE], AC_PACKAGE_NAME)
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])
dnl ***************************************************************************
......
{
"name": "nautilus-bluetooth",
"version": "0.1.2",
"version": "0.1.3",
"description": "A simple Nautilus extension that adds a \"Send via Bluetooth\" entry to Nautilus' right-click menu",
"homepage": "https://github.com/madmurphy/nautilus-bluetooth",
"homepage": "https://gitlab.gnome.org/madmurphy/nautilus-bluetooth",
"author": "madmurphy333@gmail.com",
"license": "GPL-3.0",
"main": "nautilus-bluetooth",
"repository": {
"type": "git",
"url": "https://github.com/madmurphy/nautilus-bluetooth.git"
"url": "https://gitlab.gnome.org/madmurphy/nautilus-bluetooth.git"
},
"dependencies": {
"glib2": "*",
......@@ -23,7 +23,7 @@
"src/nautilus-bluetooth.c"
],
"bugs": {
"url": "https://github.com/madmurphy/nautilus-bluetooth/issues",
"url": "https://gitlab.gnome.org/madmurphy/nautilus-bluetooth/issues",
"email" : "madmurphy333@gmail.com"
},
"keywords": [
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-02 15:05+0100\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"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
......@@ -17,10 +17,10 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../src/nautilus-bluetooth.c:133
#: ../src/nautilus-bluetooth.c:141
msgid "Send via Bluetooth"
msgstr "Via Bluetooth senden"
#: ../src/nautilus-bluetooth.c:134
#: ../src/nautilus-bluetooth.c:142
msgid "Send the selected files to a Bluetooth device"
msgstr "Versende die ausgewählten Dateien an ein Bluetooth-Gerät"
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-02 15:05+0100\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"
"Language-Team: Spanish <es@tp.org.es>\n"
......@@ -17,10 +17,10 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../src/nautilus-bluetooth.c:133
#: ../src/nautilus-bluetooth.c:141
msgid "Send via Bluetooth"
msgstr "Enviar por Bluetooth"
#: ../src/nautilus-bluetooth.c:134
#: ../src/nautilus-bluetooth.c:142
msgid "Send the selected files to a Bluetooth device"
msgstr "Enviar los archivos seleccionados a un dispositivo Bluetooth"
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-02 15:05+0100\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"
"Language-Team: French <traduc@traduc.org>\n"
......@@ -17,10 +17,10 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: ../src/nautilus-bluetooth.c:133
#: ../src/nautilus-bluetooth.c:141
msgid "Send via Bluetooth"
msgstr "Envoyer via Bluetooth"
#: ../src/nautilus-bluetooth.c:134
#: ../src/nautilus-bluetooth.c:142
msgid "Send the selected files to a Bluetooth device"
msgstr "Envoyer les fichiers sélectionnés à un périphérique Bluetooth"
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-02 15:05+0100\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"
"Language-Team: Italian <tp@lists.linux.it>\n"
......@@ -17,10 +17,10 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../src/nautilus-bluetooth.c:133
#: ../src/nautilus-bluetooth.c:141
msgid "Send via Bluetooth"
msgstr "Invia tramite Bluetooth"
#: ../src/nautilus-bluetooth.c:134
#: ../src/nautilus-bluetooth.c:142
msgid "Send the selected files to a Bluetooth device"
msgstr "Invia i file selezionati a un dispositivo Bluetooth"
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-02 15:05+0100\n"
"POT-Creation-Date: 2019-09-05 19:47+0100\n"
"PO-Revision-Date: 2019-08-28 02:30+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Latin\n"
......@@ -16,10 +16,10 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../src/nautilus-bluetooth.c:133
#: ../src/nautilus-bluetooth.c:141
msgid "Send via Bluetooth"
msgstr "Mitte per Bluetooth"
#: ../src/nautilus-bluetooth.c:134
#: ../src/nautilus-bluetooth.c:142
msgid "Send the selected files to a Bluetooth device"
msgstr "Mitte electos codicillos ad Bluetooth apparatum"
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-02 15:05+0100\n"
"POT-Creation-Date: 2019-09-05 19:47+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -17,10 +17,10 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../src/nautilus-bluetooth.c:133
#: ../src/nautilus-bluetooth.c:141
msgid "Send via Bluetooth"
msgstr ""
#: ../src/nautilus-bluetooth.c:134
#: ../src/nautilus-bluetooth.c:142
msgid "Send the selected files to a Bluetooth device"
msgstr ""
## Process this file with automake to produce Makefile.in
# Process this file with automake to produce Makefile.in
AM_CPPFLAGS = \
"-DPACKAGE_LOCALE_DIR=\"$(localedir)\"" \
"-DPACKAGE_SRC_DIR=\"$(srcdir)\"" \
"-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\"" \
"-DG_LOG_DOMAIN=\"NautilusBluetooth\""
AM_CFLAGS = \
-Wall\
-g \
-pedantic \
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \
-DG_LOG_DOMAIN=\"Nautilus-Bluetooth\" \
-DDATADIR=\""$(datadir)"\" \
-I$(top_srcdir) \
-I$(top_builddir) \
$(WARN_CFLAGS) \
$(NAUTILUS_CFLAGS) \
$(GLIB_CFLAGS) \
$(NAUTILUS_BLUETOOTH_CFLAGS)
nautilus_extensiondir=$(NAUTILUS_EXTENSION_DIR)
nautilus_extensiondir = $(NAUTILUS_EXTENSION_DIR)
nautilus_extension_LTLIBRARIES = libnautilus_bluetooth.la
nautilus_extension_LTLIBRARIES = \
libnautilus_bluetooth.la
libnautilus_bluetooth_la_SOURCES = \
nautilus-bluetooth.c
libnautilus_bluetooth_la_LDFLAGS = -module -avoid-version
libnautilus_bluetooth_la_LDFLAGS = \
-module \
-avoid-version
libnautilus_bluetooth_la_LIBADD = $(NAUTILUS_BLUETOOTH_LIBS)
libnautilus_bluetooth_la_LIBADD = \
$(NAUTILUS_BLUETOOTH_LIBS)
## EOF
# EOF
......@@ -29,9 +29,14 @@
#endif
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <nautilus-extension.h>
#ifdef ENABLE_NLS
#include <glib/gi18n-lib.h>
#else
#define _(STRING) STRING
#endif
/*
......@@ -63,13 +68,13 @@ static GObjectClass * parent_class;
static void nautilus_bluetooth_sendto (
NautilusMenuItem * menu_item,
NautilusMenuItem * const menu_item,
gpointer user_data
) {
GList * file_selection = g_object_get_data((GObject *) menu_item, "nautilus_bluetooth_files");
GList * const file_selection = g_object_get_data((GObject *) menu_item, "nautilus_bluetooth_files");
const gsize argv_last = g_list_length(file_selection) + 1;
gchar ** argv = g_malloc((argv_last + 1) * sizeof(gchar *));
gchar ** const argv = g_malloc((argv_last + 1) * sizeof(gchar *));
gsize idx = 1;
GError * spawnerr = NULL;
......@@ -103,7 +108,10 @@ GType nautilus_bluetooth_get_type (void) {
}
static void nautilus_bluetooth_class_init (NautilusBluetoothClass * nautilus_bluetooth_class, gpointer class_data) {
static void nautilus_bluetooth_class_init (
NautilusBluetoothClass * const nautilus_bluetooth_class,
gpointer class_data
) {
parent_class = g_type_class_peek_parent(nautilus_bluetooth_class);
......@@ -111,9 +119,9 @@ static void nautilus_bluetooth_class_init (NautilusBluetoothClass * nautilus_blu
static GList * nautilus_bluetooth_get_file_items (
NautilusMenuProvider * provider,
GtkWidget * window,
GList * file_selection
NautilusMenuProvider * const provider,
GtkWidget * const window,
GList * const file_selection
) {
for (GList * iter = file_selection; iter; iter = iter->next) {
......@@ -128,8 +136,8 @@ static GList * nautilus_bluetooth_get_file_items (
}
NautilusMenuItem * menu_item = nautilus_menu_item_new(
"NautilusBluetooth::send_to_bluetooth",
NautilusMenuItem * const menu_item = nautilus_menu_item_new(
"NautilusBluetooth::send_via_bluetooth",
_("Send via Bluetooth"),
_("Send the selected files to a Bluetooth device"),
"bluetooth"
......@@ -154,7 +162,7 @@ static GList * nautilus_bluetooth_get_file_items (
static void nautilus_bluetooth_menu_provider_iface_init (
NautilusMenuProviderIface * iface,
NautilusMenuProviderIface * const iface,
gpointer iface_data
) {
......@@ -163,7 +171,7 @@ static void nautilus_bluetooth_menu_provider_iface_init (
}
static void nautilus_bluetooth_register_type (GTypeModule * module) {
static void nautilus_bluetooth_register_type (GTypeModule * const module) {
static const GTypeInfo info = {
sizeof(NautilusBluetoothClass),
......@@ -201,7 +209,7 @@ static void nautilus_bluetooth_register_type (GTypeModule * module) {
}
void nautilus_module_initialize (GTypeModule * module) {
void nautilus_module_initialize (GTypeModule * const module) {
#ifdef ENABLE_NLS
bindtextdomain(GETTEXT_PACKAGE, NAUTILUS_BLUETOOTH_LOCALEDIR);
......
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