Author: kitone
Date: Thu Jan  8 23:43:16 2015
New Revision: 884

URL: http://svn.gna.org/viewcvs/subtitleeditor?rev=884&view=rev
Log:
Fix bug #22489 : Text correction - ability to double click on confirmation page.

Modified:
    trunk/ChangeLog
    trunk/plugins/actions/textcorrection/confirmationpage.h

Modified: trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/subtitleeditor/trunk/ChangeLog?rev=884&r1=883&r2=884&view=diff
==============================================================================
--- trunk/ChangeLog     (original)
+++ trunk/ChangeLog     Thu Jan  8 23:43:16 2015
@@ -1,3 +1,8 @@
+2015-01-08  kitone  <[email protected]>
+
+       * plugins/actions/textcorrection/confirmationpage.h:
+       Fix bug #22489 : Text correction - ability to double click on 
confirmation page.
+
 2015-01-08  kitone  <[email protected]>
 
        * plugins/actions/textcorrection/patternspage.h:

Modified: trunk/plugins/actions/textcorrection/confirmationpage.h
URL: 
http://svn.gna.org/viewcvs/subtitleeditor/trunk/plugins/actions/textcorrection/confirmationpage.h?rev=884&r1=883&r2=884&view=diff
==============================================================================
--- trunk/plugins/actions/textcorrection/confirmationpage.h     (original)
+++ trunk/plugins/actions/textcorrection/confirmationpage.h     Thu Jan  8 
23:43:16 2015
@@ -104,16 +104,18 @@
                }
                // column Corrected
                {
-                       Gtk::TreeViewColumn* column = manage(new 
Gtk::TreeViewColumn(_("Corrected Text")));
-                       m_treeview->append_column(*column);
+                       m_column_corrected_text = manage(new 
Gtk::TreeViewColumn(_("Corrected Text")));
+                       m_treeview->append_column(*m_column_corrected_text);
 
                        CellRendererCustom<TextViewCell>* renderer = manage(new 
CellRendererCustom<TextViewCell>);
-                       column->pack_start(*renderer);
-                       column->add_attribute(renderer->property_text(), 
m_column.corrected);
+                       m_column_corrected_text->pack_start(*renderer);
+                       
m_column_corrected_text->add_attribute(renderer->property_text(), 
m_column.corrected);
                        renderer->property_editable() = true;
                        renderer->signal_edited().connect(
                                        sigc::mem_fun(*this, 
&ComfirmationPage::on_corrected_edited));
                }
+               m_treeview->signal_row_activated().connect(
+                       sigc::mem_fun(*this, 
&ComfirmationPage::on_row_activated));
        }
 
        /*
@@ -254,6 +256,15 @@
        }
 
        /*
+        */
+       void on_row_activated(const Gtk::TreeModel::Path &path, 
Gtk::TreeViewColumn *column)
+       {
+               if(column == m_column_corrected_text)
+                       return;
+               on_accept_toggled(path.to_string());
+       }
+
+       /*
         * Update the item text.
         */
        void on_corrected_edited(const Glib::ustring &path, const Glib::ustring 
&text)
@@ -268,6 +279,7 @@
        Column m_column;
        Glib::RefPtr<Gtk::ListStore> m_liststore;
        Gtk::TreeView* m_treeview;
+       Gtk::TreeViewColumn* m_column_corrected_text;
        Gtk::Button* m_buttonMarkAll;
        Gtk::Button* m_buttonUnmarkAll;
        Gtk::CheckButton* m_checkRemoveBlank;


_______________________________________________
Subtitleeditor-commits mailing list
[email protected]
https://mail.gna.org/listinfo/subtitleeditor-commits

Reply via email to