[gnome-commander] tabs: execute view.close_duplicate_tabs on clicked fs (previously: on active fs)
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] tabs: execute view.close_duplicate_tabs on clicked fs (previously: on active fs)
- Date: Tue, 4 Jan 2011 21:57:40 +0000 (UTC)
commit b6c465cfb5ab3cf852602b19191fefbbe1a57bcb
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Tue Jan 4 22:56:08 2011 +0100
tabs: execute view.close_duplicate_tabs on clicked fs (previously: on active fs)
src/gnome-cmd-file-selector.cc | 2 +-
src/gnome-cmd-user-actions.cc | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 106e0b4..4617563 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -644,7 +644,7 @@ static gboolean on_notebook_button_pressed (GtkWidget *widget, GdkEventButton *e
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
menuitem = gtk_menu_item_new_with_mnemonic (_("Close _Duplicate Tabs"));
- g_signal_connect (menuitem, "activate", G_CALLBACK (view_close_duplicate_tabs), NULL);
+ g_signal_connect (menuitem, "activate", G_CALLBACK (view_close_duplicate_tabs), fs);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
gtk_widget_show_all (menu);
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index 209e74e..4b30716 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -1526,9 +1526,10 @@ void view_close_all_tabs (GtkMenuItem *menuitem, gpointer not_used)
}
-void view_close_duplicate_tabs (GtkMenuItem *menuitem, gpointer not_used)
+void view_close_duplicate_tabs (GtkMenuItem *menuitem, gpointer file_selector)
{
- GnomeCmdFileSelector *fs = get_fs (ACTIVE);
+ GnomeCmdFileSelector *fs = file_selector ? GNOME_CMD_FILE_SELECTOR (file_selector) : get_fs (ACTIVE);
+
GnomeCmdNotebook *notebook = fs->notebook;
typedef set<gint> TABS_COLL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]