diff options
author | 2009-01-26 16:54:56 -0500 | |
---|---|---|
committer | 2009-01-26 16:54:56 -0500 | |
commit | 10398566eb46ae7b76844c77501461ce1945755e (patch) | |
tree | 6c311fced5ec35db3a3d525fc1be7b890b321ca4 /src | |
parent | de75865048797117e548d894051a7ce76cbe4b05 (diff) | |
download | textadept-10398566eb46ae7b76844c77501461ce1945755e.tar.gz textadept-10398566eb46ae7b76844c77501461ce1945755e.zip |
Menu label text is irrelevant for PM menu actions due to l10n; focus on menu_id.
Diffstat (limited to 'src')
-rw-r--r-- | src/lua_interface.c | 9 | ||||
-rw-r--r-- | src/textadept.c | 4 | ||||
-rw-r--r-- | src/textadept.h | 2 |
3 files changed, 4 insertions, 11 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c index 02771be1..023bd7c0 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -350,8 +350,6 @@ int l_add_scintilla_buffer(sptr_t doc) { lua_newtable(lua); lua_pushnumber(lua, doc); lua_setfield(lua, -2, "doc_pointer"); - lua_pushboolean(lua, false); - lua_setfield(lua, -2, "dirty"); l_cfunc(lua, l_cf_buffer_find, "find"); l_cfunc(lua, l_cf_buffer_text_range, "text_range"); l_cfunc(lua, l_cf_buffer_delete, "delete"); @@ -969,17 +967,14 @@ void l_pm_perform_action() { * Performs a selected menu action from an item's context menu in the Project * Manager. * The full path table for the item is at the top of the Lua stack. - * @param menu_item The label text for the menu item clicked. * @param menu_id The numeric ID for the menu item. */ -void l_pm_perform_menu_action(const char *menu_item, int menu_id) { +void l_pm_perform_menu_action(int menu_id) { if (!l_is_ta_table_function("pm", "perform_menu_action")) return; l_insert(lua, -1); // shift full_path down - lua_pushstring(lua, menu_item); - l_insert(lua, -1); // shift full_path down lua_pushnumber(lua, menu_id); l_insert(lua, -1); // shift full_path down - l_call_function(3); + l_call_function(2); } // Find/Replace diff --git a/src/textadept.c b/src/textadept.c index 2ab4091c..b85dcabb 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -774,13 +774,11 @@ void pm_popup_context_menu(GdkEventButton *event) { * @see l_pm_perform_menu_action */ void pm_process_selected_menu_item(GtkWidget *menu_item, int menu_id) { - GtkWidget *label = gtk_bin_get_child(GTK_BIN(menu_item)); - const char *text = gtk_label_get_text(GTK_LABEL(label)); GtkTreePath *path; GtkTreeViewColumn *column; gtk_tree_view_get_cursor(GTK_TREE_VIEW(pm_view), &path, &column); l_pm_get_full_path(path); - l_pm_perform_menu_action(text, menu_id); + l_pm_perform_menu_action(menu_id); } /** diff --git a/src/textadept.h b/src/textadept.h index c0677ae2..f991cc77 100644 --- a/src/textadept.h +++ b/src/textadept.h @@ -98,7 +98,7 @@ void l_pm_populate(GtkTreeIter *initial_iter); void l_pm_get_full_path(GtkTreePath *path); void l_pm_perform_action(); void l_pm_popup_context_menu(GdkEventButton *event, GCallback callback); -void l_pm_perform_menu_action(const char *menu_item, int menu_id); +void l_pm_perform_menu_action(int menu_id); void l_find(const char *ftext, bool next); void l_find_replace(const char *rtext); |