Revision: 4154
http://geany.svn.sourceforge.net/geany/?rev=4154&view=rev
Author: eht16
Date: 2009-09-06 16:49:09 +0000 (Sun, 06 Sep 2009)
Log Message:
-----------
Improve the opening string in the plugin manager dialog.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/plugins.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-09-04 16:07:23 UTC (rev 4153)
+++ trunk/ChangeLog 2009-09-06 16:49:09 UTC (rev 4154)
@@ -1,3 +1,9 @@
+2009-09-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/plugins.c:
+ Improve the opening string in the plugin manager dialog.
+
+
2009-09-04 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/treeviews.c, src/document.c:
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2009-09-04 16:07:23 UTC (rev 4153)
+++ trunk/src/plugins.c 2009-09-06 16:49:09 UTC (rev 4154)
@@ -1231,8 +1231,7 @@
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(swin), GTK_SHADOW_IN);
gtk_container_add(GTK_CONTAINER(swin), pm_widgets.tree);
- label = geany_wrap_label_new(_("Below is a list of available plugins. "
- "Select the plugins which should be loaded when Geany is started."));
+ label = geany_wrap_label_new(_("Choose those plugins which should be loaded at startup"));
pm_widgets.configure_button = gtk_button_new_from_stock(GTK_STOCK_PREFERENCES);
gtk_widget_set_sensitive(pm_widgets.configure_button, FALSE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4153
http://geany.svn.sourceforge.net/geany/?rev=4153&view=rev
Author: ntrel
Date: 2009-09-04 16:07:23 +0000 (Fri, 04 Sep 2009)
Log Message:
-----------
Add/expand some comment info.
Modified Paths:
--------------
trunk/scripts/fix-alignment.pl
Modified: trunk/scripts/fix-alignment.pl
===================================================================
--- trunk/scripts/fix-alignment.pl 2009-09-04 16:00:15 UTC (rev 4152)
+++ trunk/scripts/fix-alignment.pl 2009-09-04 16:07:23 UTC (rev 4153)
@@ -3,7 +3,8 @@
# License: GNU GPL V2 or later, as published by the Free Software Foundation, USA.
# Warranty: NONE
-# Re-align C source code for Geany
+# Re-align C source code for Geany.
+# Doesn't handle indents/blank lines/anything complicated ;-)
use strict;
use warnings;
@@ -45,16 +46,18 @@
if (!($line =~ m,/\*|\*/|//|"|\\$|',) and !($line =~ m/^\s*[*#]/)) {
# make these operators have *one* space each side
# operators must have longer variants first
- # others require special handling: &,*,+,-,> can be (part of) unary op
+ # some require special handling below
my $ops = '<<=,<<,>>=,>>,<=,>=,<,||,|=,|,-=,+=,*=,/=,/,==,!=,%=,%,=';
$ops =~ s/([|*+])/\\$1/g; # escape regex chars
$ops =~ s/,/|/g;
$line =~ s/($ops)\s*/$1 /g; # space after op
$line =~ s/(\S)\s*($ops)/$1 $2/g; # space before op unless indent
+ # &,*,+,-,> can be (part of) unary op
# ignore no space after & address-of operator, enforce space around x & y operator
# ignore lines starting with &, ambiguous.
$line =~ s/([\w)])\s*&\s*([\w(]|$)/$1 & $2/g;
+ # TODO: other possible unarys
# space after statements
my $statements = 'for|if|while|switch';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4152
http://geany.svn.sourceforge.net/geany/?rev=4152&view=rev
Author: ntrel
Date: 2009-09-04 16:00:15 +0000 (Fri, 04 Sep 2009)
Log Message:
-----------
Add script to reformat C source code to Geany's style - work in progress.
Added Paths:
-----------
trunk/scripts/fix-alignment.pl
Added: trunk/scripts/fix-alignment.pl
===================================================================
--- trunk/scripts/fix-alignment.pl (rev 0)
+++ trunk/scripts/fix-alignment.pl 2009-09-04 16:00:15 UTC (rev 4152)
@@ -0,0 +1,82 @@
+#!/usr/bin/env perl
+# Copyright: 2009, Nick Treleaven
+# License: GNU GPL V2 or later, as published by the Free Software Foundation, USA.
+# Warranty: NONE
+
+# Re-align C source code for Geany
+
+use strict;
+use warnings;
+
+use Getopt::Std;
+
+my %args = ();
+getopts('w', \%args);
+my $opt_write = $args{'w'};
+
+my $argc = $#ARGV + 1;
+my $scriptname = $0;
+
+($argc == 1) or die <<END;
+Usage:
+$scriptname sourcefile [>outfile]
+ Print formatted output to STDOUT or outfile.
+ Warning: do not use the same file for both.
+
+$scriptname -w sourcefile
+ Writes to the file in-place.
+ Warning: backup your file(s) first or use clean version control files.
+END
+
+# TODO: operate on multiple files
+my ($infile) = @ARGV;
+my @lines;
+
+open(INPUT, $infile) or die "Couldn't open $infile for reading: $!\n";
+
+while (<INPUT>) {
+ my $line = $_; # read a line, including \n char
+
+ # strip trailing space & newline
+ $line =~ s/\s+$//g;
+
+ # for now, don't process lines with comments, strings, preproc, overflowed lines or chars
+ # multi-line comments are skipped if they start with ' * '.
+ if (!($line =~ m,/\*|\*/|//|"|\\$|',) and !($line =~ m/^\s*[*#]/)) {
+ # make these operators have *one* space each side
+ # operators must have longer variants first
+ # others require special handling: &,*,+,-,> can be (part of) unary op
+ my $ops = '<<=,<<,>>=,>>,<=,>=,<,||,|=,|,-=,+=,*=,/=,/,==,!=,%=,%,=';
+ $ops =~ s/([|*+])/\\$1/g; # escape regex chars
+ $ops =~ s/,/|/g;
+ $line =~ s/($ops)\s*/$1 /g; # space after op
+ $line =~ s/(\S)\s*($ops)/$1 $2/g; # space before op unless indent
+
+ # ignore no space after & address-of operator, enforce space around x & y operator
+ # ignore lines starting with &, ambiguous.
+ $line =~ s/([\w)])\s*&\s*([\w(]|$)/$1 & $2/g;
+
+ # space after statements
+ my $statements = 'for|if|while|switch';
+ $line =~ s/\b($statements)\b\s*/$1 /g;
+
+ # no space on inside of brackets
+ $line =~ s/\(\s+/(/g;
+ $line =~ s/\s+\)/)/g;
+ }
+ # strip trailing space again (e.g. trailing operator now has space afterwards)
+ $line =~ s/\s+$//g;
+
+ $opt_write or print $line."\n";
+ $opt_write and push(@lines, $line);
+}
+close(INPUT);
+
+$opt_write or exit;
+
+open(OUTPUT, ">$infile") or die "Couldn't open $infile for writing: $!\n";
+foreach my $line (@lines)
+{
+ print OUTPUT $line."\n";
+}
+close(OUTPUT);
Property changes on: trunk/scripts/fix-alignment.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4151
http://geany.svn.sourceforge.net/geany/?rev=4151&view=rev
Author: ntrel
Date: 2009-09-04 11:34:12 +0000 (Fri, 04 Sep 2009)
Log Message:
-----------
Apply patch from Thomas Martitz to improve sidebar type-ahead code:
Use gtk_notebook_set_current_page() instead of
document_open_file_full() when choosing an item from the documents
list.
Avoid using goto in document_open_file_full().
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
trunk/src/treeviews.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-09-04 11:21:29 UTC (rev 4150)
+++ trunk/ChangeLog 2009-09-04 11:34:12 UTC (rev 4151)
@@ -1,3 +1,13 @@
+2009-09-04 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/treeviews.c, src/document.c:
+ Apply patch from Thomas Martitz to improve sidebar type-ahead code:
+ Use gtk_notebook_set_current_page() instead of
+ document_open_file_full() when choosing an item from the documents
+ list.
+ Avoid using goto in document_open_file_full().
+
+
2009-09-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/treeviews.c, src/document.c, src/document.h, THANKS:
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2009-09-04 11:21:29 UTC (rev 4150)
+++ trunk/src/document.c 2009-09-04 11:34:12 UTC (rev 4151)
@@ -1231,112 +1231,112 @@
if (doc != NULL)
{
ui_add_recent_file(utf8_filename); /* either add or reorder recent item */
- g_free(utf8_filename);
- g_free(locale_filename);
document_check_disk_status(doc, TRUE); /* force a file changed check */
- goto end;
}
}
- display_filename = utils_str_middle_truncate(utf8_filename, 100);
+ if (reload || (!reload && doc != NULL))
+ { /* doc possibly changed */
+ display_filename = utils_str_middle_truncate(utf8_filename, 100);
- /* if default encoding for opening files is set, use it if no forced encoding is set */
- if (file_prefs.default_open_encoding >= 0 && forced_enc == NULL)
- forced_enc = encodings[file_prefs.default_open_encoding].charset;
+ /* if default encoding for opening files is set, use it if no forced encoding is set */
+ if (file_prefs.default_open_encoding >= 0 && forced_enc == NULL)
+ forced_enc = encodings[file_prefs.default_open_encoding].charset;
- if (! load_text_file(locale_filename, display_filename, &filedata, forced_enc))
- {
- g_free(display_filename);
- g_free(utf8_filename);
- g_free(locale_filename);
- return NULL;
- }
+ if (! load_text_file(locale_filename, display_filename, &filedata, forced_enc))
+ {
+ g_free(display_filename);
+ g_free(utf8_filename);
+ g_free(locale_filename);
+ return NULL;
+ }
- if (! reload)
- {
- doc = document_create(utf8_filename);
- g_return_val_if_fail(doc != NULL, NULL); /* really should not happen */
+ if (! reload)
+ {
+ doc = document_create(utf8_filename);
+ g_return_val_if_fail(doc != NULL, NULL); /* really should not happen */
- /* file exists on disk, set real_path */
- setptr(doc->real_path, tm_get_real_path(locale_filename));
+ /* file exists on disk, set real_path */
+ setptr(doc->real_path, tm_get_real_path(locale_filename));
- doc->priv->is_remote = utils_is_remote_path(locale_filename);
- monitor_file_setup(doc);
- }
+ doc->priv->is_remote = utils_is_remote_path(locale_filename);
+ monitor_file_setup(doc);
+ }
- sci_set_undo_collection(doc->editor->sci, FALSE); /* avoid creation of an undo action */
- sci_empty_undo_buffer(doc->editor->sci);
+ sci_set_undo_collection(doc->editor->sci, FALSE); /* avoid creation of an undo action */
+ sci_empty_undo_buffer(doc->editor->sci);
- /* add the text to the ScintillaObject */
- sci_set_readonly(doc->editor->sci, FALSE); /* to allow replacing text */
- sci_set_text(doc->editor->sci, filedata.data); /* NULL terminated data */
- queue_colourise(doc); /* Ensure the document gets colourised. */
+ /* add the text to the ScintillaObject */
+ sci_set_readonly(doc->editor->sci, FALSE); /* to allow replacing text */
+ sci_set_text(doc->editor->sci, filedata.data); /* NULL terminated data */
+ queue_colourise(doc); /* Ensure the document gets colourised. */
- /* detect & set line endings */
- editor_mode = utils_get_line_endings(filedata.data, filedata.len);
- sci_set_eol_mode(doc->editor->sci, editor_mode);
- g_free(filedata.data);
+ /* detect & set line endings */
+ editor_mode = utils_get_line_endings(filedata.data, filedata.len);
+ sci_set_eol_mode(doc->editor->sci, editor_mode);
+ g_free(filedata.data);
- sci_set_undo_collection(doc->editor->sci, TRUE);
+ sci_set_undo_collection(doc->editor->sci, TRUE);
- doc->priv->mtime = filedata.mtime; /* get the modification time from file and keep it */
- g_free(doc->encoding); /* if reloading, free old encoding */
- doc->encoding = filedata.enc;
- doc->has_bom = filedata.bom;
- store_saved_encoding(doc); /* store the opened encoding for undo/redo */
+ doc->priv->mtime = filedata.mtime; /* get the modification time from file and keep it */
+ g_free(doc->encoding); /* if reloading, free old encoding */
+ doc->encoding = filedata.enc;
+ doc->has_bom = filedata.bom;
+ store_saved_encoding(doc); /* store the opened encoding for undo/redo */
- doc->readonly = readonly || filedata.readonly;
- sci_set_readonly(doc->editor->sci, doc->readonly);
+ doc->readonly = readonly || filedata.readonly;
+ sci_set_readonly(doc->editor->sci, doc->readonly);
- /* update line number margin width */
- doc->priv->line_count = sci_get_line_count(doc->editor->sci);
- sci_set_line_numbers(doc->editor->sci, editor_prefs.show_linenumber_margin, 0);
+ /* update line number margin width */
+ doc->priv->line_count = sci_get_line_count(doc->editor->sci);
+ sci_set_line_numbers(doc->editor->sci, editor_prefs.show_linenumber_margin, 0);
- /* set the cursor position according to pos, cl_options.goto_line and cl_options.goto_column */
- pos = set_cursor_position(doc->editor, pos);
+ /* set the cursor position according to pos, cl_options.goto_line and cl_options.goto_column */
+ pos = set_cursor_position(doc->editor, pos);
- if (! reload)
- {
+ if (! reload)
+ {
- /* "the" SCI signal (connect after initial setup(i.e. adding text)) */
- g_signal_connect(doc->editor->sci, "sci-notify", G_CALLBACK(editor_sci_notify_cb),
- doc->editor);
+ /* "the" SCI signal (connect after initial setup(i.e. adding text)) */
+ g_signal_connect(doc->editor->sci, "sci-notify", G_CALLBACK(editor_sci_notify_cb),
+ doc->editor);
- use_ft = (ft != NULL) ? ft : filetypes_detect_from_document(doc);
- }
- else
- { /* reloading */
- document_undo_clear(doc);
+ use_ft = (ft != NULL) ? ft : filetypes_detect_from_document(doc);
+ }
+ else
+ { /* reloading */
+ document_undo_clear(doc);
- use_ft = ft;
- }
- /* update taglist, typedef keywords and build menu if necessary */
- document_set_filetype(doc, use_ft);
+ use_ft = ft;
+ }
+ /* update taglist, typedef keywords and build menu if necessary */
+ document_set_filetype(doc, use_ft);
- /* set indentation settings after setting the filetype */
- if (reload)
- editor_set_indent_type(doc->editor, doc->editor->indent_type); /* resetup sci */
- else
- set_indentation(doc->editor);
+ /* set indentation settings after setting the filetype */
+ if (reload)
+ editor_set_indent_type(doc->editor, doc->editor->indent_type); /* resetup sci */
+ else
+ set_indentation(doc->editor);
- document_set_text_changed(doc, FALSE); /* also updates tab state */
- ui_document_show_hide(doc); /* update the document menu */
+ document_set_text_changed(doc, FALSE); /* also updates tab state */
+ ui_document_show_hide(doc); /* update the document menu */
- /* finally add current file to recent files menu, but not the files from the last session */
- if (! main_status.opening_session_files)
- ui_add_recent_file(utf8_filename);
+ /* finally add current file to recent files menu, but not the files from the last session */
+ if (! main_status.opening_session_files)
+ ui_add_recent_file(utf8_filename);
- if (! reload)
- g_signal_emit_by_name(geany_object, "document-open", doc);
+ if (! reload)
+ g_signal_emit_by_name(geany_object, "document-open", doc);
- if (reload)
- ui_set_statusbar(TRUE, _("File %s reloaded."), display_filename);
- else
- /* For translators: this is the status window message for opening a file. %d is the number
- * of the newly opened file, %s indicates whether the file is opened read-only
- * (it is replaced with the string ", read-only"). */
- msgwin_status_add(_("File %s opened(%d%s)."),
- display_filename, gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)),
- (readonly) ? _(", read-only") : "");
+ if (reload)
+ ui_set_statusbar(TRUE, _("File %s reloaded."), display_filename);
+ else
+ /* For translators: this is the status window message for opening a file. %d is the number
+ * of the newly opened file, %s indicates whether the file is opened read-only
+ * (it is replaced with the string ", read-only"). */
+ msgwin_status_add(_("File %s opened(%d%s)."),
+ display_filename, gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)),
+ (readonly) ? _(", read-only") : "");
+ }
g_free(display_filename);
g_free(utf8_filename);
@@ -1346,7 +1346,6 @@
* based on a configurable interval */
/*g_timeout_add(10000, auto_update_tag_list, doc);*/
-end:
/* now bring the file in front */
editor_goto_pos(doc->editor, pos, FALSE);
Modified: trunk/src/treeviews.c
===================================================================
--- trunk/src/treeviews.c 2009-09-04 11:21:29 UTC (rev 4150)
+++ trunk/src/treeviews.c 2009-09-04 11:34:12 UTC (rev 4151)
@@ -721,16 +721,15 @@
/* use switch_notebook_page to ignore changing the notebook page because it is already done */
if (gtk_tree_selection_get_selected(selection, &model, &iter) && ! ignore_callback)
{
- gint pos;
gtk_tree_model_get(model, &iter, DOCUMENTS_DOCUMENT, &doc, -1);
if (! doc)
return FALSE; /* parent */
- pos = sci_get_current_position(doc->editor->sci);
- /* we could just reload, but that would destroy the notification about
- * the file being modified if it was externally, so fill in all required fields */
- document_open_file_full(NULL, doc->file_name, pos,
- doc->readonly, doc->file_type, doc->encoding);
+ /* switch to the doc and grab the focus */
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(main_widgets.notebook),
+ gtk_notebook_page_num(GTK_NOTEBOOK(main_widgets.notebook),
+ (GtkWidget*) doc->editor->sci));
+ change_focus_to_editor(doc);
}
return FALSE;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4150
http://geany.svn.sourceforge.net/geany/?rev=4150&view=rev
Author: ntrel
Date: 2009-09-04 11:21:29 +0000 (Fri, 04 Sep 2009)
Log Message:
-----------
Minor edits: list FSF, use $0 for scriptname.
Modified Paths:
--------------
trunk/scripts/changelist.pl
Modified: trunk/scripts/changelist.pl
===================================================================
--- trunk/scripts/changelist.pl 2009-09-03 12:14:58 UTC (rev 4149)
+++ trunk/scripts/changelist.pl 2009-09-04 11:21:29 UTC (rev 4150)
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
# Copyright: 2008-2009, Nick Treleaven
-# License: GNU GPL V2 or later
+# License: GNU GPL V2 or later, as published by the Free Software Foundation, USA.
# Warranty: NONE
# Searches a ChangeLog file for a line matching 'matchstring', then matches
@@ -24,12 +24,11 @@
use strict;
use warnings;
-my $scriptname = "changelist.pl";
my $argc = $#ARGV + 1;
($argc == 2) or die <<END;
Usage:
-$scriptname matchstring changelogfile >outfile
+$0 matchstring changelogfile >outfile
matchstring is not case sensitive.
END
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4147
http://geany.svn.sourceforge.net/geany/?rev=4147&view=rev
Author: elextr
Date: 2009-09-03 04:32:05 +0000 (Thu, 03 Sep 2009)
Log Message:
-----------
Ensure uses of filename are protected against nulls when running
a build command and give status message if not.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-09-03 03:40:21 UTC (rev 4146)
+++ trunk/ChangeLog 2009-09-03 04:32:05 UTC (rev 4147)
@@ -3,6 +3,9 @@
* src/build.c, src/filetypes.h, src/filetypes.c
Only write filetype config files when build command or regex is
actually changed. Removed commented code in src/filetypes.c.
+ * src/build.c
+ Ensure uses of filename are protected against nulls when running
+ a build command and give status message if not.
2009-09-01 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2009-09-03 03:40:21 UTC (rev 4146)
+++ trunk/src/build.c 2009-09-03 04:32:05 UTC (rev 4147)
@@ -504,7 +504,7 @@
gchar* ret_str; /* to be freed when not in use anymore */
stack = g_string_new(src);
- if (doc!=NULL)
+ if (doc!=NULL && doc->file_name!=NULL)
{
filename = utils_get_utf8_from_locale(doc->file_name);
@@ -534,7 +534,7 @@
else if (strstr(stack->str, "%p"))
{ /* fall back to %d */
ui_set_statusbar(FALSE, _("failed to substitute %%p, no project active"));
- if (doc!=NULL)
+ if (doc!=NULL && filename!=NULL)
replacement = g_path_get_dirname(filename);
}
@@ -568,7 +568,12 @@
gint stderr_fd;
#endif
- g_return_val_if_fail(doc!=NULL || dir!=NULL, (GPid) 1);
+ if(!( (doc!=NULL && NZV(doc->file_name)) || NZV(dir) ))
+ {
+ geany_debug("Failed to run command with no working directory");
+ ui_set_statusbar(TRUE, _("Process failed, no working directory"));
+ return (GPid)1;
+ }
if (doc!=NULL)
clear_errors(doc);
@@ -712,7 +717,7 @@
if (! result)
{
ui_set_statusbar(TRUE, _("Failed to execute \"%s\" (start-script could not be created)"),
- cmd_string);
+ NZV(cmd_string) ? cmd_string: NULL);
}
utils_free_pointers(4, cmd_string, tmp, executable, locale_filename, NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4145
http://geany.svn.sourceforge.net/geany/?rev=4145&view=rev
Author: ntrel
Date: 2009-09-01 17:20:34 +0000 (Tue, 01 Sep 2009)
Log Message:
-----------
Remove plugin from plugin manager dialog on unloading if it no
longer exists or is incompatible.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/plugins.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-09-01 08:26:00 UTC (rev 4144)
+++ trunk/ChangeLog 2009-09-01 17:20:34 UTC (rev 4145)
@@ -1,3 +1,10 @@
+2009-09-01 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/plugins.c:
+ Remove plugin from plugin manager dialog on unloading if it no
+ longer exists or is incompatible.
+
+
2009-08-31 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/plugins.c:
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2009-09-01 08:26:00 UTC (rev 4144)
+++ trunk/src/plugins.c 2009-09-01 17:20:34 UTC (rev 4145)
@@ -1034,20 +1034,27 @@
/* reload plugin module and initialize it if item is checked */
p = plugin_new(file_name, state, TRUE);
- if (state)
- keybindings_load_keyfile(); /* load shortcuts */
+ if (!p)
+ {
+ /* plugin file may no longer be on disk, or is now incompatible */
+ gtk_list_store_remove(pm_widgets.store, &iter);
+ }
+ else
+ {
+ if (state)
+ keybindings_load_keyfile(); /* load shortcuts */
- /* update model */
- gtk_list_store_set(pm_widgets.store, &iter,
- PLUGIN_COLUMN_CHECK, state,
- PLUGIN_COLUMN_PLUGIN, p, -1);
+ /* update model */
+ gtk_list_store_set(pm_widgets.store, &iter,
+ PLUGIN_COLUMN_CHECK, state,
+ PLUGIN_COLUMN_PLUGIN, p, -1);
+ /* set again the sensitiveness of the configure and help buttons */
+ is_active = is_active_plugin(p);
+ gtk_widget_set_sensitive(pm_widgets.configure_button, p->configure != NULL && is_active);
+ gtk_widget_set_sensitive(pm_widgets.help_button, p->help != NULL && is_active);
+ }
g_free(file_name);
-
- /* set again the sensitiveness of the configure and help buttons */
- is_active = is_active_plugin(p);
- gtk_widget_set_sensitive(pm_widgets.configure_button, p->configure != NULL && is_active);
- gtk_widget_set_sensitive(pm_widgets.help_button, p->help != NULL && is_active);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.