Re: [Geany-devel] [geanyprj] coding style patch

2011-12-13 Thread Matthew Brush

On 12/12/2011 11:02 PM, Yura Siamashka wrote:

Hi

Sorry I didn't follow conversion to github and I am not really familiar with 
new workflow.

So as GeanyPrj maintainer how do I commit patch to mainline? Should my github user be 
added to main geany-plugins repository or I need to create new fork with 
related changes and create pull request to main geany-plugins from time to time?



I think Frank asked for Github usernames in another thread for this.


This github stuff is a bit confusing for me.



There was some discussion about doing something like this:

1. Go to github.com/geany/geany-plugins and click Fork
2. Go to github.com/you/geany-plugins and get the clone URL
3. From terminal:
  $ git clone address from github in step 2
  $ cd geany-plugins/geanyprj
  $ git checkout -b your-topic-branch
  hack, commit, hack, commit, ...
4. git push origin your-topic-branch
5. Go to github.com/you/geany-plugins/tree/your-topic-branch and click 
the Pull Request button.


Or we might end up just working from the main repository ourselves like 
we did with SVN, unless someone can step up to review all the pull requests.


Frank did you decide on a best practice yet?

Cheers,
Matthew Brush




On 12/12/2011 06:51 AM, Johann SAUNIER wrote:

Hi there,

This is a new patch for Geanyprj. It doesn't implement any functionality
or bug fix. It's only a cosmetic patch to comply to Geany's coding
conventions.

Since geany-plugins has moved on GitHub, is there an equivalent to the
tracker-patches functionality of SourceForge for sending patches ?



Yep,

In Github land it's called a pull request.  While logged in to Github,
navigate to the geany-plugins repository and click the fork button.
It will make a copy of the repository under your account.  Create a new
branch, hack away and when it's ready, click the Pull request button
on Github and it will notify committers that you have something ready in
your branch to be merged.

Of course like you did here on the ML is fine too, but it's easier to
loose track of if it's not persistent somewhere.

Cheers,
Matthew Brush
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel





___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] [geanyprj] coding style patch

2011-12-13 Thread Frank Lanitz
Am 13.12.2011 09:11, schrieb Matthew Brush:
 On 12/12/2011 11:02 PM, Yura Siamashka wrote:
 Hi

 Sorry I didn't follow conversion to github and I am not really
 familiar with new workflow.

 So as GeanyPrj maintainer how do I commit patch to mainline? Should my
 github user be added to main geany-plugins repository or I need to
 create new fork with related changes and create pull request to main
 geany-plugins from time to time?

 
 I think Frank asked for Github usernames in another thread for this.
 
 This github stuff is a bit confusing for me.

 
 There was some discussion about doing something like this:
 
 1. Go to github.com/geany/geany-plugins and click Fork
 2. Go to github.com/you/geany-plugins and get the clone URL
 3. From terminal:
   $ git clone address from github in step 2
   $ cd geany-plugins/geanyprj
   $ git checkout -b your-topic-branch
   hack, commit, hack, commit, ...
 4. git push origin your-topic-branch
 5. Go to github.com/you/geany-plugins/tree/your-topic-branch and click
 the Pull Request button.
 
 Or we might end up just working from the main repository ourselves like
 we did with SVN, unless someone can step up to review all the pull
 requests.
 
 Frank did you decide on a best practice yet?

I'd really like to see the workflow as you described inside the numbered
section. But as I'm not god its a bit up to community what's the best
way ;)

Cheers,
Frank
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


[Geany-devel] [geanyprj] coding style patch

2011-12-12 Thread Johann SAUNIER
Hi there,

This is a new patch for Geanyprj. It doesn't implement any functionality or
bug fix. It's only a cosmetic patch to comply to Geany's coding conventions.

Since geany-plugins has moved on GitHub, is there an equivalent to the
tracker-patches functionality of SourceForge for sending patches ?


Thanks,
Johann
From 9003959d1f9e422498d20639e6ea4e36d05468f1 Mon Sep 17 00:00:00 2001
From: Johann Saunier jsaunier.de...@gmail.com
Date: Mon, 12 Dec 2011 15:21:41 +0100
Subject: [PATCH] cosmetics for conforming to Geany's rules

- run scripts/fix-alignment.pl
- replace int by gint
- put functions' prototypes and their return type one the same line
- remove spaces between * and the identifier
- replace C++ style comments with C comments
---
 geanyprj/src/geanyprj.c |   32 +++---
 geanyprj/src/geanyprj.h |   92 +++---
 geanyprj/src/menu.c |   41 +--
 geanyprj/src/project.c  |  103 +++
 geanyprj/src/sidebar.c  |   85 +++---
 geanyprj/src/utils.c|   28 ++---
 geanyprj/src/xproject.c |   51 +++
 7 files changed, 206 insertions(+), 226 deletions(-)

diff --git a/geanyprj/src/geanyprj.c b/geanyprj/src/geanyprj.c
index 44bd831..a8f28b1 100644
--- a/geanyprj/src/geanyprj.c
+++ b/geanyprj/src/geanyprj.c
@@ -51,8 +51,7 @@ enum
 PLUGIN_KEY_GROUP(geanyprj, KB_COUNT)
 
 
-static void
-reload_project()
+static void reload_project()
 {
 	gchar *dir;
 	gchar *proj;
@@ -87,8 +86,8 @@ reload_project()
 		g_free(proj);
 }
 
-static void
-on_doc_save(G_GNUC_UNUSED GObject * obj, GeanyDocument * doc, G_GNUC_UNUSED gpointer user_data)
+
+static void on_doc_save(G_GNUC_UNUSED GObject *obj, GeanyDocument *doc, G_GNUC_UNUSED gpointer user_data)
 {
 	gchar *name;
 
@@ -103,20 +102,21 @@ on_doc_save(G_GNUC_UNUSED GObject * obj, GeanyDocument * doc, G_GNUC_UNUSED gpoi
 	xproject_update_tag(doc-file_name);
 }
 
-static void
-on_doc_open(G_GNUC_UNUSED GObject * obj, G_GNUC_UNUSED GeanyDocument * doc,
-	G_GNUC_UNUSED gpointer user_data)
+
+static void on_doc_open(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED GeanyDocument *doc,
+		G_GNUC_UNUSED gpointer user_data)
 {
 	reload_project();
 }
 
-static void
-on_doc_activate(G_GNUC_UNUSED GObject * obj, G_GNUC_UNUSED GeanyDocument * doc,
-		G_GNUC_UNUSED gpointer user_data)
+
+static void on_doc_activate(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED GeanyDocument *doc,
+			G_GNUC_UNUSED gpointer user_data)
 {
 	reload_project();
 }
 
+
 PluginCallback plugin_callbacks[] = {
 	{document-open, (GCallback)  on_doc_open, TRUE, NULL},
 	{document-save, (GCallback)  on_doc_save, TRUE, NULL},
@@ -124,16 +124,16 @@ PluginCallback plugin_callbacks[] = {
 	{NULL, NULL, FALSE, NULL}
 };
 
+
 /* Keybinding callback */
-static void
-kb_find_in_project()
+static void kb_find_in_project()
 {
 	on_find_in_project(NULL, NULL);
 }
 
+
 /* Called by Geany to initialize the plugin */
-void
-plugin_init(G_GNUC_UNUSED GeanyData * data)
+void plugin_init(G_GNUC_UNUSED GeanyData *data)
 {
 	main_locale_init(LOCALEDIR, GETTEXT_PACKAGE);
 	tools_menu_init();
@@ -147,9 +147,9 @@ plugin_init(G_GNUC_UNUSED GeanyData * data)
 			_(Find a text in geanyprj's project), NULL);
 }
 
+
 /* Called by Geany before unloading the plugin. */
-void
-plugin_cleanup()
+void plugin_cleanup()
 {
 	tools_menu_uninit();
 
diff --git a/geanyprj/src/geanyprj.h b/geanyprj/src/geanyprj.h
index be8fe89..3c2202a 100644
--- a/geanyprj/src/geanyprj.h
+++ b/geanyprj/src/geanyprj.h
@@ -69,68 +69,60 @@ extern GeanyFunctions *geany_functions;
 extern const gchar *project_type_string[NEW_PROJECT_TYPE_SIZE];
 extern void *project_type_filter[NEW_PROJECT_TYPE_SIZE];
 
-// project.c
-struct GeanyPrj *geany_project_new();
-struct GeanyPrj *geany_project_load(const gchar * path);
-void geany_project_free(struct GeanyPrj *prj);
 
+/* project.c */
+struct GeanyPrj *geany_project_new(void);
+struct GeanyPrj *geany_project_load(const gchar *path);
+void geany_project_free(struct GeanyPrj *prj);
 void geany_project_regenerate_file_list(struct GeanyPrj *prj);
-
-gboolean geany_project_add_file(struct GeanyPrj *prj, const gchar * path);
-gboolean geany_project_remove_file(struct GeanyPrj *prj, const gchar * path);
+gboolean geany_project_add_file(struct GeanyPrj *prj, const gchar *path);
+gboolean geany_project_remove_file(struct GeanyPrj *prj, const gchar *path);
 void geany_project_save(struct GeanyPrj *prj);
-
-void geany_project_set_path(struct GeanyPrj *prj, const gchar * path);
-void geany_project_set_name(struct GeanyPrj *prj, const gchar * name);
+void geany_project_set_path(struct GeanyPrj *prj, const gchar *path);
+void geany_project_set_name(struct GeanyPrj *prj, const gchar *name);
 void geany_project_set_type_int(struct GeanyPrj *prj, gint val);
-void geany_project_set_type_string(struct GeanyPrj *prj, const gchar * val);
+void geany_project_set_type_string(struct GeanyPrj 

Re: [Geany-devel] [geanyprj] coding style patch

2011-12-12 Thread Matthew Brush

On 12/12/2011 06:51 AM, Johann SAUNIER wrote:

Hi there,

This is a new patch for Geanyprj. It doesn't implement any functionality
or bug fix. It's only a cosmetic patch to comply to Geany's coding
conventions.

Since geany-plugins has moved on GitHub, is there an equivalent to the
tracker-patches functionality of SourceForge for sending patches ?



Yep,

In Github land it's called a pull request.  While logged in to Github, 
navigate to the geany-plugins repository and click the fork button. 
It will make a copy of the repository under your account.  Create a new 
branch, hack away and when it's ready, click the Pull request button 
on Github and it will notify committers that you have something ready in 
your branch to be merged.


Of course like you did here on the ML is fine too, but it's easier to 
loose track of if it's not persistent somewhere.


Cheers,
Matthew Brush
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] [geanyprj] coding style patch

2011-12-12 Thread Yura Siamashka
Hi

Sorry I didn't follow conversion to github and I am not really familiar with 
new workflow.

So as GeanyPrj maintainer how do I commit patch to mainline? Should my github 
user be added to main geany-plugins repository or I need to create new fork 
with related changes and create pull request to main geany-plugins from time to 
time?

This github stuff is a bit confusing for me.
 

 On 12/12/2011 06:51 AM, Johann SAUNIER wrote:
  Hi there,
 
  This is a new patch for Geanyprj. It doesn't implement any functionality
  or bug fix. It's only a cosmetic patch to comply to Geany's coding
  conventions.
 
  Since geany-plugins has moved on GitHub, is there an equivalent to the
  tracker-patches functionality of SourceForge for sending patches ?
 
 
 Yep,
 
 In Github land it's called a pull request.  While logged in to Github, 
 navigate to the geany-plugins repository and click the fork button. 
 It will make a copy of the repository under your account.  Create a new 
 branch, hack away and when it's ready, click the Pull request button 
 on Github and it will notify committers that you have something ready in 
 your branch to be merged.
 
 Of course like you did here on the ML is fine too, but it's easier to 
 loose track of if it's not persistent somewhere.
 
 Cheers,
 Matthew Brush
 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


-- 
Yura Siamashka yura...@gmail.com
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel