diff --git a/KKEdit/plugins/Clipboard/ClipboardPlugin.pot b/KKEdit/plugins/Clipboard/ClipboardPlugin.pot new file mode 100644 index 00000000..a17b2406 --- /dev/null +++ b/KKEdit/plugins/Clipboard/ClipboardPlugin.pot @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: ClipboardPlugin 1.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-30 16:58+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: clipboardplugin.cpp:166 +msgid "C_lipboard" +msgstr "" + +#: clipboardplugin.cpp:173 +#, c-format +msgid "Clip Number. %i" +msgstr "" + +#: clipboardplugin.cpp:200 +msgid "Clipboard Plugin - Add's multiple clips" +msgstr "" + +#: clipboardplugin.cpp:201 +msgid "French Translation" +msgstr "" + +#: clipboardplugin.cpp:206 +msgid "Clipboard Plugin" +msgstr "" + +#: ../common.h:29 +msgid "Apply" +msgstr "" + +#: ../common.h:30 +msgid "Cancel" +msgstr "" + +#: ../common.h:31 +msgid "New" +msgstr "" + +#: ../common.h:32 +msgid "Help" +msgstr "" + +#: ../common.h:33 +msgid "Open" +msgstr "" + +#: ../common.h:34 +msgid "Connect" +msgstr "" + +#: ../common.h:35 +msgid "OK" +msgstr "" diff --git a/KKEdit/plugins/Clipboard/ClipboardPlugin_fr_FR.po b/KKEdit/plugins/Clipboard/ClipboardPlugin_fr_FR.po new file mode 100644 index 00000000..01bb4823 --- /dev/null +++ b/KKEdit/plugins/Clipboard/ClipboardPlugin_fr_FR.po @@ -0,0 +1,74 @@ +# French translations for ClipboardPlugin package +# Traductions françaises du paquet ClipboardPlugin. +# Copyright (C) 2014 THE ClipboardPlugin'S COPYRIGHT HOLDER +# This file is distributed under the same license as the ClipboardPlugin package. +# Automatically generated, 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: ClipboardPlugin 1.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 12:44+0100\n" +"PO-Revision-Date: 2016-08-23 12:46-0000\n" +"Last-Translator: K. D. Hedger \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 1.6.11\n" + +#: clipboardplugin.cpp:166 +msgid "C_lipboard" +msgstr "P_resse-papier" + +#: clipboardplugin.cpp:173 +#, c-format +msgid "Clip Number. %i" +msgstr "Emplacement %i" + +#: clipboardplugin.cpp:200 +msgid "Clipboard Plugin - Add's multiple clips" +msgstr "" +"Greffon presse-papier - Un presse-papier pour KKEdit avec 10 emplacements" + +#: clipboardplugin.cpp:201 +msgid "French Translation" +msgstr "Traduction française" + +#: ../common.h:28 +msgid "Apply" +msgstr "_Appliquer" + +#: ../common.h:29 +msgid "Cancel" +msgstr "_Annuler" + +#: ../common.h:30 +msgid "New" +msgstr "Nouveau" + +#: ../common.h:31 +msgid "Help" +msgstr "Aide" + +#: ../common.h:32 +msgid "Open" +msgstr "Ouvrir" + +#: ../common.h:33 +msgid "Connect" +msgstr "Relier" + +#: ../common.h:34 +msgid "OK" +msgstr "OK" + +#: ../common.h:43 +msgid "" +"\n" +"More by the same author\n" +msgstr "" +"\n" +"Plus du même auteur\n" diff --git a/KKEdit/plugins/Clipboard/Makefile.am b/KKEdit/plugins/Clipboard/Makefile.am new file mode 100644 index 00000000..b918c431 --- /dev/null +++ b/KKEdit/plugins/Clipboard/Makefile.am @@ -0,0 +1,21 @@ +PLUGNAME = clipboard +SONAME = lib$(PLUGNAME) +SRCFILES = $(PLUGNAME).cpp + +AUTOMAKE_OPTIONS = subdir-objects + +all: + gcc ${EXTRAMAKEFLAGS} $(CONFCXXFLAGS) $(CONFCPPFLAGS) $(CONFLDFLAGS) -fPIC -Wall -g -c $(SRCFILES) $(GLIB_CFLAGS) $(GLIB_LIBS) $(GTK_CFLAGS) $(GTK_LIBS) $(GTKSRC_CFLAGS) $(GTKSRC_LIBS) -DLOCALEDIR=\"${localedir}\" -DDATADIR=\"${pkgdatadir}\" $(DEVMODE) $(USEGTK3) -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -o $(PLUGNAME).o + + gcc -nodefaultlibs -shared -Wl,--version-script=exportmap,-soname,$(SONAME).so -o $(SONAME).so $(PLUGNAME).o -lc + +clean: + rm -f *.o *.so||true + +distclean: + rm -f *.o *.so Makefile||true + +install: all + mkdir -vp $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk $(DESTDIR)${localedir}/fr_FR/LC_MESSAGES + cp $(SONAME).so $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk + cp po/fr_FR/LC_MESSAGES/ClipboardPlugin.mo $(DESTDIR)${localedir}/fr_FR/LC_MESSAGES/ClipboardPlugin$(GTK3SUFFIX).mo \ No newline at end of file diff --git a/KKEdit/plugins/Clipboard/Makefile.in b/KKEdit/plugins/Clipboard/Makefile.in new file mode 100644 index 00000000..069f4425 --- /dev/null +++ b/KKEdit/plugins/Clipboard/Makefile.in @@ -0,0 +1,458 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = KKEdit/plugins/Clipboard +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +ASPELL_LIBS = @ASPELL_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXCTAGS = @EXCTAGS@ +EXEEXT = @EXEEXT@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GREP = @GREP@ +GTK3SUFFIX = @GTK3SUFFIX@ +GTKSRC_CFLAGS = @GTKSRC_CFLAGS@ +GTKSRC_LIBS = @GTKSRC_LIBS@ +GTKSU = @GTKSU@ +GTKVERSION = @GTKVERSION@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ICONV_LIBS = @ICONV_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANPAGEEDITOR = @MANPAGEEDITOR@ +MKDIR_P = @MKDIR_P@ +NEWPLUGINCLUDES = @NEWPLUGINCLUDES@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLUGDIRS = @PLUGDIRS@ +PLUGVERSION = @PLUGVERSION@ +SEDCOMMAND = @SEDCOMMAND@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE290 = @USE290@ +VERSION = @VERSION@ +VTEVERS = @VTEVERS@ +VTE_CFLAGS = @VTE_CFLAGS@ +VTE_LIBS = @VTE_LIBS@ +WEBKIT_CFLAGS = @WEBKIT_CFLAGS@ +WEBKIT_LIBS = @WEBKIT_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_debug_level = @with_debug_level@ +with_gsu_path = @with_gsu_path@ +with_qt5_docdir = @with_qt5_docdir@ +PLUGNAME = clipboard +SONAME = lib$(PLUGNAME) +SRCFILES = $(PLUGNAME).cpp +AUTOMAKE_OPTIONS = subdir-objects +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu KKEdit/plugins/Clipboard/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu KKEdit/plugins/Clipboard/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean-am: clean-generic mostlyclean-am + +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ + ctags-am distclean distclean-generic distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +all: + gcc ${EXTRAMAKEFLAGS} $(CONFCXXFLAGS) $(CONFCPPFLAGS) $(CONFLDFLAGS) -fPIC -Wall -g -c $(SRCFILES) $(GLIB_CFLAGS) $(GLIB_LIBS) $(GTK_CFLAGS) $(GTK_LIBS) $(GTKSRC_CFLAGS) $(GTKSRC_LIBS) -DLOCALEDIR=\"${localedir}\" -DDATADIR=\"${pkgdatadir}\" $(DEVMODE) $(USEGTK3) -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -o $(PLUGNAME).o + + gcc -nodefaultlibs -shared -Wl,--version-script=exportmap,-soname,$(SONAME).so -o $(SONAME).so $(PLUGNAME).o -lc + +clean: + rm -f *.o *.so||true + +distclean: + rm -f *.o *.so Makefile||true + +install: all + mkdir -vp $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk $(DESTDIR)${localedir}/fr_FR/LC_MESSAGES + cp $(SONAME).so $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk + cp po/fr_FR/LC_MESSAGES/ClipboardPlugin.mo $(DESTDIR)${localedir}/fr_FR/LC_MESSAGES/ClipboardPlugin$(GTK3SUFFIX).mo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/KKEdit/plugins/Clipboard/clipboard.cpp b/KKEdit/plugins/Clipboard/clipboard.cpp new file mode 100644 index 00000000..5ff13864 --- /dev/null +++ b/KKEdit/plugins/Clipboard/clipboard.cpp @@ -0,0 +1,243 @@ +/* + * + * ©K. D. Hedger. Wed 20 Apr 17:13:14 BST 2016 kdhedger68713@gmail.com + + * This file (clipboardplugin.cpp) is part of KKEdit. + + * plugins 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. + + * plugins 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 plugins. If not, see . + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../config.h" +#include "../common.h" +#include "../kkedit-plugins.h" + +#define PLUGVERSION VERSION +#define MAXCLIPS 10 +#define MAXCLIPMENULEN 43 +#define CLIPENDLEN 20 +#define CLIPENDLENSTR "20" +#ifdef _USEGTK3_ +#define TEXTDOMAIN "ClipboardPlugin-3" +#define ABOUTICON "KKEditPlug-3" +#else +#define TEXTDOMAIN "ClipboardPlugin" +#define ABOUTICON "KKEditPlug" +#endif + +struct clips +{ + GtkWidget* menuItem; + char* text; +}; + +GtkWidget* menuPlug; +GtkClipboard* mainClipboard; +int currentClip=-1; +clips clip[MAXCLIPS]; +plugData* plugdata; +gulong clipid; +char* currentdomain=NULL; +bool manual=false; +int sinkInt; + +int (*module_plug_function)(gpointer globaldata); + +extern "C" const gchar* g_module_check_init(GModule *module) +{ + currentdomain=strdup(textdomain(NULL)); + return(NULL); +} + +void setTextDomain(bool plugdomain,plugData* pdata) +{ + if(plugdomain==true) + { + //set domain to plug + bindtextdomain(TEXTDOMAIN,LOCALEDIR); + textdomain(TEXTDOMAIN); + bind_textdomain_codeset(TEXTDOMAIN,"UTF-8"); + } + else + { + //resetdomain + bindtextdomain(currentdomain,pdata->locale); + textdomain(currentdomain); + bind_textdomain_codeset(currentdomain,"UTF-8"); + } +} + +extern "C" void g_module_unload(GModule *module) +{ + for(int j=0;j=MAXCLIPS) + currentClip=0; +} + +void clipChanged(GtkClipboard* clipboard,gpointer user_data) +{ + char* texthold; + char* label; + + + if (manual==true) + { + manual=false; + return; + } + + if (gtk_clipboard_wait_is_text_available(mainClipboard)==true) + { + setCurrentClip(); + if(clip[currentClip].text != NULL) + free(clip[currentClip].text); + clip[currentClip].text=gtk_clipboard_wait_for_text(clipboard); + + texthold=g_strescape(clip[currentClip].text,NULL); + texthold=g_strstrip(texthold); + + if(strlen(clip[currentClip].text)>MAXCLIPMENULEN) + { + sinkInt=asprintf(&label,"%." CLIPENDLENSTR "s...%s",texthold,(char*)&texthold[strlen(texthold)-CLIPENDLEN]); + gtk_menu_item_set_label((GtkMenuItem*)clip[currentClip].menuItem,label); + free(label); + } + else + gtk_menu_item_set_label((GtkMenuItem*)clip[currentClip].menuItem,texthold); + + free(texthold); + gtk_widget_show_all(menuPlug); + } +} + +void theCallBack(GtkWidget* widget,gpointer data) +{ + int clipnum=(int)(long)data; + + if(clip[clipnum].text!=NULL) + { + manual=true; + gtk_clipboard_set_text(mainClipboard,clip[clipnum].text,-1); + } +} + +extern "C" int addToGui(gpointer data) +{ + GtkWidget* menu; + char* command; + + plugdata=(plugData*)data; + currentClip=-1; + setTextDomain(true,plugdata); + + menuPlug=gtk_menu_item_new_with_label(gettext("C_lipboard")); + gtk_menu_item_set_use_underline((GtkMenuItem*)menuPlug,true); + menu=gtk_menu_new(); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuPlug),menu); + + for(int j=0;jmlist.menuBar),menuPlug); + + mainClipboard=gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); + clipid=g_signal_connect(G_OBJECT(mainClipboard),"owner-change",G_CALLBACK(clipChanged),plugdata); + setTextDomain(false,plugdata); + return(0); +} + +extern "C" int doAbout(gpointer data) +{ + plugData *plugdata=(plugData*)data; + char *licencepath; + char *licence; + GtkAboutDialog *about; + char *translators; + + setTextDomain(true,plugdata); + + const char *aboutboxstring=gettext("Clipboard Plugin - Add's multiple clips"); + sinkInt=asprintf(&translators,"%s:\nNguyen Thanh Tung ",gettext("French Translation")); + sinkInt=asprintf(&licencepath,"%s/docs/gpl-3.0.txt",plugdata->dataDir); + + g_file_get_contents(licencepath,&licence,NULL,NULL); + about=(GtkAboutDialog*)gtk_about_dialog_new(); + gtk_about_dialog_set_program_name(about,gettext("Clipboard Plugin")); + gtk_about_dialog_set_authors(about,authors); + gtk_about_dialog_set_comments(about,aboutboxstring); + gtk_about_dialog_set_copyright(about,COPYRITE); + gtk_about_dialog_set_version(about,PLUGVERSION); + gtk_about_dialog_set_website(about,KKEDITPAGE); + gtk_about_dialog_set_website_label(about,"KKEdit Homepage"); + gtk_about_dialog_set_logo_icon_name(about,ABOUTICON); + gtk_about_dialog_set_license(about,licence); + gtk_about_dialog_set_translator_credits(about,(const gchar*)translators); + gtk_window_set_transient_for((GtkWindow*)about,(GtkWindow*)plugdata->prefsWindow); + + gtk_dialog_run(GTK_DIALOG(about)); + gtk_widget_destroy((GtkWidget*)about); + free(licence); + free(licencepath); + free(translators); + setTextDomain(false,plugdata); + return(0); +} + +extern "C" int enablePlug(gpointer data) +{ + plugData* plugdata=(plugData*)data; + + if(plugdata->modData->unload==true) + { + gtk_widget_destroy(menuPlug); + gtk_widget_show_all(plugdata->mlist.menuBar); + } + else + { + if(g_module_symbol(plugdata->modData->module,"addToGui",(gpointer*)&module_plug_function)) + module_plug_function(data); + gtk_widget_show_all(plugdata->mlist.menuBar); + } + return(0); +} diff --git a/KKEdit/plugins/Clipboard/exportmap b/KKEdit/plugins/Clipboard/exportmap new file mode 100644 index 00000000..4a7671c5 --- /dev/null +++ b/KKEdit/plugins/Clipboard/exportmap @@ -0,0 +1,10 @@ +{ +global: addToGui; + doAbout; + enablePlug; + g_module_unload; + g_module_check_init; + +local: *; + +}; \ No newline at end of file diff --git a/KKEdit/plugins/Clipboard/makepo b/KKEdit/plugins/Clipboard/makepo new file mode 100755 index 00000000..0356bc9c --- /dev/null +++ b/KKEdit/plugins/Clipboard/makepo @@ -0,0 +1,33 @@ +#!/bin/bash -e + +#©keithhedger Fri 3 Oct 17:38:03 BST 2014 kdhedger68713@gmail.com + +MAKEPOS=0 +MAKEMOS=0 +DOMAINNAME=ClipboardPlugin + +if [ "X$1" = "Xmakepos" ];then + MAKEPOS=1 + MAKEMOS=0 +fi + +if [ "X$1" = "Xmakemos" ];then + MAKEPOS=0 + MAKEMOS=1 +fi + +langs="fr_FR" + +rm ${DOMAINNAME}.pot||true +xgettext --package-name ${DOMAINNAME} --package-version 1.2 --default-domain ${DOMAINNAME} --output ${DOMAINNAME}.pot clipboardplugin.cpp ../common.h + +for arg in $langs + do + mkdir --parents po/${arg}/LC_MESSAGES + if [ $MAKEPOS -eq 1 ];then + msginit --no-translator --locale $arg --output-file ${DOMAINNAME}_${arg}.po --input ${DOMAINNAME}.pot + fi + if [ $MAKEMOS -eq 1 ];then + msgfmt --check --verbose --output-file po/${arg}/LC_MESSAGES/${DOMAINNAME}.mo ${DOMAINNAME}_${arg}.po + fi + done \ No newline at end of file diff --git a/KKEdit/plugins/Clipboard/po/fr_FR/LC_MESSAGES/ClipboardPlugin.mo b/KKEdit/plugins/Clipboard/po/fr_FR/LC_MESSAGES/ClipboardPlugin.mo new file mode 100644 index 00000000..62ab5091 Binary files /dev/null and b/KKEdit/plugins/Clipboard/po/fr_FR/LC_MESSAGES/ClipboardPlugin.mo differ diff --git a/KKEdit/plugins/SymbolMenu/Makefile.am b/KKEdit/plugins/SymbolMenu/Makefile.am new file mode 100644 index 00000000..a89d1bd8 --- /dev/null +++ b/KKEdit/plugins/SymbolMenu/Makefile.am @@ -0,0 +1,22 @@ +PLUGNAME = symbolmenu +SONAME = lib$(PLUGNAME) +SRCFILES = $(PLUGNAME).cpp + +AUTOMAKE_OPTIONS = subdir-objects + +all: + gcc ${EXTRAMAKEFLAGS} $(CONFCXXFLAGS) $(CONFCPPFLAGS) $(CONFLDFLAGS) -fPIC -Wall -g -c $(SRCFILES) $(GLIB_CFLAGS) $(GLIB_LIBS) $(GTK_CFLAGS) $(GTK_LIBS) $(GTKSRC_CFLAGS) $(GTKSRC_LIBS) -DLOCALEDIR=\"${localedir}\" -DDATADIR=\"${pkgdatadir}\" $(DEVMODE) $(USEGTK3) -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -o $(PLUGNAME).o + + gcc -nodefaultlibs -shared -Wl,--version-script=exportmap,-soname,$(SONAME).so -o $(SONAME).so $(PLUGNAME).o -lc + +clean: distclean + +distclean: + rm -f *.o *.so Makefile||true + +install: all + mkdir -vp $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk $(DESTDIR)${localedir}/fr_FR/LC_MESSAGES + cp $(SONAME).so $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk + cp po/fr_FR/LC_MESSAGES/SymbolMenuPlugin.mo $(DESTDIR)${localedir}/fr_FR/LC_MESSAGES + cp indicator-chars.txt $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk + chmod 644 $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk/indicator-chars.txt \ No newline at end of file diff --git a/KKEdit/plugins/SymbolMenu/Makefile.in b/KKEdit/plugins/SymbolMenu/Makefile.in new file mode 100644 index 00000000..808d084e --- /dev/null +++ b/KKEdit/plugins/SymbolMenu/Makefile.in @@ -0,0 +1,459 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = KKEdit/plugins/SymbolMenu +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +ASPELL_LIBS = @ASPELL_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXCTAGS = @EXCTAGS@ +EXEEXT = @EXEEXT@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GREP = @GREP@ +GTK3SUFFIX = @GTK3SUFFIX@ +GTKSRC_CFLAGS = @GTKSRC_CFLAGS@ +GTKSRC_LIBS = @GTKSRC_LIBS@ +GTKSU = @GTKSU@ +GTKVERSION = @GTKVERSION@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +ICONV_LIBS = @ICONV_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANPAGEEDITOR = @MANPAGEEDITOR@ +MKDIR_P = @MKDIR_P@ +NEWPLUGINCLUDES = @NEWPLUGINCLUDES@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PLUGDIRS = @PLUGDIRS@ +PLUGVERSION = @PLUGVERSION@ +SEDCOMMAND = @SEDCOMMAND@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE290 = @USE290@ +VERSION = @VERSION@ +VTEVERS = @VTEVERS@ +VTE_CFLAGS = @VTE_CFLAGS@ +VTE_LIBS = @VTE_LIBS@ +WEBKIT_CFLAGS = @WEBKIT_CFLAGS@ +WEBKIT_LIBS = @WEBKIT_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_debug_level = @with_debug_level@ +with_gsu_path = @with_gsu_path@ +with_qt5_docdir = @with_qt5_docdir@ +PLUGNAME = symbolmenu +SONAME = lib$(PLUGNAME) +SRCFILES = $(PLUGNAME).cpp +AUTOMAKE_OPTIONS = subdir-objects +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu KKEdit/plugins/SymbolMenu/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu KKEdit/plugins/SymbolMenu/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean-am: clean-generic mostlyclean-am + +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ + ctags-am distclean distclean-generic distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +all: + gcc ${EXTRAMAKEFLAGS} $(CONFCXXFLAGS) $(CONFCPPFLAGS) $(CONFLDFLAGS) -fPIC -Wall -g -c $(SRCFILES) $(GLIB_CFLAGS) $(GLIB_LIBS) $(GTK_CFLAGS) $(GTK_LIBS) $(GTKSRC_CFLAGS) $(GTKSRC_LIBS) -DLOCALEDIR=\"${localedir}\" -DDATADIR=\"${pkgdatadir}\" $(DEVMODE) $(USEGTK3) -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -o $(PLUGNAME).o + + gcc -nodefaultlibs -shared -Wl,--version-script=exportmap,-soname,$(SONAME).so -o $(SONAME).so $(PLUGNAME).o -lc + +clean: distclean + +distclean: + rm -f *.o *.so Makefile||true + +install: all + mkdir -vp $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk $(DESTDIR)${localedir}/fr_FR/LC_MESSAGES + cp $(SONAME).so $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk + cp po/fr_FR/LC_MESSAGES/SymbolMenuPlugin.mo $(DESTDIR)${localedir}/fr_FR/LC_MESSAGES + cp indicator-chars.txt $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk + chmod 644 $(DESTDIR)$(pkgdatadir)$(GTK3SUFFIX)/plugins-gtk/indicator-chars.txt + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/KKEdit/plugins/SymbolMenu/SymbolMenuPlugin.pot b/KKEdit/plugins/SymbolMenu/SymbolMenuPlugin.pot new file mode 100644 index 00000000..d2d9363a --- /dev/null +++ b/KKEdit/plugins/SymbolMenu/SymbolMenuPlugin.pot @@ -0,0 +1,58 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: SymbolMenuPlugin 1.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-30 16:59+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: symbolmenuplugin.cpp:191 +msgid "Symbol Menu Plugin - Copy symbols to clipboard" +msgstr "" + +#: symbolmenuplugin.cpp:192 +msgid "French Translation" +msgstr "" + +#: symbolmenuplugin.cpp:197 +msgid "Symbol Menu Plugin" +msgstr "" + +#: ../common.h:29 +msgid "Apply" +msgstr "" + +#: ../common.h:30 +msgid "Cancel" +msgstr "" + +#: ../common.h:31 +msgid "New" +msgstr "" + +#: ../common.h:32 +msgid "Help" +msgstr "" + +#: ../common.h:33 +msgid "Open" +msgstr "" + +#: ../common.h:34 +msgid "Connect" +msgstr "" + +#: ../common.h:35 +msgid "OK" +msgstr "" diff --git a/KKEdit/plugins/SymbolMenu/SymbolMenuPlugin_fr_FR.po b/KKEdit/plugins/SymbolMenu/SymbolMenuPlugin_fr_FR.po new file mode 100644 index 00000000..dc15df5d --- /dev/null +++ b/KKEdit/plugins/SymbolMenu/SymbolMenuPlugin_fr_FR.po @@ -0,0 +1,59 @@ +# French translations for SymbolMenuPlugin package +# Traductions françaises du paquet SymbolMenuPlugin. +# Copyright (C) 2016 THE SymbolMenuPlugin'S COPYRIGHT HOLDER +# This file is distributed under the same license as the SymbolMenuPlugin package. +# Automatically generated, 2016. +# +msgid "" +msgstr "" +"Project-Id-Version: SymbolMenuPlugin 1.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-05 15:53+0000\n" +"PO-Revision-Date: 2016-11-05 15:53+0000\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: symbolmenuplugin.cpp:177 +msgid "Symbol Menu Plugin - Copy symbols to clipboard" +msgstr "" + +#: symbolmenuplugin.cpp:178 +msgid "French Translation" +msgstr "" + +#: symbolmenuplugin.cpp:183 +msgid "Symbol Menu Plugin" +msgstr "" + +#: ../common.h:29 +msgid "Apply" +msgstr "" + +#: ../common.h:30 +msgid "Cancel" +msgstr "" + +#: ../common.h:31 +msgid "New" +msgstr "" + +#: ../common.h:32 +msgid "Help" +msgstr "" + +#: ../common.h:33 +msgid "Open" +msgstr "" + +#: ../common.h:34 +msgid "Connect" +msgstr "" + +#: ../common.h:35 +msgid "OK" +msgstr "" diff --git a/KKEdit/plugins/SymbolMenu/exportmap b/KKEdit/plugins/SymbolMenu/exportmap new file mode 100644 index 00000000..4a7671c5 --- /dev/null +++ b/KKEdit/plugins/SymbolMenu/exportmap @@ -0,0 +1,10 @@ +{ +global: addToGui; + doAbout; + enablePlug; + g_module_unload; + g_module_check_init; + +local: *; + +}; \ No newline at end of file diff --git a/KKEdit/plugins/SymbolMenu/indicator-chars.txt b/KKEdit/plugins/SymbolMenu/indicator-chars.txt new file mode 100644 index 00000000..79abb05e --- /dev/null +++ b/KKEdit/plugins/SymbolMenu/indicator-chars.txt @@ -0,0 +1,21 @@ +[Accents+Punctuation]´`¨ˆ¸!¡‼¿… +[Arrows]â†â†’↑↓↔↕↨↗↘↳↵â‡â‡’⇔⇤⇥⇦⇧⇨⇩ +[Emoticons 1]☻☺☹😀ðŸ˜ðŸ˜‚😃😄😅😆😇😈😉😊😋😌ðŸ˜ðŸ˜ŽðŸ˜ðŸ˜ðŸ˜‘😒😓😔😕😖😗😘😙😚 +[Emoticons 2]😛😜ðŸ˜ðŸ˜žðŸ˜ŸðŸ˜ ðŸ˜¡ðŸ˜¢ðŸ˜£ðŸ˜¥ðŸ˜¦ðŸ˜§ðŸ˜¨ðŸ˜©ðŸ˜ªðŸ˜«ðŸ˜­ðŸ˜®ðŸ˜¯ðŸ˜°ðŸ˜±ðŸ˜²ðŸ˜³ðŸ˜´ðŸ˜µðŸ˜¶ðŸ˜· +[Lines Single]—─¯¦|│∟âŒÂ¬â”Œâ”¬â”├┼┤└┴┘┤Γ +[Lines Double]╡╢╖╕╣║╗â•â•œâ•›â•žâ•Ÿâ•šâ•”╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪ +[Marks]©℗®℠™¤¢$£¥₧€℅№†‡§¶ +[Math]÷×±≠<≤≥>√~≈≃‰‱∞â¿Âº#0⅛¼⅜½â…¾⅞¹²³ +[Numbering]➊➋➌âžâžŽâžâžâž‘➒➓①②③④⑤⑥⑦⑧⑨⑩ +[Quotes]'‘’“â€â€¹â€ºÂ«Â» +[Science]℃℉°µø؃ΩßαΔδεΘπΣτΦφΨΩ℮∂∆âˆâˆ‘∩≡⌠⌡⊕⊖⊗⊘⊙ +[Shapes]►◄▲▼△▽░▒▓█▌â–■▄▀▬ +[Symbols 1]✓✔☑✗✘✕✖☓☒â˜â€¢â—â—‹â◯◎☉▢ââ‘□◘◙◆◇✦★☆✮✯✰ +[Symbols 2]☞☜â˜â˜Ÿâ˜šâ˜›âœ‚✄☎✆✉âœâœŽâœâœâœ‘✒⌨☮☯♡â¤âœ½âœ¾âœ¿â€ââƒâ‡âˆâ…â„↠+[Symbols 3]☼☀â˜â˜‚☃☄♂♀♪♫♩♬♭♮♯♥♠♣♦·⚓� +[↓ Accented Letters ↓] +[A]áÃàÀâÂåÅäÄãêæÆ +[C+D+E]çÇðÃéÉèÈêÊëË +[G+I+N]ğĞíÃìÌîÎïÃıİñÑ +[O+S]óÓòÒôÔöÖõÕœŒšŠşŞþÞ +[U+Y+Z]úÚùÙûÛüÜýÃÿŸžŽ diff --git a/KKEdit/plugins/SymbolMenu/makepo b/KKEdit/plugins/SymbolMenu/makepo new file mode 100755 index 00000000..f6b704d5 --- /dev/null +++ b/KKEdit/plugins/SymbolMenu/makepo @@ -0,0 +1,33 @@ +#!/bin/bash -e + +#©keithhedger Fri 3 Oct 17:38:03 BST 2014 kdhedger68713@gmail.com + +MAKEPOS=0 +MAKEMOS=0 +DOMAINNAME=SymbolMenuPlugin + +if [ "X$1" = "Xmakepos" ];then + MAKEPOS=1 + MAKEMOS=0 +fi + +if [ "X$1" = "Xmakemos" ];then + MAKEPOS=0 + MAKEMOS=1 +fi + +langs="fr_FR" + +rm ${DOMAINNAME}.pot||true +xgettext --package-name ${DOMAINNAME} --package-version 1.2 --default-domain ${DOMAINNAME} --output ${DOMAINNAME}.pot symbolmenuplugin.cpp ../common.h + +for arg in $langs + do + mkdir --parents po/${arg}/LC_MESSAGES + if [ $MAKEPOS -eq 1 ];then + msginit --no-translator --locale $arg --output-file ${DOMAINNAME}_${arg}.po --input ${DOMAINNAME}.pot + fi + if [ $MAKEMOS -eq 1 ];then + msgfmt --check --verbose --output-file po/${arg}/LC_MESSAGES/${DOMAINNAME}.mo ${DOMAINNAME}_${arg}.po + fi + done \ No newline at end of file diff --git a/KKEdit/plugins/SymbolMenu/po/fr_FR/LC_MESSAGES/SymbolMenuPlugin.mo b/KKEdit/plugins/SymbolMenu/po/fr_FR/LC_MESSAGES/SymbolMenuPlugin.mo new file mode 100644 index 00000000..e93985bd Binary files /dev/null and b/KKEdit/plugins/SymbolMenu/po/fr_FR/LC_MESSAGES/SymbolMenuPlugin.mo differ diff --git a/KKEdit/plugins/SymbolMenu/symbolmenu.cpp b/KKEdit/plugins/SymbolMenu/symbolmenu.cpp new file mode 100644 index 00000000..a2b3e713 --- /dev/null +++ b/KKEdit/plugins/SymbolMenu/symbolmenu.cpp @@ -0,0 +1,234 @@ +/* + * + * ©K. D. Hedger. Sat 5 Nov 15:42:06 GMT 2016 kdhedger68713@gmail.com + + * This file (symbolmenuplugin.cpp) is part of plugins. + + * plugins 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. + + * plugins 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 plugins. If not, see . + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "../config.h" +#include "../common.h" +#include "../kkedit-plugins.h" +#include "../../src/sliceclass.h" + +#define PLUGVERSION VERSION +#ifdef _USEGTK3_ +#define TEXTDOMAIN "SymbolMenuPlugin-3" +#define ABOUTICON "KKEditPlug-3" +#else +#define TEXTDOMAIN "SymbolMenuPlugin" +#define ABOUTICON "KKEditPlug" +#endif + +extern bool showStatus; +extern GtkWidget *statusWidget; + +char* prefsPath; +GtkWidget *menuPlug; +char *sinkReturnStr; +int sinkReturn; +GtkClipboard *mainClipboard; +char *currentdomain=NULL; + +int (*module_plug_function)(gpointer globaldata); + +extern "C" const gchar* g_module_check_init(GModule *module) +{ + return(NULL); +} + +extern "C" const gchar* g_module_unload(GModule *module) +{ + return(NULL); +} + +void setTextDomain(bool plugdomain,plugData* pdata) +{ + if(plugdomain==true) + { + //set domain to plug + bindtextdomain(TEXTDOMAIN,LOCALEDIR); + textdomain(TEXTDOMAIN); + bind_textdomain_codeset(TEXTDOMAIN,"UTF-8"); + } + else + { + //resetdomain + bindtextdomain(currentdomain,pdata->locale); + textdomain(currentdomain); + bind_textdomain_codeset(currentdomain,"UTF-8"); + } +} + +void copySymbol(GtkWidget* widget,gpointer data) +{ + char *message=NULL; + gtk_clipboard_set_text(mainClipboard,gtk_menu_item_get_label((GtkMenuItem*)widget),-1); + + if((showStatus==false)) + return; + + gtk_statusbar_remove_all((GtkStatusbar*)statusWidget,0); + sinkReturn=asprintf(&message,"Copied %s to clipboard ...",gtk_menu_item_get_label((GtkMenuItem*)widget)); + gtk_statusbar_push((GtkStatusbar*)statusWidget,0,message); + free(message); + gtk_clipboard_set_text(mainClipboard,gtk_menu_item_get_label((GtkMenuItem*)widget),-1); +} + +extern "C" int addToGui(gpointer data) +{ + GtkWidget* menuitem; + GtkWidget* submenuitem; + GtkWidget* submenu; + GtkWidget* subsubmenu; + FILE* fd=NULL; + char buffer[2048]; + StringSlice *mystr=new StringSlice; + plugData *plugdata=(plugData*)data; + char *menulabel=NULL; + gchar *symbol=NULL; + char *filepath; + + menuPlug=gtk_menu_item_new_with_label("_Symbols"); + gtk_menu_item_set_use_underline((GtkMenuItem*)menuPlug,true); + submenu=gtk_menu_new(); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuPlug),submenu); + + mystr->setReturnDupString(false); + mainClipboard=gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); + + sinkReturn=asprintf(&filepath,"%s/indicator-chars.txt",plugdata->lPlugFolder); + fd=fopen(filepath,"r"); + if(fd==NULL) + { + free(filepath); + sinkReturn=asprintf(&filepath,"%s/indicator-chars.txt",plugdata->gPlugFolder); + fd=fopen(filepath,"r"); + } + + if(fd==NULL) + { + free(filepath); + sinkReturn=asprintf(&filepath,"%s/.indicator-chars.txt",getenv("HOME")); + fd=fopen(filepath,"r"); + } + + if(fd!=NULL) + { + free(filepath); + while(feof(fd)==0) + { + buffer[0]=0; + sinkReturnStr=fgets(buffer,2048,fd); + if(strlen(buffer)>0) + { + buffer[strlen(buffer)-1]=0; + menulabel=mystr->sliceBetween(buffer,(char*)"[",(char*)"]"); + if(strlen(menulabel)>0) + { + menuitem=gtk_menu_item_new_with_label(menulabel); + gtk_menu_shell_append(GTK_MENU_SHELL(submenu),menuitem); + menulabel=mystr->sliceBetween(buffer,(char*)"]",NULL); + if(g_utf8_strlen(menulabel,-1)>0) + { + subsubmenu=gtk_menu_new(); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem),subsubmenu); + for(int j=0;jmlist.menuBar),menuPlug); + gtk_widget_show_all(menuPlug); + return(0); +} + +extern "C" int doAbout(gpointer data) +{ + plugData *plugdata=(plugData*)data; + char *licencepath; + char *licence; + GtkAboutDialog *about; + char *translators; + + setTextDomain(true,plugdata); + + const char *aboutboxstring=gettext("Symbol Menu Plugin - Copy symbols to clipboard"); + sinkReturn=asprintf(&translators,"%s:\nNguyen Thanh Tung ",gettext("French Translation")); + sinkReturn=asprintf(&licencepath,"%s/docs/gpl-3.0.txt",plugdata->dataDir); + + g_file_get_contents(licencepath,&licence,NULL,NULL); + about=(GtkAboutDialog*)gtk_about_dialog_new(); + gtk_about_dialog_set_program_name(about,gettext("Symbol Menu Plugin")); + gtk_about_dialog_set_authors(about,authors); + gtk_about_dialog_set_comments(about,aboutboxstring); + gtk_about_dialog_set_copyright(about,COPYRITE); + gtk_about_dialog_set_version(about,PLUGVERSION); + gtk_about_dialog_set_website(about,KKEDITPAGE); + gtk_about_dialog_set_website_label(about,"KKEdit Homepage"); + gtk_about_dialog_set_logo_icon_name(about,ABOUTICON); + gtk_about_dialog_set_license(about,licence); + gtk_about_dialog_set_translator_credits(about,(const gchar*)translators); + gtk_window_set_transient_for((GtkWindow*)about,(GtkWindow*)plugdata->prefsWindow); + + gtk_dialog_run(GTK_DIALOG(about)); + gtk_widget_destroy((GtkWidget*)about); + free(licence); + free(licencepath); + free(translators); + setTextDomain(false,plugdata); + return(0); +} + +extern "C" int enablePlug(gpointer data) +{ + plugData* plugdata=(plugData*)data; + + if(plugdata->modData->unload==true) + { + gtk_widget_destroy(menuPlug); + gtk_widget_show_all(plugdata->mlist.menuBar); + } + else + { + if(g_module_symbol(plugdata->modData->module,"addToGui",(gpointer*)&module_plug_function)) + module_plug_function(data); + gtk_widget_show_all(plugdata->mlist.menuBar); + } + return(0); +} diff --git a/packages/debian/org.freedesktop.policykit.kkedit.policy b/packages/debian/org.freedesktop.policykit.kkedit.policy new file mode 100644 index 00000000..dd89b251 --- /dev/null +++ b/packages/debian/org.freedesktop.policykit.kkedit.policy @@ -0,0 +1,18 @@ + + + + + Run gedit program + Authentication is required to run KKEdit as root + accessories-text-editor + + auth_admin + auth_admin + auth_admin + + /usr/bin/<> + true + + \ No newline at end of file