[ekiga] Simplified the chat window api



commit 0a088a634d58bf9fd7a54724a58dae359c9831fc
Author: Julien Puydt <jpuydt free fr>
Date:   Thu Jun 20 20:31:57 2013 +0200

    Simplified the chat window api

 lib/engine/gui/gtk-frontend/chat-window.cpp  |    6 ++----
 lib/engine/gui/gtk-frontend/chat-window.h    |    3 +--
 lib/engine/gui/gtk-frontend/gtk-frontend.cpp |   19 +++++++++----------
 3 files changed, 12 insertions(+), 16 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/chat-window.cpp b/lib/engine/gui/gtk-frontend/chat-window.cpp
index 82d5f5d..8b6d7de 100644
--- a/lib/engine/gui/gtk-frontend/chat-window.cpp
+++ b/lib/engine/gui/gtk-frontend/chat-window.cpp
@@ -444,16 +444,14 @@ chat_window_init (ChatWindow* self)
 /* public api */
 
 GtkWidget*
-chat_window_new (Ekiga::ServiceCore& core,
-                const std::string key)
+chat_window_new (Ekiga::ServiceCore& core)
 {
   ChatWindow* self = NULL;
   GtkAccelGroup *accel = NULL;
 
   self = (ChatWindow*)g_object_new (CHAT_WINDOW_TYPE,
-                                    "key", key.c_str (),
                                     "hide_on_esc", FALSE,
-                                      NULL);
+                                   NULL);
 
   self->priv = new ChatWindowPrivate;
 
diff --git a/lib/engine/gui/gtk-frontend/chat-window.h b/lib/engine/gui/gtk-frontend/chat-window.h
index c75d13c..a75429b 100644
--- a/lib/engine/gui/gtk-frontend/chat-window.h
+++ b/lib/engine/gui/gtk-frontend/chat-window.h
@@ -69,8 +69,7 @@ struct _ChatWindowClass
 
 /* Public API */
 
-GtkWidget* chat_window_new (Ekiga::ServiceCore& core,
-                           const std::string key);
+GtkWidget* chat_window_new (Ekiga::ServiceCore& core);
 
 /* GObject's boilerplate */
 
diff --git a/lib/engine/gui/gtk-frontend/gtk-frontend.cpp b/lib/engine/gui/gtk-frontend/gtk-frontend.cpp
index 2404e1d..e570cea 100644
--- a/lib/engine/gui/gtk-frontend/gtk-frontend.cpp
+++ b/lib/engine/gui/gtk-frontend/gtk-frontend.cpp
@@ -146,22 +146,21 @@ GtkFrontend::build ()
 
   // BEWARE: uses the main window during runtime
   assistant_window =
-    boost::shared_ptr<GtkWidget> (assistant_window_new (core),
-                                 gtk_widget_destroy);
+    boost::shared_ptr<GtkWidget> (assistant_window_new (core), gtk_widget_destroy);
+
   call_window =
-    boost::shared_ptr<GtkWidget> (call_window_new (core),
-                                 gtk_widget_destroy);
+    boost::shared_ptr<GtkWidget> (call_window_new (core), gtk_widget_destroy);
+
   chat_window =
-    boost::shared_ptr<GtkWidget> (chat_window_new (core, "/apps/" PACKAGE_NAME 
"/general/user_interface/chat_window"),
-                                 gtk_widget_destroy);
+    boost::shared_ptr<GtkWidget> (chat_window_new (core), gtk_widget_destroy);
+  gm_window_set_key(GM_WINDOW(chat_window.get ()), "/apps/" PACKAGE_NAME 
"/general/user_interface/chat_window");
+
   preferences_window =
-    boost::shared_ptr<GtkWidget> (preferences_window_new (core),
-                                 gtk_widget_destroy);
+    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);
+    boost::shared_ptr<StatusIcon> (status_icon_new (core), g_object_unref);
   g_signal_connect (status_icon.get (), "clicked",
                    G_CALLBACK (on_status_icon_clicked), this);
 


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