diff options
author | 2009-01-03 22:50:12 -0500 | |
---|---|---|
committer | 2009-01-03 22:50:12 -0500 | |
commit | c15e9a9cf36da02cb883eb14fd3a4ee23548f675 (patch) | |
tree | be8de81c387208fa5011399d31df5c772e626f50 /src/textadept.c | |
parent | fd48dede42c0678e4a5410bd635a02d255fe89d6 (diff) | |
download | textadept-c15e9a9cf36da02cb883eb14fd3a4ee23548f675.tar.gz textadept-c15e9a9cf36da02cb883eb14fd3a4ee23548f675.zip |
Added localization support.
All Textadept messages are in core/locale.lua which provides the new
'textadept.locale' module.
Diffstat (limited to 'src/textadept.c')
-rw-r--r-- | src/textadept.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/textadept.c b/src/textadept.c index 136cd18b..4d08af59 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -53,7 +53,7 @@ static void pm_row_activated(GtkTreeView *, GtkTreePath *, GtkTreeViewColumn *, gpointer); static gbool pm_button_press(GtkTreeView *, GdkEventButton *event, gpointer); static gbool pm_popup_menu(GtkWidget *, gpointer); -static void pm_menu_activate(GtkWidget *menu_item, gpointer); +static void pm_menu_activate(GtkWidget *menu_item, gpointer menu_id); // Find/Replace GtkWidget *findbox, *find_entry, *replace_entry; @@ -746,16 +746,17 @@ void pm_popup_context_menu(GdkEventButton *event) { /** * Performs a Lua action for a selected Project Manager menu item. * @param menu_item The menu item. + * @param menu_id The numeric ID for the menu item. * @see l_pm_perform_menu_action */ -void pm_process_selected_menu_item(GtkWidget *menu_item) { +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); + l_pm_perform_menu_action(text, menu_id); } /** @@ -875,8 +876,8 @@ static gbool pm_popup_menu(GtkWidget *, gpointer) { * Signal for a selected Project Manager menu item. * @see pm_process_selected_menu_item */ -static void pm_menu_activate(GtkWidget *menu_item, gpointer) { - pm_process_selected_menu_item(menu_item); +static void pm_menu_activate(GtkWidget *menu_item, gpointer menu_id) { + pm_process_selected_menu_item(menu_item, reinterpret_cast<int>(menu_id)); } // Find/Replace |