[ekiga] Documented the gtk+ frontend sources to know where things stand
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Documented the gtk+ frontend sources to know where things stand
- Date: Thu, 20 Jun 2013 19:22:11 +0000 (UTC)
commit 70a11ea2940de16f5f76f951f3d7e3e749c482fa
Author: Julien Puydt <jpuydt free fr>
Date: Thu Jun 20 16:03:48 2013 +0200
Documented the gtk+ frontend sources to know where things stand
lib/engine/gui/gtk-frontend/call-window.cpp | 2 -
lib/engine/gui/gtk-frontend/gtk-frontend.cpp | 40 ++++++++++++++++++++------
lib/engine/gui/gtk-frontend/statusicon.cpp | 8 ++---
3 files changed, 34 insertions(+), 16 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/call-window.cpp b/lib/engine/gui/gtk-frontend/call-window.cpp
index 5652a2b..0c4a8f5 100644
--- a/lib/engine/gui/gtk-frontend/call-window.cpp
+++ b/lib/engine/gui/gtk-frontend/call-window.cpp
@@ -78,8 +78,6 @@
#include "audioinput-core.h"
#include "audiooutput-core.h"
-#include "gtk-frontend.h"
-
#include <algorithm>
enum CallingState {Standby, Calling, Ringing, Connected, Called};
diff --git a/lib/engine/gui/gtk-frontend/gtk-frontend.cpp b/lib/engine/gui/gtk-frontend/gtk-frontend.cpp
index 32e9b8c..dd5f4d8 100644
--- a/lib/engine/gui/gtk-frontend/gtk-frontend.cpp
+++ b/lib/engine/gui/gtk-frontend/gtk-frontend.cpp
@@ -76,6 +76,9 @@ gtk_frontend_init (Ekiga::ServiceCore &core,
if (presence_core && contact_core && chat_core && history_source) {
+ // BEWARE: the GtkFrontend ctor could do everything, but the status
+ // icon ctor and the main window ctor use GtkFrontend, so we must
+ // keep the ctor+build setup
boost::shared_ptr<GtkFrontend> gtk_frontend (new GtkFrontend (core));
core.add (gtk_frontend);
gtk_frontend->build ();
@@ -94,7 +97,8 @@ GtkFrontend::~GtkFrontend ()
}
-void GtkFrontend::build ()
+void
+GtkFrontend::build ()
{
boost::shared_ptr<Ekiga::ContactCore> contact_core = core.get<Ekiga::ContactCore> ("contact-core");
boost::shared_ptr<Ekiga::ChatCore> chat_core = core.get<Ekiga::ChatCore> ("chat-core");
@@ -108,7 +112,10 @@ void GtkFrontend::build ()
gtk_widget_destroy);
accounts_window =
boost::shared_ptr<GtkWidget> (accounts_window_new_with_key (core, "/apps/" PACKAGE_NAME
"/general/user_interface/accounts_window"),
+
gtk_widget_destroy);
+
+ // BEWARE: uses the main window during runtime
assistant_window =
boost::shared_ptr<GtkWidget> (assistant_window_new (core),
gtk_widget_destroy);
@@ -121,23 +128,32 @@ void GtkFrontend::build ()
preferences_window =
boost::shared_ptr<GtkWidget> (preferences_window_new (core),
gtk_widget_destroy);
+
+ // BEWARE: the status icon needs the chat window at startup
status_icon =
boost::shared_ptr<StatusIcon> (status_icon_new (core),
g_object_unref);
+
+ // BEWARE: the main window uses the chat window and status icon at
+ // startup already, and later on needs the call window, addressbook
+ // window, preferences window and assistant window
main_window =
boost::shared_ptr<GtkWidget> (gm_main_window_new (core),
gtk_widget_destroy);
+
gtk_window_set_transient_for (GTK_WINDOW (assistant_window.get ()), GTK_WINDOW (main_window.get ()));
}
-const std::string GtkFrontend::get_name () const
+const std::string
+GtkFrontend::get_name () const
{
return "gtk-frontend";
}
-const std::string GtkFrontend::get_description () const
+const std::string
+GtkFrontend::get_description () const
{
return "\tGtk+ frontend support";
}
@@ -155,37 +171,43 @@ GtkFrontend::get_main_window () const
}
-const GtkWidget *GtkFrontend::get_addressbook_window () const
+const GtkWidget*
+GtkFrontend::get_addressbook_window () const
{
return addressbook_window.get ();
}
-const GtkWidget *GtkFrontend::get_accounts_window () const
+const GtkWidget*
+GtkFrontend::get_accounts_window () const
{
return accounts_window.get ();
}
-const GtkWidget *GtkFrontend::get_preferences_window () const
+const GtkWidget*
+GtkFrontend::get_preferences_window () const
{
return preferences_window.get ();
}
-const GtkWidget *GtkFrontend::get_call_window () const
+const GtkWidget*
+GtkFrontend::get_call_window () const
{
return call_window.get ();
}
-const GtkWidget *GtkFrontend::get_chat_window () const
+const GtkWidget*
+GtkFrontend::get_chat_window () const
{
return chat_window.get ();
}
-const StatusIcon *GtkFrontend::get_status_icon () const
+const StatusIcon*
+GtkFrontend::get_status_icon () const
{
return status_icon.get ();
}
diff --git a/lib/engine/gui/gtk-frontend/statusicon.cpp b/lib/engine/gui/gtk-frontend/statusicon.cpp
index 3a08950..efd9d01 100644
--- a/lib/engine/gui/gtk-frontend/statusicon.cpp
+++ b/lib/engine/gui/gtk-frontend/statusicon.cpp
@@ -38,19 +38,17 @@
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
+#include <vector>
+
#include "statusicon.h"
#include "gmstockicons.h"
#include "gmmenuaddon.h"
#include "gmcallbacks.h"
-#include "gtk-frontend.h"
-#include "call-core.h"
-
-#include <vector>
-
#include "services.h"
#include "gtk-frontend.h"
+#include "call-core.h"
#include "notification-core.h"
#include "personal-details.h"
#include "scoped-connections.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]