mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
Refactoring - step 1
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@ -83,7 +83,9 @@ libs/utilspp/functor/Makefile
|
||||
libs/utilspp/singleton/Makefile
|
||||
sflphone-gtk/Makefile
|
||||
sflphone-gtk/src/Makefile
|
||||
sflphone-gtk/src/contactlist/Makefile
|
||||
sflphone-gtk/src/config/Makefile
|
||||
sflphone-gtk/src/contacts/Makefile
|
||||
sflphone-gtk/src/contacts/addressbook/Makefile
|
||||
sflphone-gtk/pixmaps/Makefile
|
||||
|
||||
|
||||
|
@ -42,8 +42,10 @@ AC_SUBST(DEPS_LIBS)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
src/contactlist/Makefile
|
||||
src/Makefile
|
||||
src/config/Makefile
|
||||
src/contacts/Makefile
|
||||
src/contacts/addressbook/Makefile
|
||||
pixmaps/Makefile
|
||||
sflphone.desktop
|
||||
])
|
||||
|
14
sflphone-gtk/globals.mak
Normal file
14
sflphone-gtk/globals.mak
Normal file
@ -0,0 +1,14 @@
|
||||
# Global variables
|
||||
src = $(top_srcdir)
|
||||
|
||||
# Preprocessor flags
|
||||
AM_CPPFLAGS = $(DEPS_CFLAGS) \
|
||||
-I$(src)/src \
|
||||
-I$(src)/src/config \
|
||||
-I$(src)/src/contacts \
|
||||
-I$(src)/src/addressbook \
|
||||
-DICONS_DIR=\""$(prefix)/share/sflphone"\" \
|
||||
-DCODECS_DIR=\""$(prefix)/lib/sflphone/codecs"\"
|
||||
-DPREFIX=\"$(prefix)\" \
|
||||
$(ZEROCONFFLAGS) \
|
||||
-DENABLE_TRACE
|
@ -1,19 +1,13 @@
|
||||
include ../globals.mak
|
||||
|
||||
bin_PROGRAMS = sflphone-gtk
|
||||
|
||||
SUBDIRS=contactlist
|
||||
SUBDIRS = config contacts
|
||||
|
||||
# noinst_LTLIBRARIES = libsflphonegtk.la
|
||||
NOFIFY_LIBS = -lnotify
|
||||
SEXY_LIBS = -lsexy
|
||||
|
||||
NOFIFY_LIBS=-lnotify
|
||||
SEXY_LIBS=-lsexy
|
||||
|
||||
#if GTK_CHECK_VERSION(2,10,0)
|
||||
STATUSICON_HEADER = statusicon.h
|
||||
STATUSICON_SOURCE = statusicon.c
|
||||
#elif
|
||||
#STATUSICON_HEADER =
|
||||
#STATUSICON_SOURCE =
|
||||
#endif
|
||||
SFLPHONEGTK_LIBS=./contacts/libcontacts.la ./config/libconfig.la
|
||||
|
||||
sflphone_gtk_SOURCES = \
|
||||
main.c \
|
||||
@ -28,33 +22,25 @@ sflphone_gtk_SOURCES = \
|
||||
menus.c \
|
||||
calltab.c \
|
||||
calltree.c \
|
||||
searchfilter.c \
|
||||
actions.c \
|
||||
configwindow.c \
|
||||
accountlist.c \
|
||||
accountwindow.c \
|
||||
marshaller.c \
|
||||
sliders.c \
|
||||
$(STATUSICON_SOURCE) \
|
||||
statusicon.c \
|
||||
codeclist.c \
|
||||
timestamp.c \
|
||||
reqaccount.c \
|
||||
addressbook-config.c \
|
||||
hooks-config.c
|
||||
|
||||
noinst_HEADERS = actions.h dbus.h sflnotify.h mainwindow.h calllist.h dialpad.h audioconf.h codeclist.h assistant.h \
|
||||
callmanager-glue.h errors.h sflphone_const.h configurationmanager-glue.h instance-glue.h menus.h calltab.h calltree.h configwindow.h \
|
||||
accountlist.h accountwindow.h marshaller.h sliders.h $(STATUSICON_HEADER) timestamp.h searchfilter.h reqaccount.h addressbook-config.h hooks-config.h
|
||||
accountlist.h accountwindow.h marshaller.h sliders.h statusicon.h timestamp.h reqaccount.h hooks-config.h
|
||||
|
||||
EXTRA_DIST = marshaller.list
|
||||
|
||||
sflphone_gtk_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SEXY_LIBS) \
|
||||
./contactlist/libcontact.la
|
||||
|
||||
|
||||
AM_CPPFLAGS = $(DEPS_CFLAGS) \
|
||||
-DICONS_DIR=\""$(prefix)/share/sflphone"\" \
|
||||
-DCODECS_DIR=\""$(prefix)/lib/sflphone/codecs"\"
|
||||
sflphone_gtk_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SEXY_LIBS) $(SFLPHONEGTK_LIBS)
|
||||
|
||||
# add symbolic link
|
||||
install-exec-local:
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include <menus.h>
|
||||
#include <statusicon.h>
|
||||
#include <calltab.h>
|
||||
#include <searchfilter.h>
|
||||
#include <contactlist/eds.h>
|
||||
#include <contacts/searchfilter.h>
|
||||
#include <contacts/addressbook/eds.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
@ -296,7 +296,7 @@ sflphone_hang_up()
|
||||
void
|
||||
sflphone_pick_up()
|
||||
{
|
||||
|
||||
|
||||
call_t * selectedCall = call_get_selected(active_calltree);
|
||||
if(selectedCall)
|
||||
{
|
||||
@ -370,7 +370,7 @@ sflphone_off_hold ()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(dbus_get_is_recording(selectedCall))
|
||||
g_print("Currently recording! \n");
|
||||
else
|
||||
@ -489,7 +489,7 @@ process_dialing(call_t * c, guint keyval, gchar * key)
|
||||
c->from = g_strconcat("\"\" <", c->to, ">", NULL);
|
||||
}
|
||||
update_call_tree(current_calls,c);
|
||||
}
|
||||
}
|
||||
else if(strlen(c->to) == 0)
|
||||
{
|
||||
if(c->state != CALL_STATE_TRANSFERT)
|
||||
@ -506,7 +506,7 @@ process_dialing(call_t * c, guint keyval, gchar * key)
|
||||
default:
|
||||
// if (keyval < 255 || (keyval >65453 && keyval < 65466))
|
||||
if (keyval < 127 || (keyval > 65400 && keyval < 65466))
|
||||
{
|
||||
{
|
||||
|
||||
if(c->state != CALL_STATE_TRANSFERT)
|
||||
dbus_play_dtmf( key );
|
||||
@ -530,7 +530,7 @@ process_dialing(call_t * c, guint keyval, gchar * key)
|
||||
call_t *
|
||||
sflphone_new_call()
|
||||
{
|
||||
|
||||
|
||||
call_t *c;
|
||||
gchar *from, *to;
|
||||
|
||||
@ -684,9 +684,9 @@ sflphone_place_call ( call_t * c )
|
||||
|
||||
if(c->state == CALL_STATE_DIALING && strcmp(c->to, "") != 0)
|
||||
{
|
||||
|
||||
//format_phone_number (&c->to);
|
||||
|
||||
|
||||
//format_phone_number (&c->to);
|
||||
|
||||
if( account_list_get_size() == 0 )
|
||||
{
|
||||
notify_no_accounts();
|
||||
@ -701,8 +701,8 @@ sflphone_place_call ( call_t * c )
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
account_t * current;
|
||||
|
||||
if(g_strcasecmp(c->accountID, "") != 0) {
|
||||
@ -713,11 +713,11 @@ sflphone_place_call ( call_t * c )
|
||||
// printf("sflphone_place_call :: c->accountID : %i \n",c->accountID);
|
||||
|
||||
// account_t * current = c->accountID;
|
||||
|
||||
|
||||
|
||||
|
||||
if( current )
|
||||
{
|
||||
|
||||
|
||||
if(g_strcasecmp(g_hash_table_lookup( current->properties, "Status"),"REGISTERED")==0)
|
||||
{
|
||||
// OK, everything alright - the call is made with the current account
|
||||
@ -740,7 +740,7 @@ sflphone_place_call ( call_t * c )
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
// No current accounts have been setup.
|
||||
// So we place a call with the first registered account
|
||||
// and we change the current account
|
||||
@ -763,7 +763,7 @@ sflphone_place_call ( call_t * c )
|
||||
void
|
||||
sflphone_display_selected_codec (const gchar* codecName)
|
||||
{
|
||||
|
||||
|
||||
call_t * selectedCall = call_get_selected(current_calls);
|
||||
gchar* msg;
|
||||
account_t* acc;
|
||||
|
@ -27,10 +27,10 @@
|
||||
#include <calllist.h>
|
||||
#include <calltab.h>
|
||||
#include <menus.h>
|
||||
#include <searchfilter.h>
|
||||
#include <contacts/searchfilter.h>
|
||||
#include <contacts/addressbook/eds.h>
|
||||
#include <dbus.h>
|
||||
#include <contactlist/eds.h>
|
||||
#include "addressbook-config.h"
|
||||
#include <addressbook-config.h>
|
||||
|
||||
GtkWidget * toolbar;
|
||||
GtkToolItem * pickupButton;
|
||||
|
9
sflphone-gtk/src/config/Makefile.am
Normal file
9
sflphone-gtk/src/config/Makefile.am
Normal file
@ -0,0 +1,9 @@
|
||||
include ../../globals.mak
|
||||
|
||||
noinst_LTLIBRARIES = libconfig.la
|
||||
|
||||
libconfig_la_SOURCES = addressbook-config.c
|
||||
|
||||
libconfig_la_LDFLAGS = @DEPS_LDFLAGS@
|
||||
|
||||
libconfig_la_CFLAGS = @DEPS_CFLAGS@
|
@ -1,8 +0,0 @@
|
||||
noinst_LTLIBRARIES = libcontact.la
|
||||
|
||||
libcontact_la_SOURCES = \
|
||||
eds.c
|
||||
|
||||
libcontact_la_LDFLAGS=@DEPS_LDFLAGS@
|
||||
|
||||
libcontact_la_CFLAGS=@DEPS_CFLAGS@
|
@ -1,7 +0,0 @@
|
||||
Ref trac http://dev.savoirfairelinux.net/sflphone/report/3
|
||||
|
||||
* Ticket #163
|
||||
* Ticket #164
|
||||
* Ticket #165
|
||||
* Ticket #166
|
||||
|
13
sflphone-gtk/src/contacts/Makefile.am
Normal file
13
sflphone-gtk/src/contacts/Makefile.am
Normal file
@ -0,0 +1,13 @@
|
||||
include ../../globals.mak
|
||||
|
||||
SUBDIRS = addressbook
|
||||
|
||||
noinst_LTLIBRARIES = libcontacts.la
|
||||
|
||||
libcontacts_la_SOURCES = searchfilter.c
|
||||
|
||||
libcontacts_la_LDFLAGS = @DEPS_LDFLAGS@
|
||||
|
||||
libcontacts_la_CFLAGS = @DEPS_CFLAGS@
|
||||
|
||||
libcontacts_la_LIBADD = ./addressbook/libaddressbook.la
|
9
sflphone-gtk/src/contacts/addressbook/Makefile.am
Normal file
9
sflphone-gtk/src/contacts/addressbook/Makefile.am
Normal file
@ -0,0 +1,9 @@
|
||||
include ../../../globals.mak
|
||||
|
||||
noinst_LTLIBRARIES = libaddressbook.la
|
||||
|
||||
libaddressbook_la_SOURCES = eds.c
|
||||
|
||||
libaddressbook_la_LDFLAGS = @DEPS_LDFLAGS@
|
||||
|
||||
libaddressbook_la_CFLAGS = @DEPS_CFLAGS@
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include <searchfilter.h>
|
||||
#include <calltree.h>
|
||||
#include <contactlist/eds.h>
|
||||
#include <addressbook/eds.h>
|
||||
#include "addressbook-config.h"
|
||||
|
||||
static void handler_async_search (GList *hits, gpointer user_data UNUSED);
|
@ -27,7 +27,7 @@
|
||||
#include <mainwindow.h>
|
||||
#include <menus.h>
|
||||
#include <sliders.h>
|
||||
#include <searchfilter.h>
|
||||
#include <contacts/searchfilter.h>
|
||||
#include <assistant.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
@ -141,13 +141,13 @@ create_main_window ()
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), subvbox, FALSE /*expand*/, FALSE /*fill*/, 0 /*padding*/);
|
||||
|
||||
|
||||
|
||||
// if( SHOW_SEARCHBAR ){
|
||||
// filterEntry = create_filter_entry();
|
||||
// gtk_box_pack_start (GTK_BOX (subvbox), filterEntry, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
|
||||
// gtk_widget_show_all ( filterEntry );
|
||||
// }
|
||||
|
||||
|
||||
|
||||
if( SHOW_VOLUME ){
|
||||
speaker_control = create_slider("speaker");
|
||||
|
Reference in New Issue
Block a user