[ekiga] Added back a toggle column in the account window



commit 77eb6c19d8f5e9409088e39676e3e9acbcfc8545
Author: Julien Puydt <jpuydt gnome org>
Date:   Sun Jul 12 09:51:51 2009 +0200

    Added back a toggle column in the account window
    
    (no action through it yet)

 src/gui/accounts.cpp |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/accounts.cpp b/src/gui/accounts.cpp
index 1cc5775..acbf44a 100644
--- a/src/gui/accounts.cpp
+++ b/src/gui/accounts.cpp
@@ -117,6 +117,7 @@ static void on_selection_changed (GtkTreeSelection* /*selection*/,
 enum {
 
   COLUMN_ACCOUNT,
+  COLUMN_ACCOUNT_IS_ACTIVE,
   COLUMN_ACCOUNT_WEIGHT,
   COLUMN_ACCOUNT_ACCOUNT_NAME,
   COLUMN_ACCOUNT_STATUS,
@@ -317,6 +318,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_WEIGHT, PANGO_WEIGHT_NORMAL,
                       COLUMN_ACCOUNT_ACCOUNT_NAME, account->get_name ().c_str (),
                       -1);
@@ -353,6 +355,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_WEIGHT, PANGO_WEIGHT_NORMAL,
                             COLUMN_ACCOUNT_ACCOUNT_NAME, account->get_name ().c_str (),
 			    COLUMN_ACCOUNT_STATUS, account->get_status ().c_str (),
@@ -547,6 +550,7 @@ gm_accounts_window_new (Ekiga::ServiceCore &core)
   /* The accounts list store */
   list_store = gtk_list_store_new (COLUMN_ACCOUNT_NUMBER,
                                    G_TYPE_POINTER,
+				   G_TYPE_BOOLEAN, /* Is account active? */
 				   G_TYPE_INT,
 				   G_TYPE_STRING,  /* Account Name */
 				   G_TYPE_STRING,  /* Error Message */
@@ -560,6 +564,14 @@ gm_accounts_window_new (Ekiga::ServiceCore &core)
   aobj = gtk_widget_get_accessible (GTK_WIDGET (aw->accounts_list));
   atk_object_set_name (aobj, _("Accounts"));
 
+  renderer = gtk_cell_renderer_toggle_new ();
+  column = gtk_tree_view_column_new_with_attributes (_("Active"),
+						     renderer,
+						     "active",
+						     COLUMN_ACCOUNT_IS_ACTIVE,
+						     NULL);
+  gtk_tree_view_append_column (GTK_TREE_VIEW (aw->accounts_list), column);
+
   /* Add all text renderers */
   for (int i = COLUMN_ACCOUNT_ACCOUNT_NAME ; i < COLUMN_ACCOUNT_NUMBER - 1 ; i++) {
 



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