[ekiga/ds-gtk-application] Opal Roster: Fixed popup menus not being displayed.



commit a5b89e4d5dc3fcea45e20e533d6fc52b16bc65b3
Author: Damien Sandras <dsandras beip be>
Date:   Sun Sep 14 19:02:21 2014 +0200

    Opal Roster: Fixed popup menus not being displayed.
    
    UI popups were not displayed when invoking roster menus.
    This was due:
     - a missing "questions" connection between presentities and heaps;
     - a confusion between "questions" objects due to multiple inheritance
       from LiveObject with the new design. We have several questions to
       relay following we are a Cluster or a Bank. Clusters will relay
       questions from Heaps. Banks will relay questions from Accounts.

 lib/engine/components/opal/opal-account.cpp |   11 ++++++-----
 lib/engine/components/opal/opal-bank.cpp    |    6 ++++++
 2 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index da587fa..64ae0ed 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -186,6 +186,7 @@ Opal::Account::Account (boost::shared_ptr<Opal::Sip::EndPoint> _sip_endpoint,
        pres->trigger_saving.connect (boost::ref (trigger_saving));
        pres->removed.connect (boost::bind (&Opal::Account::when_presentity_removed, this, pres));
        pres->updated.connect (boost::bind (&Opal::Account::when_presentity_updated, this, pres));
+       pres->questions.connect (boost::ref (Ekiga::Heap::questions));
        add_object (pres);
        presentity_added (pres);
       }
@@ -607,7 +608,7 @@ Opal::Account::edit ()
   request->text ("timeout", _("Timeout:"), str.str (), _("Time in seconds after which the account 
registration is automatically retried"));
   request->boolean ("enabled", _("Enable account"), is_enabled ());
 
-  questions (request);
+  Ekiga::Account::questions (request);
 }
 
 
@@ -648,7 +649,7 @@ Opal::Account::on_edit_form_submitted (bool submitted,
     result.visit (*request);
     request->error (error);
 
-    questions (request);
+    Ekiga::Account::questions (request);
   }
   else {
 
@@ -734,7 +735,7 @@ Opal::Account::add_contact ()
                         _("Put contact in groups:"),
                         std::set<std::string>(), groups);
 
-  questions (request);
+  Ekiga::Heap::questions (request);
 }
 
 void
@@ -779,7 +780,7 @@ Opal::Account::on_add_contact_form_submitted (bool submitted,
     else
       request->error (_("You already have a contact with this address!"));
 
-    questions (request);
+    Ekiga::Heap::questions (request);
   }
 }
 
@@ -1264,7 +1265,7 @@ Opal::Account::on_rename_group (std::string name)
   request->instructions (_("Please edit this group name"));
   request->text ("name", _("Name:"), name, std::string ());
 
-  questions (request);
+  Ekiga::Heap::questions (request);
 }
 
 
diff --git a/lib/engine/components/opal/opal-bank.cpp b/lib/engine/components/opal/opal-bank.cpp
index 11aa7c9..60fb27e 100644
--- a/lib/engine/components/opal/opal-bank.cpp
+++ b/lib/engine/components/opal/opal-bank.cpp
@@ -88,6 +88,12 @@ Opal::Bank::Bank (Ekiga::ServiceCore& core):
       Ekiga::BankImpl<Account>::add_connection (account, account->presentity_added.connect (boost::bind 
(boost::ref(presentity_added), account, _1)));
       Ekiga::BankImpl<Account>::add_connection (account, account->presentity_updated.connect (boost::bind 
(boost::ref(presentity_updated), account, _1)));
       Ekiga::BankImpl<Account>::add_connection (account, account->presentity_removed.connect (boost::bind 
(boost::ref(presentity_removed), account, _1)));
+
+      // We have several questions to relay following we are a Cluster or a Bank.
+      // Clusters will relay questions from Heaps. Banks will relay questions from Accounts.
+      Ekiga::BankImpl<Account>::add_connection (account, account->Heap::questions.connect 
(boost::ref(Ekiga::Cluster::questions)));
+      Ekiga::BankImpl<Account>::add_connection (account, account->Account::questions.connect 
(boost::ref(Ekiga::Bank::questions)));
+
       Ekiga::BankImpl<Account>::add_connection (account, account->trigger_saving.connect (boost::bind 
(&Opal::Bank::save, this)));
       Ekiga::BankImpl<Account>::add_connection (account, account->presence_received.connect (boost::ref 
(presence_received)));
       Ekiga::BankImpl<Account>::add_connection (account, account->status_received.connect (boost::ref 
(status_received)));


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