[ekiga] The gnomemeeting_window_show was only called through the show_window function : pushed the code of o



commit 134f51d6e7f2e56e9c6080758a402bacb14c1a7f
Author: Julien Puydt <jpuydt gnome org>
Date:   Tue Oct 13 22:03:04 2009 +0200

    The gnomemeeting_window_show was only called through the show_window function : pushed the code of one in the other
    
    Should work as good as before

 src/gui/callbacks.cpp |   11 +----------
 src/gui/misc.cpp      |    8 +++++++-
 src/gui/misc.h        |    3 ++-
 3 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/src/gui/callbacks.cpp b/src/gui/callbacks.cpp
index 336b620..4ffa686 100644
--- a/src/gui/callbacks.cpp
+++ b/src/gui/callbacks.cpp
@@ -78,20 +78,11 @@ delete_window_cb (GtkWidget *widget,
   return TRUE;
 }
 
-static void
-show_window (GtkWidget *window)
-{
-  if (!gnomemeeting_window_is_visible (window))
-    gnomemeeting_window_show (window);
-  else
-    gtk_window_present (GTK_WINDOW (window));
-}
-
 void
 show_window_cb (G_GNUC_UNUSED GtkWidget *widget,
 		gpointer data)
 {
-  show_window (GTK_WIDGET (data));
+  gnomemeeting_window_show (GTK_WIDGET (data));
 }
 
 
diff --git a/src/gui/misc.cpp b/src/gui/misc.cpp
index ac7db2a..fcd6a0b 100644
--- a/src/gui/misc.cpp
+++ b/src/gui/misc.cpp
@@ -142,7 +142,13 @@ gnomemeeting_window_show (GtkWidget *w)
   gchar *position = NULL;
   gchar **couple = NULL;
   
-  g_return_if_fail (w != NULL);
+  g_return_if_fail (GTK_IS_WINDOW (w));
+
+  if (gnomemeeting_window_is_visible (w)) {
+
+    gtk_window_present (GTK_WINDOW (w));
+    return;
+  } // else we do the show :
   
   window_name = (char *) g_object_get_data (G_OBJECT (w), "window_name");
 
diff --git a/src/gui/misc.h b/src/gui/misc.h
index d25cba1..b657aeb 100644
--- a/src/gui/misc.h
+++ b/src/gui/misc.h
@@ -74,7 +74,8 @@ gboolean gnomemeeting_window_is_visible (GtkWidget *w);
  *                 or anything under the
  *                 /apps/gnomemeeting/general/user_interface/ key and is given
  *                 by g_object_get_data (G_OBJECT, "window_name"). The window
- *                 object is pointed by the GtkWidget *.
+ *                 object is pointed by the GtkWidget *. It will either show the
+ *                 window if hidden, or just present it if already visible.
  * PRE          :  /
  */
 void gnomemeeting_window_show (GtkWidget *w);



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