diff --git a/MAINTAINERS b/MAINTAINERS index 4ca7f3049..f03100b00 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -95,11 +95,6 @@ M: Frank Lanitz W: http://frank.uvena.de/en/Geany/geanylatex/ S: Maintained -geanylipsum -P: Frank Lanitz -M: Frank Lanitz -W: http://plugins.geany.org/geanylipsum.html -S: Maintained geanylua P: @@ -173,6 +168,12 @@ M: Sylvan Mostert W: S: Maintained +lipsum +P: Frank Lanitz +M: Frank Lanitz +W: http://plugins.geany.org/lipsum.html +S: Maintained + markdown P: Matthew Brush M: Matthew Brush diff --git a/Makefile.am b/Makefile.am index 7b59b0706..1a1a99565 100644 --- a/Makefile.am +++ b/Makefile.am @@ -59,10 +59,6 @@ if ENABLE_GEANYLATEX SUBDIRS += geanylatex endif -if ENABLE_GEANYLIPSUM -SUBDIRS += geanylipsum -endif - if ENABLE_GEANYLUA SUBDIRS += geanylua endif @@ -108,6 +104,10 @@ if ENABLE_LINEOPERATIONS SUBDIRS += lineoperations endif +if ENABLE_LIPSUM +SUBDIRS += lipsum +endif + if ENABLE_MARKDOWN SUBDIRS += markdown endif diff --git a/NEWS b/NEWS index 01d84b5c2..5fdc9b7e0 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ Geany Plugins 1.29 (not yet released) - No changes by now. + General: + * Rename plugin GeanyLipsum to Lipsum (PR#472) Geany Plugins 1.28 (2016-07-10) diff --git a/README b/README index 88f9b45d7..01434b0c0 100644 --- a/README +++ b/README @@ -60,7 +60,6 @@ Available plugins are: * ``geanygendoc`` -- the GeanyGenDoc plugin * ``geanyinsertnum`` -- the GeanyInsertNum plugin * ``geanylatex`` -- the GeanyLaTeX plugin -* ``geanylipsum`` -- the GeanyLipsum plugin * ``geanylua`` -- the GeanyLua plugin * ``geanymacro`` -- the GeanyMacro plugin * ``geanyminiscript`` -- the GeanyMiniScript plugin @@ -73,6 +72,7 @@ Available plugins are: * ``gitchangebar`` -- the GitChangeBar plugin * ``gtkspell`` -- GeanyVC's spell-check support * ``lineoperations`` -- simple line functions that can be applied to an open file +* ``lipsum`` -- the Lipsum plugin * ``markdown`` -- the Markdown plugin * ``multiterm`` -- the multiterm plugin * ``overview``-- the overview plugin diff --git a/build/geanylipsum.m4 b/build/geanylipsum.m4 deleted file mode 100644 index d48db2c4f..000000000 --- a/build/geanylipsum.m4 +++ /dev/null @@ -1,9 +0,0 @@ -AC_DEFUN([GP_CHECK_GEANYLIPSUM], -[ - GP_ARG_DISABLE([GeanyLipsum], [auto]) - GP_COMMIT_PLUGIN_STATUS([GeanyLipsum]) - AC_CONFIG_FILES([ - geanylipsum/Makefile - geanylipsum/src/Makefile - ]) -]) diff --git a/build/lipsum.m4 b/build/lipsum.m4 new file mode 100644 index 000000000..8c711f0cf --- /dev/null +++ b/build/lipsum.m4 @@ -0,0 +1,9 @@ +AC_DEFUN([GP_CHECK_LIPSUM], +[ + GP_ARG_DISABLE([Lipsum], [auto]) + GP_COMMIT_PLUGIN_STATUS([Lipsum]) + AC_CONFIG_FILES([ + lipsum/Makefile + lipsum/src/Makefile + ]) +]) diff --git a/configure.ac b/configure.ac index 83e458050..ed1b782db 100644 --- a/configure.ac +++ b/configure.ac @@ -43,7 +43,6 @@ GP_CHECK_GEANYEXTRASEL GP_CHECK_GEANYGENDOC GP_CHECK_GEANYINSERTNUM GP_CHECK_GEANYLATEX -GP_CHECK_GEANYLIPSUM GP_CHECK_GEANYLUA GP_CHECK_GEANYMACRO GP_CHECK_GEANYMINISCRIPT @@ -55,6 +54,7 @@ GP_CHECK_GEANYPG GP_CHECK_GENIUSPASTE GP_CHECK_GITCHANGEBAR GP_CHECK_LINEOPERATIONS +GP_CHECK_LIPSUM GP_CHECK_MARKDOWN GP_CHECK_MULTITERM GP_CHECK_OVERVIEW diff --git a/geanylipsum/src/Makefile.am b/geanylipsum/src/Makefile.am deleted file mode 100644 index 4e733a5ff..000000000 --- a/geanylipsum/src/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -include $(top_srcdir)/build/vars.build.mk -plugin = geanylipsum - -geanyplugins_LTLIBRARIES = geanylipsum.la - -geanylipsum_la_SOURCES = geanylipsum.c -geanylipsum_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyLipsum\" -geanylipsum_la_LIBADD = $(COMMONLIBS) - -include $(top_srcdir)/build/cppcheck.mk diff --git a/geanylipsum/AUTHORS b/lipsum/AUTHORS similarity index 100% rename from geanylipsum/AUTHORS rename to lipsum/AUTHORS diff --git a/geanylipsum/COPYING b/lipsum/COPYING similarity index 100% rename from geanylipsum/COPYING rename to lipsum/COPYING diff --git a/geanylipsum/ChangeLog b/lipsum/ChangeLog similarity index 89% rename from geanylipsum/ChangeLog rename to lipsum/ChangeLog index 84ddfa087..2ed5a347a 100644 --- a/geanylipsum/ChangeLog +++ b/lipsum/ChangeLog @@ -1,3 +1,6 @@ +####################### +# Not in usage anymore +####################### 2010-09-23 Frank Lanitz * Replace deprecated PLUGIN_KEY_GROUP macro. @@ -10,7 +13,7 @@ 2009-04-11 Frank Lanitz - * Add not complete part of Lorem Ipsum text if there is any at end of + * Add not complete part of Lorem Ipsum text if there is any at end of insertion. diff --git a/geanylipsum/INSTALL b/lipsum/INSTALL similarity index 100% rename from geanylipsum/INSTALL rename to lipsum/INSTALL diff --git a/geanylipsum/Makefile.am b/lipsum/Makefile.am similarity index 74% rename from geanylipsum/Makefile.am rename to lipsum/Makefile.am index b04cccf1e..ddeecd9d0 100644 --- a/geanylipsum/Makefile.am +++ b/lipsum/Makefile.am @@ -1,4 +1,4 @@ include $(top_srcdir)/build/vars.auxfiles.mk SUBDIRS = src -plugin = geanylipsum +plugin = lipsum diff --git a/geanylipsum/NEWS b/lipsum/NEWS similarity index 100% rename from geanylipsum/NEWS rename to lipsum/NEWS diff --git a/geanylipsum/README b/lipsum/README similarity index 85% rename from geanylipsum/README rename to lipsum/README index 3aa4fa5c3..c47b8d1f7 100644 --- a/geanylipsum/README +++ b/lipsum/README @@ -1,12 +1,12 @@ -GeanyLipsum ------------ +Lipsum +------ .. contents:: About ------ -GeanyLipsum is a plugin for Geany that implements a Lorem Ipsum +Lipsum is a plugin for Geany that implements a Lorem Ipsum generator to insert placeholder text into your document. @@ -41,9 +41,9 @@ github.com. Get the code by: git clone https://github.com/geany/geany-plugins.git If you want to create a patch, please respect the license of -GeanyLipsum as well as intellectual property of third. Patches that +Lipsum as well as intellectual property of third. Patches that should be included to the default distribution must be licensed under -the same conditions as GeanyLipsum by the copyright owner (GPL2+). +the same conditions as Lipsum by the copyright owner (GPL2+). Known issues @@ -58,7 +58,7 @@ https://github.com/geany/geany-plugins/issues License ------- -GeanyLipsum and all its parts is distributed under the terms of the +Lipsum and all its parts is distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of this license can be found in the file COPYING @@ -75,6 +75,3 @@ Frank Lanitz (frank(at)geany(dot)org). Please also do so, if you got any questions and visiting http://plugins.geany.org didn't help you to figure out the answer. Visiting the website is also a good start if you want to check for any update on this plugin. - -A more historical page can be found at -http://frank.uvena.de/en/Geany/geanylipsum diff --git a/lipsum/src/Makefile.am b/lipsum/src/Makefile.am new file mode 100644 index 000000000..e3711cebb --- /dev/null +++ b/lipsum/src/Makefile.am @@ -0,0 +1,10 @@ +include $(top_srcdir)/build/vars.build.mk +plugin = lipsum + +geanyplugins_LTLIBRARIES = lipsum.la + +lipsum_la_SOURCES = lipsum.c +lipsum_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"Lipsum\" +lipsum_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk diff --git a/geanylipsum/src/geanylipsum.c b/lipsum/src/lipsum.c similarity index 70% rename from geanylipsum/src/geanylipsum.c rename to lipsum/src/lipsum.c index 0f484b3ee..bd4d063ec 100644 --- a/geanylipsum/src/geanylipsum.c +++ b/lipsum/src/lipsum.c @@ -1,7 +1,7 @@ /* - * geanylipsum.c + * lipsum.c * - * Copyright 2008-2015 Frank Lanitz + * Copyright 2008-2016 Frank Lanitz * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +28,10 @@ #endif #include +#include +#include +#include + GeanyPlugin *geany_plugin; GeanyData *geany_data; @@ -36,9 +40,9 @@ PLUGIN_VERSION_CHECK(224) PLUGIN_SET_TRANSLATABLE_INFO( LOCALEDIR, GETTEXT_PACKAGE, - _("GeanyLipsum"), + _("Lipsum"), _("Creating dummy text with Geany"), - "0.4.4", + VERSION, "Frank Lanitz ") static GtkWidget *main_menu_item = NULL; @@ -144,12 +148,69 @@ plugin_init(G_GNUC_UNUSED GeanyData *data) GtkWidget *menu_lipsum = NULL; GKeyFile *config = g_key_file_new(); gchar *config_file = NULL; + gchar *config_file_old = NULL; + gchar *config_dir = NULL; + gchar *config_dir_old = NULL; GeanyKeyGroup *key_group; + config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, "geanylipsum", G_DIR_SEPARATOR_S, "lipsum.conf", NULL); + #ifndef G_OS_WIN32 + /* We try only to move if we are on not Windows platform */ + config_dir_old = g_build_filename(geany->app->configdir, + "plugins", "geanylipsum", NULL); + config_file_old = g_build_filename(config_dir_old, + "lipsum.conf", NULL); + config_dir = g_build_filename(geany->app->configdir, + "plugins", "lipsum", NULL); + if (g_file_test(config_file_old, G_FILE_TEST_EXISTS)) + { + if (dialogs_show_question( + _("Renamed plugin detected!\n" + "\n" + "As you may have already noticed, GeanyLipsum has been " + "renamed to just Lipsum. \n" + "Geany is able to migrate your old plugin configuration by " + "moving the old configuration file to new location.\n" + "Warning: This will not include your keybindings.\n" + "Move now?"))) + { + if (g_rename(config_dir_old, config_dir) == 0) + { + dialogs_show_msgbox(GTK_MESSAGE_INFO, + _("Your configuration directory has been " + "successfully moved from \"%s\" to \"%s\"."), + config_dir_old, config_dir); + } + else + { + /* If there was an error on migrating we need + * to load from original one. + * When saving new configuration it will go to + * new folder so migration should + * be implicit. */ + g_free(config_file); + config_file = g_strdup(config_file_old); + dialogs_show_msgbox( + GTK_MESSAGE_WARNING, + _("Your old configuration directory \"%s\" could " + "not be moved to \"%s\" (%s). " + "Please manually move the directory to the new location."), + config_dir_old, + config_dir, + g_strerror(errno)); + } + } + } + + g_free(config_dir_old); + g_free(config_dir); + g_free(config_file_old); + #endif + /* Initialising options from config file if there is any*/ g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL); lipsum = utils_get_setting_string(config, "snippets", "lipsumtext", default_loremipsum); @@ -171,7 +232,7 @@ plugin_init(G_GNUC_UNUSED GeanyData *data) main_menu_item = menu_lipsum; /* init keybindings */ - key_group = plugin_set_key_group(geany_plugin, "geanylipsum", COUNT_KB, NULL); + key_group = plugin_set_key_group(geany_plugin, "lipsum", COUNT_KB, NULL); keybindings_set_item(key_group, LIPSUM_KB_INSERT, kblipsum_insert, 0, 0, "insert_lipsum", _("Insert Lipsum text"), menu_lipsum); } diff --git a/po/POTFILES.in b/po/POTFILES.in index 715487af0..35ec494af 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -148,9 +148,6 @@ geanylatex/src/latexencodings.c geanylatex/src/latexstructure.c geanylatex/src/reftex.c -# geanylipsum -geanylipsum/src/geanylipsum.c - # geanyLua geanylua/glspi.h geanylua/glspi_ver.h @@ -221,6 +218,9 @@ git-changebar/src/gcb-plugin.c # LineOperations lineoperations/src/lineoperations.c +# lipsum +lipsum/src/lipsum.c + # Markdown markdown/src/conf.c markdown/src/plugin.c