ekiga r7456 - in trunk: . src/gui



Author: dsandras
Date: Thu Dec 11 20:02:44 2008
New Revision: 7456
URL: http://svn.gnome.org/viewvc/ekiga?rev=7456&view=rev

Log:
Moved more notifiers where they should be.


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

Modified: trunk/src/gui/conf.cpp
==============================================================================
--- trunk/src/gui/conf.cpp	(original)
+++ trunk/src/gui/conf.cpp	Thu Dec 11 20:02:44 2008
@@ -60,36 +60,8 @@
 
 
 /* Declarations */
-static void stay_on_top_changed_nt (gpointer id,
-				    GmConfEntry *entry,
-                                    gpointer data);
 
 
-/* DESCRIPTION  :  This callback is called when the "stay_on_top" 
- *                 config value changes.
- * BEHAVIOR     :  Changes the hint for the video windows.
- * PRE          :  /
- */
-static void 
-stay_on_top_changed_nt (G_GNUC_UNUSED gpointer id,
-                        GmConfEntry *entry, 
-                        gpointer data)
-{
-  bool val = false;
-    
-  g_return_if_fail (data != NULL);
-
-  if (gm_conf_entry_get_type (entry) == GM_CONF_BOOL) {
-
-    //gdk_threads_enter ();
-
-    val = gm_conf_entry_get_bool (entry);
-
-    ekiga_main_window_set_stay_on_top (EKIGA_MAIN_WINDOW (data), val);
-
-    //gdk_threads_leave ();
-  }
-}
 
 
 /* The functions */
@@ -128,9 +100,7 @@
    * several actions.
    */
 
-  /* Notifiers for the VIDEO_DISPLAY_KEY keys */
-  gm_conf_notifier_add (VIDEO_DISPLAY_KEY "stay_on_top", 
-			stay_on_top_changed_nt, main_window);
+
 }
 
 

Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp	(original)
+++ trunk/src/gui/main.cpp	Thu Dec 11 20:02:44 2008
@@ -234,6 +234,9 @@
 static void gm_main_window_toggle_fullscreen (Ekiga::VideoOutputFSToggle toggle,
                                               GtkWidget   *main_window);
 
+static void ekiga_main_window_set_stay_on_top (EkigaMainWindow *mw,
+                                               gboolean stay_on_top);
+
 static void ekiga_main_window_show_call_panel (EkigaMainWindow *mw);
 
 static void ekiga_main_window_hide_call_panel (EkigaMainWindow *mw);
@@ -290,6 +293,16 @@
                                         gpointer data);
 
 
+/* DESCRIPTION  :  This callback is called when the "stay_on_top" 
+ *                 config value changes.
+ * BEHAVIOR     :  Changes the hint for the video windows.
+ * PRE          :  /
+ */
+static void stay_on_top_changed_nt (G_GNUC_UNUSED gpointer id,
+                                    GmConfEntry *entry, 
+                                    gpointer data);
+
+
 /** Pull a trigger from a Ekiga::Service
  *
  * @param data is a pointer to the Ekiga::Trigger
@@ -1856,10 +1869,8 @@
   
   if (gm_conf_entry_get_type (entry) == GM_CONF_INT) {
 
-    //gdk_threads_enter ();
     section = gm_conf_entry_get_int (entry);
     ekiga_main_window_set_panel_section (EKIGA_MAIN_WINDOW (data), section);
-    //gdk_threads_leave ();
   }
 }
 
@@ -1873,13 +1884,26 @@
 
   if (gm_conf_entry_get_type (entry) == GM_CONF_BOOL) {
 
-    //gdk_threads_enter ();
     if (gm_conf_entry_get_bool (entry)) 
       ekiga_main_window_show_call_panel (EKIGA_MAIN_WINDOW (data));
     else 
       ekiga_main_window_hide_call_panel (EKIGA_MAIN_WINDOW (data));
+  }
+}
+
+static void 
+stay_on_top_changed_nt (G_GNUC_UNUSED gpointer id,
+                        GmConfEntry *entry, 
+                        gpointer data)
+{
+  bool val = false;
+    
+  g_return_if_fail (data != NULL);
+
+  if (gm_conf_entry_get_type (entry) == GM_CONF_BOOL) {
 
-    //gdk_threads_leave ();
+    val = gm_conf_entry_get_bool (entry);
+    ekiga_main_window_set_stay_on_top (EKIGA_MAIN_WINDOW (data), val);
   }
 }
 
@@ -2495,6 +2519,15 @@
   }
 }
 
+static void 
+ekiga_main_window_set_stay_on_top (EkigaMainWindow *mw,
+				   gboolean stay_on_top)
+{
+  g_return_if_fail (EKIGA_IS_MAIN_WINDOW (mw));
+
+  /* Update the stay-on-top attribute */
+  gdk_window_set_always_on_top (GTK_WIDGET (mw)->window, stay_on_top);
+}
 
 static void 
 ekiga_main_window_show_call_panel (EkigaMainWindow *mw)
@@ -3755,9 +3788,11 @@
   /* GConf Notifiers */
   gm_conf_notifier_add (USER_INTERFACE_KEY "main_window/panel_section",
                         panel_section_changed_nt, object);
-
   gm_conf_notifier_add (USER_INTERFACE_KEY "main_window/show_call_panel",
                         show_call_panel_changed_nt, object);
+  gm_conf_notifier_add (VIDEO_DISPLAY_KEY "stay_on_top", 
+			stay_on_top_changed_nt, object);
+
 
   return object;
 }
@@ -4315,16 +4350,6 @@
 }
 
 
-void 
-ekiga_main_window_set_stay_on_top (EkigaMainWindow *mw,
-				   gboolean stay_on_top)
-{
-  g_return_if_fail (EKIGA_IS_MAIN_WINDOW (mw));
-
-  /* Update the stay-on-top attribute */
-  gdk_window_set_always_on_top (GTK_WIDGET (mw)->window, stay_on_top);
-}
-
 /* The main () */
 int 
 main (int argc, 

Modified: trunk/src/gui/main.h
==============================================================================
--- trunk/src/gui/main.h	(original)
+++ trunk/src/gui/main.h	Thu Dec 11 20:02:44 2008
@@ -368,14 +368,6 @@
 GdkPixbuf *ekiga_main_window_get_current_picture (EkigaMainWindow *main_window);
 
 
-/* DESCRIPTION   :  /
- * BEHAVIOR      : Returns the currently displayed picture as a pixbuf.
- * PRE           : The main window GMObject.
- */
-void ekiga_main_window_set_stay_on_top (EkigaMainWindow *mw,
-				        gboolean stay_on_top);
-
-
 /* DESCRIPTION  :  /
  * BEHAVIOR     :  Update the main window sensitivity following the opened
  *                 and closed audio and video channels. It also updates



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