[nemiver/better-variable-format: 8/8] Avoid over reacting to pretty printing key changes



commit 9d2c3f232daff5961eea53fc79a1ce064f64ba3c
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 792b26f..7553a81 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -4722,9 +4722,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 ()) {
@@ -4733,16 +4735,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,
@@ -4762,7 +4767,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]