Author: kitone
Date: Fri Jan 9 20:25:02 2015
New Revision: 885
URL: http://svn.gna.org/viewcvs/subtitleeditor?rev=885&view=rev
Log:
Fix bug #22489 : Text correction - Fix error introduce with the previous commit
and only display close button without errors.
Modified:
trunk/ChangeLog
trunk/plugins/actions/textcorrection/patternspage.h
trunk/plugins/actions/textcorrection/textcorrection.cc
Modified: trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/subtitleeditor/trunk/ChangeLog?rev=885&r1=884&r2=885&view=diff
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Fri Jan 9 20:25:02 2015
@@ -1,3 +1,10 @@
+2015-01-09 kitone <[email protected]>
+
+ * plugins/actions/textcorrection/patternspage.h:
+ * plugins/actions/textcorrection/textcorrection.cc:
+ Fix bug #22489 : Text correction - Fix error introduce with the previous
+ commit and only display close button without errors.
+
2015-01-08 kitone <[email protected]>
* plugins/actions/textcorrection/confirmationpage.h:
Modified: trunk/plugins/actions/textcorrection/patternspage.h
URL:
http://svn.gna.org/viewcvs/subtitleeditor/trunk/plugins/actions/textcorrection/patternspage.h?rev=885&r1=884&r2=885&view=diff
==============================================================================
--- trunk/plugins/actions/textcorrection/patternspage.h (original)
+++ trunk/plugins/actions/textcorrection/patternspage.h Fri Jan 9 20:25:02 2015
@@ -297,10 +297,9 @@
*/
void set_enable(bool state)
{
- if(state)
- show();
- else
- hide();
+ Config::getInstance().set_value_bool(m_page_name, "enabled",
state);
+
+ (state) ? show() : hide();
}
/*
@@ -541,7 +540,7 @@
cfg.set_value_string(m_page_name, "script", get_script());
cfg.set_value_string(m_page_name, "language", get_language());
cfg.set_value_string(m_page_name, "country", get_country());
- cfg.set_value_bool(m_page_name, "enabled", is_visible());
+ cfg.set_value_bool(m_page_name, "enabled", is_enable());
}
Modified: trunk/plugins/actions/textcorrection/textcorrection.cc
URL:
http://svn.gna.org/viewcvs/subtitleeditor/trunk/plugins/actions/textcorrection/textcorrection.cc?rev=885&r1=884&r2=885&view=diff
==============================================================================
--- trunk/plugins/actions/textcorrection/textcorrection.cc (original)
+++ trunk/plugins/actions/textcorrection/textcorrection.cc Fri Jan 9
20:25:02 2015
@@ -58,6 +58,9 @@
if(page)
m_tasksPage->add_task(page);
}
+
+ set_page_type(*get_nth_page(0), Gtk::ASSISTANT_PAGE_INTRO);
+ set_page_type(*get_nth_page(get_n_pages()-1),
Gtk::ASSISTANT_PAGE_CONFIRM);
}
/*
@@ -86,6 +89,7 @@
insert_page(*page, pos);
set_page_title(*page, page->get_page_title());
+ set_page_type(*page, Gtk::ASSISTANT_PAGE_CONTENT);
}
/*
@@ -100,8 +104,11 @@
if(ap && ap == m_comfirmationPage)
{
bool res = m_comfirmationPage->comfirme(doc,
get_patterns());
- set_page_complete(*page, res);
+ set_page_complete(*page, true);
set_page_title(*page,
m_comfirmationPage->get_page_title());
+ // No change, only display the close button
+ if(!res)
+ set_page_type(*m_comfirmationPage,
Gtk::ASSISTANT_PAGE_SUMMARY);
}
else
set_page_complete(*page, true);
_______________________________________________
Subtitleeditor-commits mailing list
[email protected]
https://mail.gna.org/listinfo/subtitleeditor-commits