Branch: refs/heads/master
Author: Frank Lanitz <frank(a)frank.uvena.de>
Committer: Frank Lanitz <frank(a)frank.uvena.de>
Date: Wed, 10 Aug 2016 18:32:23 UTC
Commit: fb48d40c276019af80871fb74d0738d0bafbbf23
https://github.com/geany/geany-plugins/commit/fb48d40c276019af80871fb74d073…
Log Message:
-----------
Update plugins's name in README and code
Modified Paths:
--------------
lipsum/README
lipsum/src/lipsum.c
Modified: lipsum/README
13 lines changed, 5 insertions(+), 8 deletions(-)
===================================================================
@@ -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
Modified: lipsum/src/lipsum.c
8 lines changed, 4 insertions(+), 4 deletions(-)
===================================================================
@@ -1,7 +1,7 @@
/*
- * geanylipsum.c
+ * lipsum.c
*
- * Copyright 2008-2015 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
+ * Copyright 2008-2016 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
*
* 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
@@ -36,9 +36,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 <frank(a)frank.uvena.de>")
static GtkWidget *main_menu_item = NULL;
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Frank Lanitz <frank(a)frank.uvena.de>
Committer: Frank Lanitz <frank(a)frank.uvena.de>
Date: Wed, 10 Aug 2016 18:32:23 UTC
Commit: 8068fa2503d6812b08cd42a525e96b70b16548ea
https://github.com/geany/geany-plugins/commit/8068fa2503d6812b08cd42a525e96…
Log Message:
-----------
Make ChangeLog as not used anymore
Modified Paths:
--------------
lipsum/ChangeLog
Modified: lipsum/ChangeLog
5 lines changed, 4 insertions(+), 1 deletions(-)
===================================================================
@@ -1,3 +1,6 @@
+#######################
+# Not in usage anymore
+#######################
2010-09-23 Frank Lanitz <frank(a)frank.uvena.de>
* Replace deprecated PLUGIN_KEY_GROUP macro.
@@ -10,7 +13,7 @@
2009-04-11 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
- * 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.
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Frank Lanitz <frank(a)frank.uvena.de>
Committer: Frank Lanitz <frank(a)frank.uvena.de>
Date: Wed, 10 Aug 2016 18:32:23 UTC
Commit: c4cabd9c622d6eaf464ae58cd71b934174f32e89
https://github.com/geany/geany-plugins/commit/c4cabd9c622d6eaf464ae58cd71b9…
Log Message:
-----------
Add migration of configuration files
Modified Paths:
--------------
lipsum/src/lipsum.c
Modified: lipsum/src/lipsum.c
60 lines changed, 60 insertions(+), 0 deletions(-)
===================================================================
@@ -28,6 +28,10 @@
#endif
#include <geanyplugin.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <errno.h>
+
GeanyPlugin *geany_plugin;
GeanyData *geany_data;
@@ -144,12 +148,68 @@ 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_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S,
+ "plugins", G_DIR_SEPARATOR_S, "geanylipsum", NULL);
+ config_file_old = g_strconcat(config_dir_old, G_DIR_SEPARATOR_S,
+ "lipsum.conf", NULL);
+ config_dir = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S,
+ "plugins", G_DIR_SEPARATOR_S, "lipsum", NULL);
+ if (g_file_test(config_file_old, G_FILE_TEST_EXISTS))
+ {
+ if (dialogs_show_question(
+ _("Renamed plugin detected!\n"
+ "\n"
+ "GeanyLipsum has been renamed to Lipsum -- you surely have "
+ "already recognised it. \n"
+ "Geany is able to migrate your old plugin configuration by "
+ "moving the old configuration file to new location.\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 move manually 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);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).