From 4533e5e378aae1df5a980a1dd6b2359d02891513 Mon Sep 17 00:00:00 2001 From: nicholasbishop Date: Wed, 17 Oct 2007 06:50:06 +0000 Subject: [PATCH] Added a Rename menu item to the popup for the filter list in the filter effects dialog; equivalent to double-clicking on the filter. --- src/ui/dialog/filter-effects-dialog.cpp | 7 +++++++ src/ui/dialog/filter-effects-dialog.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 583591d8e..80f642852 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -920,6 +920,8 @@ FilterEffectsDialog::FilterModifier::FilterModifier(FilterEffectsDialog& d) sigc::mem_fun(*this, &FilterModifier::filter_list_button_release)); _menu = create_popup_menu(*this, sigc::mem_fun(*this, &FilterModifier::duplicate_filter), sigc::mem_fun(*this, &FilterModifier::remove_filter)); + _menu->items().push_back(Gtk::Menu_Helpers::MenuElem( + _("R_ename"), sigc::mem_fun(*this, &FilterModifier::rename_filter))); _menu->accelerate(*this); _list.get_selection()->signal_changed().connect(sigc::mem_fun(*this, &FilterModifier::on_filter_selection_changed)); @@ -1154,6 +1156,11 @@ void FilterEffectsDialog::FilterModifier::duplicate_filter() } } +void FilterEffectsDialog::FilterModifier::rename_filter() +{ + _list.set_cursor(_model->get_path(_list.get_selection()->get_selected()), *_list.get_column(1), true); +} + FilterEffectsDialog::CellRendererConnection::CellRendererConnection() : Glib::ObjectBase(typeid(CellRendererConnection)), _primitive(*this, "primitive", 0) diff --git a/src/ui/dialog/filter-effects-dialog.h b/src/ui/dialog/filter-effects-dialog.h index cb543775b..d1a5039e3 100644 --- a/src/ui/dialog/filter-effects-dialog.h +++ b/src/ui/dialog/filter-effects-dialog.h @@ -99,6 +99,7 @@ private: void add_filter(); void remove_filter(); void duplicate_filter(); + void rename_filter(); sigc::connection _doc_replaced; sigc::connection _resource_changed; -- 2.30.2