diff --git a/sflphone-client-gnome/src/contacts/Makefile.am b/sflphone-client-gnome/src/contacts/Makefile.am index cbaf218b5e9fa258c7caf8538cc97c008914615b..27a5a5a3cc007c65e7122d219b61ff6505354843 100644 --- a/sflphone-client-gnome/src/contacts/Makefile.am +++ b/sflphone-client-gnome/src/contacts/Makefile.am @@ -7,6 +7,7 @@ libcontacts_la_SOURCES = \ calllist.c \ calltab.c \ calltree.c \ + gtkcellrendererbutton.c \ history.c \ addrbookfactory.c \ conferencelist.c diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 8f58741464127fcb5942a81f2fb8c2ed0b7d44b1..d4483a019c708f9948a0f66f16a5679dd4231047 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -34,13 +34,16 @@ #include <stdlib.h> #include <glib/gprintf.h> #include <eel-gconf-extensions.h> -#include <calllist.h> -#include <conferencelist.h> -#include <mainwindow.h> -#include <history.h> + +#include "dbus.h" +#include "calllist.h" +#include "conferencelist.h" +#include "mainwindow.h" +#include "history.h" +#include "calltree.h" #include "uimanager.h" #include "actions.h" -#include "../imwindow.h" +#include "imwindow.h" #include "searchbar.h" // Messages used in menu item diff --git a/sflphone-client-gnome/src/dbus/dbus.h b/sflphone-client-gnome/src/dbus/dbus.h index ebdd745d9824d48f1d21814bc0a930d60cb0545a..e275d917fdfb1d7b56d4ff250197e614452f57ed 100644 --- a/sflphone-client-gnome/src/dbus/dbus.h +++ b/sflphone-client-gnome/src/dbus/dbus.h @@ -622,6 +622,9 @@ dbus_detach_participant (const gchar* callID); void dbus_join_participant (const gchar* sel_callID, const gchar* drag_callID); +void +dbus_create_conf_from_participant_list(const gchar **list); + void dbus_join_conference (const gchar* sel_confID, const gchar* drag_confID); diff --git a/sflphone-client-gnome/src/ui.xml b/sflphone-client-gnome/src/ui.xml index 9d61626d0ae7dc97605e1b2337be30e39db77bb7..43c4f4799ef48fea0bada93193538fc0bb10fc13 100644 --- a/sflphone-client-gnome/src/ui.xml +++ b/sflphone-client-gnome/src/ui.xml @@ -54,6 +54,7 @@ <separator/> <toolitem name="VoicemailToolbar" action="Voicemail"/> <toolitem name="HistoryToolbar" action="History"/> + <toolitem name="PlayRecordToolbar" action="PlayRecord"/> </toolbar> <popup name="PopupMenu"> diff --git a/sflphone-client-gnome/src/uimanager.c b/sflphone-client-gnome/src/uimanager.c index 9f7a508f0d9ee81e70b8985c4521e92963499187..50f4d0abbcd0155f76592b070ff1db061c16ffbe 100644 --- a/sflphone-client-gnome/src/uimanager.c +++ b/sflphone-client-gnome/src/uimanager.c @@ -78,6 +78,8 @@ static GtkAction * voicemailAction; static GtkWidget * voicemailToolbar; static GtkWidget * imToolbar; static GtkAction * imAction; +static GtkWidget * playRecordWidget; +static GtkWidget * playRecordAction; static GtkWidget * editable_num; static GtkDialog * edit_dialog; @@ -180,6 +182,9 @@ update_actions() if (eel_gconf_get_integer (HISTORY_ENABLED)) { gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (historyButton), -1); gtk_widget_set_sensitive (GTK_WIDGET (historyButton), TRUE); + + if(is_inserted(GTK_WIDGET (playRecordWidget), GTK_WIDGET(toolbar))) + gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(playRecordWidget)); } // If addressbook support has been enabled and all addressbooks are loaded, display the icon @@ -262,6 +267,8 @@ update_actions() if (active_calltree == current_calls) gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE); + if (active_calltree == current_calls) + gtk_action_set_sensitive (GTK_ACTION(playRecordAction), TRUE); //gtk_action_set_sensitive( GTK_ACTION(newCallMenu),TRUE); g_object_ref (newCallWidget); @@ -270,6 +277,8 @@ update_actions() if (active_calltree == current_calls) gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget), 1); + else if(active_calltree == history) + gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM(playRecordWidget), 3); break; case CALL_STATE_CURRENT: @@ -703,6 +712,13 @@ call_record (void) sflphone_rec_call(); } +static void +playback_record(void) +{ + + DEBUG("UIManager: Playback button pressed"); +} + static void call_configuration_assistant (void * foo UNUSED) { @@ -970,6 +986,8 @@ static const GtkActionEntry menu_entries[] = { N_ ("Minimize to system tray"), G_CALLBACK (call_minimize) }, { "Quit", GTK_STOCK_CLOSE, N_ ("_Quit"), "<control>Q", N_ ("Quit the program"), G_CALLBACK (call_quit) }, + { "PlayRecord", GTK_STOCK_MEDIA_PLAY, N_ ("_Playback record"), NULL, + N_ ("Playback recorded file"), G_CALLBACK (playback_record) }, // Edit Menu { "Edit", NULL, N_ ("_Edit"), NULL, NULL, NULL }, @@ -1137,8 +1155,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) // TODO update the selection to make sure the call under the mouse is the call selected // call type boolean - gboolean pickup = FALSE, hangup = FALSE, hold = FALSE, copy = FALSE, - record = FALSE, im = FALSE; + gboolean pickup = FALSE, hangup = FALSE, hold = FALSE, copy = FALSE, record = FALSE, im = FALSE; gboolean accounts = FALSE; // conference type boolean @@ -1720,6 +1737,10 @@ create_toolbar_actions (GtkUIManager *ui_manager, GtkWidget **widget) "/ToolbarActions/InstantMessagingToolbar"); historyButton = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions/HistoryToolbar"); + playRecordWidget = gtk_ui_manager_get_widget(ui_manager, + "/ToolbarActions/PlayRecordToolbar"); + playRecordAction = gtk_ui_manager_get_action(ui_manager, + "/ToolbarActions/PlayRecord"); if(abookfactory_is_addressbook_loaded()) { contactButton = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions/AddressbookToolbar"); }