[ekiga] Made the chat window correctly relay the form dialogs from the lower strates



commit aa2040cf4c0001ef2514456f30d5026d92dff6a7
Author: Julien Puydt <jpuydt newton localdomain>
Date:   Wed Sep 14 11:41:24 2011 +0200

    Made the chat window correctly relay the form dialogs from the lower strates

 lib/engine/gui/gtk-frontend/chat-window.cpp |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/chat-window.cpp b/lib/engine/gui/gtk-frontend/chat-window.cpp
index 8077bb8..9189e43 100644
--- a/lib/engine/gui/gtk-frontend/chat-window.cpp
+++ b/lib/engine/gui/gtk-frontend/chat-window.cpp
@@ -38,6 +38,9 @@
 #include <gdk/gdkkeysyms.h>
 #include <glib/gi18n.h>
 
+#include "menu-builder-gtk.h"
+#include "form-dialog-gtk.h"
+
 #include "chat-window.h"
 #include "simple-chat-page.h"
 #include "multiple-chat-page.h"
@@ -69,6 +72,9 @@ static void update_unread (ChatWindow* self);
 
 /* signal callbacks (declarations) */
 
+static bool on_handle_questions (ChatWindow* self,
+				 Ekiga::FormRequestPtr request);
+
 static void on_close_button_clicked (GtkButton* button,
 				     gpointer data);
 
@@ -126,6 +132,17 @@ update_unread (ChatWindow* self)
 
 /* signal callbacks (implementations) */
 
+static bool on_handle_questions (ChatWindow* self,
+				 Ekiga::FormRequestPtr request)
+{
+  GtkWidget *parent = gtk_widget_get_toplevel (GTK_WIDGET (self));
+  FormDialog dialog (request, parent);
+
+  dialog.run ();
+
+  return true;
+}
+
 static void
 on_close_button_clicked (GtkButton* button,
 			 gpointer data)
@@ -441,6 +458,7 @@ chat_window_new (Ekiga::ChatCore& core,
 		    G_CALLBACK (on_switch_page), result);
 
   result->priv->connections.push_front (core.dialect_added.connect (boost::bind (&on_dialect_added, result, _1)));
+  result->priv->connections.push_front (core.questions.connect (boost::bind (&on_handle_questions, result, _1)));
   core.visit_dialects (boost::bind (&on_dialect_added, result, _1));
 
   return (GtkWidget*)result;



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