[ekiga] Removed the ekiga_main_window_set_panel_section function



commit 6c176f8b109bcc33f3b5c74f79c20ad361694a95
Author: Julien Puydt <jpuydt gnome org>
Date:   Thu Oct 7 17:25:35 2010 +0200

    Removed the ekiga_main_window_set_panel_section function
    
    It was only used twice, both inside the main window code :
    - one of the uses could be trivially avoided ;
    - I moved its body at the second place.

 src/gui/main_window.cpp |   27 +++++++++------------------
 src/gui/main_window.h   |   10 ----------
 2 files changed, 9 insertions(+), 28 deletions(-)
---
diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp
index 033a157..3b09d28 100644
--- a/src/gui/main_window.cpp
+++ b/src/gui/main_window.cpp
@@ -1882,12 +1882,17 @@ panel_section_changed_nt (G_GNUC_UNUSED gpointer id,
 {
   gint section = 0;
 
-  g_return_if_fail (data != NULL);
-  
+  g_return_if_fail (EKIGA_IS_MAIN_WINDOW (data));
+
   if (gm_conf_entry_get_type (entry) == GM_CONF_INT) {
 
+    EkigaMainWindow* mw = EKIGA_MAIN_WINDOW (data);
+    GtkWidget* menu = NULL;
     section = gm_conf_entry_get_int (entry);
-    ekiga_main_window_set_panel_section (EKIGA_MAIN_WINDOW (data), section);
+    gtk_notebook_set_current_page (GTK_NOTEBOOK (mw->priv->main_notebook), section);
+
+    menu = gtk_menu_get_widget (mw->priv->main_menu, "dialpad");
+    gtk_radio_menu_select_with_widget (menu, section);
   }
 }
 
@@ -2866,20 +2871,6 @@ ekiga_main_window_incoming_call_notify (EkigaMainWindow *mw,
 }
 #endif
 
-void 
-ekiga_main_window_set_panel_section (EkigaMainWindow *mw,
-                                     int section)
-{
-  GtkWidget *menu = NULL;
-  
-  g_return_if_fail (EKIGA_MAIN_WINDOW (mw));
-  
-  gtk_notebook_set_current_page (GTK_NOTEBOOK (mw->priv->main_notebook), section);
-
-  menu = gtk_menu_get_widget (mw->priv->main_menu, "dialpad");
-  gtk_radio_menu_select_with_widget (GTK_WIDGET (menu), section);
-}
-
 
 void 
 ekiga_main_window_set_call_info (EkigaMainWindow *mw,
@@ -3748,7 +3739,7 @@ ekiga_main_window_init_gui (EkigaMainWindow *mw)
   gtk_widget_show_all (gtk_paned_get_child1 (GTK_PANED (mw->priv->hpaned)));
   if (gm_conf_get_bool (USER_INTERFACE_KEY "main_window/show_call_panel"))
     gtk_widget_show_all (gtk_paned_get_child2 (GTK_PANED (mw->priv->hpaned)));
-  ekiga_main_window_set_panel_section (mw, section);
+  gtk_notebook_set_current_page (GTK_NOTEBOOK (mw->priv->main_notebook), section);
 }
 
 static void
diff --git a/src/gui/main_window.h b/src/gui/main_window.h
index 2e64648..e7b59fb 100644
--- a/src/gui/main_window.h
+++ b/src/gui/main_window.h
@@ -207,16 +207,6 @@ void gm_main_window_get_video_sliders_values (GtkWidget *main_window,
 
 
 /* DESCRIPTION  :  /
- * BEHAVIOR     :  Select the correct panel section in the menus
- * 		   and in the main window.
- * PRE          :  The main window GMObject and a valid section.
- */
-void ekiga_main_window_set_panel_section (EkigaMainWindow *main_window,
-                                          int section);
-
-
-
-/* DESCRIPTION  :  /
  * BEHAVIOR     :  Updates the information displayed in the info label
  * 		   of the main window.
  * PRE          :  The main window GMObject, 



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