Commit 76e80641 authored by Alexandre Savard's avatar Alexandre Savard

Merge branch 'master' into conference

parents ec0c4ff2 f54d4220
......@@ -342,14 +342,14 @@ calltree_reset (calltab_t* tab)
void
focus_on_calltree_out(){
DEBUG("set_focus_on_calltree_out");
//DEBUG("set_focus_on_calltree_out");
// gtk_widget_grab_focus(GTK_WIDGET(sw));
focus_is_on_calltree = FALSE;
}
void
focus_on_calltree_in(){
DEBUG("set_focus_on_calltree_in");
//DEBUG("set_focus_on_calltree_in");
// gtk_widget_grab_focus(GTK_WIDGET(sw));
focus_is_on_calltree = TRUE;
}
......@@ -1175,13 +1175,14 @@ void calltree_display (calltab_t *tab) {
DEBUG ("display main tab");
/*
if (active_calltree==contacts) {
gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)contactButton, FALSE);
} else {
gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)historyButton, FALSE);
}
*/
gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)currentCallsButton, TRUE);
}
/* case 2: we want to display the history */
......@@ -1190,10 +1191,10 @@ void calltree_display (calltab_t *tab) {
DEBUG ("display history tab");
if (active_calltree==contacts) {
//gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)contactButton, FALSE);
gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)contactButton, FALSE);
}
//gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)historyButton, TRUE);
gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)historyButton, TRUE);
}
else if (tab==contacts) {
......@@ -1201,10 +1202,10 @@ void calltree_display (calltab_t *tab) {
DEBUG ("display contact tab");
if (active_calltree==history) {
//gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)historyButton, FALSE);
gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)historyButton, FALSE);
}
//gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)contactButton, TRUE);
gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)contactButton, TRUE);
}
else
......
......@@ -129,14 +129,12 @@ on_key_released (GtkWidget *widget, GdkEventKey *event, gpointer user_data UNUSE
void
focus_on_mainwindow_out(){
DEBUG("focus_on_mainwindow_out");
// gtk_widget_grab_focus(GTK_WIDGET(window));
}
void
focus_on_mainwindow_in(){
DEBUG("focus_on_mainwindow_in");
// gtk_widget_grab_focus(GTK_WIDGET(window));
}
......
......@@ -24,7 +24,7 @@
#include <calltree.h>
#include <uimanager.h>
#define MAIN_WINDOW_WIDTH 300
#define MAIN_WINDOW_WIDTH 400
#define MAIN_WINDOW_HEIGHT 320
/** @file mainwindow.h
......
......@@ -20,13 +20,6 @@
#include <toolbar.h>
#include <contacts/addressbook.h>
static gboolean
is_inserted( GtkWidget* button )
{
return ( GTK_WIDGET(button)->parent == GTK_WIDGET( toolbar ) );
}
static void
call_mailbox( GtkWidget* widget UNUSED, gpointer data UNUSED)
......
......@@ -55,9 +55,9 @@
</toolbar>
<toolbar name="ToolbarWindows">
<toolitem action="CallWindow"/>
<toolitem action="History"/>
<toolitem action="Addressbook"/>
<toolitem name="CallWindowToolbar" action="CallWindow"/>
<toolitem name="HistoryToolbar" action="History"/>
<toolitem name="AddressbookToolbar" action="Addressbook"/>
</toolbar>
</ui>
......@@ -29,6 +29,8 @@
static GtkWidget *toolbar;
guint transfertButtonConnId; //The button toggled signal connection ID
GtkAction * pickUpAction;
GtkWidget * pickUpWidget;
GtkWidget * newCallAction;
......@@ -291,9 +293,9 @@ void update_actions()
gtk_action_set_sensitive( GTK_ACTION(hangUpAction), TRUE);
break;
case CALL_STATE_TRANSFERT:
//gtk_signal_handler_block (GTK_OBJECT (transferToolbar), transfertButtonConnId);
gtk_signal_handler_block (GTK_OBJECT (transferToolbar), transfertButtonConnId);
gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON(transferToolbar), TRUE);
//gtk_signal_handler_unblock (transferToolbar, transfertButtonConnId);
gtk_signal_handler_unblock (transferToolbar, transfertButtonConnId);
gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), TRUE);
......@@ -723,9 +725,9 @@ static void calltree_switch_cb (GtkRadioAction *action, GtkRadioAction *current)
/**
* Transfert the line
*/
static void call_transfer_cb (GtkAction * action, gpointer data)
static void call_transfer_cb ()
{
gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(action))? sflphone_set_transfert() : sflphone_unset_transfert() ;
gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (transferToolbar))? sflphone_set_transfert() : sflphone_unset_transfert() ;
}
static void call_mailbox_cb (void)
......@@ -1376,6 +1378,10 @@ GtkWidget* create_toolbar_actions (GtkUIManager *ui_manager)
newCallWidget = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions/NewCallToolbar");
pickUpWidget = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions/PickUpToolbar");
// Set the handler ID for the transfer
transfertButtonConnId = g_signal_connect (G_OBJECT (transferToolbar), "toggled", G_CALLBACK (call_transfer_cb), NULL);
holdConnId = g_signal_connect (G_OBJECT (holdToolbar), "toggled", G_CALLBACK (call_hold), NULL);
return toolbar;
}
......@@ -1386,5 +1392,9 @@ GtkWidget* create_toolbar_windows (GtkUIManager *ui_manager)
toolbar = gtk_ui_manager_get_widget (ui_manager, "/ToolbarWindows");
active_calltree = current_calls;
historyButton = gtk_ui_manager_get_widget (ui_manager, "/ToolbarWindows/HistoryToolbar");
contactButton = gtk_ui_manager_get_widget (ui_manager, "/ToolbarWindows/AddressbookToolbar");
currentCallsButton = gtk_ui_manager_get_widget (ui_manager, "/ToolbarWindows/CallWindowToolbar");
return toolbar;
}
......@@ -24,9 +24,12 @@
G_BEGIN_DECLS
guint transfertButtonConnId; //The button toggled signal connection ID
guint holdConnId; //The hold_menu signal connection ID
GtkWidget *historyButton;
GtkWidget *contactButton;
GtkWidget *currentCallsButton;
gboolean uimanager_new (GtkUIManager**);
G_END_DECLS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment