[nemiver/el6-branch] Avoid over reacting to pretty printing key changes



commit c631675364ada704b12c6a1ec598ba4fc7cf7513
Author: Dodji Seketeli <dodji seketeli org>
Date:   Wed Mar 2 15:34:15 2011 +0100

    Avoid over reacting to pretty printing key changes
    
    	* src/persp/dbgperspective/nmv-dbg-perspective.cc
    	(DBGPerspective::Priv::enable_pretty_printing): New member.
    	(DBGPerspective::on_conf_key_changed_signal): Don't react to a
    	change of the value of the pretty printing key if the new value
    	equals the old one.
    	(DBGPerspective::read_default_config): Set the value of the new
    	member DBGPerspective::Priv::enable_pretty_printing.  Also also a
    	couple of ";" around.

 src/persp/dbgperspective/nmv-dbg-perspective.cc |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index ea719d8..e7f5111 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -4720,9 +4720,11 @@ DBGPerspective::read_default_config ()
     if (m_priv->global_search_paths.empty ()) {
         UString dirs;
 
-        NEMIVER_TRY
+        NEMIVER_TRY;
+
         conf_mgr.get_key_value (CONF_KEY_NEMIVER_SOURCE_DIRS, dirs);
-        NEMIVER_CATCH_NOX
+
+        NEMIVER_CATCH_NOX;
 
         LOG_DD ("got source dirs '" << dirs << "' from conf mgr");
         if (!dirs.empty ()) {
@@ -4731,16 +4733,19 @@ DBGPerspective::read_default_config ()
                     << "' dir paths");
         }
 
-        NEMIVER_TRY
+        NEMIVER_TRY;
+
         conf_mgr.get_key_value (CONF_KEY_SHOW_DBG_ERROR_DIALOGS,
                                 m_priv->show_dbg_errors);
-        NEMIVER_CATCH_NOX
+        NEMIVER_CATCH_NOX;
 
         conf_mgr.value_changed_signal ().connect
             (sigc::mem_fun (*this,
                             &DBGPerspective::on_conf_key_changed_signal));
     }
-    NEMIVER_TRY
+
+    NEMIVER_TRY;
+
     conf_mgr.get_key_value (CONF_KEY_HIGHLIGHT_SOURCE_CODE,
                             m_priv->enable_syntax_highlight);
     conf_mgr.get_key_value (CONF_KEY_SHOW_SOURCE_LINE_NUMBERS,
@@ -4760,7 +4765,9 @@ DBGPerspective::read_default_config ()
                             m_priv->num_instr_to_disassemble);
     conf_mgr.get_key_value (CONF_KEY_ASM_STYLE_PURE,
                             m_priv->asm_style_pure);
-    NEMIVER_CATCH_NOX
+    conf_mgr.get_key_value (CONF_KEY_PRETTY_PRINTING,
+                            m_priv->enable_pretty_printing);
+    NEMIVER_CATCH_NOX;
 
 #ifdef WITH_SOURCEVIEWMM2
     UString style_id ("classic");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]