[glom] Rename b-prefixed variables.



commit cb405f9c6e090bb88ac8fc474188c7c9005a6dab
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 30 12:05:50 2016 +0200

    Rename b-prefixed variables.
    
    This is ancient code that used a simplified hungarian notation.

 glom/bakery/appwindow.cc                          |    4 +-
 glom/bakery/appwindow.h                           |    2 +-
 glom/libglom/document/bakery/document.cc          |   14 +++++-----
 glom/libglom/document/bakery/document.h           |    6 ++--
 glom/mode_data/box_data.cc                        |    4 +-
 glom/mode_data/box_data.h                         |    2 +-
 glom/mode_data/datawidget/datawidget.cc           |    6 ++--
 glom/mode_data/db_adddel/db_adddel.cc             |    8 +++---
 glom/mode_data/db_adddel/db_adddel.h              |    4 +-
 glom/mode_data/db_adddel/db_adddel_withbuttons.cc |    4 +-
 glom/mode_data/db_adddel/db_adddel_withbuttons.h  |    2 +-
 glom/utility_widgets/adddel/adddel.cc             |   28 ++++++++++----------
 glom/utility_widgets/adddel/adddel.h              |    8 +++---
 glom/utility_widgets/adddel/adddel_withbuttons.cc |    6 ++--
 glom/utility_widgets/adddel/adddel_withbuttons.h  |    2 +-
 15 files changed, 50 insertions(+), 50 deletions(-)
---
diff --git a/glom/bakery/appwindow.cc b/glom/bakery/appwindow.cc
index f396195..0f62b83 100644
--- a/glom/bakery/appwindow.cc
+++ b/glom/bakery/appwindow.cc
@@ -88,9 +88,9 @@ void AppWindow::on_menu_edit_clear()
   
 }
 
-void AppWindow::set_operation_cancelled(bool bVal /* = true */)
+void AppWindow::set_operation_cancelled(bool value /* = true */)
 {
-  m_bOperationCancelled = bVal;
+  m_bOperationCancelled = value;
 }
 
 bool AppWindow::get_operation_cancelled()
diff --git a/glom/bakery/appwindow.h b/glom/bakery/appwindow.h
index a526403..84aba8e 100644
--- a/glom/bakery/appwindow.h
+++ b/glom/bakery/appwindow.h
@@ -103,7 +103,7 @@ protected:
   //operation_cancelled:
   //e.g. A File|Open tries to save existing data,
   //but this needs to be cancelled if the save failed. 
-  static void set_operation_cancelled(bool bVal = true);
+  static void set_operation_cancelled(bool value = true);
   static bool get_operation_cancelled();
 
   //Member data:
diff --git a/glom/libglom/document/bakery/document.cc b/glom/libglom/document/bakery/document.cc
index d3ad770..86f8409 100644
--- a/glom/libglom/document/bakery/document.cc
+++ b/glom/libglom/document/bakery/document.cc
@@ -93,9 +93,9 @@ Glib::ustring Document::get_contents() const
   return m_strContents;
 }
 
-void Document::set_modified(bool bVal /* = true */)
+void Document::set_modified(bool value /* = true */)
 {
-  m_bModified = bVal;
+  m_bModified = value;
 
   if(m_bModified)
   {
@@ -468,9 +468,9 @@ bool Document::get_read_only() const
   }
 }
 
-void Document::set_read_only(bool bVal)
+void Document::set_read_only(bool value)
 {
-  m_bReadOnly = bVal;
+  m_bReadOnly = value;
 }
 
 bool Document::get_is_new() const
@@ -478,12 +478,12 @@ bool Document::get_is_new() const
   return m_bIsNew;
 }
 
-void Document::set_is_new(bool bVal)
+void Document::set_is_new(bool value)
 {
-  if(bVal)
+  if(value)
     set_modified(false); //can't be modified if it is new.
 
-  m_bIsNew = bVal;
+  m_bIsNew = value;
 }
 
 void Document::set_file_extension(const Glib::ustring& strVal)
diff --git a/glom/libglom/document/bakery/document.h b/glom/libglom/document/bakery/document.h
index 0801b31..f38a148 100644
--- a/glom/libglom/document/bakery/document.h
+++ b/glom/libglom/document/bakery/document.h
@@ -69,12 +69,12 @@ public:
 
 
   bool get_modified() const;
-  virtual void set_modified(bool bVal = true);
+  virtual void set_modified(bool value = true);
 
   ///Whether this just a default document.
   bool get_is_new() const;
   ///Called by AppWindow_WithDoc::init_create_document().
-  void set_is_new(bool bVal);
+  void set_is_new(bool value);
 
   Glib::ustring get_contents() const;
 
@@ -88,7 +88,7 @@ public:
   static Glib::ustring util_file_uri_get_name(const Glib::ustring& file_uri, const Glib::ustring& 
file_extension);
 
   bool get_read_only() const;
-  void set_read_only(bool bVal);
+  void set_read_only(bool value);
 
   ///If you don't want to use a View, then don't use set_view().
   void set_view(ViewBase* pView);
diff --git a/glom/mode_data/box_data.cc b/glom/mode_data/box_data.cc
index d695484..a853a04 100644
--- a/glom/mode_data/box_data.cc
+++ b/glom/mode_data/box_data.cc
@@ -156,9 +156,9 @@ void Box_Data::on_Button_Find()
   signal_find_criteria.emit(where_clause);
 }
 
-void Box_Data::set_unstored_data(bool bVal)
+void Box_Data::set_unstored_data(bool value)
 {
-  m_bUnstoredData = bVal;
+  m_bUnstoredData = value;
 }
 
 bool Box_Data::get_unstored_data() const
diff --git a/glom/mode_data/box_data.h b/glom/mode_data/box_data.h
index 779bddd..7faa2ad 100644
--- a/glom/mode_data/box_data.h
+++ b/glom/mode_data/box_data.h
@@ -60,7 +60,7 @@ public:
 
   Gnome::Gda::SqlExpr get_find_where_clause() const;
 
-  void set_unstored_data(bool bVal);
+  void set_unstored_data(bool value);
   bool get_unstored_data() const;
 
   bool confirm_discard_unstored_data() const;
diff --git a/glom/mode_data/datawidget/datawidget.cc b/glom/mode_data/datawidget/datawidget.cc
index 7022e33..1caaef7 100644
--- a/glom/mode_data/datawidget/datawidget.cc
+++ b/glom/mode_data/datawidget/datawidget.cc
@@ -286,11 +286,11 @@ void DataWidget::set_value(const Gnome::Gda::Value& value)
     auto checkbutton = dynamic_cast<Gtk::CheckButton*>(widget);
     if(checkbutton)
     {
-      bool bValue = false;
+      bool bool_value = false;
       if(!value.is_null() && value.get_value_type() == G_TYPE_BOOLEAN)
-        bValue = value.get_boolean();
+        bool_value = value.get_boolean();
 
-      checkbutton->set_active( bValue );
+      checkbutton->set_active( bool_value );
     }
   }
 
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index 42e9d42..ce1a4bd 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -1052,9 +1052,9 @@ bool DbAddDel::get_prevent_user_signals() const
   return m_bPreventUserSignals;
 }
 
-void DbAddDel::set_prevent_user_signals(bool bVal)
+void DbAddDel::set_prevent_user_signals(bool value)
 {
-  m_bPreventUserSignals = bVal;
+  m_bPreventUserSignals = value;
 }
 
 /*
@@ -1102,9 +1102,9 @@ void DbAddDel::set_allow_delete(bool val)
   m_allow_delete = val;
 }
 
-void DbAddDel::set_allow_user_actions(bool bVal)
+void DbAddDel::set_allow_user_actions(bool value)
 {
-  m_bAllowUserActions = bVal;
+  m_bAllowUserActions = value;
 }
 
 bool DbAddDel::get_allow_user_actions() const
diff --git a/glom/mode_data/db_adddel/db_adddel.h b/glom/mode_data/db_adddel/db_adddel.h
index ebe93da..96e95c4 100644
--- a/glom/mode_data/db_adddel/db_adddel.h
+++ b/glom/mode_data/db_adddel/db_adddel.h
@@ -55,7 +55,7 @@ public:
   DbAddDel();
   virtual ~DbAddDel();
 
-  virtual void set_allow_user_actions(bool bVal = true);
+  virtual void set_allow_user_actions(bool value = true);
   bool get_allow_user_actions() const;
 
   virtual void set_allow_add(bool val = true);
@@ -188,7 +188,7 @@ public:
 
   void finish_editing(); //Closes active edit controls and commits the data to the cell.
   //void reactivate(); //Sheet doesn't seem to update unless a cell is active.
-  void set_prevent_user_signals(bool bVal = true);
+  void set_prevent_user_signals(bool value = true);
 
   //TODO_refactor: make private.
 
diff --git a/glom/mode_data/db_adddel/db_adddel_withbuttons.cc 
b/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
index 5ceb1f6..7ab604c 100644
--- a/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
+++ b/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
@@ -81,9 +81,9 @@ void DbAddDel_WithButtons::set_allow_delete(bool val)
   setup_buttons();
 }
 
-void DbAddDel_WithButtons::set_allow_user_actions(bool bVal)
+void DbAddDel_WithButtons::set_allow_user_actions(bool value)
 {
-  DbAddDel::set_allow_user_actions(bVal);
+  DbAddDel::set_allow_user_actions(value);
 
   setup_buttons();
 
diff --git a/glom/mode_data/db_adddel/db_adddel_withbuttons.h 
b/glom/mode_data/db_adddel/db_adddel_withbuttons.h
index 4749ad6..0ceec94 100644
--- a/glom/mode_data/db_adddel/db_adddel_withbuttons.h
+++ b/glom/mode_data/db_adddel/db_adddel_withbuttons.h
@@ -34,7 +34,7 @@ public:
 
   void set_allow_add(bool val = true) override;
   void set_allow_delete(bool val = true) override;
-  void set_allow_user_actions(bool bVal = true) override;
+  void set_allow_user_actions(bool value = true) override;
 
   ///Whether each row should have a button, to request edit.
   void set_allow_view_details(bool val = true) override;
diff --git a/glom/utility_widgets/adddel/adddel.cc b/glom/utility_widgets/adddel/adddel.cc
index d53e9a9..47103a8 100644
--- a/glom/utility_widgets/adddel/adddel.cc
+++ b/glom/utility_widgets/adddel/adddel.cc
@@ -339,11 +339,11 @@ Glib::ustring AddDel::get_value(const Gtk::TreeModel::iterator& iter, guint col)
       //Get different types of data, depending on the column:
       if(m_ColumnTypes[col_real].m_style == AddDelColumnInfo::enumStyles::Boolean)
       {
-        bool bValue = false;
-        treerow.get_value(col_real, bValue);
+        bool bool_value = false;
+        treerow.get_value(col_real, bool_value);
 
         //Create a string representation of the value:
-        value = bValue  ? "true" : "false";
+        value = bool_value  ? "true" : "false";
       }
       else
       {
@@ -763,8 +763,8 @@ void AddDel::set_value(const Gtk::TreeModel::iterator& iter, guint col, const Gl
       {
         case(AddDelColumnInfo::enumStyles::Boolean):
         {
-          bool bValue = (strValue == "true");
-          treerow.set_value(col, bValue);
+          const bool bool_value = (strValue == "true");
+          treerow.set_value(col, bool_value);
           break;
         }
         default:
@@ -797,7 +797,7 @@ void AddDel::set_value(const Gtk::TreeModel::iterator& iter, guint col, unsigned
   set_value(iter, col, Glib::ustring(pchValue));
 }
 
-void AddDel::set_value(const Gtk::TreeModel::iterator& iter, guint col, bool bVal)
+void AddDel::set_value(const Gtk::TreeModel::iterator& iter, guint col, bool value)
 {
   InnerIgnore innerIgnore(this);
 
@@ -813,12 +813,12 @@ void AddDel::set_value(const Gtk::TreeModel::iterator& iter, guint col, bool bVa
       {
         case(AddDelColumnInfo::enumStyles::Boolean):
         {
-          treerow.set_value(col, bVal);
+          treerow.set_value(col, value);
           break;
         }
         default:
         {
-          Glib::ustring strValue = (bVal ? "true" : "false");
+          Glib::ustring strValue = (value ? "true" : "false");
           treerow.set_value(col, strValue);
           break;
         }
@@ -894,9 +894,9 @@ bool AddDel::get_prevent_user_signals() const
   return m_bPreventUserSignals;
 }
 
-void AddDel::set_prevent_user_signals(bool bVal)
+void AddDel::set_prevent_user_signals(bool value)
 {
-  m_bPreventUserSignals = bVal;
+  m_bPreventUserSignals = value;
 }
 
 void AddDel::set_column_choices(guint col, const type_vec_strings& vecStrings)
@@ -938,9 +938,9 @@ void AddDel::set_allow_delete(bool val)
 }
 
 
-void AddDel::set_allow_user_actions(bool bVal)
+void AddDel::set_allow_user_actions(bool value)
 {
-  m_bAllowUserActions = bVal;
+  m_bAllowUserActions = value;
 }
 
 bool AddDel::get_allow_user_actions() const
@@ -968,9 +968,9 @@ void AddDel::finish_editing()
 //  set_ignore_treeview_signals(bIgnoreSheetSignals);
 }
 
-void AddDel::set_ignore_treeview_signals(bool bVal)
+void AddDel::set_ignore_treeview_signals(bool value)
 {
-  m_bIgnoreSheetSignals = bVal;
+  m_bIgnoreSheetSignals = value;
 }
 
 bool AddDel::get_ignore_treeview_signals() const
diff --git a/glom/utility_widgets/adddel/adddel.h b/glom/utility_widgets/adddel/adddel.h
index a52b866..2d6d25e 100644
--- a/glom/utility_widgets/adddel/adddel.h
+++ b/glom/utility_widgets/adddel/adddel.h
@@ -81,7 +81,7 @@ public:
   // Set the accessible name for the TreeView widget
   void set_treeview_accessible_name(const Glib::ustring& name);
 
-  virtual void set_allow_user_actions(bool bVal = true);
+  virtual void set_allow_user_actions(bool value = true);
   bool get_allow_user_actions() const;
 
   virtual void set_allow_add(bool val = true);
@@ -126,7 +126,7 @@ public:
   //void set_value(const Gtk::TreeModel::iterator& iter, guint col, const Gnome::Gda::Value& value);
   void set_value(const Gtk::TreeModel::iterator& iter, guint col, const Glib::ustring& strValue);
   void set_value(const Gtk::TreeModel::iterator& iter, guint col, unsigned long ulValue);
-  void set_value(const Gtk::TreeModel::iterator& iter, guint col, bool bVal);
+  void set_value(const Gtk::TreeModel::iterator& iter, guint col, bool value);
 
   //void set_value_selected(guint col, const Gnome::Gda::Value& value);
 
@@ -167,7 +167,7 @@ public:
 
   void finish_editing(); //Closes active edit controls and commits the data to the cell.
   //void reactivate(); //Sheet doesn't seem to update unless a cell is active.
-  void set_prevent_user_signals(bool bVal = true);
+  void set_prevent_user_signals(bool value = true);
 
   /** When this is set to true, a new row will be added automatically, and the cursor will be placed in the 
first column of the new row.
    * Use set_auto_add(false) if you want to provide default values for columns in the new row, or if you 
want to place the cursor in a different column.
@@ -263,7 +263,7 @@ private:
   bool get_prevent_user_signals() const;
 
   //Sometimes the sheet sends signals when it shouldn't:
-  void set_ignore_treeview_signals(bool bVal = true);
+  void set_ignore_treeview_signals(bool value = true);
   bool get_ignore_treeview_signals() const;
 
   bool get_view_column_index(guint model_column_index, guint& view_column_index);
diff --git a/glom/utility_widgets/adddel/adddel_withbuttons.cc 
b/glom/utility_widgets/adddel/adddel_withbuttons.cc
index 981bcf8..e8dcd53 100644
--- a/glom/utility_widgets/adddel/adddel_withbuttons.cc
+++ b/glom/utility_widgets/adddel/adddel_withbuttons.cc
@@ -125,12 +125,12 @@ void AddDel_WithButtons::set_allow_delete(bool val)
   m_Button_Del.set_sensitive(val);
 }
 
-void AddDel_WithButtons::set_allow_user_actions(bool bVal)
+void AddDel_WithButtons::set_allow_user_actions(bool value)
 {
-  AddDel::set_allow_user_actions(bVal);
+  AddDel::set_allow_user_actions(value);
 
   //add or remove buttons:
-  if(bVal)
+  if(value)
   {
     set_allow_user_actions(false); //Remove them first (Don't want to add them twice).
 
diff --git a/glom/utility_widgets/adddel/adddel_withbuttons.h 
b/glom/utility_widgets/adddel/adddel_withbuttons.h
index c895bca..bce1343 100644
--- a/glom/utility_widgets/adddel/adddel_withbuttons.h
+++ b/glom/utility_widgets/adddel/adddel_withbuttons.h
@@ -35,7 +35,7 @@ public:
 
   void set_allow_add(bool val = true) override;
   void set_allow_delete(bool val = true) override;
-  void set_allow_user_actions(bool bVal = true) override;
+  void set_allow_user_actions(bool value = true) override;
 
   /**
    * @param label The button label text, including the mnemonic underline.


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