ekiga r7174 - trunk/src/gui



Author: sfre
Date: Wed Oct  8 18:23:19 2008
New Revision: 7174
URL: http://svn.gnome.org/viewvc/ekiga?rev=7174&view=rev

Log:
Add a new EkigaMainWindow object.

Modified:
   trunk/src/gui/main.cpp
   trunk/src/gui/main.h

Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp	(original)
+++ trunk/src/gui/main.cpp	Wed Oct  8 18:23:19 2008
@@ -115,6 +115,14 @@
   DeviceType deviceType;
 };
 
+G_DEFINE_TYPE (EkigaMainWindow, ekiga_main_window, GM_WINDOW_TYPE);
+
+struct _EkigaMainWindowPrivate
+{
+  Ekiga::ServiceCore *core;
+};
+
+
 /* Declarations */
 struct _GmMainWindow
 {
@@ -4013,6 +4021,32 @@
                          (GConnectFlags) 0);
 }
 
+static void
+ekiga_main_window_init (EkigaMainWindow *mw)
+{
+  mw->priv = G_TYPE_INSTANCE_GET_PRIVATE (mw, EKIGA_TYPE_MAIN_WINDOW,
+                                          EkigaMainWindowPrivate);
+}
+
+static void
+ekiga_main_window_class_init (EkigaMainWindowClass *klass)
+{
+  g_type_class_add_private (klass, sizeof (EkigaMainWindowPrivate));
+}
+
+GtkWidget *
+ekiga_main_window_new (Ekiga::ServiceCore *core)
+{
+  EkigaMainWindow *mw;
+
+  mw = EKIGA_MAIN_WINDOW (g_object_new (EKIGA_TYPE_MAIN_WINDOW, NULL));
+  mw->priv->core = core;
+
+  gm_window_set_key (GM_WINDOW (mw), USER_INTERFACE_KEY "main_window");
+
+  return GTK_WIDGET (mw);
+}
+
 GtkWidget *
 gm_main_window_new (Ekiga::ServiceCore & core)
 {
@@ -4041,7 +4075,7 @@
 		    G_CALLBACK (on_chat_unread_alert), NULL);
 
   /* The Top-level window */
-  window = gm_window_new_with_key (USER_INTERFACE_KEY "main_window");
+  window = ekiga_main_window_new (&core);
   gm_window_set_hide_on_delete (GM_WINDOW (window), FALSE);
   gtk_window_set_title (GTK_WINDOW (window), 
 			_("Ekiga"));

Modified: trunk/src/gui/main.h
==============================================================================
--- trunk/src/gui/main.h	(original)
+++ trunk/src/gui/main.h	Wed Oct  8 18:23:19 2008
@@ -46,6 +46,32 @@
 #include "services.h"
 #include "call.h"
 
+#include "lib/gui/gmwindow.h"
+
+G_BEGIN_DECLS
+
+#define EKIGA_TYPE_MAIN_WINDOW               (ekiga_main_window_get_type ())
+#define EKIGA_MAIN_WINDOW(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), EKIGA_TYPE_MAIN_WINDOW, EkigaMainWindow))
+#define EKIGA_MAIN_WINDOW_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), EKIGA_TYPE_MAIN_WINDOW, EkigaMainWindowClass))
+#define EKIGA_IS_MAIN_WINDOW(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EKIGA_TYPE_MAIN_WINDOW))
+#define EKIGA_IS_MAIN_WINDOW_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), EKIGA_TYPE_MAIN_WINDOW))
+
+typedef struct _EkigaMainWindowPrivate       EkigaMainWindowPrivate;
+typedef struct _EkigaMainWindow              EkigaMainWindow;
+
+struct _EkigaMainWindow {
+  GmWindow                parent;
+  EkigaMainWindowPrivate *priv;
+};
+
+typedef GmWindowClass EkigaMainWindowClass;
+
+GType        ekiga_main_window_get_type   ();
+GtkWidget   *ekiga_main_window_new        (Ekiga::ServiceCore *core);
+
+G_END_DECLS
+
+
 
 /* DESCRIPTION  :  /
  * BEHAVIOR     :  Press the given dialpad key.



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