Code

Added a Rename menu item to the popup for the filter list in the filter effects dialo...
authornicholasbishop <nicholasbishop@users.sourceforge.net>
Wed, 17 Oct 2007 06:50:06 +0000 (06:50 +0000)
committernicholasbishop <nicholasbishop@users.sourceforge.net>
Wed, 17 Oct 2007 06:50:06 +0000 (06:50 +0000)
src/ui/dialog/filter-effects-dialog.cpp
src/ui/dialog/filter-effects-dialog.h

index 583591d8ec93ce5ee7907faaecf6f3a2e553d352..80f6428527bc79280b0ad1ea953f372c3c4f5377 100644 (file)
@@ -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)
index cb543775b7f4905eb946fcf24aefc3d696aa87a1..d1a5039e3ed708a7cb8703279a7af2962e5497fe 100644 (file)
@@ -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;