I constantly have many files open from different projects with the same file name this gets quite confusing.
So i have add a right click for the treebrowser plugin which will close all files under the folders path this allows me to quickly close a number of files for a project i have finished working with.
The codes below if some one would like to merge it, if you need a patch file or similar let me know preferably with how to make it, as this is the first patch i have made to a project like this.
static void on_menu_close_children(GtkMenuItem *menuitem, gchar *uri) { /* go through all documents match with current folder path, and close */ guint nb_documents = geany->documents_array->len;
int i; int uri_len=strlen(uri); for(i=0;i<GEANY(documents_array)->len;i++){ if(documents[i]->is_valid) { if(strlen(documents[i]->file_name)>uri_len){ if(strncmp(uri,documents[i]->file_name,uri_len)==0){ document_close(documents[i]); } } } } }
item = ui_image_menu_item_new(GTK_STOCK_CLOSE, g_strdup_printf(_("Close %s Children "), name)); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect(item, "activate", G_CALLBACK(on_menu_close_children), uri); gtk_widget_set_sensitive(item, is_dir);
On 8 February 2011 02:58, oliver.marks oliver.marks@gforces.co.uk wrote:
I constantly have many files open from different projects with the same file name this gets quite confusing.
So i have add a right click for the treebrowser plugin which will close all files under the folders path this allows me to quickly close a number of files for a project i have finished working with.
The codes below if some one would like to merge it, if you need a patch file or similar let me know preferably with how to make it, as this is the first patch i have made to a project like this.
Hi,
Its preferable to get a patch, it reduces the risk of errors. For instance you don't say which source file this goes in, patches do all that.
How did you get the source?
If you checked out SVN then you just need a "svn diff >file_to_attach_to_mail".
If you used a tarball then you will need to re-extract the source file you changed to a differrent directory and do "diff original_file changed_file >file_to_attach_to_mail
Cheers Lex
static void on_menu_close_children(GtkMenuItem *menuitem, gchar *uri) { /* go through all documents match with current folder path, and close */ guint nb_documents = geany->documents_array->len;
int i; int uri_len=strlen(uri); for(i=0;i<GEANY(documents_array)->len;i++){ if(documents[i]->is_valid) { if(strlen(documents[i]->file_name)>uri_len){ if(strncmp(uri,documents[i]->file_name,uri_len)==0){ document_close(documents[i]); } } } } }
item = ui_image_menu_item_new(GTK_STOCK_CLOSE, g_strdup_printf(_("Close %s Children "), name)); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect(item, "activate", G_CALLBACK(on_menu_close_children), uri); gtk_widget_set_sensitive(item, is_dir);
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Hi,
Its preferable to get a patch, it reduces the risk of errors. For instance you don't say which source file this goes in, patches do all that.
How did you get the source?
If you checked out SVN then you just need a "svn diff >file_to_attach_to_mail".
Cheers for that info patch attached to this email, and i now know how to make patch files :)
If you used a tarball then you will need to re-extract the source file you changed to a differrent directory and do "diff original_file changed_file >file_to_attach_to_mail
Cheers Lex
static void on_menu_close_children(GtkMenuItem *menuitem, gchar *uri) { /* go through all documents match with current folder path, and close */ guint nb_documents = geany->documents_array->len;
int i; int uri_len=strlen(uri); for(i=0;i<GEANY(documents_array)->len;i++){ if(documents[i]->is_valid) { if(strlen(documents[i]->file_name)>uri_len){ if(strncmp(uri,documents[i]->file_name,uri_len)==0){ document_close(documents[i]); } } } } }
item = ui_image_menu_item_new(GTK_STOCK_CLOSE, g_strdup_printf(_("Close %s Children "), name)); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect(item, "activate", G_CALLBACK(on_menu_close_children), uri); gtk_widget_set_sensitive(item, is_dir);
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Hi Oliver,
I can now see that your patch is actually to the treebrowser plugin, not to Geany itself. Plugins are separately developed and maintained, see http://plugins.geany.org/treebrowser.html for info on that plugin. At the very bottom it says where to submit patches for this plugin.
Of course you may be lucky and the plugin author may be watching this list and shortcut the process.
Cheers Lex
On 8 February 2011 19:13, oliver.marks oliver.marks@gforces.co.uk wrote:
Hi,
Its preferable to get a patch, it reduces the risk of errors. For instance you don't say which source file this goes in, patches do all that.
How did you get the source?
If you checked out SVN then you just need a "svn diff >file_to_attach_to_mail".
Cheers for that info patch attached to this email, and i now know how to make patch files :)
If you used a tarball then you will need to re-extract the source file you changed to a differrent directory and do "diff original_file changed_file >file_to_attach_to_mail
Cheers Lex
static void on_menu_close_children(GtkMenuItem *menuitem, gchar *uri) { /* go through all documents match with current folder path, and close */ guint nb_documents = geany->documents_array->len;
int i; int uri_len=strlen(uri); for(i=0;i<GEANY(documents_array)->len;i++){ if(documents[i]->is_valid) { if(strlen(documents[i]->file_name)>uri_len){ if(strncmp(uri,documents[i]->file_name,uri_len)==0){ document_close(documents[i]); } } } } }
item = ui_image_menu_item_new(GTK_STOCK_CLOSE, g_strdup_printf(_("Close %s Children "), name)); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect(item, "activate", G_CALLBACK(on_menu_close_children), uri); gtk_widget_set_sensitive(item, is_dir);
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Okay did not realise i had to submit it differently hopefully added it correctly at this link https://sourceforge.net/tracker/?group_id=222729&atid=1056534 just incase.
On Tue, 2011-02-08 at 19:31 +1100, Lex Trotman wrote:
Hi Oliver,
I can now see that your patch is actually to the treebrowser plugin, not to Geany itself. Plugins are separately developed and maintained, see http://plugins.geany.org/treebrowser.html for info on that plugin. At the very bottom it says where to submit patches for this plugin.
Of course you may be lucky and the plugin author may be watching this list and shortcut the process.
Cheers Lex
On 8 February 2011 19:13, oliver.marks oliver.marks@gforces.co.uk wrote:
Hi,
Its preferable to get a patch, it reduces the risk of errors. For instance you don't say which source file this goes in, patches do all that.
How did you get the source?
If you checked out SVN then you just need a "svn diff >file_to_attach_to_mail".
Cheers for that info patch attached to this email, and i now know how to make patch files :)
If you used a tarball then you will need to re-extract the source file you changed to a differrent directory and do "diff original_file changed_file >file_to_attach_to_mail
Cheers Lex
static void on_menu_close_children(GtkMenuItem *menuitem, gchar *uri) { /* go through all documents match with current folder path, and close */ guint nb_documents = geany->documents_array->len;
int i; int uri_len=strlen(uri); for(i=0;i<GEANY(documents_array)->len;i++){ if(documents[i]->is_valid) { if(strlen(documents[i]->file_name)>uri_len){ if(strncmp(uri,documents[i]->file_name,uri_len)==0){ document_close(documents[i]); } } } } }
item = ui_image_menu_item_new(GTK_STOCK_CLOSE, g_strdup_printf(_("Close %s Children "), name)); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect(item, "activate", G_CALLBACK(on_menu_close_children), uri); gtk_widget_set_sensitive(item, is_dir);
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel