[ekiga] Ported everything to GTK+-3.0.



commit 8114e6c867105217544ee28f3ee457c9345ac2fa
Author: Damien Sandras <dsandras beip be>
Date:   Sat Mar 16 15:47:43 2013 +0100

    Ported everything to GTK+-3.0.

 .../x-videooutput/videooutput-manager-x.cpp        |    2 +-
 lib/engine/gui/gtk-frontend/chat-area.cpp          |    3 +-
 lib/engine/gui/gtk-frontend/chat-window.cpp        |    2 +-
 lib/engine/gui/gtk-frontend/roster-view-gtk.cpp    |    2 +-
 lib/engine/gui/gtk-frontend/statusicon.cpp         |    2 +-
 lib/engine/gui/gtk-frontend/statusmenu.cpp         |    4 +-
 lib/gui/gmpreferences.c                            |   26 ++++++++++----------
 lib/gui/gmstatusbar.c                              |    2 -
 lib/gui/xvwindow.cpp                               |    4 +--
 lib/gui/xvwindow.h                                 |    1 +
 lib/gui/xwindow.cpp                                |    4 +--
 lib/gui/xwindow.h                                  |    1 +
 src/gui/assistant.cpp                              |    2 +-
 src/gui/main_window.cpp                            |   10 ++++----
 14 files changed, 30 insertions(+), 35 deletions(-)
---
diff --git a/lib/engine/components/x-videooutput/videooutput-manager-x.cpp 
b/lib/engine/components/x-videooutput/videooutput-manager-x.cpp
index 5491f4c..c00faff 100644
--- a/lib/engine/components/x-videooutput/videooutput-manager-x.cpp
+++ b/lib/engine/components/x-videooutput/videooutput-manager-x.cpp
@@ -148,7 +148,7 @@ GMVideoOutputManager_x::create_window (Ekiga::DisplayInfo &info,
       cont = contX;
     }
 
-    if (win->Init (cont.display, cont.window,
+    if (win->Init (cont.display, cont.window, cont.gc,
                    cont.x, cont.y,
                    cont.wWidth, cont.wHeight,
                    cont.iWidth, cont.iHeight)) {
diff --git a/lib/engine/gui/gtk-frontend/chat-area.cpp b/lib/engine/gui/gtk-frontend/chat-area.cpp
index 71366de..2d17372 100644
--- a/lib/engine/gui/gtk-frontend/chat-area.cpp
+++ b/lib/engine/gui/gtk-frontend/chat-area.cpp
@@ -414,7 +414,6 @@ on_extlink_tag_event (GtkTextTag* tag,
   case GDK_SELECTION_CLEAR:
   case GDK_PROXIMITY_IN:
   case GDK_PROXIMITY_OUT:
-  case GDK_NO_EXPOSE:
   case GDK_VISIBILITY_NOTIFY:
   case GDK_CLIENT_EVENT:
   case GDK_DROP_FINISHED:
@@ -553,7 +552,7 @@ message_activated_cb (G_GNUC_UNUSED GtkWidget *w,
   // if ...-shift-enter, insert newline
   // if enter, send message
   // note there are two enter: from main kbd and from keypad
-  if ((key->keyval == GDK_Return || key->keyval == GDK_KP_Enter)
+  if ((key->keyval == GDK_KEY_Return || key->keyval == GDK_KEY_KP_Enter)
       && (key->state & GDK_SHIFT_MASK) == 0) {
 
     buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (self->priv->message));
diff --git a/lib/engine/gui/gtk-frontend/chat-window.cpp b/lib/engine/gui/gtk-frontend/chat-window.cpp
index ca982cf..bbde78e 100644
--- a/lib/engine/gui/gtk-frontend/chat-window.cpp
+++ b/lib/engine/gui/gtk-frontend/chat-window.cpp
@@ -466,7 +466,7 @@ chat_window_new (Ekiga::ServiceCore& core,
 
   accel = gtk_accel_group_new ();
   gtk_window_add_accel_group (GTK_WINDOW (self), accel);
-  gtk_accel_group_connect (accel, GDK_Escape, (GdkModifierType) 0, GTK_ACCEL_LOCKED,
+  gtk_accel_group_connect (accel, GDK_KEY_Escape, (GdkModifierType) 0, GTK_ACCEL_LOCKED,
                            g_cclosure_new_swap (G_CALLBACK (on_escaped), (gpointer) self, NULL));
   g_object_unref (accel);
 
diff --git a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
index 26c7e72..087af0d 100644
--- a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
@@ -703,7 +703,7 @@ on_view_event_after (GtkWidget *tree_view,
   // take into account only clicks and Enter keys
   if (event->type != GDK_BUTTON_PRESS && event->type != GDK_2BUTTON_PRESS && event->type != GDK_KEY_PRESS)
     return FALSE;
-  if (event->type == GDK_KEY_PRESS && ((GdkEventKey*)event)->keyval != GDK_Return && 
((GdkEventKey*)event)->keyval != GDK_KP_Enter)
+  if (event->type == GDK_KEY_PRESS && ((GdkEventKey*)event)->keyval != GDK_KEY_Return && 
((GdkEventKey*)event)->keyval != GDK_KEY_KP_Enter)
     return FALSE;
 
   self = ROSTER_VIEW_GTK (data);
diff --git a/lib/engine/gui/gtk-frontend/statusicon.cpp b/lib/engine/gui/gtk-frontend/statusicon.cpp
index 52e416b..60e0b64 100644
--- a/lib/engine/gui/gtk-frontend/statusicon.cpp
+++ b/lib/engine/gui/gtk-frontend/statusicon.cpp
@@ -371,7 +371,7 @@ statusicon_build_menu ()
     {
       GTK_MENU_ENTRY("help", NULL,
                      _("Get help by reading the Ekiga manual"),
-                     GTK_STOCK_HELP, GDK_F1,
+                     GTK_STOCK_HELP, GDK_KEY_F1,
                      G_CALLBACK (help_callback), NULL, TRUE),
 
       GTK_MENU_ENTRY("about", NULL,
diff --git a/lib/engine/gui/gtk-frontend/statusmenu.cpp b/lib/engine/gui/gtk-frontend/statusmenu.cpp
index 9f2d1dd..baf650c 100644
--- a/lib/engine/gui/gtk-frontend/statusmenu.cpp
+++ b/lib/engine/gui/gtk-frontend/statusmenu.cpp
@@ -538,7 +538,7 @@ status_menu_clear_status_message_dialog_run (StatusMenu *self)
 
   vbox = gtk_vbox_new (false, 0);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox, false, false, 2);
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), vbox, false, false, 2);
 
 
   label = gtk_label_new (_("Delete custom messages:"));
@@ -683,7 +683,7 @@ status_menu_new_status_message_dialog_run (StatusMenu *self,
 
   vbox = gtk_vbox_new (false, 0);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox, false, false, 2);
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), vbox, false, false, 2);
 
   hbox = gtk_hbox_new (false, 2);
   gtk_window_set_icon_name (GTK_WINDOW (dialog), status_icon_name[option - NUM_STATUS_TYPES - 1]);
diff --git a/lib/gui/gmpreferences.c b/lib/gui/gmpreferences.c
index f669c08..b988fe7 100644
--- a/lib/gui/gmpreferences.c
+++ b/lib/gui/gmpreferences.c
@@ -974,10 +974,10 @@ gnome_prefs_window_new (const gchar *logo_name)
   GtkWidget *pixmap = NULL;
   GtkWidget *hsep = NULL;
 
-  GdkColor cwhite;
+  GdkRGBA cwhite;
 
-  PangoAttrList *attrs = NULL; 
-  PangoAttribute *attr = NULL; 
+  PangoAttrList *attrs = NULL;
+  PangoAttribute *attr = NULL;
 
   /* Box inside the prefs window */
   GtkWidget *dialog_vbox = NULL;
@@ -987,12 +987,12 @@ gnome_prefs_window_new (const gchar *logo_name)
 
   gpw = (GnomePrefsWindow *) g_malloc (sizeof (GnomePrefsWindow));
   gpw->last_page = 1;
-  
+
   g_object_set_data_full (G_OBJECT (window), "gpw", (gpointer) gpw, g_free);
-  
+
   gtk_dialog_add_button (GTK_DIALOG (window), GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL);
 
-  
+
   /* The sections */
   gpw->notebook = gtk_notebook_new ();
   gtk_notebook_set_show_tabs (GTK_NOTEBOOK (gpw->notebook), FALSE);
@@ -1004,19 +1004,19 @@ gnome_prefs_window_new (const gchar *logo_name)
   gtk_container_add (GTK_CONTAINER (event_box),
                     GTK_WIDGET (pixmap));
 
-  cwhite.red   = 0xff * 0x100;
-  cwhite.green = 0xff * 0x100;
-  cwhite.blue  = 0xff * 0x100;
-  gdk_colormap_alloc_color(gdk_colormap_get_system (), &cwhite, FALSE, TRUE);
-  gtk_widget_modify_bg (GTK_WIDGET (event_box),
-                       GTK_STATE_NORMAL, &cwhite);
+  cwhite.red   = 1.0;
+  cwhite.green = 1.0;
+  cwhite.blue  = 1.0;
+  cwhite.alpha = 0.0;
+  gtk_widget_override_background_color (GTK_WIDGET (event_box),
+                                        GTK_STATE_NORMAL, &cwhite);
 
   gtk_notebook_prepend_page (GTK_NOTEBOOK (gpw->notebook), event_box, NULL);
 
 
   /* The sections */
   dialog_vbox = gtk_dialog_get_content_area (GTK_DIALOG (window));
-  
+
   hbox = gtk_hbox_new (FALSE, 6);
   gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
   gtk_container_add (GTK_CONTAINER (dialog_vbox), hbox);
diff --git a/lib/gui/gmstatusbar.c b/lib/gui/gmstatusbar.c
index 4203343..09ab0b9 100644
--- a/lib/gui/gmstatusbar.c
+++ b/lib/gui/gmstatusbar.c
@@ -157,8 +157,6 @@ gm_statusbar_new ()
 
   result = g_object_new (GM_TYPE_STATUSBAR, NULL);
 
-  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (result), FALSE);
-
   return GTK_WIDGET (result);
 }
 
diff --git a/lib/gui/xvwindow.cpp b/lib/gui/xvwindow.cpp
index fc46d7b..093af26 100644
--- a/lib/gui/xvwindow.cpp
+++ b/lib/gui/xvwindow.cpp
@@ -114,6 +114,7 @@ XVWindow::~XVWindow()
 int 
 XVWindow::Init (Display* dp, 
                 Window rootWindow, 
+                GC gc, 
                 int x, 
                 int y,
                 int windowWidth, 
@@ -165,9 +166,6 @@ XVWindow::Init (Display* dp,
   } 
   PTRACE(4, "XVideo\tUsing XVideo port: " << _XVPort);
 
-  XGCValues values;
-  GC gc = XCreateGC (dp, rootWindow, 0, &values);
-
   if (!CreateAtomsAndWindow(gc, x, y, windowWidth, windowHeight)) {
     XUnlockDisplay(_display);
     return 0;
diff --git a/lib/gui/xvwindow.h b/lib/gui/xvwindow.h
index 3e6e988..fa55375 100644
--- a/lib/gui/xvwindow.h
+++ b/lib/gui/xvwindow.h
@@ -82,6 +82,7 @@ public:
   
   virtual int Init (Display *dp, 
             Window xvWindow, 
+            GC gc, 
             int x, 
             int y, 
             int windowWidth, 
diff --git a/lib/gui/xwindow.cpp b/lib/gui/xwindow.cpp
index e673150..98100ad 100644
--- a/lib/gui/xwindow.cpp
+++ b/lib/gui/xwindow.cpp
@@ -181,6 +181,7 @@ XWindow::~XWindow()
 int 
 XWindow::Init (Display* dp, 
                 Window rootWindow, 
+                GC gc, 
                 int x, 
                 int y,
                 int windowWidth, 
@@ -200,9 +201,6 @@ XWindow::Init (Display* dp,
   DumpVisuals();
 #endif
 
-  XGCValues values;
-  GC gc = XCreateGC (dp, rootWindow, 0, &values);
-
   if (!CreateAtomsAndWindow(gc, x, y, windowWidth, windowHeight)) {
     XUnlockDisplay(_display);
     return 0;
diff --git a/lib/gui/xwindow.h b/lib/gui/xwindow.h
index ab02016..b5cdec9 100644
--- a/lib/gui/xwindow.h
+++ b/lib/gui/xwindow.h
@@ -79,6 +79,7 @@ public:
   
   virtual int Init (Display *dp, 
             Window xvWindow, 
+            GC gc, 
             int x, 
             int y, 
             int windowWidth, 
diff --git a/src/gui/assistant.cpp b/src/gui/assistant.cpp
index f416cd7..e985b2b 100644
--- a/src/gui/assistant.cpp
+++ b/src/gui/assistant.cpp
@@ -1680,7 +1680,7 @@ ekiga_assistant_key_press_cb (GtkWidget *widget,
                              GdkEventKey *event,
                              G_GNUC_UNUSED gpointer user_data)
 {
-  if (event->keyval == GDK_Escape) {
+  if (event->keyval == GDK_KEY_Escape) {
 
     gtk_widget_hide (widget);
     return TRUE;  /* do not propagate the key to parent */
diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp
index ffecf21..c6323b3 100644
--- a/src/gui/main_window.cpp
+++ b/src/gui/main_window.cpp
@@ -751,7 +751,8 @@ static bool on_handle_errors (std::string error,
                                               GTK_BUTTONS_OK, NULL);
 
   gtk_window_set_title (GTK_WINDOW (dialog), _("Error"));
-  gtk_label_set_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label), error.c_str ());
+  gtk_label_set_markup (GTK_LABEL (gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (dialog))),
+                        error.c_str ());
 
   g_signal_connect_swapped (dialog, "response",
                             G_CALLBACK (gtk_widget_destroy),
@@ -876,7 +877,7 @@ status_icon_clicked_cb (G_GNUC_UNUSED GtkWidget* widget,
   GtkWidget *window = GTK_WIDGET (data);
 
   if (!gtk_widget_get_visible (window)
-      || (gdk_window_get_state (GDK_WINDOW (window->window)) & GDK_WINDOW_STATE_ICONIFIED)) {
+      || (gdk_window_get_state (GDK_WINDOW (gtk_widget_get_window (window))) & GDK_WINDOW_STATE_ICONIFIED)) {
     gtk_widget_show (window);
   }
   else {
@@ -1157,7 +1158,7 @@ ekiga_main_window_init_uri_toolbar (EkigaMainWindow *mw)
 
   // activate Ctrl-L to get the entry focus
   gtk_widget_add_accelerator (mw->priv->entry, "grab-focus",
-                             mw->priv->accel, GDK_L,
+                             mw->priv->accel, GDK_KEY_L,
                              (GdkModifierType) GDK_CONTROL_MASK,
                              (GtkAccelFlags) 0);
 
@@ -1391,7 +1392,7 @@ ekiga_main_window_init_menu (EkigaMainWindow *mw)
 
       GTK_MENU_ENTRY("help", NULL,
                      _("Get help by reading the Ekiga manual"),
-                     GTK_STOCK_HELP, GDK_F1,
+                     GTK_STOCK_HELP, GDK_KEY_F1,
                      G_CALLBACK (help_callback), NULL, TRUE),
 
       GTK_MENU_ENTRY("about", NULL,
@@ -1538,7 +1539,6 @@ ekiga_main_window_init_gui (EkigaMainWindow *mw)
                       true, true, 0);
 
   /* The statusbar */
-  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (mw->priv->statusbar), TRUE);
   mw->priv->statusbar_ebox = gtk_event_box_new ();
   gtk_container_add (GTK_CONTAINER (mw->priv->statusbar_ebox), mw->priv->statusbar);
   gtk_box_pack_start (GTK_BOX (window_vbox), mw->priv->statusbar_ebox,


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