From 729af7ee8cd72d97ca7cf7cfb6a2b65d6ae388e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Sat, 14 Jan 2006 22:36:57 +0000 Subject: [PATCH] added popup menu to symbol list, added "Hide" and "Hide sidebar" to sidebar popups, other bugfixes git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@125 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- src/callbacks.c | 41 ++++++++++++++++++++++++++++++++++++++++- src/callbacks.h | 7 ++++++- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/callbacks.c b/src/callbacks.c index ad1ed4a9..637bcc78 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -154,12 +154,13 @@ gint destroyapp(GtkWidget *widget, gpointer gdata) g_object_unref(app->default_tag_tree); gtk_widget_destroy(app->default_tag_tree); } + scintilla_release_resources(); gtk_widget_destroy(app->window); // kill explicitly since only one or none menu is shown at a time if (GTK_IS_WIDGET(dialogs_build_menus.menu_c)) gtk_widget_destroy(dialogs_build_menus.menu_c); if (GTK_IS_WIDGET(dialogs_build_menus.menu_misc)) gtk_widget_destroy(dialogs_build_menus.menu_misc); if (GTK_IS_WIDGET(dialogs_build_menus.menu_tex)) gtk_widget_destroy(dialogs_build_menus.menu_tex); - +/// TODO destroy popup menus if (app->have_vte) vte_close(); g_free(app); @@ -1676,6 +1677,8 @@ on_tree_view_button_press_event (GtkWidget *widget, gtk_menu_popup(GTK_MENU(msgwindow.popup_compiler_menu), NULL, NULL, NULL, NULL, event->button, event->time); else if (user_data && GPOINTER_TO_INT(user_data) == 6) gtk_menu_popup(GTK_MENU(tv.popup_openfiles), NULL, NULL, NULL, NULL, event->button, event->time); + else if (user_data && GPOINTER_TO_INT(user_data) == 7) + gtk_menu_popup(GTK_MENU(tv.popup_taglist), NULL, NULL, NULL, NULL, event->button, event->time); } return FALSE; } @@ -1712,12 +1715,48 @@ on_openfiles_tree_popup_clicked (GtkMenuItem *menuitem, on_toolbutton23_clicked(NULL, NULL); break; } + case 3: + { + app->treeview_openfiles_visible = FALSE; + utils_treeviews_showhide(); + break; + } + case 4: + { + app->treeview_openfiles_visible = FALSE; + app->treeview_symbol_visible = FALSE; + utils_treeviews_showhide(); + break; + } } } } } +void +on_taglist_tree_popup_clicked (GtkMenuItem *menuitem, + gpointer user_data) +{ + switch (GPOINTER_TO_INT(user_data)) + { + case 0: + { + app->treeview_symbol_visible = FALSE; + utils_treeviews_showhide(); + break; + } + case 1: + { + app->treeview_openfiles_visible = FALSE; + app->treeview_symbol_visible = FALSE; + utils_treeviews_showhide(); + break; + } + } +} + + void on_message_treeview_clear_activate (GtkMenuItem *menuitem, gpointer user_data) diff --git a/src/callbacks.h b/src/callbacks.h index 125c8bf8..b85a566d 100644 --- a/src/callbacks.h +++ b/src/callbacks.h @@ -1,7 +1,7 @@ /* * callbacks.h - this file is part of Geany, a fast and lightweight IDE * - * Copyright 2005 Enrico Troeger + * Copyright 2006 Enrico Troeger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -601,6 +601,10 @@ void on_openfiles_tree_popup_clicked (GtkMenuItem *menuitem, gpointer user_data); +void +on_taglist_tree_popup_clicked (GtkMenuItem *menuitem, + gpointer user_data); + gboolean on_window_key_press_event (GtkWidget *widget, GdkEventKey *event, @@ -609,3 +613,4 @@ on_window_key_press_event (GtkWidget *widget, void on_help_shortcuts1_activate (GtkMenuItem *menuitem, gpointer user_data); +