[ekiga] Cleanup



commit 7f23d3eb7b2a8bb027ecd5ce1621a5af19442990
Author: Eugen Dedu <eugen dedu univ-fcomte fr>
Date:   Wed Apr 15 18:27:49 2015 +0200

    Cleanup

 lib/engine/gui/gtk-frontend/call-window.cpp |   27 +++----------------
 lib/engine/gui/gtk-frontend/main_window.cpp |   36 +++------------------------
 2 files changed, 9 insertions(+), 54 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/call-window.cpp b/lib/engine/gui/gtk-frontend/call-window.cpp
index 1a89c38..5169d54 100644
--- a/lib/engine/gui/gtk-frontend/call-window.cpp
+++ b/lib/engine/gui/gtk-frontend/call-window.cpp
@@ -84,12 +84,6 @@
 
 enum CallingState {Standby, Calling, Ringing, Connected, Called};
 
-enum DeviceType {AudioInput, AudioOutput, Ringer, VideoInput};
-struct deviceStruct {
-  char name[256];
-  DeviceType deviceType;
-};
-
 G_DEFINE_TYPE (EkigaCallWindow, ekiga_call_window, GM_TYPE_WINDOW);
 
 enum {
@@ -115,7 +109,7 @@ struct _EkigaCallWindowPrivate
   GtkAccelGroup *accel;
 
   boost::shared_ptr<Ekiga::Call> current_call;
-  unsigned calling_state;
+  CallingState calling_state;
 
   GtkWidget *ext_video_win;
   GtkWidget *event_box;
@@ -130,18 +124,8 @@ struct _EkigaCallWindowPrivate
   GtkWidget *call_panel_toolbar;
   GtkWidget *blacklist_button;
 
-  GtkWidget *audio_settings_window;
-  GtkWidget *audio_input_volume_frame;
-  GtkWidget *audio_output_volume_frame;
   GtkWidget *input_signal;
   GtkWidget *output_signal;
-#if GTK_CHECK_VERSION (3, 0, 0)
-  GtkAdjustment *adj_input_volume;
-  GtkAdjustment *adj_output_volume;
-#else
-  GtkObject *adj_input_volume;
-  GtkObject *adj_output_volume;
-#endif
 #ifndef WIN32
   GC gc;
 #endif
@@ -326,10 +310,10 @@ static void ekiga_call_window_remove_action_entries (GActionMap *map,
                                                       const GActionEntry *entries);
 
 static void ekiga_call_window_update_calling_state (EkigaCallWindow *self,
-                                                    unsigned calling_state);
+                                                    CallingState calling_state);
 
 static void ekiga_call_window_update_header_bar_actions (EkigaCallWindow *self,
-                                                         unsigned calling_state);
+                                                         CallingState calling_state);
 
 static void ekiga_call_window_clear_signal_levels (EkigaCallWindow *self);
 
@@ -1009,7 +993,7 @@ ekiga_call_window_remove_action_entries (GActionMap *map,
 
 static void
 ekiga_call_window_update_calling_state (EkigaCallWindow *self,
-                                        unsigned calling_state)
+                                        CallingState calling_state)
 {
   g_return_if_fail (self != NULL);
 
@@ -1044,7 +1028,6 @@ ekiga_call_window_update_calling_state (EkigaCallWindow *self,
       gtk_spinner_start (GTK_SPINNER (self->priv->spinner));
       break;
 
-
     case Called:
     default:
       break;
@@ -1055,7 +1038,7 @@ ekiga_call_window_update_calling_state (EkigaCallWindow *self,
 
 static void
 ekiga_call_window_update_header_bar_actions (EkigaCallWindow *self,
-                                             unsigned calling_state)
+                                             CallingState calling_state)
 {
   GList *it = NULL;
   g_return_if_fail (self != NULL);
diff --git a/lib/engine/gui/gtk-frontend/main_window.cpp b/lib/engine/gui/gtk-frontend/main_window.cpp
index 2bbffa4..c1f6b9a 100644
--- a/lib/engine/gui/gtk-frontend/main_window.cpp
+++ b/lib/engine/gui/gtk-frontend/main_window.cpp
@@ -67,29 +67,8 @@
 
 #include "opal-bank.h"
 
-#include <algorithm>
-
 enum CallingState {Standby, Calling, Connected, Called};
 
-typedef enum {
-  CONTACTS,
-  DIALPAD,
-  CALL,
-  NUM_SECTIONS
-} PanelSection;
-
-enum DeviceType {AudioInput, AudioOutput, Ringer, VideoInput};
-
-typedef enum {
-  CONTACT,
-  NUM_MENU_SECTIONS
-} MenuSection;
-
-struct deviceStruct {
-  char name[256];
-  DeviceType deviceType;
-};
-
 G_DEFINE_TYPE (EkigaMainWindow, ekiga_main_window, GM_TYPE_WINDOW);
 
 
@@ -121,12 +100,6 @@ struct _EkigaMainWindowPrivate
   GtkWidget *preview_button;
   GtkWidget *menu_button;
 
-  /* stack pages
-   *  (we store the numbers so we know where we are)
-   */
-  gint roster_view_page_number;
-  gint dialpad_page_number;
-  gint call_history_page_number;
   GtkWidget* roster_view;
   GtkWidget* call_history_view;
 
@@ -138,7 +111,7 @@ struct _EkigaMainWindowPrivate
 
   /* Calls */
   boost::shared_ptr<Ekiga::Call> current_call;
-  unsigned calling_state;
+  CallingState calling_state;
 
   Ekiga::scoped_connections connections;
 
@@ -512,7 +485,6 @@ actions_changed_cb (G_GNUC_UNUSED GtkWidget *widget,
                     gpointer data)
 {
   GMenu *menu = NULL;
-  int pos = 0;
 
   g_return_if_fail (EKIGA_IS_MAIN_WINDOW (data));
   EkigaMainWindow *self = EKIGA_MAIN_WINDOW (data);
@@ -522,7 +494,7 @@ actions_changed_cb (G_GNUC_UNUSED GtkWidget *widget,
 
   /* Those are Actions from the selected Presentity and Heap */
   if (model) {
-    g_menu_insert_section (menu, pos++, NULL, model);
+    g_menu_insert_section (menu, 0, NULL, model);
     gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (self->priv->menu_button), G_MENU_MODEL (menu));
   }
   else
@@ -941,8 +913,8 @@ gm_main_window_new (GmApplication *app)
   /* basic gtk+ setup  */
   mw = EKIGA_MAIN_WINDOW (g_object_new (EKIGA_TYPE_MAIN_WINDOW,
                                         "application", GTK_APPLICATION (app),
-                                       "key", USER_INTERFACE ".main-window",
-                                       NULL));
+                                        "key", USER_INTERFACE ".main-window",
+                                        NULL));
   Ekiga::ServiceCore& core = gm_application_get_core (app);
 
   /* fetching needed engine objects */


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