Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Sun, 29 Mar 2015 19:42:56 UTC
Commit: bd3ee19093940e860a18d460eda4effec5661f40
https://github.com/geany/geany-plugins/commit/bd3ee19093940e860a18d460eda4e…
Log Message:
-----------
projectorganizer: Update docs
Modified Paths:
--------------
projectorganizer/README
Modified: projectorganizer/README
9 lines changed, 1 insertions(+), 8 deletions(-)
===================================================================
@@ -83,9 +83,7 @@ use patterns "\*.c \*h \*.am \*.ac" to see the source files together with
automake and autoconf files. If no patterns are defined (default), Project Organizer
treats this as the "\*" pattern in which case all files under the project directory
are displayed. After closing the dialog, the files matching the patterns
-should appear in the sidebar under the Project tab (unless the Project Organizer
-plugin was loaded for the first time and Geany project was already open - see
-Known Issues for more details).
+should appear in the sidebar under the Project tab.
Additional settings are available from the Project Organizer tab under the Project
properties dialog. You can define patterns to distinguish between header and source
@@ -200,11 +198,6 @@ Project Organizer adds an extra entry into the context menu of the editor:
Known issues
============
-* When the plugin is loaded from the Plugin Manager for the first time and a project
- is already open, no files are displayed in the sidebar. The workaround is to
- reload the project in this case. The issue is caused by Geany only passing the project
- configuration file to a plugin when the project is opened, which isn't the case when
- the plugin is loaded.
* There might be some issues with UTF8 file names - the testing has been very
limited.
* In general it is not a good idea to use both the Project Organizer and GeanyPrj
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Sun, 29 Mar 2015 19:36:51 UTC
Commit: f4c61f69dd0407d0c5f325a66b6f13fc1e041684
https://github.com/geany/geany-plugins/commit/f4c61f69dd0407d0c5f325a66b6f1…
Log Message:
-----------
projectorganizer: Add a (hacky) way to show the file tree when the plugin is enabled
See the comment in the code for more info.
Modified Paths:
--------------
projectorganizer/src/prjorg-main.c
projectorganizer/src/prjorg-sidebar.c
Modified: projectorganizer/src/prjorg-main.c
33 lines changed, 28 insertions(+), 5 deletions(-)
===================================================================
@@ -124,10 +124,13 @@ static void on_project_dialog_close(G_GNUC_UNUSED GObject * obj, GtkWidget * not
static void on_project_open(G_GNUC_UNUSED GObject * obj, GKeyFile * config,
G_GNUC_UNUSED gpointer user_data)
{
- prjorg_project_open(config);
- prjorg_sidebar_update(TRUE);
- prjorg_sidebar_activate(TRUE);
- prjorg_menu_activate_menu_items(TRUE);
+ if (!prj_org)
+ {
+ prjorg_project_open(config);
+ prjorg_sidebar_update(TRUE);
+ prjorg_sidebar_activate(TRUE);
+ prjorg_menu_activate_menu_items(TRUE);
+ }
}
@@ -141,12 +144,13 @@ static void on_project_close(G_GNUC_UNUSED GObject * obj, G_GNUC_UNUSED gpointer
}
+/* May be called also after plugin_init(), see plugin_init() for more info */
static void on_project_save(G_GNUC_UNUSED GObject * obj, GKeyFile * config,
G_GNUC_UNUSED gpointer user_data)
{
if (!prj_org)
{
- /* happens when the project is created */
+ /* happens when the project is created or the plugin is loaded */
prjorg_project_open(config);
prjorg_sidebar_update(TRUE);
prjorg_sidebar_activate(TRUE);
@@ -172,10 +176,29 @@ PluginCallback plugin_callbacks[] = {
};
+static gboolean write_config_cb(gpointer user_data)
+{
+ if (geany_data->app->project && !prj_org)
+ project_write_config();
+ return FALSE;
+}
+
+
void plugin_init(G_GNUC_UNUSED GeanyData * data)
{
prjorg_menu_init();
prjorg_sidebar_init();
+ /* If the project is already open, we won't get the project-open signal
+ * when the plugin is enabled in the plugin manager so the plugin won't
+ * reload the project tree. However, we can force the call of the
+ * project-save signal emission whose handler does a similar thing like
+ * project-open so we get the same effect.
+ *
+ * For some reason this doesn't work when called directly from plugin_init()
+ * so perform on idle instead. Also use low priority so hopefully normal
+ * project opening happens before and we don't unnecessarily rewrite the
+ * project file. */
+ g_idle_add_full(G_PRIORITY_LOW, write_config_cb, NULL, NULL);
}
Modified: projectorganizer/src/prjorg-sidebar.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1328,7 +1328,7 @@ void prjorg_sidebar_init(void)
g_signal_connect(G_OBJECT(s_file_view), "key-press-event",
G_CALLBACK(on_key_press), NULL);
- set_intro_message(_("(Re)open project to start using the plugin"));
+ set_intro_message(_("Open a project to start using the plugin"));
prjorg_sidebar_activate(FALSE);
/**** popup menu ****/
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Sun, 29 Mar 2015 19:36:51 UTC
Commit: dd2658ca799f19d5df0279ac01faf928c940ee85
https://github.com/geany/geany-plugins/commit/dd2658ca799f19d5df0279ac01faf…
Log Message:
-----------
projectorganizer: set file open dialog folder to base_path when adding external directory
There's a good chance that the external directory is
around (e.g. one level up). (Unfortunately plugins
don't have access to the default project directory
settings so we cannot use it.)
Modified Paths:
--------------
projectorganizer/src/prjorg-sidebar.c
Modified: projectorganizer/src/prjorg-sidebar.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -291,6 +291,7 @@ static void on_add_external(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED
GTK_WINDOW(geany->main_widgets->window), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("Add"), GTK_RESPONSE_ACCEPT, NULL);
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), geany_data->app->project->base_path);
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
{
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Alexander Blesius <onkel-pflaume(a)web.de>
Committer: Alexander Blesius <onkel-pflaume(a)web.de>
Date: Sun, 29 Mar 2015 12:22:36 UTC
Commit: 7507198a35cb9e9259a85024ec02d11e26910d01
https://github.com/geany/geany-plugins/commit/7507198a35cb9e9259a85024ec02d…
Log Message:
-----------
typo
Modified Paths:
--------------
geanypy/geany/plugin.py
Modified: geanypy/geany/plugin.py
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -79,7 +79,7 @@ def __plugin_name__(self):
string name of the plugin.
"""
raise NotImplementedError(
- "Plugin's must implement the __plugin_name__ attribute.")
+ "Plugins must implement the __plugin_name__ attribute.")
@property
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).