gplugin/gplugin

79c1a69fc4b8
Merged in feature/random-cleanups (pull request #19)

Feature/random cleanups

Approved-by: Elliott Sales de Andrade
--- a/.hgignore Tue Jul 02 21:58:52 2019 -0500
+++ b/.hgignore Thu Jul 18 01:12:41 2019 +0000
@@ -7,7 +7,6 @@
\#*.ui\#
syntax: regexp
-^artifacts\/
^build.*\/
^packaging\/debian\/tmp\/
^packaging\/debian\/(.+\.)?(substvars|debhelper\.log)$
@@ -15,5 +14,6 @@
^packaging\/debian\/libgplugin0?(-.+)?\/
^packaging\/debian\/gir1.2-gplugin-0.0\/
^packaging\/debian\/files$
+^po\/.*\.pot$
^obj-x86_64-linux-gnu\/
^debian\/?$
--- a/gplugin.sublime-project Tue Jul 02 21:58:52 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-{
- "folders":
- [
- {
- "path": "."
- }
- ]
-}
--- a/gplugin/gplugin-loader.c Tue Jul 02 21:58:52 2019 -0500
+++ b/gplugin/gplugin-loader.c Thu Jul 18 01:12:41 2019 +0000
@@ -156,7 +156,7 @@
* extensions that the loader supports.
*/
GSList *
-gplugin_loader_class_get_supported_extensions(const GPluginLoaderClass *klass) {
+gplugin_loader_class_get_supported_extensions(GPluginLoaderClass *klass) {
g_return_val_if_fail(GPLUGIN_IS_LOADER_CLASS(klass), NULL);
if(klass->supported_extensions)
--- a/gplugin/gplugin-loader.h Tue Jul 02 21:58:52 2019 -0500
+++ b/gplugin/gplugin-loader.h Thu Jul 18 01:12:41 2019 +0000
@@ -60,7 +60,7 @@
GType gplugin_loader_get_type(void);
-GSList *gplugin_loader_class_get_supported_extensions(const GPluginLoaderClass *klass);
+GSList *gplugin_loader_class_get_supported_extensions(GPluginLoaderClass *klass);
GPluginPlugin *gplugin_loader_query_plugin(GPluginLoader *loader, const gchar *filename, GError **error);
--- a/gplugin/meson.build Tue Jul 02 21:58:52 2019 -0500
+++ b/gplugin/meson.build Thu Jul 18 01:12:41 2019 +0000
@@ -206,17 +206,6 @@
],
)
-# nls
-if get_option('nls')
-# gettextize_pot_file(
-# SORT
-# LANGUAGES C
-# SOURCES ${GPLUGIN_SOURCES} ${GPLUGIN_NATIVE_SOURCES} gplugin-query.c
-# BUILT_SOURCES ${GPLUGIN_PUBLIC_BUILT_SOURCES}
-# FILENAME gplugin.pot
-# )
-endif
-
###############################################################################
# gplugin-query executable
###############################################################################
--- a/gplugin/tests/test-plugin-info.c Tue Jul 02 21:58:52 2019 -0500
+++ b/gplugin/tests/test-plugin-info.c Thu Jul 18 01:12:41 2019 +0000
@@ -51,7 +51,7 @@
gchar **tmp = NULL;
/* make sure our arrarys are the same length */
- g_assert_cmpuint(g_strv_length(got), ==, g_strv_length(expected));
+ g_assert_cmpuint(g_strv_length(got), ==, g_strv_length((gchar **)expected));
/* now walk through until expected[i] is null comparing each entry */
for(i = 0; expected[i]; i++)
@@ -61,7 +61,7 @@
tmp = func(info);
/* verify that the accessor returned the proper value as well */
- g_assert_cmpuint(g_strv_length(tmp), ==, g_strv_length(expected));
+ g_assert_cmpuint(g_strv_length(tmp), ==, g_strv_length((gchar **)expected));
for(i = 0; expected[i]; i++)
g_assert_cmpstr(tmp[i], ==, expected[i]);
--- a/meson.build Tue Jul 02 21:58:52 2019 -0500
+++ b/meson.build Thu Jul 18 01:12:41 2019 +0000
@@ -112,33 +112,3 @@
install_data('ChangeLog', 'INSTALL', 'README', 'HACKING',
install_dir : join_paths(get_option('datadir'), 'doc', 'gplugin'))
-###############################################################################
-# make dist
-###############################################################################
-#set(ARCHIVES
-# gplugin-${GPLUGIN_VERSION}.tar.bz2
-# gplugin-${GPLUGIN_VERSION}.tar.gz
-# gplugin-${GPLUGIN_VERSION}.zip
-#)
-
-#set(SIGNATURES)
-
-#foreach(ARCHIVE ${ARCHIVES})
-# add_custom_command(
-# COMMAND hg archive ${ARCHIVE}
-# OUTPUT ${ARCHIVE}
-# DEPENDS .
-# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-# )
-#
-# add_custom_command(
-# COMMAND gpg --yes -abs ${ARCHIVE}
-# OUTPUT ${ARCHIVE}.asc
-# DEPENDS . ${ARCHIVE}
-# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-# )
-#
-# list(APPEND SIGNATURES ${ARCHIVE}.asc)
-#endforeach(ARCHIVE)
-#
-#add_custom_target(dist DEPENDS ${ARCHIVES} ${SIGNATURES})
--- a/packaging/debian/control Tue Jul 02 21:58:52 2019 -0500
+++ b/packaging/debian/control Thu Jul 18 01:12:41 2019 +0000
@@ -4,7 +4,7 @@
Maintainer: Gary Kramlich <grim@reaperworld.com>
Build-Depends: debhelper (>=9),
meson (>=0.37.0), libglib2.0-dev, libgtk-3-dev,
- xsltproc, gettext, help2man,
+ gettext, help2man,
gobject-introspection, libgirepository1.0-dev,
liblua5.1-0-dev, lua-lgi,
python3-dev, python-gi-dev, python3-gi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/po/POTFILES Thu Jul 18 01:12:41 2019 +0000
@@ -0,0 +1,36 @@
+gplugin-gtk-viewer/data/window.ui
+gplugin-gtk-viewer/gplugin-gtk-viewer-window.c
+gplugin-gtk-viewer/gplugin-gtk-viewer.c
+gplugin-gtk/data/plugin-info.ui
+gplugin-gtk/gplugin-gtk-plugin-info.c
+gplugin-gtk/gplugin-gtk-store.c
+gplugin-gtk/gplugin-gtk-view.c
+gplugin/gplugin-core.c
+gplugin/gplugin-file-tree.c
+gplugin/gplugin-loader.c
+gplugin/gplugin-manager.c
+gplugin/gplugin-native-loader.c
+gplugin/gplugin-native-plugin.c
+gplugin/gplugin-options.c
+gplugin/gplugin-plugin-info.c
+gplugin/gplugin-plugin.c
+gplugin/gplugin-private.c
+gplugin/gplugin-query.c
+gplugin/gplugin-version.c
+lua/gplugin-lua-core.c
+lua/gplugin-lua-loader.c
+lua/gplugin-lua-plugin.c
+lua/gplugin-lua-test-lgi.c
+perl/gplugin-perl-core.c
+perl/gplugin-perl-loader.c
+perl/gplugin-perl-plugin.c
+plugins/gplugin-license-check.c
+python/gplugin-python-core.c
+python/gplugin-python-loader.c
+python/gplugin-python-plugin.c
+python/gplugin-python-test-pygobject.c
+python/gplugin-python-utils.c
+ruby/gplugin-ruby-protect.c
+tcc/gplugin-tcc-core.c
+tcc/gplugin-tcc-loader.c
+tcc/gplugin-tcc-plugin.c
--- a/po/meson.build Tue Jul 02 21:58:52 2019 -0500
+++ b/po/meson.build Thu Jul 18 01:12:41 2019 +0000
@@ -1,3 +1,3 @@
if get_option('nls')
-# GETTEXTIZE_TRANSLATIONS(UPDATE)
+ i18n.gettext(GETTEXT_PACKAGE)
endif
--- a/scripts/bitbucket_upload Tue Jul 02 21:58:52 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-#!/bin/sh
-
-CURL=$(which curl)
-GREP=$(which grep)
-AWK=$(which awk)
-
-OUTPUT=.bitbucket.cookies
-
-rm -f ${OUTPUT}
-
-PATH=${1}
-FILES=${@}
-
-if [ -z ${PATH} ] ; then
- echo "You must provide a repository path"
- exit 1
-fi
-
-if [ -z "${FILES}" ] ; then
- echo "You must provide at least one file to upload"
- exit 1
-fi
-
-BASE_URI=https://bitbucket.org
-LOGIN_URI=${BASE_URI}/account/signin/
-UPLOAD_URI=${BASE_URI}/${PATH}/downloads
-
-read -e -p "bitbucket username: " BB_USERNAME
-read -e -s -p "bitbucket password: " BB_PASSWORD
-echo
-echo
-
-# get the csrf token
-echo -n "getting login token ... "
-${CURL} -s -k -c ${OUTPUT} -o /dev/null ${LOGIN_URI}
-CSRF_TOKEN=$(${GREP} csrftoken ${OUTPUT} | ${AWK} '{print $7}')
-if [ -z ${CSRF_TOKEN} ] ; then
- echo "failed."
- rm -f ${OUTPUT}
- exit 1
-else
- echo "done"
-fi
-
-
-echo -n "logging in ... "
-${CURL} -s -k -c ${OUTPUT} -b ${OUTPUT} -o /dev/null -d "username=${BB_USERNAME}&password=${BB_PASSWORD}&csrfmiddlewaretoken=${CSRF_TOKEN}" --referer ${LOGIN_URI} -L ${LOGIN_URI}
-${GREP} -q bb_session ${OUTPUT}
-if [ $? -ne 0 ] ; then
- echo "failed"
- rm -f ${OUTPUT}
- exit 1
-else
- echo "done"
-fi
-
-for FILE in ${FILES} ; do
- echo -n "uploading ${FILE} ... "
- ${CURL} -s -k -c ${OUTPUT} -b ${OUTPUT} --referer ${UPLOAD_URI} -L --form csrfmiddlewaretoken=${CSRF_TOKEN} --form token= --form file=@"${FILE}" ${UPLOAD_URI}
- if [ $? -ne 0 ] ; then
- echo "failed"
- rm -f ${OUTPUT}
- exit 1
- else
- echo "done"
- fi
-done
-
-exit 0
-
--- a/scripts/makeviz.sh Tue Jul 02 21:58:52 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-gource \
- --seconds-per-day .1 \
- --auto-skip-seconds .1 \
- --file-idle-time 0 \
- --multi-sampling \
- --highlight-users \
- --stop-at-end \
- --key \
- --title "History of GPlugin" \
- --font-size 26 \
- -1280x720 \
- --max-files 0 \
- --hide filenames,mouse,progress \
- --output-framerate 30 \
- -o - \
-| ffmpeg \
- -y \
- -r 30 \
- -f image2pipe \
- -vcodec ppm \
- -i - \
- -vcodec libx264 \
- -preset ultrafast \
- -pix_fmt yuv420p \
- -crf 1 \
- -threads 0 \
- -bf 0 \
- gplugin.mp4
-
--- a/tcc/gplugin-tcc-plugin.c Tue Jul 02 21:58:52 2019 -0500
+++ b/tcc/gplugin-tcc-plugin.c Thu Jul 18 01:12:41 2019 +0000
@@ -145,7 +145,7 @@
GPluginTccPluginPrivate *priv = gplugin_tcc_plugin_get_instance_private(GPLUGIN_TCC_PLUGIN(obj));
g_clear_pointer(&priv->s, tcc_delete);
- g_clear_pointer(&priv->mem);
+ g_clear_pointer(&priv->mem, g_free);
g_clear_pointer(&priv->filename, g_free);
g_clear_object(&priv->loader);
@@ -176,7 +176,7 @@
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY
);
- properties[PROP_MEM] =g_param_spec_pointer(
+ properties[PROP_MEM] = g_param_spec_pointer(
"memory", "memory",
"The memory allocated for the symbol table for the plugin",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY
--- a/tcc/meson.build Tue Jul 02 21:58:52 2019 -0500
+++ b/tcc/meson.build Thu Jul 18 01:12:41 2019 +0000
@@ -11,7 +11,7 @@
]
if not compiler.has_header('libtcc.h')
- error('LibTcc header not found')
+ error('libtcc.h not found')
endif
TCC = compiler.find_library('tcc')
--- a/xsl/gtester-junit.xsl Tue Jul 02 21:58:52 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011-2017 Gary Kramlich <grim@reaperworld.com>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, see <http://www.gnu.org/licenses/>.
--->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" cdata-section-elements="system-out system-err failure" indent="yes"/>
-
- <!-- basename template, keeps removing text before '/' until there isn't any -->
- <xsl:template name="basename">
- <xsl:param name="path"/>
-
- <xsl:choose>
- <xsl:when test="contains($path, '/')">
- <xsl:call-template name="basename">
- <xsl:with-param name="path" select="substring-after($path, '/')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$path"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- match the gtester root tag -->
- <xsl:template match="/gtester">
- <xsl:element name="testsuite">
- <!-- add the number of tests as the test attribute -->
- <xsl:attribute name="tests">
- <xsl:value-of select="count(//testcase)"/>
- </xsl:attribute>
-
- <!-- sum up all durations and add it as the time attribute -->
- <xsl:attribute name="time">
- <xsl:value-of select="sum(//testbinary/duration)"/>
- </xsl:attribute>
-
- <!-- add the number of failures as the failures attribute -->
- <xsl:attribute name="failures">
- <xsl:value-of select="count(//testcase/status[@result='failed'])"/>
- </xsl:attribute>
-
- <xsl:apply-templates/>
-
- <!-- now create the system-out and system-err elements -->
- <xsl:element name="system-out">
- <xsl:apply-templates select="//message"/>
- </xsl:element>
-
- <xsl:element name="system-err">
- <xsl:apply-templates select="//error"/>
- </xsl:element>
- </xsl:element>
- </xsl:template>
-
- <!-- match the testcases -->
- <xsl:template match="/gtester/testbinary/testcase">
- <xsl:element name="testcase">
- <xsl:attribute name="time">
- <xsl:value-of select="./duration/text()"/>
- </xsl:attribute>
- <xsl:attribute name="name">
- <xsl:variable name="exec">
- <xsl:call-template name="basename">
- <xsl:with-param name="path" select="../@path"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="concat($exec, translate(@path, '/-', '.'))"/>
- </xsl:attribute>
-
- <xsl:if test="./status[@result='failed']">
- <xsl:element name="failure">
- <xsl:value-of select="error"/>
- </xsl:element>
- </xsl:if>
- </xsl:element>
- </xsl:template>
-
- <!-- ignore all other cdata -->
- <xsl:template match="text()"/>
-</xsl:stylesheet>
-