Revision: 1413 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1413&view=re... Author: funto66 Date: 2010-05-30 05:07:00 +0000 (Sun, 30 May 2010)
Log Message: ----------- CodeNav: bugfix: some strings should not have been translatable. Thanks Frank for the patch.
Modified Paths: -------------- trunk/geany-plugins/codenav/src/codenavigation.h trunk/geany-plugins/codenav/src/goto_file.c trunk/geany-plugins/codenav/src/switch_head_impl.c
Modified: trunk/geany-plugins/codenav/src/codenavigation.h =================================================================== --- trunk/geany-plugins/codenav/src/codenavigation.h 2010-05-29 09:05:27 UTC (rev 1412) +++ trunk/geany-plugins/codenav/src/codenavigation.h 2010-05-30 05:07:00 UTC (rev 1413) @@ -46,7 +46,7 @@ #include "geanyfunctions.h" /* this wraps geany_functions function pointers */
/* Debug flag */ -/*#define CODE_NAVIGATION_DEBUG*/ +#define CODE_NAVIGATION_DEBUG
#define CODE_NAVIGATION_VERSION "0.1"
Modified: trunk/geany-plugins/codenav/src/goto_file.c =================================================================== --- trunk/geany-plugins/codenav/src/goto_file.c 2010-05-29 09:05:27 UTC (rev 1412) +++ trunk/geany-plugins/codenav/src/goto_file.c 2010-05-30 05:07:00 UTC (rev 1413) @@ -60,7 +60,7 @@ KEY_ID_GOTO_FILE, (GeanyKeyCallback)(&menu_item_activate), GDK_g, GDK_MOD1_MASK | GDK_SHIFT_MASK, - _("goto_file"), + "goto_file", _("Goto file"), /* used in the Preferences dialog */ menu_item); }
Modified: trunk/geany-plugins/codenav/src/switch_head_impl.c =================================================================== --- trunk/geany-plugins/codenav/src/switch_head_impl.c 2010-05-29 09:05:27 UTC (rev 1412) +++ trunk/geany-plugins/codenav/src/switch_head_impl.c 2010-05-30 05:07:00 UTC (rev 1413) @@ -60,6 +60,9 @@ static void on_configure_remove_language(GtkWidget* widget, gpointer data);
+static void +on_configure_cell_edited(GtkCellRendererText* text, gchar* arg1, gchar* arg2, gpointer data); + /* --------------------------------------------------------------------- * Initialization * --------------------------------------------------------------------- @@ -85,7 +88,7 @@ KEY_ID_SWITCH_HEAD_IMPL, (GeanyKeyCallback)(&menu_item_activate), GDK_s, GDK_MOD1_MASK | GDK_SHIFT_MASK, - _("switch_head_impl"), + "switch_head_impl", _("Switch header/implementation"), /* used in the Preferences dialog */ menu_item);
@@ -468,8 +471,8 @@ /* - add the columns */ /* -> headers : */ cell_renderer = gtk_cell_renderer_text_new(); - /* TODO ! Try it... */ - /* g_object_set(G_OBJECT(cell_renderer), "editable", TRUE, NULL); */ + g_object_set(G_OBJECT(cell_renderer), "editable", TRUE, NULL); + g_signal_connect(G_OBJECT(cell_renderer), "edited", G_CALLBACK(on_configure_cell_edited), GINT_TO_POINTER(COLUMN_HEAD)); column = gtk_tree_view_column_new_with_attributes( _("Headers extensions"), cell_renderer, "text", COLUMN_HEAD, NULL); @@ -477,11 +480,14 @@
/* -> implementations : */ cell_renderer = gtk_cell_renderer_text_new(); + g_object_set(G_OBJECT(cell_renderer), "editable", TRUE, NULL); + g_signal_connect(G_OBJECT(cell_renderer), "edited", G_CALLBACK(on_configure_cell_edited), GINT_TO_POINTER(COLUMN_IMPL)); column = gtk_tree_view_column_new_with_attributes( _("Implementations extensions"), cell_renderer, "text", COLUMN_IMPL, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view), column);
+ /* - finally add the GtkTreeView to the frame's vbox */ gtk_box_pack_start(GTK_BOX(vbox), tree_view, TRUE, TRUE, 6);
@@ -494,7 +500,6 @@
/* Add the "add" button to the frame's hbox */ add_button = gtk_button_new_from_stock(GTK_STOCK_ADD); - gtk_widget_set_sensitive(add_button, FALSE); /* TODO ! */ g_signal_connect(G_OBJECT(add_button), "clicked", G_CALLBACK(on_configure_add_language), tree_view); gtk_box_pack_start(GTK_BOX(hbox_buttons), add_button, FALSE, FALSE, 0);
@@ -514,8 +519,6 @@ static void on_configure_add_language(GtkWidget* widget, gpointer data) { - /* TODO : test it ! */ - GtkWidget* tree_view = (GtkWidget*)data; GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view))); GtkTreeIter tree_iter; @@ -532,6 +535,8 @@ path = gtk_tree_path_new_from_indices(nb_lines-1, -1);
column = gtk_tree_view_get_column(GTK_TREE_VIEW(tree_view), 0); + + /* TODO : why isn't the cell being edited, although we say "TRUE" as last parameter ?? */ gtk_tree_view_set_cursor(GTK_TREE_VIEW(tree_view), path, column, TRUE); gtk_widget_grab_focus(tree_view);
@@ -549,6 +554,18 @@ }
/* --------------------------------------------------------------------- + * Callback called when a cell has been edited in the configuration dialog + * --------------------------------------------------------------------- + */ +static void +on_configure_cell_edited(GtkCellRendererText* text, gchar* arg1, gchar* arg2, gpointer data) +{ + /* TODO !! */ + Column col = (Column)(GPOINTER_TO_INT(data)); + log_debug("arg1 == %s, arg2 == %s\n", arg1, arg2); +} + +/* --------------------------------------------------------------------- * Write the configuration of the feature * --------------------------------------------------------------------- */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org