SF.net SVN: geany:[5687] trunk
colombanw at users.sourceforge.net
colombanw at xxxxx
Sun Apr 3 17:52:49 UTC 2011
Revision: 5687
http://geany.svn.sourceforge.net/geany/?rev=5687&view=rev
Author: colombanw
Date: 2011-04-03 17:52:49 +0000 (Sun, 03 Apr 2011)
Log Message:
-----------
Fix ID of newly added commands in the `Set Custom Commands` dialog
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tools.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-03 17:25:27 UTC (rev 5686)
+++ trunk/ChangeLog 2011-04-03 17:52:49 UTC (rev 5687)
@@ -18,6 +18,8 @@
Fix loading and updating menu accelerators for custom commands.
* src/prefs.c:
Don't allow editing keybinding column of group rows.
+ * src/tools.c:
+ Fix ID of newly added commands in the `Set Custom Commands` dialog.
2011-04-02 Colomban Wendling <colomban(at)geany(dot)org>
Modified: trunk/src/tools.c
===================================================================
--- trunk/src/tools.c 2011-04-03 17:25:27 UTC (rev 5686)
+++ trunk/src/tools.c 2011-04-03 17:52:49 UTC (rev 5687)
@@ -65,7 +65,7 @@
/* custom commands code*/
struct cc_dialog
{
- gint count;
+ guint count;
GtkWidget *view;
GtkTreeViewColumn *edit_column;
GtkListStore *store;
@@ -133,13 +133,14 @@
{
GtkTreeIter iter;
const gchar *cmd;
+ guint id = cc->count;
cmd = (idx >= 0) ? ui_prefs.custom_commands[idx] : NULL;
+ cc->count++;
gtk_list_store_append(cc->store, &iter);
- gtk_list_store_set(cc->store, &iter, CC_COLUMN_ID, cc->count, CC_COLUMN_CMD, cmd, -1);
+ gtk_list_store_set(cc->store, &iter, CC_COLUMN_ID, id, CC_COLUMN_CMD, cmd, -1);
cc_dialog_update_row_status(cc->store, &iter, cmd);
- cc->count++;
if (start_editing)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list