[ekiga] Being active and enabled is different.



commit e65f709175d5b2ab08ed3df14d04464044a386a2
Author: Damien Sandras <dsandras seconix com>
Date:   Sat Oct 24 19:33:42 2009 +0200

    Being active and enabled is different.
    
    Renamed is_active into is_enabled for accounts.

 lib/engine/account/account.h                |    2 +-
 lib/engine/components/opal/sip-endpoint.cpp |    2 +-
 plugins/loudmouth/loudmouth-account.cpp     |    2 +-
 plugins/loudmouth/loudmouth-account.h       |    2 +-
 src/gui/accounts.cpp                        |   14 +++++++-------
 src/gui/main_window.cpp                     |    2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/lib/engine/account/account.h b/lib/engine/account/account.h
index df7c79a..f3d5119 100644
--- a/lib/engine/account/account.h
+++ b/lib/engine/account/account.h
@@ -85,7 +85,7 @@ namespace Ekiga
      *
      * @return Whether the account is active
      */
-    virtual bool is_active () const = 0;
+    virtual bool is_enabled () const = 0;
 
     /** Create the menu for that account and its actions.
      * This function is purely virtual and should be implemented by
diff --git a/lib/engine/components/opal/sip-endpoint.cpp b/lib/engine/components/opal/sip-endpoint.cpp
index d651c95..a4976fa 100644
--- a/lib/engine/components/opal/sip-endpoint.cpp
+++ b/lib/engine/components/opal/sip-endpoint.cpp
@@ -190,7 +190,7 @@ Opal::Sip::EndPoint::menu_builder_add_actions (const std::string& fullname,
 	 it != bank->end ();
 	 it++) {
 
-      if ((*it)->get_protocol_name () == "SIP" && (*it)->is_active ()) {
+      if ((*it)->get_protocol_name () == "SIP" && (*it)->is_enabled ()) {
 
 	std::stringstream uristr;
 	std::string str = uri;
diff --git a/plugins/loudmouth/loudmouth-account.cpp b/plugins/loudmouth/loudmouth-account.cpp
index ac5c40b..43bc5b3 100644
--- a/plugins/loudmouth/loudmouth-account.cpp
+++ b/plugins/loudmouth/loudmouth-account.cpp
@@ -374,7 +374,7 @@ LM::Account::get_status () const
 }
 
 bool
-LM::Account::is_active () const
+LM::Account::is_enabled () const
 {
   bool result = false;
   xmlChar* xml_str = xmlGetProp (node, BAD_CAST "startup");
diff --git a/plugins/loudmouth/loudmouth-account.h b/plugins/loudmouth/loudmouth-account.h
index 65af29d..80cfdfc 100644
--- a/plugins/loudmouth/loudmouth-account.h
+++ b/plugins/loudmouth/loudmouth-account.h
@@ -67,7 +67,7 @@ namespace LM
 
     const std::string get_status () const;
 
-    bool is_active () const;
+    bool is_enabled () const;
 
     bool populate_menu (Ekiga::MenuBuilder& builder);
 
diff --git a/src/gui/accounts.cpp b/src/gui/accounts.cpp
index 14a3c0f..ebcad52 100644
--- a/src/gui/accounts.cpp
+++ b/src/gui/accounts.cpp
@@ -124,7 +124,7 @@ static void on_selection_changed (GtkTreeSelection* /*selection*/,
 enum {
 
   COLUMN_ACCOUNT,
-  COLUMN_ACCOUNT_IS_ACTIVE,
+  COLUMN_ACCOUNT_IS_ENABLED,
   COLUMN_ACCOUNT_WEIGHT,
   COLUMN_ACCOUNT_ACCOUNT_NAME,
   COLUMN_ACCOUNT_STATUS,
@@ -284,7 +284,7 @@ void account_toggled_cb (G_GNUC_UNUSED GtkCellRendererToggle* renderer,
   GtkTreePath* path = NULL;
   GtkTreeIter iter;
   Ekiga::Account* account = NULL;
-  gboolean is_active;
+  gboolean is_enabled;
 
   aw = gm_aw_get_aw (GTK_WIDGET (data));
 
@@ -295,10 +295,10 @@ void account_toggled_cb (G_GNUC_UNUSED GtkCellRendererToggle* renderer,
 
     gtk_tree_model_get (model, &iter,
 			COLUMN_ACCOUNT, &account,
-			COLUMN_ACCOUNT_IS_ACTIVE, &is_active,
+			COLUMN_ACCOUNT_IS_ENABLED, &is_enabled,
 			-1);
 
-    if (is_active) {
+    if (is_enabled) {
 
       Ekiga::Activator builder ("disable");
       account->populate_menu (builder);
@@ -365,7 +365,7 @@ gm_accounts_window_add_account (GtkWidget *window,
   gtk_list_store_append (GTK_LIST_STORE (model), &iter);
   gtk_list_store_set (GTK_LIST_STORE (model), &iter,
                       COLUMN_ACCOUNT, account.get (),
-		      COLUMN_ACCOUNT_IS_ACTIVE, account->is_active (),
+		      COLUMN_ACCOUNT_IS_ENABLED, account->is_enabled (),
                       COLUMN_ACCOUNT_WEIGHT, PANGO_WEIGHT_NORMAL,
                       COLUMN_ACCOUNT_ACCOUNT_NAME, account->get_name ().c_str (),
                       -1);
@@ -402,7 +402,7 @@ gm_accounts_window_update_account (GtkWidget *accounts_window,
 
         gtk_list_store_set (GTK_LIST_STORE (model), &iter,
                             COLUMN_ACCOUNT, account.get (),
-			    COLUMN_ACCOUNT_IS_ACTIVE, account->is_active (),
+			    COLUMN_ACCOUNT_IS_ENABLED, account->is_enabled (),
                             COLUMN_ACCOUNT_WEIGHT, PANGO_WEIGHT_NORMAL,
                             COLUMN_ACCOUNT_ACCOUNT_NAME, account->get_name ().c_str (),
 			    COLUMN_ACCOUNT_STATUS, account->get_status ().c_str (),
@@ -622,7 +622,7 @@ gm_accounts_window_new (Ekiga::ServiceCore &core)
   column = gtk_tree_view_column_new_with_attributes (_("Active"),
 						     renderer,
 						     "active",
-						     COLUMN_ACCOUNT_IS_ACTIVE,
+						     COLUMN_ACCOUNT_IS_ENABLED,
 						     NULL);
   gtk_tree_view_append_column (GTK_TREE_VIEW (aw->accounts_list), column);
   g_signal_connect (G_OBJECT (renderer), "toggled",
diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp
index 5ce721c..17ee134 100644
--- a/src/gui/main_window.cpp
+++ b/src/gui/main_window.cpp
@@ -2219,7 +2219,7 @@ account_completion_helper (Ekiga::AccountPtr acc,
 			   EkigaMainWindow* mw)
 {
   Opal::AccountPtr account = boost::dynamic_pointer_cast<Opal::Account>(acc);
-  if (account && account->is_active ()) {
+  if (account && account->is_enabled ()) {
 
     if (g_ascii_strncasecmp (text, "sip:", 4) == 0 && account->get_protocol_name () == "SIP") {
 



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