From ccfd5f3727d57af68b620b42a79cda52ac269029 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.com> Date: Tue, 20 Jul 2010 10:47:38 -0400 Subject: [PATCH] [#2833] Remove unused dbus methods in gnome client (now using gconf) --- .../dbus/configurationmanager-introspec.xml | 210 +----------------- sflphone-client-gnome/src/dbus/dbus.c | 209 ----------------- sflphone-client-gnome/src/dbus/dbus.h | 33 --- sflphone-client-gnome/src/shortcuts.c | 4 +- sflphone-client-gnome/src/statusicon.c | 4 +- .../dbus/configurationmanager-introspec.xml | 2 +- 6 files changed, 6 insertions(+), 456 deletions(-) mode change 100644 => 100755 sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml diff --git a/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml b/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml old mode 100644 new mode 100755 index 24aeaf2332..68e0117446 --- a/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml +++ b/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml @@ -338,7 +338,7 @@ <tp:docstring> Return true if ringtone is enabled, false otherwise </tp:docstring> - <arg type="s" name="accountID" direction="in"/> + <arg type="s" name="accountID" direction="in" /> <arg type="i" name="bool" direction="out"> <tp:docstring> </tp:docstring> @@ -347,7 +347,6 @@ <method name="ringtoneEnabled" tp:name-for-bindings="ringtoneEnabled"> <tp:docstring> - Unused </tp:docstring> <arg type="s" name="accountID" direction="in"/> </method> @@ -637,20 +636,6 @@ </arg> </method> - <method name="setNotify" tp:name-for-bindings="setNotify"> - <tp:docstring> - </tp:docstring> - </method> - - <method name="getNotify" tp:name-for-bindings="getNotify"> - <tp:docstring> - </tp:docstring> - <arg type="i" name="level" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - <method name="setMailNotify" tp:name-for-bindings="setMailNotify"> <tp:docstring> </tp:docstring> @@ -665,69 +650,6 @@ </arg> </method> - <method name="getDialpad" tp:name-for-bindings="getDialpad"> - <tp:docstring> - </tp:docstring> - <arg type="i" name="state" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="setDialpad" tp:name-for-bindings="setDialpad"> - <tp:docstring> - </tp:docstring> - <arg type="b" name="display" direction="in"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="getSearchbar" tp:name-for-bindings="getSearchbar"> - <tp:docstring> - </tp:docstring> - <arg type="i" name="state" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="setSearchbar" tp:name-for-bindings="setSearchbar"> - <tp:docstring> - </tp:docstring> - </method> - - <method name="setHistoryEnabled" tp:name-for-bindings="setHistoryEnabled"> - <tp:docstring> - </tp:docstring> - </method> - - <method name="getHistoryEnabled" tp:name-for-bindings="getHistoryEnabled"> - <tp:docstring> - </tp:docstring> - <arg type="s" name="state" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="getVolumeControls" tp:name-for-bindings="getVolumeControls"> - <tp:docstring> - </tp:docstring> - <arg type="i" name="state" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="setVolumeControls" tp:name-for-bindings="setVolumeControls"> - <tp:docstring> - </tp:docstring> - <arg type="b" name="display" direction="in"> - <tp:docstring> - </tp:docstring> - </arg> - </method> <method name="getHistoryLimit" tp:name-for-bindings="getHistoryLimit"> <tp:docstring> @@ -747,136 +669,6 @@ </arg> </method> - <method name="startHidden" tp:name-for-bindings="startHidden"> - <tp:docstring> - </tp:docstring> - </method> - - <method name="isStartHidden" tp:name-for-bindings="isStartHidden"> - <tp:docstring> - </tp:docstring> - <arg type="i" name="state" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="popupMode" tp:name-for-bindings="popupMode"> - <tp:docstring> - </tp:docstring> - <arg type="i" name="state" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="switchPopupMode" tp:name-for-bindings="switchPopupMode"> - <tp:docstring> - </tp:docstring> - </method> - - <method name="getWindowWidth" tp:name-for-bindings="getWindowWidth"> - <tp:docstring> - Unused - </tp:docstring> - <arg type="i" name="width" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="getWindowHeight" tp:name-for-bindings="getWindowHeight"> - <tp:docstring> - Unused - </tp:docstring> - <arg type="i" name="height" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="setWindowWidth" tp:name-for-bindings="setWindowWidth"> - <tp:docstring> - Unused - </tp:docstring> - <arg type="i" name="width" direction="in"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="setWindowHeight" tp:name-for-bindings="setWindowHeight"> - <tp:docstring> - Unused - </tp:docstring> - <arg type="i" name="height" direction="in"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="getWindowPositionX" tp:name-for-bindings="getWindowPositionX"> - <tp:docstring> - Unused - </tp:docstring> - <arg type="i" name="posX" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="setWindowPositionX" tp:name-for-bindings="setWindowPositionX"> - <tp:docstring> - Unused - </tp:docstring> - <arg type="i" name="posX" direction="in"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="getWindowPositionY" tp:name-for-bindings="getWindowPositionY"> - <tp:docstring> - Unused - </tp:docstring> - <arg type="i" name="posY" direction="out"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="setWindowPositionY" tp:name-for-bindings="setWindowPositionY"> - <tp:docstring> - Unused - </tp:docstring> - <arg type="i" name="posY" direction="in"> - <tp:docstring> - </tp:docstring> - </arg> - </method> - - <method name="enableStatusIcon" tp:name-for-bindings="enableStatusIcon"> - <tp:docstring> - Allow SFLphone icon to be displayed in system tray - </tp:docstring> - <arg type="s" name="value" direction="in"> - <tp:docstring> - true/false - </tp:docstring> - </arg> - </method> - - <method name="isStatusIconEnabled" tp:name-for-bindings="isStatusIconEnabled"> - <tp:docstring> - Test if SFLphone icon is displayed in system tray. - </tp:docstring> - <arg type="s" name="value" direction="out"> - <tp:docstring> - true/false - </tp:docstring> - </arg> - </method> - <!-- Addressbook configuration --> <method name="getAddressbookSettings" tp:name-for-bindings="getAddressbookSettings"> diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index fec306a12f..4c8fe85ff3 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -1665,71 +1665,6 @@ dbus_is_iax2_enabled() return res; } -int -dbus_get_dialpad() -{ - int state; - GError* error = NULL; - org_sflphone_SFLphone_ConfigurationManager_get_dialpad( - configurationManagerProxy, &state, &error); - if (error) - { - g_error_free(error); - } - return state; -} - -void -dbus_set_dialpad(gboolean display) -{ - - GError* error = NULL; - org_sflphone_SFLphone_ConfigurationManager_set_dialpad( - configurationManagerProxy, display, &error); - if (error) - { - g_error_free(error); - } -} - -int -dbus_get_searchbar() -{ - int state; - GError* error = NULL; - if (!org_sflphone_SFLphone_ConfigurationManager_get_searchbar( - configurationManagerProxy, &state, &error)) - { - if (error->domain == DBUS_GERROR && error->code - == DBUS_GERROR_REMOTE_EXCEPTION) - { - ERROR ("Caught remote method (get_searchbar) exception %s: %s", dbus_g_error_get_name(error), error->message); - } - else - { - ERROR("Error while calling get_searchbar: %s", error->message); - } - g_error_free(error); - return -1; - } - else - { - return state; - } -} - -void -dbus_set_searchbar() -{ - GError* error = NULL; - org_sflphone_SFLphone_ConfigurationManager_set_searchbar( - configurationManagerProxy, &error); - if (error) - { - g_error_free(error); - } -} - void dbus_join_participant(const gchar* sel_callID, const gchar* drag_callID) { @@ -2357,150 +2292,6 @@ dbus_get_all_ip_interface_by_name(void) } } -guint -dbus_get_window_width(void) -{ - - GError *error = NULL; - guint value; - - org_sflphone_SFLphone_ConfigurationManager_get_window_width( - configurationManagerProxy, &value, &error); - - if (error != NULL) - { - ERROR ("Failed to call get_window_width() on ConfigurationManager: %s", - error->message); - g_error_free(error); - } - return value; -} - -guint -dbus_get_window_height(void) -{ - - GError *error = NULL; - guint value; - - org_sflphone_SFLphone_ConfigurationManager_get_window_height( - configurationManagerProxy, &value, &error); - - if (error != NULL) - { - ERROR ("Failed to call get_window_height() on ConfigurationManager: %s", - error->message); - g_error_free(error); - } - return value; -} - -void -dbus_set_window_width(const guint width) -{ - - GError *error = NULL; - - org_sflphone_SFLphone_ConfigurationManager_set_window_width( - configurationManagerProxy, width, &error); - - if (error != NULL) - { - ERROR ("Failed to call set_window_width() on ConfigurationManager: %s", - error->message); - g_error_free(error); - } -} - -void -dbus_set_window_height(const guint height) -{ - - GError *error = NULL; - - org_sflphone_SFLphone_ConfigurationManager_set_window_height( - configurationManagerProxy, height, &error); - - if (error != NULL) - { - ERROR ("Failed to call set_window_height() on ConfigurationManager: %s", - error->message); - g_error_free(error); - } -} - -guint -dbus_get_window_position_x(void) -{ - - GError *error = NULL; - guint value; - - org_sflphone_SFLphone_ConfigurationManager_get_window_position_x( - configurationManagerProxy, &value, &error); - - if (error != NULL) - { - ERROR ("Failed to call get_window_position_x() on ConfigurationManager: %s", - error->message); - g_error_free(error); - } - return value; -} - -guint -dbus_get_window_position_y(void) -{ - - GError *error = NULL; - guint value; - - org_sflphone_SFLphone_ConfigurationManager_get_window_position_y( - configurationManagerProxy, &value, &error); - - if (error != NULL) - { - ERROR ("Failed to call get_window_position_y() on ConfigurationManager: %s", - error->message); - g_error_free(error); - } - return value; -} - -void -dbus_set_window_position_x(const guint posx) -{ - - GError *error = NULL; - - org_sflphone_SFLphone_ConfigurationManager_set_window_position_x( - configurationManagerProxy, posx, &error); - - if (error != NULL) - { - ERROR ("Failed to call set_window_position_x() on ConfigurationManager: %s", - error->message); - g_error_free(error); - } -} - -void -dbus_set_window_position_y(const guint posy) -{ - - GError *error = NULL; - - org_sflphone_SFLphone_ConfigurationManager_set_window_position_y( - configurationManagerProxy, posy, &error); - - if (error != NULL) - { - ERROR ("Failed to call set_window_position_y() on ConfigurationManager: %s", - error->message); - g_error_free(error); - } -} - GHashTable* dbus_get_shortcuts(void) { diff --git a/sflphone-client-gnome/src/dbus/dbus.h b/sflphone-client-gnome/src/dbus/dbus.h index c48ed18fac..9abaa0cc96 100644 --- a/sflphone-client-gnome/src/dbus/dbus.h +++ b/sflphone-client-gnome/src/dbus/dbus.h @@ -390,30 +390,6 @@ gchar* dbus_get_ringtone_choice( const gchar *accountID ); */ void dbus_set_ringtone_choice( const gchar *accountID, const gchar* tone ); -/** - * ConfigurationManager - Set the dialpad visible or not - */ -void dbus_set_dialpad (gboolean display); - -/** - * ConfigurationManager - Tells if the user wants to display the dialpad or not - * @return int 1 if dialpad has to be displayed - * 0 otherwise - */ -int dbus_get_dialpad( void ); - -/** - * ConfigurationManager - Set the searchbar visible or not - */ -void dbus_set_searchbar( ); - -/** - * ConfigurationManager - Tells if the user wants to display the search bar or not - * @return int 1 if the search bar has to be displayed - * 0 otherwise - */ -int dbus_get_searchbar( void ); - /** * ConfigurationManager - Gives the maximum number of days the user wants to have in the history * @return double The maximum number of days @@ -572,15 +548,6 @@ gchar** dbus_get_supported_tls_method(); gchar** dbus_get_participant_list (const char * confID); -guint dbus_get_window_width (void); -guint dbus_get_window_height (void); -void dbus_set_window_height (const guint height); -void dbus_set_window_width (const guint width); -guint dbus_get_window_position_x (void); -guint dbus_get_window_position_y (void); -void dbus_set_window_position_x (const guint posx); -void dbus_set_window_position_y (const guint posy); - GHashTable* dbus_get_shortcuts(void); void dbus_set_shortcuts(GHashTable * shortcuts); diff --git a/sflphone-client-gnome/src/shortcuts.c b/sflphone-client-gnome/src/shortcuts.c index 4ecb7cd47b..130d18ad34 100644 --- a/sflphone-client-gnome/src/shortcuts.c +++ b/sflphone-client-gnome/src/shortcuts.c @@ -130,8 +130,8 @@ popup_window_callback () { gtk_widget_hide (GTK_WIDGET(get_main_window())); gtk_widget_show (GTK_WIDGET(get_main_window())); - gtk_window_move (GTK_WINDOW (get_main_window ()), - dbus_get_window_position_x (), dbus_get_window_position_y ()); + //gtk_window_move (GTK_WINDOW (get_main_window ()), + // dbus_get_window_position_x (), dbus_get_window_position_y ()); } static void diff --git a/sflphone-client-gnome/src/statusicon.c b/sflphone-client-gnome/src/statusicon.c index 72511091f0..d3ace0f97d 100644 --- a/sflphone-client-gnome/src/statusicon.c +++ b/sflphone-client-gnome/src/statusicon.c @@ -46,8 +46,8 @@ popup_main_window(void) if (__POPUP_WINDOW) { gtk_widget_show(get_main_window()); - gtk_window_move(GTK_WINDOW (get_main_window ()), - dbus_get_window_position_x(), dbus_get_window_position_y()); + //gtk_window_move(GTK_WINDOW (get_main_window ()), + // dbus_get_window_position_x(), dbus_get_window_position_y()); set_minimized(FALSE); } } diff --git a/sflphone-common/src/dbus/configurationmanager-introspec.xml b/sflphone-common/src/dbus/configurationmanager-introspec.xml index 9feeb72e27..68e0117446 100755 --- a/sflphone-common/src/dbus/configurationmanager-introspec.xml +++ b/sflphone-common/src/dbus/configurationmanager-introspec.xml @@ -317,7 +317,7 @@ Provide a list of playback device from ALSA </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/> - <arg type="as" name="+list" direction="out"> + <arg type="as" name="list" direction="out"> <tp:docstring> </tp:docstring> </arg> -- GitLab