aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2010-03-10 02:55:33 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2010-03-10 02:55:33 -0500
commit69aa7111af192403ee612be1aaa87555beabe145 (patch)
tree9501f45bc24d535084da5dddce2087073b90edae /src
parent9ccdc7a172c6a60ce948e4c5093603f02b530750 (diff)
Removed side pane.
Diffstat (limited to 'src')
-rw-r--r--src/lua_interface.c209
-rw-r--r--src/textadept.c231
-rw-r--r--src/textadept.h8
3 files changed, 3 insertions, 445 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c
index acdb4524..7752dcc5 100644
--- a/src/lua_interface.c
+++ b/src/lua_interface.c
@@ -42,7 +42,6 @@ static int l_buffer_mt_index(lua_State *), l_buffer_mt_newindex(lua_State *),
l_bufferp_mt_index(lua_State *), l_bufferp_mt_newindex(lua_State *),
l_view_mt_index(lua_State *), l_view_mt_newindex(lua_State *),
l_ta_mt_index(lua_State *), l_ta_mt_newindex(lua_State *),
- l_pm_mt_index(lua_State *), l_pm_mt_newindex(lua_State *),
l_find_mt_index(lua_State *), l_find_mt_newindex(lua_State *),
l_ce_mt_index(lua_State *), l_ce_mt_newindex(lua_State *);
@@ -53,9 +52,6 @@ static int l_cf_buffer_delete(lua_State *), l_cf_buffer_text_range(lua_State *),
l_cf_ta_goto_window(lua_State *), l_cf_view_goto_buffer(lua_State *),
l_cf_ta_gtkmenu(lua_State *), l_cf_ta_iconv(lua_State *),
l_cf_ta_reset(lua_State *), l_cf_ta_quit(lua_State *),
- l_cf_pm_activate(lua_State *), l_cf_pm_add_browser(lua_State *),
- l_cf_pm_clear(lua_State *), l_cf_pm_fill(lua_State *),
- l_cf_pm_focus(lua_State *), l_cf_pm_show_context_menu(lua_State *),
l_cf_find_focus(lua_State *), l_cf_find_next(lua_State *),
l_cf_find_prev(lua_State *), l_cf_find_replace(lua_State *),
l_cf_find_replace_all(lua_State *), l_cf_ce_focus(lua_State *),
@@ -93,15 +89,6 @@ int l_init(int argc, char **argv, int reinit) {
lua_newtable(lua);
lua_newtable(lua);
- l_cfunc(lua, l_cf_pm_activate, "activate");
- l_cfunc(lua, l_cf_pm_add_browser, "add_browser");
- l_cfunc(lua, l_cf_pm_clear, "clear");
- l_cfunc(lua, l_cf_pm_fill, "fill");
- l_cfunc(lua, l_cf_pm_focus, "focus");
- l_cfunc(lua, l_cf_pm_show_context_menu, "show_context_menu");
- l_mt(lua, "_pm_mt", l_pm_mt_index, l_pm_mt_newindex);
- lua_setfield(lua, -2, "pm");
- lua_newtable(lua);
l_cfunc(lua, l_cf_find_next, "find_next");
l_cfunc(lua, l_cf_find_prev, "find_prev");
l_cfunc(lua, l_cf_find_focus, "focus");
@@ -701,57 +688,6 @@ void l_ta_popup_context_menu(GdkEventButton *event) {
} else lua_pop(lua, 1);
}
-// Project Manager
-
-/**
- * Creates a Lua table of parent nodes for the given Project Manager treeview
- * path and returns a reference to it.
- * The first table item is the PM Entry text, the next items are parents of the
- * given node in descending order, and the last item is the given node itself.
- * The reference can be retrieved using lua_rawgeti.
- * @param store The GtkTreeStore of the PM view.
- * @param path The GtkTreePath of the node. If NULL, only the PM Entry text is
- * contained in the resulting table.
- * @return int reference to the created table in LUA_REGISTRYINDEX.
- */
-int l_pm_pathtableref(GtkTreeStore *store, GtkTreePath *path) {
- lua_newtable(lua);
- lua_pushstring(lua, gtk_entry_get_text(GTK_ENTRY(pm_entry)));
- lua_rawseti(lua, -2, 1);
- if (path) {
- GtkTreeIter iter;
- while (gtk_tree_path_get_depth(path) > 0) {
- char *item = 0;
- gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, path);
- gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 1, &item, -1);
- lua_pushstring(lua, item);
- lua_rawseti(lua, -2, gtk_tree_path_get_depth(path) + 1);
- g_free(item);
- gtk_tree_path_up(path);
- }
- }
- return luaL_ref(lua, LUA_REGISTRYINDEX);
-}
-
-/**
- * Requests a popup context menu for a selected Project Manager item.
- * @param event The mouse button event.
- */
-void l_pm_popup_context_menu(GdkEventButton *event) {
- GtkTreePath *path = NULL;
- GtkTreeIter iter;
- GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(pm_view));
- GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(pm_view));
- if (gtk_tree_selection_get_selected(sel, NULL, &iter))
- path = gtk_tree_model_get_path(model, &iter);
- lua_pushlightuserdata(lua, (GdkEventButton *)event);
- int ref = luaL_ref(lua, LUA_REGISTRYINDEX);
- l_handle_event("pm_context_menu_request", LUA_TTABLE,
- l_pm_pathtableref(GTK_TREE_STORE(model), path),
- LUA_TLIGHTUSERDATA, ref, -1);
- if (path) gtk_tree_path_free(path);
-}
-
// Lua functions (stack maintenence is unnecessary)
/**
@@ -1006,54 +942,6 @@ static int l_ta_mt_newindex(lua_State *lua) {
return 0;
}
-static int l_pm_mt_index(lua_State *lua) {
- const char *key = lua_tostring(lua, 2);
- if (streq(key, "entry_text"))
- lua_pushstring(lua, gtk_entry_get_text(GTK_ENTRY(pm_entry)));
- else if (streq(key, "width")) {
- int pos =
- gtk_paned_get_position(GTK_PANED(gtk_widget_get_parent(pm_container)));
- lua_pushinteger(lua, pos);
- } else if (streq(key, "cursor")) {
- GtkTreePath *path = NULL;
- gtk_tree_view_get_cursor(GTK_TREE_VIEW(pm_view), &path, NULL);
- if (path) {
- char *path_str = gtk_tree_path_to_string(path);
- lua_pushstring(lua, path_str);
- g_free(path_str);
- gtk_tree_path_free(path);
- } else lua_pushnil(lua);
- } else lua_rawget(lua, 1);
- return 1;
-}
-
-static int l_pm_mt_newindex(lua_State *lua) {
- const char *key = lua_tostring(lua, 2);
- if (streq(key, "entry_text"))
- gtk_entry_set_text(GTK_ENTRY(pm_entry), lua_tostring(lua, 3));
- else if (streq(key, "width"))
- gtk_paned_set_position(GTK_PANED(gtk_widget_get_parent(pm_container)),
- luaL_checkinteger(lua, 3));
- else if (streq(key, "cursor")) {
- GtkTreePath *path = gtk_tree_path_new_from_string(lua_tostring(lua, 3));
- luaL_argcheck(lua, path, 3, "bad path");
- int *indices = gtk_tree_path_get_indices(path);
- GtkTreePath *ipath = gtk_tree_path_new_from_indices(indices[0], -1);
- for (int i = 1; i < gtk_tree_path_get_depth(path); i++)
- if (gtk_tree_view_row_expanded(GTK_TREE_VIEW(pm_view), ipath) ||
- gtk_tree_view_expand_row(GTK_TREE_VIEW(pm_view), ipath, FALSE))
- gtk_tree_path_append_index(ipath, indices[i]);
- else
- break;
- GtkTreeViewColumn *col =
- gtk_tree_view_get_column(GTK_TREE_VIEW(pm_view), 0);
- gtk_tree_view_set_cursor(GTK_TREE_VIEW(pm_view), ipath, col, FALSE);
- gtk_tree_path_free(ipath);
- gtk_tree_path_free(path);
- } else lua_rawset(lua, 1);
- return 0;
-}
-
#define toggled(w) gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))
static int l_find_mt_index(lua_State *lua) {
const char *key = lua_tostring(lua, 2);
@@ -1293,103 +1181,6 @@ static int l_cf_ta_reset(lua_State *lua) {
return 0;
}
-static int l_cf_pm_activate(lua_State *lua) {
- g_signal_emit_by_name(G_OBJECT(pm_entry), "activate");
- return 0;
-}
-
-static int l_cf_pm_add_browser(lua_State *lua) {
- GtkWidget *pm_combo = gtk_widget_get_parent(pm_entry);
- gtk_combo_box_append_text(GTK_COMBO_BOX(pm_combo), lua_tostring(lua, -1));
- return 0;
-}
-
-static int l_cf_pm_clear(lua_State *lua) {
- gtk_tree_store_clear(
- GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(pm_view))));
- return 0;
-}
-
-static int l_cf_pm_fill(lua_State *lua) {
- luaL_checktype(lua, 1, LUA_TTABLE);
- GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(pm_view));
- GtkTreeStore *store = GTK_TREE_STORE(model);
- GtkTreeIter initial_iter, *initial_iter_p = NULL;
- if (lua_gettop(lua) > 1 && lua_type(lua, 2) == LUA_TSTRING &&
- gtk_tree_model_get_iter_from_string(model, &initial_iter,
- lua_tostring(lua, 2)))
- initial_iter_p = &initial_iter;
- if (!initial_iter_p) gtk_tree_store_clear(store);
- GtkTreeIter iter, child;
- lua_pushnil(lua);
- while (lua_next(lua, 1)) {
- if (lua_istable(lua, -1) && lua_type(lua, -2) == LUA_TSTRING) {
- gtk_tree_store_append(store, &iter, initial_iter_p);
- gtk_tree_store_set(store, &iter, 1, lua_tostring(lua, -2), -1);
- lua_getfield(lua, -1, "parent");
- if (lua_toboolean(lua, -1)) {
- gtk_tree_store_append(store, &child, &iter);
- gtk_tree_store_set(store, &child, 1, "\0dummy", -1);
- }
- lua_pop(lua, 1); // parent
- lua_getfield(lua, -1, "pixbuf");
- if (lua_isstring(lua, -1))
- gtk_tree_store_set(store, &iter, 0, lua_tostring(lua, -1), -1);
- else if (!lua_isnil(lua, -1))
- warn("pm.fill: non-string pixbuf key ignored");
- lua_pop(lua, 1); // pixbuf
- lua_getfield(lua, -1, "text");
- gtk_tree_store_set(store, &iter, 2, lua_isstring(lua, -1) ?
- lua_tostring(lua, -1) : lua_tostring(lua, -3), -1);
- lua_pop(lua, 1); // display text
- } else warn("pm.fill: string id key must have table value");
- lua_pop(lua, 1); // value
- }
- if (initial_iter_p) {
- char *item;
- gtk_tree_model_iter_nth_child(model, &child, initial_iter_p, 0);
- gtk_tree_model_get(model, &child, 1, &item, -1);
- if (strcmp((const char *)item, "\0dummy") == 0)
- gtk_tree_store_remove(store, &child);
- g_free(item);
- }
- return 0;
-}
-
-static void pm_menu_activate(GtkWidget *menu, gpointer id) {
- GtkTreePath *path = NULL;
- GtkTreeIter iter;
- GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(pm_view));
- GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(pm_view));
- if (gtk_tree_selection_get_selected(sel, NULL, &iter))
- path = gtk_tree_model_get_path(model, &iter);
- l_handle_event("pm_menu_clicked", LUA_TNUMBER, GPOINTER_TO_INT(id),
- LUA_TTABLE, l_pm_pathtableref(GTK_TREE_STORE(model), path),
- -1);
- if (path) gtk_tree_path_free(path);
-}
-
-static int l_cf_pm_show_context_menu(lua_State *lua) {
- GdkEventButton *event = NULL;
- if (lua_gettop(lua) > 1) {
- if (lua_isuserdata(lua, 2))
- event = (GdkEventButton *)lua_touserdata(lua, 2);
- lua_pop(lua, 1); // userdata
- }
- luaL_checktype(lua, 1, LUA_TTABLE);
- GtkWidget *menu = l_create_gtkmenu(lua, G_CALLBACK(pm_menu_activate), FALSE);
- gtk_widget_show_all(menu);
- gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
- event ? event->button : 0,
- gdk_event_get_time((GdkEvent *)event));
- return 0;
-}
-
-static int l_cf_pm_focus(lua_State *lua) {
- pm_toggle_focus();
- return 0;
-}
-
static int l_cf_find_focus(lua_State *lua) {
find_toggle_focus();
return 0;
diff --git a/src/textadept.c b/src/textadept.c
index fa94a469..afa3b9c6 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -30,27 +30,6 @@ static OSErr w_ae_open(const AppleEvent *, AppleEvent *, long);
static OSErr w_ae_quit(const AppleEvent *, AppleEvent *, long);
#endif
-// Project Manager
-GtkWidget *pm_view, *pm_entry, *pm_container;
-GtkWidget *pm_create_ui();
-GtkTreeStore *pm_store;
-
-static int pm_search_equal_func(GtkTreeModel *, int, const char *,
- GtkTreeIter *, gpointer);
-static int pm_sort_iter_compare_func(GtkTreeModel *, GtkTreeIter *,
- GtkTreeIter *, gpointer);
-static void pm_entry_activated(GtkWidget *, gpointer);
-static void pm_entry_changed(GtkComboBoxEntry *, gpointer);
-static gbool pm_keypress(GtkWidget *, GdkEventKey *, gpointer);
-static void pm_row_expanded(GtkTreeView *, GtkTreeIter *, GtkTreePath *,
- gpointer);
-static void pm_row_collapsed(GtkTreeView *, GtkTreeIter *, GtkTreePath *,
- gpointer);
-static void pm_row_activated(GtkTreeView *, GtkTreePath *,
- GtkTreeViewColumn *, gpointer);
-static gbool pm_buttonpress(GtkTreeView *, GdkEventButton *, gpointer);
-static gbool pm_popup_menu(GtkWidget *, gpointer);
-
// Find/Replace
GtkWidget *findbox, *find_entry, *replace_entry, *fnext_button, *fprev_button,
*r_button, *ra_button, *match_case_opt, *whole_word_opt, *lua_opt,
@@ -163,14 +142,8 @@ void create_ui() {
menubar = gtk_menu_bar_new();
gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0);
- GtkWidget *pane = gtk_hpaned_new();
- gtk_box_pack_start(GTK_BOX(vbox), pane, TRUE, TRUE, 0);
-
- GtkWidget *pm = pm_create_ui();
- gtk_paned_add1(GTK_PANED(pane), pm);
-
GtkWidget *hbox = gtk_hbox_new(FALSE, 0);
- gtk_paned_add2(GTK_PANED(pane), hbox);
+ gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
GtkWidget *editor = new_scintilla_window(0);
gtk_box_pack_start(GTK_BOX(hbox), editor, TRUE, TRUE, 0);
@@ -551,208 +524,6 @@ static OSErr w_ae_quit(const AppleEvent *event, AppleEvent *reply, long ref) {
}
#endif
-// Project Manager
-
-/**
- * Creates the Project Manager pane.
- * It consists of an entry box and a treeview called 'textadept-pm-entry' and
- * 'textadept-pm-view' respectively for styling via gtkrc. The treeview model
- * consists of a gdk-pixbuf for icons and markup text.
- */
-GtkWidget *pm_create_ui() {
- pm_container = gtk_vbox_new(FALSE, 1);
-
- GtkWidget *pm_combo = gtk_combo_box_entry_new_text();
- gtk_combo_box_set_focus_on_click(GTK_COMBO_BOX(pm_combo), FALSE);
- pm_entry = gtk_bin_get_child(GTK_BIN(pm_combo));
- gtk_widget_set_name(pm_entry, "textadept-pm-entry");
- gtk_box_pack_start(GTK_BOX(pm_container), pm_combo, FALSE, FALSE, 0);
-
- pm_store = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
- GtkTreeSortable *sortable = GTK_TREE_SORTABLE(pm_store);
- gtk_tree_sortable_set_sort_column_id(sortable, 1, GTK_SORT_ASCENDING);
- gtk_tree_sortable_set_sort_func(sortable, 1, pm_sort_iter_compare_func,
- GINT_TO_POINTER(1), NULL);
-
- pm_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(pm_store));
- g_object_unref(pm_store);
- gtk_widget_set_name(pm_view, "textadept-pm-view");
- gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(pm_view), FALSE);
- gtk_tree_view_set_enable_search(GTK_TREE_VIEW(pm_view), TRUE);
- gtk_tree_view_set_search_column(GTK_TREE_VIEW(pm_view), 2);
- gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(pm_view),
- pm_search_equal_func, NULL, NULL);
-
- GtkTreeViewColumn *column = gtk_tree_view_column_new();
- GtkCellRenderer *renderer;
- renderer = gtk_cell_renderer_pixbuf_new(); // pixbuf
- gtk_tree_view_column_pack_start(column, renderer, FALSE);
- gtk_tree_view_column_set_attributes(column, renderer, "stock-id", 0, NULL);
- renderer = gtk_cell_renderer_text_new(); // markup text
- gtk_tree_view_column_pack_start(column, renderer, TRUE);
- gtk_tree_view_column_set_attributes(column, renderer, "markup", 2, NULL);
- gtk_tree_view_append_column(GTK_TREE_VIEW(pm_view), column);
-
- GtkWidget *scrolled = gtk_scrolled_window_new(NULL, NULL);
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_container_add(GTK_CONTAINER(scrolled), pm_view);
- gtk_box_pack_start(GTK_BOX(pm_container), scrolled, TRUE, TRUE, 0);
-
- signal(pm_entry, "activate", pm_entry_activated);
- signal(pm_combo, "changed", pm_entry_changed);
- signal(pm_entry, "key-press-event", pm_keypress);
- signal(pm_view, "key-press-event", pm_keypress);
- signal(pm_view, "row-expanded", pm_row_expanded);
- signal(pm_view, "row-collapsed", pm_row_collapsed);
- signal(pm_view, "row-activated", pm_row_activated);
- signal(pm_view, "button-press-event", pm_buttonpress);
- signal(pm_view, "popup-menu", pm_popup_menu);
-
- return pm_container;
-}
-
-/**
- * Toggles the focus between the Project Manager and the current Scintilla
- * window.
- */
-void pm_toggle_focus() {
- gtk_widget_grab_focus(
- GTK_WIDGET_HAS_FOCUS(focused_editor) ? pm_entry : focused_editor);
-}
-
-/**
- * When searching the Project Manager treeview, matches are tree items that
- * contain the search text as a substring.
- * @param model The GtkTreeModel for the treeview.
- * @param col The column number to use for comparing search text to.
- * @param key The search text.
- * @param iter The GtkTreeIter for each tree node being compared.
- */
-static int pm_search_equal_func(GtkTreeModel *model, int col, const char *key,
- GtkTreeIter *iter, gpointer udata) {
- const char *text;
- gtk_tree_model_get(model, iter, col, &text, -1);
- return strstr(text, key) == NULL; // FALSE is really a match like strcmp
-}
-
-/**
- * Sorts the Project Manager treeview case sensitively.
- * @param model The GtkTreeModel for the treeview.
- * @param a The GtkTreeIter for one tree node being compared.
- * @param b The GtkTreeIter for the other tree node being compared.
- */
-static int pm_sort_iter_compare_func(GtkTreeModel *model, GtkTreeIter *a,
- GtkTreeIter *b, gpointer udata) {
- char *a_text, *b_text, *p;
- gtk_tree_model_get(model, a, 1, &a_text, -1);
- gtk_tree_model_get(model, b, 1, &b_text, -1);
- if (a_text) for (p = a_text; *p != '\0'; p++) *p = g_ascii_tolower(*p);
- if (b_text) for (p = b_text; *p != '\0'; p++) *p = g_ascii_tolower(*p);
- int retval = g_strcmp0(a_text, b_text);
- g_free(a_text);
- g_free(b_text);
- return retval;
-}
-
-// Signals
-
-/**
- * Signal for the activation of the Project Manager entry.
- * Requests contents for the Project Manager.
- */
-static void pm_entry_activated(GtkWidget *entry, gpointer udata) {
- l_handle_event("pm_contents_request", LUA_TTABLE,
- l_pm_pathtableref(pm_store, NULL), LUA_TNIL, 0, -1);
-}
-
-/**
- * Signal for a change of the text in the Project Manager entry.
- * Requests contents for the Project Manager.
- */
-static void pm_entry_changed(GtkComboBoxEntry *entry, gpointer udata) {
- l_handle_event("pm_contents_request", LUA_TTABLE,
- l_pm_pathtableref(pm_store, NULL), LUA_TNIL, 0, -1);
-}
-
-/**
- * Signal for a Project Manager keypress.
- * Currently handled keypresses:
- * - Escape - Refocuses the Scintilla view.
- */
-static gbool pm_keypress(GtkWidget *pm, GdkEventKey *event, gpointer udata) {
- if (event->keyval == 0xff1b) {
- gtk_widget_grab_focus(focused_editor);
- return TRUE;
- } else return FALSE;
-}
-
-/**
- * Signal for a Project Manager parent expansion.
- * Requests contents for a Project Manager parent node being opened.
- * Since a parent is given a dummy child by default in order to indicate that
- * it is a parent, that dummy child is removed.
- */
-static void pm_row_expanded(GtkTreeView *view, GtkTreeIter *iter,
- GtkTreePath *path, gpointer udata) {
- char *path_str = gtk_tree_path_to_string(path);
- l_handle_event("pm_contents_request", LUA_TTABLE,
- l_pm_pathtableref(pm_store, path), LUA_TSTRING, path_str, -1);
- g_free(path_str);
-}
-
-/**
- * Signal for a Project Manager parent collapse.
- * Removes all Project Manager children from a parent node being closed.
- * Re-adds a dummy child to indicate this parent is still a parent. It will be
- * removed when the parent is re-opened.
- */
-static void pm_row_collapsed(GtkTreeView *view, GtkTreeIter *iter,
- GtkTreePath *path, gpointer udata) {
- GtkTreeIter child;
- gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(pm_store), &child, iter, 0);
- while (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(pm_store), iter))
- gtk_tree_store_remove(pm_store, &child);
- gtk_tree_store_append(pm_store, &child, iter);
- gtk_tree_store_set(pm_store, &child, 1, "\0dummy", -1);
-}
-
-/**
- * Signal for the activation of a Project Manager node.
- * Performs the appropriate action on a selected Project Manager node.
- * If the node is a collapsed parent, it is expanded; otherwise the parent is
- * collapsed. If the node is not a parent at all, a Lua action is performed.
- */
-static void pm_row_activated(GtkTreeView *view, GtkTreePath *path,
- GtkTreeViewColumn *column, gpointer udata) {
- if (!gtk_tree_view_expand_row(view, path, FALSE))
- if (!gtk_tree_view_collapse_row(view, path))
- l_handle_event("pm_item_selected", LUA_TTABLE,
- l_pm_pathtableref(pm_store, path), -1);
-}
-
-/**
- * Signal for a Project Manager mouse click.
- * If it is a right-click, popup a context menu for the selected item.
- * @see l_pm_popup_context_menu
- */
-static gbool pm_buttonpress(GtkTreeView *view, GdkEventButton *event,
- gpointer udata) {
- if (event->type != GDK_BUTTON_PRESS || event->button != 3) return FALSE;
- l_pm_popup_context_menu(event);
- return TRUE;
-}
-
-/**
- * Signal for popping up a Project Manager context menu.
- * Typically Shift+F10 activates this event.
- * @see l_pm_popup_context_menu
- */
-static gbool pm_popup_menu(GtkWidget *view, gpointer udata) {
- l_pm_popup_context_menu(NULL);
- return TRUE;
-}
-
// Find/Replace
#define attach(w, x1, x2, y1, y2, xo, yo, xp, yp) \
diff --git a/src/textadept.h b/src/textadept.h
index 202a7dd5..0ec59dff 100644
--- a/src/textadept.h
+++ b/src/textadept.h
@@ -20,8 +20,8 @@
#include <lauxlib.h>
// globals
-extern GtkWidget *window, *focused_editor, *command_entry, *pm_container,
- *pm_entry, *pm_view, *findbox, *find_entry, *replace_entry,
+extern GtkWidget *window, *focused_editor, *command_entry,
+ *findbox, *find_entry, *replace_entry,
*fnext_button, *fprev_button, *r_button, *ra_button,
*match_case_opt, *whole_word_opt, *lua_opt, *in_files_opt;
extern char *textadept_home;
@@ -38,7 +38,6 @@ void split_window(GtkWidget *, int);
int unsplit_window(GtkWidget *);
void set_menubar(GtkWidget *);
void set_statusbar_text(const char *, int);
-void pm_toggle_focus();
void find_toggle_focus();
void ce_toggle_focus();
@@ -59,7 +58,4 @@ int l_handle_event(const char *, ...);
void l_handle_scnnotification(struct SCNotification *);
void l_ta_popup_context_menu(GdkEventButton *);
-int l_pm_pathtableref(GtkTreeStore *, GtkTreePath *);
-void l_pm_popup_context_menu(GdkEventButton *);
-
#endif