From 7184238049a654d2a39534058654061438c034bf Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Fri, 9 Sep 2011 12:16:57 -0400 Subject: [PATCH] * #6897: removed unused focus state vars/callbacks --- gnome/src/actions.h | 1 - gnome/src/contacts/calltree.c | 18 ------------------ gnome/src/contacts/searchbar.c | 17 ----------------- gnome/src/mainwindow.c | 20 ++++++++++++++++---- gnome/src/mainwindow.h | 6 ++---- 5 files changed, 18 insertions(+), 44 deletions(-) diff --git a/gnome/src/actions.h b/gnome/src/actions.h index d02f5d3f1d..dc9971bf68 100644 --- a/gnome/src/actions.h +++ b/gnome/src/actions.h @@ -190,7 +190,6 @@ void sflphone_fill_codec_list (); void sflphone_fill_codec_list_per_account (account_t *); - void sflphone_add_participant(); void sflphone_record (callable_obj_t *c); diff --git a/gnome/src/contacts/calltree.c b/gnome/src/contacts/calltree.c index 2d8a62a7cb..ea553faefe 100644 --- a/gnome/src/contacts/calltree.c +++ b/gnome/src/contacts/calltree.c @@ -457,18 +457,6 @@ calltree_reset (calltab_t* tab) gtk_tree_store_clear (tab->store); } -static void -focus_on_calltree_out() -{ - focus_is_on_calltree = FALSE; -} - -static void -focus_on_calltree_in() -{ - focus_is_on_calltree = TRUE; -} - void calltree_create (calltab_t* tab, gboolean searchbar_type) { @@ -516,12 +504,6 @@ calltree_create (calltab_t* tab, gboolean searchbar_type) G_CALLBACK (button_pressed), NULL); - g_signal_connect_after (G_OBJECT (tab->view), "focus-in-event", - G_CALLBACK (focus_on_calltree_in), NULL); - g_signal_connect_after (G_OBJECT (tab->view), "focus-out-event", - G_CALLBACK (focus_on_calltree_out), NULL); - - if (tab != history && tab!=contacts) { // Make calltree reordable for drag n drop diff --git a/gnome/src/contacts/searchbar.c b/gnome/src/contacts/searchbar.c index e6d1c549ac..f4b7760677 100644 --- a/gnome/src/contacts/searchbar.c +++ b/gnome/src/contacts/searchbar.c @@ -296,25 +296,8 @@ GtkWidget *addressbook_menu_new (void) return menu; } -void -focus_on_searchbar_out() -{ - DEBUG ("Searchbar: Unset focus from search bar"); - // gtk_widget_grab_focus(GTK_WIDGET(sw)); - focus_is_on_searchbar = FALSE; -} - -void -focus_on_searchbar_in() -{ - DEBUG ("Searchbar: Set focus on search bar"); - // gtk_widget_grab_focus(GTK_WIDGET(sw)); - focus_is_on_searchbar = TRUE; -} - GtkWidget* history_searchbar_new (void) { - GtkWidget *ret, *item, *image; ret = gtk_hbox_new (FALSE, 0); diff --git a/gnome/src/mainwindow.c b/gnome/src/mainwindow.c index d7e1af6161..fcf70a3a10 100644 --- a/gnome/src/mainwindow.c +++ b/gnome/src/mainwindow.c @@ -30,7 +30,7 @@ * as that of the covered work. */ -#include <config.h> +#include "config.h" #include "actions.h" #include "calltree.h" #include "calltab.h" @@ -72,6 +72,20 @@ static PidginScrollBook *embedded_error_notebook; static gchar *status_current_message; static GMutex *gmutex; +static gboolean focus_is_on_searchbar; + +void +focus_on_searchbar_out() +{ + focus_is_on_searchbar = FALSE; +} + +void +focus_on_searchbar_in() +{ + focus_is_on_searchbar = TRUE; +} + /** * Handle main window resizing */ @@ -95,9 +109,8 @@ static gboolean window_configure_cb(GtkWidget *win UNUSED, GdkEventConfigure *ev static gboolean on_delete(GtkWidget * widget UNUSED, gpointer data UNUSED) { - if (eel_gconf_get_integer(SHOW_STATUSICON)) { - gtk_widget_hide(GTK_WIDGET(get_main_window())); + gtk_widget_hide(get_main_window()); set_minimized(TRUE); } else { g_mutex_free(gmutex); @@ -166,7 +179,6 @@ on_key_released(GtkWidget *widget UNUSED, GdkEventKey *event, gpointer user_data void create_main_window() { - focus_is_on_calltree = FALSE; focus_is_on_searchbar = FALSE; // Get configuration stored in gconf diff --git a/gnome/src/mainwindow.h b/gnome/src/mainwindow.h index 6193a94545..028c16305f 100644 --- a/gnome/src/mainwindow.h +++ b/gnome/src/mainwindow.h @@ -94,14 +94,12 @@ void statusbar_pop_message (guint id); */ void statusbar_update_clock (const gchar * const time); -gboolean focus_is_on_calltree; - -gboolean focus_is_on_searchbar; - void main_window_zrtp_not_supported (callable_obj_t * c); void main_window_zrtp_negotiation_failed (const gchar* callID, const gchar* reason, const gchar* severity); void main_window_confirm_go_clear (callable_obj_t * c); +void focus_on_searchbar_out(); +void focus_on_searchbar_in(); #endif -- GitLab