diff --git a/sflphone-client-gnome/Makefile.am b/sflphone-client-gnome/Makefile.am index 7b944d233160c5d75d56f3f75104a4fbe54ca3fc..e6696e170ddc9143a6f134554035c0a866534c59 100644 --- a/sflphone-client-gnome/Makefile.am +++ b/sflphone-client-gnome/Makefile.am @@ -6,16 +6,13 @@ GCONFTOOL=gconftool-2 GNOME_DOC=gnome-doc-utils.make -log4crc_DATA = log4crc -log4crcdir = $(datadir)/sflphone - uidir=$(datadir)/sflphone/ui ui_DATA=src/ui.xml schemadir = @GCONF_SCHEMA_FILE_DIR@ schema_DATA = sflphone-client-gnome.schemas -EXTRA_DIST = $(log4crc_DATA) sflphone.desktop.in $(GNOME_DOC) m4 $(UI_DATA) $(schema_DATA) +EXTRA_DIST = sflphone.desktop.in $(GNOME_DOC) m4 $(UI_DATA) $(schema_DATA) appsdir = $(datadir)/applications apps_in_files = sflphone.desktop.in apps_DATA = $(apps_in_files:.desktop.in=.desktop) diff --git a/sflphone-client-gnome/configure.ac b/sflphone-client-gnome/configure.ac index 44f118f5391ac8dff8b6841324c886d691fe6f6d..be6faac5149766bc9e3ddc0d19cbac75ef6fdd97 100644 --- a/sflphone-client-gnome/configure.ac +++ b/sflphone-client-gnome/configure.ac @@ -35,12 +35,6 @@ AC_PROG_LIBTOOL dnl GCONF utilities AM_GCONF_SOURCE_2 -dnl Check for log4c -AC_CHECK_HEADERS(log4c.h, have_log4c=true, have_log4c=false) -if ! $have_log4c; then - AC_MSG_ERROR(Please install the log4c library) -fi - dnl uninstalled gsr ui dir AC_DEFINE_UNQUOTED(SFLPHONE_UIDIR_UNINSTALLED, "`pwd`/src/", [path to uninstalled SFLphone UI dir]) diff --git a/sflphone-client-gnome/log4crc b/sflphone-client-gnome/log4crc deleted file mode 100644 index e108c9378b0e99e095389c63d029db54a1791290..0000000000000000000000000000000000000000 --- a/sflphone-client-gnome/log4crc +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE log4c SYSTEM ""> - -<log4c version="1.2.1"> - <config> - <bufsize>0</bufsize> - <debug level="2"/> - <nocleanup>0</nocleanup> - <reread>1</reread> - </config> - - <rollingpolicy name="rollingpolicy" type="sizewin" maxsize="1024" maxnum="10" /> - <appender name="rollingfileappender" type="rollingfile" logdir="." prefix="prefix" layout="dated" rollingpolicy="rollingpolicy" /> - - <appender name="stdout" type="stream" layout="basic"/> - <appender name="stderr" type="stream" layout="dated"/> - <appender name="syslog" type="syslog" layout="basic"/> - - <layout name="basic" type="basic"/> - <layout name="dated" type="dated"/> - - <category name="root" priority="warning"/> - <category name="org.sflphone.gtk" priority="warning" appender="stdout" /> -</log4c> diff --git a/sflphone-client-gnome/src/Makefile.am b/sflphone-client-gnome/src/Makefile.am index 3ce309ce5ac8cf054dfe0ebfb957a7744b33860a..57fb2e4689c4b90983255c477e6aa014e40f4ea7 100644 --- a/sflphone-client-gnome/src/Makefile.am +++ b/sflphone-client-gnome/src/Makefile.am @@ -5,14 +5,14 @@ bin_PROGRAMS = sflphone-client-gnome SUBDIRS = config contacts dbus widget icons NOFIFY_LIBS = -lnotify -LOG4C = -llog4c - +X11_LIBS = -lX11 SFLPHONEGTK_LIBS=./contacts/libcontacts.la ./config/libconfig.la ./dbus/libdbus.la ./widget/libwidget.la ./icons/libicons.la sflphone_client_gnome_SOURCES = \ main.c \ errors.c \ + logger.c \ uimanager.c \ sflnotify.c \ mainwindow.c \ @@ -31,9 +31,9 @@ sflphone_client_gnome_SOURCES = \ noinst_HEADERS = actions.h sflnotify.h mainwindow.h dialpad.h codeclist.h \ reqaccount.h errors.h sflphone_const.h uimanager.h \ accountlist.h sliders.h statusicon.h callable_obj.h conference_obj.h \ - shortcuts.h eel-gconf-extensions.h + shortcuts.h eel-gconf-extensions.h logger.h -sflphone_client_gnome_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SFLPHONEGTK_LIBS) $(LIBSEXY_LIBS) $(LOG4C) +sflphone_client_gnome_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SFLPHONEGTK_LIBS) $(LIBSEXY_LIBS) $(X11_LIBS) # add symbolic link install-exec-local: diff --git a/sflphone-client-gnome/src/config/accountconfigdialog.c b/sflphone-client-gnome/src/config/accountconfigdialog.c index 6ea45e24ecad5c8621bfd9e41984f0a0dcc622d9..22b5a1956f8ec923583735291ad2c1ff1331eb2e 100644 --- a/sflphone-client-gnome/src/config/accountconfigdialog.c +++ b/sflphone-client-gnome/src/config/accountconfigdialog.c @@ -196,7 +196,7 @@ static GPtrArray* getNewCredential (GHashTable * properties) { DEBUG("shit"); if(valid == FALSE) { - DEBUG("Gtk tree model iter is not valid") + DEBUG("Gtk tree model iter is not valid"); return NULL; } @@ -1185,7 +1185,7 @@ GtkWidget* create_published_address (account_t **a) { GtkWidget* create_advanced_tab (account_t **a) { // Build the advanced tab, to appear on the account configuration panel - DEBUG("Config: Build advanced tab") + DEBUG("Config: Build advanced tab"); GtkWidget *ret, *frame; diff --git a/sflphone-client-gnome/src/config/preferencesdialog.c b/sflphone-client-gnome/src/config/preferencesdialog.c index 7b4c7c2de781d6c9e6a3ad8b2fe64e865bfb64ea..65c34b25a0b7f8286c24be9c8c01db80b8cd9055 100644 --- a/sflphone-client-gnome/src/config/preferencesdialog.c +++ b/sflphone-client-gnome/src/config/preferencesdialog.c @@ -39,6 +39,7 @@ #include <accountconfigdialog.h> #include <addressbook-config.h> #include <shortcuts-config.h> +#include <audioconf.h> #include <hooks-config.h> #include <audioconf.h> diff --git a/sflphone-client-gnome/src/config/shortcuts-config.c b/sflphone-client-gnome/src/config/shortcuts-config.c index 64bdfd0d434fe677c195bab07d7f1dffaf51cdf4..1804b36d7cefa2333d099303a5778563f5636178 100644 --- a/sflphone-client-gnome/src/config/shortcuts-config.c +++ b/sflphone-client-gnome/src/config/shortcuts-config.c @@ -34,44 +34,45 @@ #include <gdk/gdkx.h> GtkWidget* -create_shortcuts_settings() +create_shortcuts_settings () { GtkWidget *vbox, *result_frame, *window, *treeview, *scrolled_window, *label; GtkTreeIter iter; guint i = 0; - vbox = gtk_vbox_new(FALSE, 10); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 10); + vbox = gtk_vbox_new (FALSE, 10); + gtk_container_set_border_width (GTK_CONTAINER(vbox), 10); - gnome_main_section_new(_("General"), &result_frame); + gnome_main_section_new (_("General"), &result_frame); - label = gtk_label_new(_("Be careful: these shortcuts might override system-wide shortcuts.")); + label = gtk_label_new ( + _("Be careful: these shortcuts might override system-wide shortcuts.")); + treeview = gtk_tree_view_new (); + setup_tree_view (treeview); - treeview = gtk_tree_view_new(); - setup_tree_view(treeview); + GtkListStore *store = gtk_list_store_new (COLUMNS, G_TYPE_STRING, G_TYPE_INT, + G_TYPE_UINT); - GtkListStore *store = gtk_list_store_new(COLUMNS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_UINT); - - Accelerator* list = shortcuts_get_list(); + Accelerator* list = shortcuts_get_list (); while (list[i].action != NULL) { - gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, ACTION, _(list[i].action), MASK, - (gint) list[i].mask, VALUE, XKeycodeToKeysym(GDK_DISPLAY(), - list[i].value, 0), -1); + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, ACTION, _(list[i].action), MASK, + (gint) list[i].mask, VALUE, XKeycodeToKeysym (GDK_DISPLAY(), + list[i].key, 0), -1); i++; } - gtk_tree_view_set_model(GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store)); - g_object_unref(store); + gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store)); + g_object_unref (store); - gtk_container_add(GTK_CONTAINER (result_frame), treeview); - gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(vbox), result_frame, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (result_frame), treeview); + gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX(vbox), result_frame, FALSE, FALSE, 0); - gtk_widget_show_all(vbox); + gtk_widget_show_all (vbox); return vbox; } @@ -81,29 +82,29 @@ create_shortcuts_settings() * second is a keyboard accelerator. */ static void -setup_tree_view(GtkWidget *treeview) +setup_tree_view (GtkWidget *treeview) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; - renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes("Action", renderer, "text", - ACTION, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW (treeview), column); + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes ("Action", renderer, + "text", ACTION, NULL); + gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); - renderer = gtk_cell_renderer_accel_new(); - g_object_set(renderer, "accel-mode", GTK_CELL_RENDERER_ACCEL_MODE_GTK, + renderer = gtk_cell_renderer_accel_new (); + g_object_set (renderer, "accel-mode", GTK_CELL_RENDERER_ACCEL_MODE_GTK, "editable", TRUE, NULL); - column = gtk_tree_view_column_new_with_attributes("Shortcut", renderer, + column = gtk_tree_view_column_new_with_attributes ("Shortcut", renderer, "accel-mods", MASK, "accel-key", VALUE, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW (treeview), column); + gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); g_signal_connect (G_OBJECT (renderer), "accel_edited", G_CALLBACK (accel_edited), (gpointer) treeview); g_signal_connect (G_OBJECT (renderer), "accel_cleared", G_CALLBACK (accel_cleared), (gpointer) treeview); } static void -accel_edited(GtkCellRendererAccel *renderer, gchar *path, guint accel_key, +accel_edited (GtkCellRendererAccel *renderer, gchar *path, guint accel_key, GdkModifierType mask, guint hardware_keycode, GtkTreeView *treeview) { DEBUG("Accel edited"); @@ -111,35 +112,37 @@ accel_edited(GtkCellRendererAccel *renderer, gchar *path, guint accel_key, GtkTreeModel *model; GtkTreeIter iter; - Accelerator* list = shortcuts_get_list(); - model = gtk_tree_view_get_model(treeview); - gint code = XKeysymToKeycode(GDK_DISPLAY(), accel_key); + Accelerator* list = shortcuts_get_list (); + model = gtk_tree_view_get_model (treeview); + gint code = XKeysymToKeycode (GDK_DISPLAY(), accel_key); // Disable existing binding if key already used int i = 0; - gtk_tree_model_get_iter_first(model, &iter); + gtk_tree_model_get_iter_first (model, &iter); while (list[i].action != NULL) - { - if(list[i].value == code) - { - gtk_list_store_set(GTK_LIST_STORE (model), &iter, MASK, 0, VALUE, 0, -1); - WARN("This key was already affected"); - } - gtk_tree_model_iter_next(model, &iter); - i++; - } + { + if (list[i].key == code && list[i].mask == mask) + { + gtk_list_store_set (GTK_LIST_STORE (model), &iter, MASK, 0, VALUE, 0, + -1); + WARN("This key was already affected"); + } + gtk_tree_model_iter_next (model, &iter); + i++; + } // Update treeview - if (gtk_tree_model_get_iter_from_string(model, &iter, path)) - gtk_list_store_set(GTK_LIST_STORE (model), &iter, MASK, (gint) mask, VALUE, - accel_key, -1); + if (gtk_tree_model_get_iter_from_string (model, &iter, path)) + gtk_list_store_set (GTK_LIST_STORE (model), &iter, MASK, (gint) mask, + VALUE, accel_key, -1); // Update GDK bindings - shortcuts_update_bindings(atoi(path), code); + shortcuts_update_bindings (atoi (path), code, mask); } static void -accel_cleared(GtkCellRendererAccel *renderer, gchar *path, GtkTreeView *treeview) +accel_cleared (GtkCellRendererAccel *renderer, gchar *path, + GtkTreeView *treeview) { DEBUG("Accel cleared"); @@ -147,10 +150,10 @@ accel_cleared(GtkCellRendererAccel *renderer, gchar *path, GtkTreeView *treeview GtkTreeIter iter; // Update treeview - model = gtk_tree_view_get_model(treeview); - if (gtk_tree_model_get_iter_from_string(model, &iter, path)) - gtk_list_store_set(GTK_LIST_STORE (model), &iter, MASK, 0, VALUE, 0, -1); + model = gtk_tree_view_get_model (treeview); + if (gtk_tree_model_get_iter_from_string (model, &iter, path)) + gtk_list_store_set (GTK_LIST_STORE (model), &iter, MASK, 0, VALUE, 0, -1); // Update GDK bindings - shortcuts_update_bindings(atoi(path), 0); + shortcuts_update_bindings (atoi (path), 0, 0); } diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index dac450d507534fb51f1732c971c8885f7ab70627..326a5dd2c559d936e7266d91b9f04a7b93bdfedb 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -413,7 +413,7 @@ calltree_display_call_info(callable_obj_t * c, CallDisplayType display_type, gch case DISPLAY_TYPE_CALL_TRANSFER: - DEBUG("CallTree: Display a call transfer") + DEBUG("CallTree: Display a call transfer"); if(g_strcmp0("",c->_peer_name) == 0){ description = g_markup_printf_escaped("<b>%s</b><i>%s</i>\n<i>Transfert to:%s</i> ", @@ -901,7 +901,7 @@ void calltree_add_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent) } } - DEBUG("Added call key exchange is %s", key_exchange) + DEBUG("Added call key exchange is %s", key_exchange); if( tab == current_calls ) { diff --git a/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml b/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml index 68e01174462c02f4b3740b326710c0120daab25f..8c8fc90c0018ebafec8e87e1376b5dc59c52f209 100755 --- a/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml +++ b/sflphone-client-gnome/src/dbus/configurationmanager-introspec.xml @@ -890,20 +890,20 @@ </method> <method name="getShortcuts" tp:name-for-bindings="getShortcuts"> - <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringInt"/> + <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/> <tp:docstring> </tp:docstring> - <arg type="a{si}" name="shortcutsMap" direction="out"> + <arg type="a{ss}" name="shortcutsMap" direction="out"> <tp:docstring> </tp:docstring> </arg> </method> <method name="setShortcuts" tp:name-for-bindings="setShortcuts"> - <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringInt"/> + <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/> <tp:docstring> </tp:docstring> - <arg type="a{si}" name="shortcutsMap" direction="in"> + <arg type="a{ss}" name="shortcutsMap" direction="in"> <tp:docstring> </tp:docstring> </arg> diff --git a/sflphone-client-gnome/src/logger.c b/sflphone-client-gnome/src/logger.c new file mode 100644 index 0000000000000000000000000000000000000000..57ecf27bd45ea89def4c8f6f45f20977a003cfcc --- /dev/null +++ b/sflphone-client-gnome/src/logger.c @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc. + * Author: Julien Bonjean <julien.bonjean@savoirfairelinux.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Additional permission under GNU GPL version 3 section 7: + * + * If you modify this program, or any covered work, by linking or + * combining it with the OpenSSL project's OpenSSL library (or a + * modified version of that library), containing parts covered by the + * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. + * grants you additional permission to convey the resulting work. + * Corresponding Source for a non-source form of such a combination + * shall include the source code for the parts of OpenSSL used as well + * as that of the covered work. + */ + +#include <logger.h> +#include <stdarg.h> +#include <string.h> +#include <stdio.h> + +int log_level = LOG_INFO; + +void internal_log(const int level, const char* format, ...) +{ + if(level > log_level) + return; + + va_list ap; + char *prefix = "<> "; + char buffer[4000]; + char message[4096]; + + switch(level) + { + case LOG_ERR: + { + prefix = "<error> "; + break; + } + case LOG_WARN: + { + prefix = "<warning> "; + break; + } + case LOG_INFO: + { + prefix = "<info> "; + break; + } + case LOG_DEBUG: + { + prefix = "<debug> "; + break; + } + } + + va_start(ap, format); + vsprintf(buffer, format, ap); + va_end(ap); + + message[0] = '\0'; + strncat(message, prefix, strlen(prefix)); + strncat(message, buffer, strlen(buffer)); + strncat(message, "\n", 1); + + fprintf(stderr, "%s", message); +} + +void set_log_level(const int level) +{ + log_level = level; +} diff --git a/sflphone-client-gnome/src/logger.h b/sflphone-client-gnome/src/logger.h new file mode 100644 index 0000000000000000000000000000000000000000..e445e981e3d80106ac68f6d7a71dd007ab10b8a1 --- /dev/null +++ b/sflphone-client-gnome/src/logger.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc. + * Author: Julien Bonjean <julien.bonjean@savoirfairelinux.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Additional permission under GNU GPL version 3 section 7: + * + * If you modify this program, or any covered work, by linking or + * combining it with the OpenSSL project's OpenSSL library (or a + * modified version of that library), containing parts covered by the + * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. + * grants you additional permission to convey the resulting work. + * Corresponding Source for a non-source form of such a combination + * shall include the source code for the parts of OpenSSL used as well + * as that of the covered work. + */ + +#ifndef __LOGGER_H +#define __LOGGER_H + +void internal_log(const int level, const char* format, ...); +void set_log_level(const int level); + +#define LOG_ERR 1 +#define LOG_WARN 2 +#define LOG_INFO 3 +#define LOG_DEBUG 4 + +#define ERROR(...) internal_log(LOG_ERR, __VA_ARGS__) +#define WARN(...) internal_log(LOG_WARN, __VA_ARGS__) +#define INFO(...) internal_log(LOG_INFO, __VA_ARGS__) +#define DEBUG(...) internal_log(LOG_DEBUG, __VA_ARGS__) + +#endif diff --git a/sflphone-client-gnome/src/main.c b/sflphone-client-gnome/src/main.c index 7d12b5ca94532d4c5d64b2a5d27ec8e54fc1263c..a2b18b57e757f142073590a95fed4d3735bc8aa6 100644 --- a/sflphone-client-gnome/src/main.c +++ b/sflphone-client-gnome/src/main.c @@ -31,6 +31,7 @@ #include <actions.h> #include <calllist.h> #include <config.h> +#include <logger.h> #include <dbus/dbus.h> #include <mainwindow.h> #include <statusicon.h> @@ -42,44 +43,16 @@ #include "shortcuts.h" -/** - * Stop logging engine - */ -static void -shutdown_logging () -{ - if (log4c_fini ()) - { - ERROR("log4c_fini() failed"); - } -} - -/** - * Start loggin engine - */ -static void -startup_logging () -{ - log4c_init (); - if (log4c_load (DATA_DIR "/log4crc") == -1) - g_warning ("Cannot load log4j configuration file : %s", DATA_DIR "/log4crc"); - - log4c_sfl_gtk_category = log4c_category_get ("org.sflphone.gtk"); -} - int main (int argc, char *argv[]) { // Handle logging int i; - // Startup logging - startup_logging (); - // Check arguments if debug mode is activated for (i = 0; i < argc; i++) if (g_strcmp0 (argv[i], "--debug") == 0) - log4c_category_set_priority (log4c_sfl_gtk_category, LOG4C_PRIORITY_DEBUG); + set_log_level (LOG_DEBUG); // GtkWidget *window; g_thread_init (NULL); @@ -104,8 +77,6 @@ main (int argc, char *argv[]) "shall include the source code for the parts of OpenSSL used as well\n" \ "as that of the covered work.\n\n"); - DEBUG("Logging Started"); - srand (time (NULL)); // Internationalization @@ -152,9 +123,6 @@ main (int argc, char *argv[]) gdk_threads_leave (); - // Cleanly stop logging - shutdown_logging (); - shortcuts_destroy_bindings(); return 0; diff --git a/sflphone-client-gnome/src/sflphone_const.h b/sflphone-client-gnome/src/sflphone_const.h index da7da3ef34eb83cbc003d3a2819253a1aec3327f..6d453123db089225e65a36fc9f2e58c4f3f204c6 100644 --- a/sflphone-client-gnome/src/sflphone_const.h +++ b/sflphone-client-gnome/src/sflphone_const.h @@ -32,8 +32,8 @@ #define __SFLPHONE_CONST_H #include <libintl.h> +#include "logger.h" #include "dbus.h" -#include "log4c.h" /* @file sflphone_const.h * @brief Contains the global variables for the client code @@ -126,11 +126,6 @@ #define SHORTCUT_TOGGLEPICKUPHANGUP "togglePickupHangup" #define SHORTCUT_TOGGLEHOLD "toggleHold" -/** - * Global logger - */ -log4c_category_t* log4c_sfl_gtk_category; - /** Error while opening capture device */ #define ALSA_CAPTURE_DEVICE 0x0001 /** Error while opening playback device */ @@ -178,14 +173,6 @@ log4c_category_t* log4c_sfl_gtk_category; /** Desktop notifications - Time before to close the notification*/ #define __TIMEOUT_TIME 18000 // 30 secondes -/** - * Macros for logging - */ -#define DEBUG(...) log4c_category_log(log4c_sfl_gtk_category, LOG4C_PRIORITY_DEBUG, __VA_ARGS__); -#define WARN(...) log4c_category_log(log4c_sfl_gtk_category, LOG4C_PRIORITY_WARN, __VA_ARGS__); -#define ERROR(...) log4c_category_log(log4c_sfl_gtk_category, LOG4C_PRIORITY_ERROR, __VA_ARGS__); -#define FATAL(...) log4c_category_log(log4c_sfl_gtk_category, LOG4C_PRIORITY_FATAL, __VA_ARGS__); - /** * Gconf */ diff --git a/sflphone-client-gnome/src/shortcuts.c b/sflphone-client-gnome/src/shortcuts.c index c65b9bded102b5136b1c0803abd242e301ca7c1b..ff55a97ab2f7e03376af4f45e398cca91a43eb4e 100644 --- a/sflphone-client-gnome/src/shortcuts.c +++ b/sflphone-client-gnome/src/shortcuts.c @@ -29,13 +29,14 @@ */ #include <string.h> -#include <stdlib.h> #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> #include <X11/Xlib.h> #include <X11/XF86keysym.h> #include <gdk/gdkx.h> #include <dbus/dbus-glib.h> +#include <stdlib.h> +#include <stdio.h> #include "shortcuts.h" #include "mainwindow.h" @@ -59,7 +60,7 @@ toggle_pick_up_hang_up_callback () callable_obj_t * selectedCall = calltab_get_selected_call (active_calltree); conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree); - g_print("toggle_pick_up_hang_up_callback\n"); + g_print ("toggle_pick_up_hang_up_callback\n"); if (selectedCall) { @@ -110,12 +111,12 @@ toggle_hold_callback () { case CALL_STATE_CURRENT: case CALL_STATE_RECORD: - g_print("on hold\n"); - sflphone_on_hold(); + g_print ("on hold\n"); + sflphone_on_hold (); break; case CALL_STATE_HOLD: - g_print("off hold\n"); - sflphone_off_hold(); + g_print ("off hold\n"); + sflphone_off_hold (); break; } } @@ -174,32 +175,35 @@ get_action_callback (const gchar* action) static void remove_bindings () { - GdkDisplay *display; - GdkScreen *screen; - GdkWindow *root; + GdkDisplay *display = NULL; + GdkScreen *screen = NULL; + GdkWindow *root = NULL; + int i, j = 0; display = gdk_display_get_default (); - int i = 0; - int j = 0; - while (accelerators_list[i].action != NULL) + for (i = 0; i < gdk_display_get_n_screens (display); i++) { - if (accelerators_list[i].value != 0) + screen = gdk_display_get_screen (display, i); + if (screen != NULL) { - for (j = 0; j < gdk_display_get_n_screens (display); j++) - { - screen = gdk_display_get_screen (display, j); + j = 0; + root = gdk_screen_get_root_window (screen); - if (screen != NULL) + // remove filter + gdk_window_remove_filter (root, filter_keys, NULL); + + // unbind shortcuts + while (accelerators_list[j].action != NULL) + { + if (accelerators_list[j].key != 0) { - root = gdk_screen_get_root_window (screen); - ungrab_key (accelerators_list[i].value, root); - gdk_window_remove_filter (root, filter_keys, NULL); + ungrab_key (accelerators_list[j].key, + accelerators_list[j].mask, root); } + j++; } } - - i++; } } @@ -212,30 +216,32 @@ create_bindings () GdkDisplay *display; GdkScreen *screen; GdkWindow *root; + int i, j = 0; display = gdk_display_get_default (); - int i = 0; - int j = 0; - while (accelerators_list[i].action != NULL) + for (i = 0; i < gdk_display_get_n_screens (display); i++) { - if (accelerators_list[i].value != 0) + screen = gdk_display_get_screen (display, i); + if (screen != NULL) { - // updated GDK bindings - for (j = 0; j < gdk_display_get_n_screens (display); j++) - { - screen = gdk_display_get_screen (display, j); + j = 0; + root = gdk_screen_get_root_window (screen); - if (screen != NULL) + // add filter + gdk_window_add_filter (root, filter_keys, NULL); + + // bind shortcuts + while (accelerators_list[j].action != NULL) + { + if (accelerators_list[j].key != 0) { - root = gdk_screen_get_root_window (screen); - grab_key (accelerators_list[i].value, root); - gdk_window_add_filter (root, filter_keys, NULL); + grab_key (accelerators_list[j].key, + accelerators_list[j].mask, root); } + j++; } } - - i++; } } @@ -243,27 +249,28 @@ create_bindings () * Initialize a specific binding */ static void -initialize_binding (const gchar* action, const guint code) +initialize_binding (const gchar* action, guint key, GdkModifierType mask) { - //initialize_shortcuts_keys(); - int index = 0; - while (accelerators_list[index].action != NULL) + int i = 0; + + while (accelerators_list[i].action != NULL) { - if (strcmp (action, accelerators_list[index].action) == 0) + if (strcmp (action, accelerators_list[i].action) == 0) { break; } - index++; + i++; } - if (accelerators_list[index].action == NULL) + if (accelerators_list[i].action == NULL) { ERROR("Should not happen: cannot find corresponding action"); return; } // update config value - accelerators_list[index].value = code; + accelerators_list[i].key = key; + accelerators_list[i].mask = mask; // update bindings create_bindings (); @@ -275,60 +282,76 @@ initialize_binding (const gchar* action, const guint code) static void initialize_accelerators_list () { - GList* shortcutsKeys = g_hash_table_get_keys (shortcutsMap); + GList* shortcutsKeysElement, *shortcutsKeys = NULL; + int i = 0; + + shortcutsKeys = g_hash_table_get_keys (shortcutsMap); accelerators_list = (Accelerator*) malloc ( (g_list_length (shortcutsKeys) + 1) * sizeof(Accelerator)); - GList* shortcutsKeysElement; - int index = 0; for (shortcutsKeysElement = shortcutsKeys; shortcutsKeysElement; shortcutsKeysElement = shortcutsKeysElement->next) { gchar* action = shortcutsKeysElement->data; - accelerators_list[index].action = g_strdup (action); - accelerators_list[index].callback = get_action_callback (action); - accelerators_list[index].mask = 0; - accelerators_list[index].value = 0; + accelerators_list[i].action = g_strdup (action); + accelerators_list[i].callback = get_action_callback (action); + accelerators_list[i].mask = 0; + accelerators_list[i].key = 0; - index++; + i++; } // last element must be null - accelerators_list[index].action = 0; - accelerators_list[index].callback = 0; - accelerators_list[index].mask = 0; - accelerators_list[index].value = 0; + accelerators_list[i].action = 0; + accelerators_list[i].callback = 0; + accelerators_list[i].mask = 0; + accelerators_list[i].key = 0; } static void -update_bindings_data (const guint index, const guint code) +update_shortcuts_map (const gchar* action, guint key, GdkModifierType mask) { + gchar buffer[7]; + + // Bindings: MASKxCODE + sprintf (buffer, "%dx%d", mask, key); + + g_hash_table_replace (shortcutsMap, g_strdup (action), g_strdup (buffer)); +} + +static void +update_bindings_data (guint index, guint key, GdkModifierType mask) +{ + int i = 0; + // we need to be sure this code is not already affected // to another action - int i = 0; while (accelerators_list[i].action != NULL) { - if (accelerators_list[i].value == code) + if (accelerators_list[i].key == key && accelerators_list[i].mask == mask + && accelerators_list[i].key != 0) { + DEBUG("Existing mapping found %d+%d", mask, key); + // disable old binding - accelerators_list[i].value = 0; + accelerators_list[i].key = 0; + accelerators_list[i].mask = 0; // update config table - g_hash_table_replace (shortcutsMap, g_strdup ( - accelerators_list[i].action), GINT_TO_POINTER (0)); + update_shortcuts_map (accelerators_list[i].action, 0, 0); } i++; } - // store new value - accelerators_list[index].value = code; + // store new key + accelerators_list[index].key = key; + accelerators_list[index].mask = mask; // update value in hashtable (used for dbus calls) - g_hash_table_replace (shortcutsMap, - g_strdup (accelerators_list[index].action), GINT_TO_POINTER ( - accelerators_list[index].value)); + update_shortcuts_map (accelerators_list[index].action, + accelerators_list[index].key, accelerators_list[index].mask); } /* @@ -339,13 +362,13 @@ update_bindings_data (const guint index, const guint code) * Update current bindings with a new value */ void -shortcuts_update_bindings (const guint index, const guint code) +shortcuts_update_bindings (guint index, guint key, GdkModifierType mask) { // first remove all existing bindings remove_bindings (); // update data - update_bindings_data (index, code); + update_bindings_data (index, key, mask); // recreate all bindings create_bindings (); @@ -360,6 +383,10 @@ shortcuts_update_bindings (const guint index, const guint code) void shortcuts_initialize_bindings () { + GList* shortcutsKeys, *shortcutsKeysElement = NULL; + gchar* action, *maskAndKey, *token1, *token2 = NULL; + guint mask, key = 0; + // get shortcuts stored in config through dbus shortcutsMap = dbus_get_shortcuts (); @@ -367,15 +394,40 @@ shortcuts_initialize_bindings () initialize_accelerators_list (); // iterate through keys to initialize bindings - GList* shortcutsKeys = g_hash_table_get_keys (shortcutsMap); - GList* shortcutsKeysElement; + shortcutsKeys = g_hash_table_get_keys (shortcutsMap); + for (shortcutsKeysElement = shortcutsKeys; shortcutsKeysElement; shortcutsKeysElement = shortcutsKeysElement->next) { - gchar* key = shortcutsKeysElement->data; - int shortcut = (size_t) g_hash_table_lookup (shortcutsMap, key); - if (shortcut != 0) - initialize_binding (key, shortcut); + action = shortcutsKeysElement->data; + maskAndKey = g_strdup (g_hash_table_lookup (shortcutsMap, action)); + + token1 = strtok (maskAndKey, "x"); + token2 = strtok (NULL, "x"); + + mask = 0; + key = 0; + + // Value not setted + if (token1 == NULL) + { + // Nothing to do + } + // Backward compatibility (no mask defined) + if (token1 != NULL && token2 == NULL) + { + key = atoi (token1); + mask = 0; + } + // Regular case + else + { + mask = atoi (token1); + key = atoi (token2); + } + + if (key != 0) + initialize_binding (action, key, mask); } } @@ -385,16 +437,18 @@ shortcuts_initialize_bindings () void shortcuts_destroy_bindings () { + int i = 0; + // remove bindings remove_bindings (); // free pointers - int index = 0; - while (accelerators_list[index].action != NULL) + while (accelerators_list[i].action != NULL) { - g_free (accelerators_list[index].action); - index++; + g_free (accelerators_list[i].action); + i++; } + free (accelerators_list); } @@ -412,10 +466,12 @@ shortcuts_get_list () * filter used when an event is catched */ static GdkFilterReturn -filter_keys (GdkXEvent *xevent, GdkEvent *event, gpointer data) +filter_keys (const GdkXEvent *xevent, const GdkEvent *event, gpointer data) { - XEvent *xev; - XKeyEvent *key; + XEvent *xev = NULL; + XKeyEvent *key = NULL; + GdkModifierType keystate = 0; + int i = 0; xev = (XEvent *) xevent; if (xev->type != KeyPress) @@ -424,15 +480,16 @@ filter_keys (GdkXEvent *xevent, GdkEvent *event, gpointer data) } key = (XKeyEvent *) xevent; + keystate = key->state & ~(Mod2Mask | Mod5Mask | LockMask); // try to find corresponding action - int i = 0; while (accelerators_list[i].action != NULL) { - if (accelerators_list[i].value == key->keycode) + if (accelerators_list[i].key == key->keycode && accelerators_list[i].mask + == keystate) { - DEBUG("catched key for action: %s (%d)", accelerators_list[i].action, - accelerators_list[i].value); + DEBUG("catched key for action: %s", accelerators_list[i].action, + accelerators_list[i].key); // call associated callback function accelerators_list[i].callback (); @@ -442,7 +499,8 @@ filter_keys (GdkXEvent *xevent, GdkEvent *event, gpointer data) i++; } - DEBUG("Should not be reached :(\n"); + DEBUG("Should not be reached"); + return GDK_FILTER_CONTINUE; } @@ -450,27 +508,29 @@ filter_keys (GdkXEvent *xevent, GdkEvent *event, gpointer data) * Remove key "catcher" from GDK layer */ static void -ungrab_key (int key_code, GdkWindow *root) +ungrab_key (guint key, GdkModifierType mask, const GdkWindow *root) { + DEBUG("Ungrabbing key %d+%d", mask, key); + gdk_error_trap_push (); - XUngrabKey (GDK_DISPLAY(), key_code, 0, GDK_WINDOW_XID(root)); - XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask, GDK_WINDOW_XID(root)); - XUngrabKey (GDK_DISPLAY(), key_code, Mod5Mask, GDK_WINDOW_XID(root)); - XUngrabKey (GDK_DISPLAY(), key_code, LockMask, GDK_WINDOW_XID(root)); - XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask, - GDK_WINDOW_XID(root)); - XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask | LockMask, - GDK_WINDOW_XID(root)); - XUngrabKey (GDK_DISPLAY(), key_code, Mod5Mask | LockMask, - GDK_WINDOW_XID(root)); - XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask | LockMask, - GDK_WINDOW_XID(root)); + XUngrabKey (GDK_DISPLAY (), key, mask, GDK_WINDOW_XID (root)); + XUngrabKey (GDK_DISPLAY (), key, Mod2Mask | mask, GDK_WINDOW_XID (root)); + XUngrabKey (GDK_DISPLAY (), key, Mod5Mask | mask, GDK_WINDOW_XID (root)); + XUngrabKey (GDK_DISPLAY (), key, LockMask | mask, GDK_WINDOW_XID (root)); + XUngrabKey (GDK_DISPLAY (), key, Mod2Mask | Mod5Mask | mask, + GDK_WINDOW_XID (root)); + XUngrabKey (GDK_DISPLAY (), key, Mod2Mask | LockMask | mask, + GDK_WINDOW_XID (root)); + XUngrabKey (GDK_DISPLAY (), key, Mod5Mask | LockMask | mask, + GDK_WINDOW_XID (root)); + XUngrabKey (GDK_DISPLAY (), key, Mod2Mask | Mod5Mask | LockMask | mask, + GDK_WINDOW_XID (root)); gdk_flush (); if (gdk_error_trap_pop ()) { - ERROR("Error ungrabbing key"); + DEBUG ( "Error ungrabbing key %d+%d", mask, key); } } @@ -478,31 +538,32 @@ ungrab_key (int key_code, GdkWindow *root) * Add key "catcher" to GDK layer */ static void -grab_key (int key_code, GdkWindow *root) +grab_key (guint key, GdkModifierType mask, const GdkWindow *root) { - gdk_error_trap_push (); - XGrabKey (GDK_DISPLAY(), key_code, 0, GDK_WINDOW_XID(root), True, + DEBUG("Grabbing key %d+%d", mask, key); + + XGrabKey (GDK_DISPLAY (), key, mask, GDK_WINDOW_XID (root), True, GrabModeAsync, GrabModeAsync); - XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask, GDK_WINDOW_XID(root), True, + XGrabKey (GDK_DISPLAY (), key, Mod2Mask | mask, GDK_WINDOW_XID (root), True, GrabModeAsync, GrabModeAsync); - XGrabKey (GDK_DISPLAY(), key_code, Mod5Mask, GDK_WINDOW_XID(root), True, + XGrabKey (GDK_DISPLAY (), key, Mod5Mask | mask, GDK_WINDOW_XID (root), True, GrabModeAsync, GrabModeAsync); - XGrabKey (GDK_DISPLAY(), key_code, LockMask, GDK_WINDOW_XID(root), True, + XGrabKey (GDK_DISPLAY (), key, LockMask | mask, GDK_WINDOW_XID (root), True, GrabModeAsync, GrabModeAsync); - XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask, GDK_WINDOW_XID(root), - True, GrabModeAsync, GrabModeAsync); - XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask | LockMask, GDK_WINDOW_XID(root), - True, GrabModeAsync, GrabModeAsync); - XGrabKey (GDK_DISPLAY(), key_code, Mod5Mask | LockMask, GDK_WINDOW_XID(root), - True, GrabModeAsync, GrabModeAsync); - XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask | LockMask, - GDK_WINDOW_XID(root), True, GrabModeAsync, GrabModeAsync); + XGrabKey (GDK_DISPLAY (), key, Mod2Mask | Mod5Mask | mask, + GDK_WINDOW_XID (root), True, GrabModeAsync, GrabModeAsync); + XGrabKey (GDK_DISPLAY (), key, Mod2Mask | LockMask | mask, + GDK_WINDOW_XID (root), True, GrabModeAsync, GrabModeAsync); + XGrabKey (GDK_DISPLAY (), key, Mod5Mask | LockMask | mask, + GDK_WINDOW_XID (root), True, GrabModeAsync, GrabModeAsync); + XGrabKey (GDK_DISPLAY (), key, Mod2Mask | Mod5Mask | LockMask | mask, + GDK_WINDOW_XID (root), True, GrabModeAsync, GrabModeAsync); gdk_flush (); if (gdk_error_trap_pop ()) { - ERROR("Error grabbing key"); + DEBUG ("Error grabbing key %d+%d", mask, key); } } diff --git a/sflphone-client-gnome/src/shortcuts.h b/sflphone-client-gnome/src/shortcuts.h index 47f8fec550dc48ba8ad083994b1e17c78f9810a2..ac71bc8c0b9a768c79809bf7846a16fe6873518b 100644 --- a/sflphone-client-gnome/src/shortcuts.h +++ b/sflphone-client-gnome/src/shortcuts.h @@ -34,20 +34,20 @@ typedef struct { gchar *action; + guint key; GdkModifierType mask; - guint value; void (*callback) (void); } Accelerator; static void -grab_key (int key_code, GdkWindow *root); +grab_key (guint key, GdkModifierType mask, const GdkWindow *root); static void -ungrab_key (int key_code, GdkWindow *root); +ungrab_key (guint key, GdkModifierType mask, const GdkWindow *root); static GdkFilterReturn -filter_keys (GdkXEvent *xevent, GdkEvent *event, gpointer data); +filter_keys (const GdkXEvent *xevent, const GdkEvent *event, gpointer data); static void remove_bindings (); @@ -68,7 +68,7 @@ static void toggle_hold_callback (); static void -initialize_binding (const gchar* action, const guint code); +initialize_binding (const gchar* action, guint key, GdkModifierType mask); static void initialize_shortcuts_keys (); @@ -77,7 +77,10 @@ static void* get_action_callback (const gchar* action); static void -update_bindings_data (const guint index, const guint code); +update_bindings_data (guint index, guint key, GdkModifierType mask); + +static void +update_shortcuts_map (const gchar* action, guint value, GdkModifierType mask); /* * "Public" functions @@ -87,7 +90,7 @@ void shortcuts_initialize_bindings (); void -shortcuts_update_bindings (const guint index, const guint code); +shortcuts_update_bindings (guint index, guint key, GdkModifierType mask); void shortcuts_destroy_bindings (); diff --git a/sflphone-client-gnome/tests/Makefile.am b/sflphone-client-gnome/tests/Makefile.am index ba1161ae750bf07180fc71504a88bcf0e97dda49..3d3ffb8f4dfa7d8216f47ae495b5f310a1c76e29 100644 --- a/sflphone-client-gnome/tests/Makefile.am +++ b/sflphone-client-gnome/tests/Makefile.am @@ -27,24 +27,24 @@ SFLPHONE_OBJ = $(top_builddir)/src/accountlist.o \ check_global_SOURCES = check_global.c check_global_CFLAGS = @CHECK_CFLAGS@ @DEPS_CFLAGS@ -check_global_LDADD = $(SFLPHONE_LIBS) $(SFLPHONE_OBJ) @CHECK_LIBS@ $(DEPS_LIBS) @LIBSEXY_LIBS@ -llog4c +check_global_LDADD = $(SFLPHONE_LIBS) $(SFLPHONE_OBJ) @CHECK_LIBS@ $(DEPS_LIBS) @LIBSEXY_LIBS@ ########################################################### check_contacts_SOURCES = check_contacts.c check_contacts_CFLAGS = @CHECK_CFLAGS@ @DEPS_CFLAGS@ -check_contacts_LDADD = $(SFLPHONE_LIBS) $(SFLPHONE_OBJ) @CHECK_LIBS@ $(DEPS_LIBS) @LIBSEXY_LIBS@ -llog4c +check_contacts_LDADD = $(SFLPHONE_LIBS) $(SFLPHONE_OBJ) @CHECK_LIBS@ $(DEPS_LIBS) @LIBSEXY_LIBS@ ########################################################### check_config_SOURCES = check_config.c check_config_CFLAGS = @CHECK_CFLAGS@ @DEPS_CFLAGS@ -check_config_LDADD = $(SFLPHONE_LIBS) $(SFLPHONE_OBJ) @CHECK_LIBS@ @DEPS_LIBS@ @LIBSEXY_LIBS@ -llog4c +check_config_LDADD = $(SFLPHONE_LIBS) $(SFLPHONE_OBJ) @CHECK_LIBS@ @DEPS_LIBS@ @LIBSEXY_LIBS@ ########################################################### check_dbus_SOURCES = check_dbus.c check_dbus_CFLAGS = @CHECK_CFLAGS@ @DEPS_CFLAGS@ -check_dbus_LDADD = $(SFLPHONE_LIBS) $(SFLPHONE_OBJ) @CHECK_LIBS@ @DEPS_LIBS@ @LIBSEXY_LIBS@ -llog4c +check_dbus_LDADD = $(SFLPHONE_LIBS) $(SFLPHONE_OBJ) @CHECK_LIBS@ @DEPS_LIBS@ @LIBSEXY_LIBS@ ########################################################### diff --git a/sflphone-common/libs/pjproject/autogen.sh b/sflphone-common/libs/pjproject/autogen.sh index 695c27e85ee6a3fd11a52bae54b04f11ab6579b7..ccbfb98375458fbb561510487fa65905c7a09915 100755 --- a/sflphone-common/libs/pjproject/autogen.sh +++ b/sflphone-common/libs/pjproject/autogen.sh @@ -18,6 +18,14 @@ elif [ -e /usr/lib/rpm/config.guess ]; then rm -f config.sub config.guess ln -s /usr/lib/rpm/config.sub . ln -s /usr/lib/rpm/config.guess . +elif [ -e /usr/share/automake-*/config.guess ]; then + rm -f config.sub config.guess + ln -s /usr/share/automake-*/config.sub . + ln -s /usr/share/automake-*/config.guess . +elif [ -e /usr/share/libtool/config/config.guess ]; then + rm -f config.sub config.guess + ln -s /usr/share/libtool/config/config.sub . + ln -s /usr/share/libtool/config/config.guess . else aclocal --force automake --add-missing --force-missing --copy diff --git a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c index 1428e1b282c4663e6363e7c09537e7b2888ea42d..6bf91de888985f2ab1d7c553b6aa62ff258aefdd 100644 --- a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c +++ b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c @@ -162,6 +162,8 @@ static int worker_thread(void *arg) rc = pj_ioqueue_poll(ioqueue, &timeout); } PJ_UNREACHED(return 0;) + + return 0; } int udp_echo_srv_ioqueue(void) diff --git a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/udp_echo_srv_sync.c b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/udp_echo_srv_sync.c index ceff924389d7fa0e96f2397c46fbf07162bc6420..9b5aec652de68a18bbaf616d3d2aa66368b827b2 100644 --- a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/udp_echo_srv_sync.c +++ b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/udp_echo_srv_sync.c @@ -68,6 +68,8 @@ static int worker_thread(void *arg) } } PJ_UNREACHED(return 0;) + + return 0; } diff --git a/sflphone-common/src/dbus/configurationmanager-introspec.xml b/sflphone-common/src/dbus/configurationmanager-introspec.xml index 68e01174462c02f4b3740b326710c0120daab25f..f76826b008e9edd621a7eaa5f02f333a6ee725dd 100755 --- a/sflphone-common/src/dbus/configurationmanager-introspec.xml +++ b/sflphone-common/src/dbus/configurationmanager-introspec.xml @@ -105,8 +105,8 @@ <tp:docstring> </tp:docstring> <arg type="s" name="accountID" direction="in"> - <tp:docstring> - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> <arg type="i" name="number" direction="in"> <tp:docstring> @@ -118,9 +118,8 @@ <tp:docstring> </tp:docstring> <arg type="s" name="accountID" direction="in"> - <tp:docstring> - Account ID - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> @@ -207,55 +206,55 @@ <method name="addAccount" tp:name-for-bindings="addAccount"> <tp:docstring> - Add a new account. When created, the signal <tp:member-ref>accountsChanged</tp:member-ref> is emitted. The clients must then call <tp:member-ref>getAccountList</tp:member-ref> to update their internal data structure. - <tp:rationale>If no details are specified, the default parameters are used.</tp:rationale> - <tp:rationale>The core tries to register the account as soon it is created.</tp:rationale> + Add a new account. When created, the signal <tp:member-ref>accountsChanged</tp:member-ref> is emitted. The clients must then call <tp:member-ref>getAccountList</tp:member-ref> to update their internal data structure. + <tp:rationale>If no details are specified, the default parameters are used.</tp:rationale> + <tp:rationale>The core tries to register the account as soon it is created.</tp:rationale> </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/> <arg type="a{ss}" name="details" direction="in" tp:type="String_String_Map"> - <tp:docstring> - The new account settings - </tp:docstring> + <tp:docstring> + The new account settings + </tp:docstring> </arg> <arg type="s" name="createdAccountId" direction="out"> - <tp:docstring> - A new account ID - </tp:docstring> + <tp:docstring> + A new account ID + </tp:docstring> </arg> </method> <method name="setAccountsOrder" tp:name-for-bindings="setAccountsOrder"> <tp:docstring> - Update the accounts order. - <tp:rationale>When placing a call, the first registered account in the list is used.</tp:rationale> + Update the accounts order. + <tp:rationale>When placing a call, the first registered account in the list is used.</tp:rationale> </tp:docstring> <arg type="s" name="order" direction="in"> - <tp:docstring> - An ordered list of account IDs, delimited by '/' - </tp:docstring> + <tp:docstring> + An ordered list of account IDs, delimited by '/' + </tp:docstring> </arg> </method> <method name="removeAccount" tp:name-for-bindings="removeAccount"> - <tp:docstring> - Remove an existing account. When removed, the signal <tp:member-ref>accountsChanged</tp:member-ref> is emitted. The clients must then call <tp:member-ref>getAccountList</tp:member-ref> to update their internal data structure. - </tp:docstring> - <arg type="s" name="accoundID" direction="in"> - <tp:docstring> - The account to remove, identified by its ID - </tp:docstring> - </arg> + <tp:docstring> + Remove an existing account. When removed, the signal <tp:member-ref>accountsChanged</tp:member-ref> is emitted. The clients must then call <tp:member-ref>getAccountList</tp:member-ref> to update their internal data structure. + </tp:docstring> + <arg type="s" name="accoundID" direction="in"> + <tp:docstring> + The account to remove, identified by its ID + </tp:docstring> + </arg> </method> <method name="getAccountList" tp:name-for-bindings="getAccountList"> - <tp:docstring> - Get a list of all created accounts, as stored by the core. - </tp:docstring> + <tp:docstring> + Get a list of all created accounts, as stored by the core. + </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/> <arg type="as" name="list" direction="out"> - <tp:docstring> - A list of account IDs - </tp:docstring> + <tp:docstring> + A list of account IDs + </tp:docstring> </arg> </method> @@ -268,15 +267,15 @@ @param[in] input accountID --> <arg type="s" name="accountID" direction="in"> - <tp:docstring> - The account ID - </tp:docstring> + <tp:docstring> + The account ID + </tp:docstring> </arg> <arg type="i" name="expire" direction="in"> - <tp:docstring> - <p>To register, expire must be 1.</p> - <p>To un-register, expire must be 0.</p> - </tp:docstring> + <tp:docstring> + <p>To register, expire must be 1.</p> + <p>To un-register, expire must be 0.</p> + </tp:docstring> </arg> </method> @@ -285,14 +284,13 @@ </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/> <arg type="as" name="list" direction="out"> - <tp:docstring> - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <method name="getVersion" tp:name-for-bindings="getVersion"> <tp:docstring> - Return SFLphone-daemon version </tp:docstring> <arg type="s" name="version" direction="out"> <tp:docstring> @@ -302,19 +300,16 @@ <method name="getRingtoneList" tp:name-for-bindings="getRingtoneList"> <tp:docstring> - Return a list of valid Sun's .au sound file used - as ringtones. </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/> <arg type="as" name="list" direction="out"> - <tp:docstring> - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <method name="getPlaybackDeviceList" tp:name-for-bindings="getPlaybackDeviceList"> <tp:docstring> - 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"> @@ -325,7 +320,6 @@ <method name="getRecordDeviceList" tp:name-for-bindings="getRecordDeviceList"> <tp:docstring> - Provide a list of record device from ALSA </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/> <arg type="as" name="list" direction="out"> @@ -336,7 +330,6 @@ <method name="isRingtoneEnabled" tp:name-for-bindings="isRingtoneEnabled"> <tp:docstring> - Return true if ringtone is enabled, false otherwise </tp:docstring> <arg type="s" name="accountID" direction="in" /> <arg type="i" name="bool" direction="out"> @@ -353,24 +346,21 @@ <method name="getRingtoneChoice" tp:name-for-bindings="getRingtoneChoice"> <tp:docstring> - Get current ringtone .au file selected </tp:docstring> <arg type="s" name="accountID" direction="in"/> <arg type="s" name="tone" direction="out"> - <tp:docstring> - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <method name="setRingtoneChoice" tp:name-for-bindings="setRingtoneChoice"> <tp:docstring> - Set current ringtone .au file from list acquired using <tp:member-ref>getAccountList</tp:member-ref> </tp:docstring> <arg type="s" name="accountID" direction="in"/> <arg type="s" name="tone" direction="in"> - <tp:docstring> - A valid .au file path - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> @@ -669,7 +659,6 @@ </arg> </method> - <!-- Addressbook configuration --> <method name="getAddressbookSettings" tp:name-for-bindings="getAddressbookSettings"> <tp:docstring> @@ -748,162 +737,118 @@ </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/> <arg type="a{ss}" name="entries" direction="in"> - <tp:docstring> - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <signal name="accountsChanged" tp:name-for-bindings="accountsChanged"> - <tp:docstring> - Signal emited on account changes. Clients should update - all account status with <tp:member-ref>getAccountDetails</tp:member-ref> - iterating over the list provided by <tp:member-ref>getAccountList</tp:member-ref> - </tp:docstring> </signal> <signal name="errorAlert" tp:name-for-bindings="errorAlert"> <arg type="i" name="code"> - <tp:docstring> - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </signal> <!-- TLS Methods --> <method name="getSupportedTlsMethod" tp:name-for-bindings="getSupportedTlsMethod"> <tp:docstring> - Provide a list of supported TLS method </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/> <arg type="as" name="list" direction="out"> - <tp:docstring> - A list of TLS method: (TLSv1, SSLv1, SSLv2, - SSLv3, SSLv23) - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <method name="getTlsSettingsDefault" tp:name-for-bindings="getTlsSettingsDefault"> <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/> <tp:docstring> - Get default TLS setting for new accounts </tp:docstring> <arg type="a{ss}" name="details" direction="out"> - <tp:docstring> - A hash table containing details. Refer - to <tp:member-ref>getTlsSettings</tp:member-ref> - for possible keys - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <method name="getTlsSettings" tp:name-for-bindings="getTlsSettings"> <tp:docstring> - Get current TLS setting for a specific account </tp:docstring> <arg type="s" name="accountID" direction="in"> - <tp:docstring> - The account ID - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/> <arg type="a{ss}" name="details" direction="out"> - <tp:docstring> - A hash table containing details with key: - <ul> - <li>"TLS.listenerPort": valid numerical port</li> - <li>"TLS.enable": true/false</li> - <li>"TLS.certificateListFile": A valid path to - a .pem file containing CA certificate</li> - <li>"TLS.certificateFile": A valid path to a - file containing the public end-point - certificate (optional)</li> - <li>"TLS.privateKeyFile": A valid path to a - file containing the public end-point private - key (optional)</li> - <li>"TLS.password": Public end-point private - key password (optional)</li> - <li>"TLS.method": (TLSv1, SSLv1, SSLv2, - SSLv3, SSLv23)</li> - </ul> - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <method name="setTlsSettings" tp:name-for-bindings="setTlsSettings"> <tp:docstring> - Update TLS setting for a specific account </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="MapStringString"/> <arg type="s" name="accountID" direction="in"> - <tp:docstring> - The account ID - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> <arg type="a{ss}" name="details" direction="in"> - <tp:docstring> - A hash table containing details. Refer - to <tp:member-ref>getTlsSettings</tp:member-ref> - for possible keys. - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <method name="getAddrFromInterfaceName" tp:name-for-bindings="getAddrFromInterfaceName"> <tp:docstring> - Resolve interface IPv4 address provided its name. </tp:docstring> <arg type="s" name="interface" direction="in"> - <tp:docstring> - Interface name - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> <arg type="s" name="address" direction="out"> - <tp:docstring> - Interface IPv4 address - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <method name="getAllIpInterface" tp:name-for-bindings="getAllIpInterface"> <tp:docstring> - Provide a list of IP interface's IPv4 address. </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/> <arg type="as" name="list" direction="out"> - <tp:docstring> - A list of interface's IPv4 address - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <method name="getAllIpInterfaceByName" tp:name-for-bindings="getAllIpInterfaceByName"> <tp:docstring> - Provide a list of IP interface's name: default - (0.0.0.0), lo, eth0 ... </tp:docstring> <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/> <arg type="as" name="list" direction="out"> - <tp:docstring> - A list of interface's name - </tp:docstring> + <tp:docstring> + </tp:docstring> </arg> </method> <method name="getShortcuts" tp:name-for-bindings="getShortcuts"> - <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringInt"/> + <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/> <tp:docstring> </tp:docstring> - <arg type="a{si}" name="shortcutsMap" direction="out"> + <arg type="a{ss}" name="shortcutsMap" direction="out"> <tp:docstring> </tp:docstring> </arg> </method> <method name="setShortcuts" tp:name-for-bindings="setShortcuts"> - <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringInt"/> + <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/> <tp:docstring> </tp:docstring> - <arg type="a{si}" name="shortcutsMap" direction="in"> + <arg type="a{ss}" name="shortcutsMap" direction="in"> <tp:docstring> </tp:docstring> </arg> diff --git a/sflphone-common/src/dbus/configurationmanager.cpp b/sflphone-common/src/dbus/configurationmanager.cpp index 9169c05075bd9e6b1f552388ddd849ccfd58b63e..8f0e2bd02d2673b89bd218ff915a151703764acc 100755 --- a/sflphone-common/src/dbus/configurationmanager.cpp +++ b/sflphone-common/src/dbus/configurationmanager.cpp @@ -725,27 +725,16 @@ std::vector<std::string> ConfigurationManager::getAllIpInterfaceByName(void) { } -std::map<std::string, int32_t> ConfigurationManager::getShortcuts() { - - std::map<std::string, int> shortcutsMap; - int shortcut; - - for (int i = 0; i < (int)shortcutsKeys.size(); i++) { - std::string key = shortcutsKeys.at(i); - shortcut = Manager::instance().getConfigInt("Shortcuts", key); - shortcutsMap.insert(std::pair<std::string, int>(key, shortcut)); - } +std::map<std::string, std::string> ConfigurationManager::getShortcuts() { return Manager::instance().shortcutPreferences.getShortcuts(); - - return shortcutsMap; } void ConfigurationManager::setShortcuts( - const std::map<std::string, int32_t>& shortcutsMap) { + const std::map<std::string, std::string>& shortcutsMap) { - std::map<std::string, int> map_cpy = shortcutsMap; - std::map<std::string, int>::iterator it; + std::map<std::string, std::string> map_cpy = shortcutsMap; + std::map<std::string, std::string>::iterator it; for (int i = 0; i < (int)shortcutsKeys.size(); i++) { std::string key = shortcutsKeys.at(i); diff --git a/sflphone-common/src/dbus/configurationmanager.h b/sflphone-common/src/dbus/configurationmanager.h index c89576eff090fd25d0c92bce0bbccd7eaab9c201..6c6083fad430a80a9468597ec29adeb2f192f55c 100755 --- a/sflphone-common/src/dbus/configurationmanager.h +++ b/sflphone-common/src/dbus/configurationmanager.h @@ -139,8 +139,8 @@ public: std::vector<std::string> getAllIpInterface(void); std::vector<std::string> getAllIpInterfaceByName(void); - std::map< std::string, int32_t > getShortcuts (); - void setShortcuts (const std::map< std::string, int32_t >& shortcutsMap); + std::map< std::string, std::string > getShortcuts (); + void setShortcuts (const std::map< std::string, std::string >& shortcutsMap); }; diff --git a/sflphone-common/src/preferences.cpp b/sflphone-common/src/preferences.cpp index 7a992c4727b77ea36f3ae5e799b2677aaa40bf18..70fb6eb7406b6452e70a13cbd5a3464dcc8f7e63 100644 --- a/sflphone-common/src/preferences.cpp +++ b/sflphone-common/src/preferences.cpp @@ -444,17 +444,16 @@ ShortcutPreferences::ShortcutPreferences() : _hangup("") ShortcutPreferences::~ShortcutPreferences() {} -std::map<std::string, int> ShortcutPreferences::getShortcuts() +std::map<std::string, std::string> ShortcutPreferences::getShortcuts() { - std::map<std::string, int> shortcutsMap; - int shortcut; + std::map<std::string, std::string> shortcutsMap; - shortcutsMap.insert(std::pair<std::string, int>(hangupShortKey, atoi(_hangup.data()))); - shortcutsMap.insert(std::pair<std::string, int>(pickupShortKey, atoi(_pickup.data()))); - shortcutsMap.insert(std::pair<std::string, int>(popupShortKey, atoi(_popup.data()))); - shortcutsMap.insert(std::pair<std::string, int>(toggleHoldShortKey, atoi(_toggleHold.data()))); - shortcutsMap.insert(std::pair<std::string, int>(togglePickupHangupShortKey, atoi(_togglePickupHangup.data()))); + shortcutsMap.insert(std::pair<std::string, std::string>(hangupShortKey, _hangup.data())); + shortcutsMap.insert(std::pair<std::string, std::string>(pickupShortKey, _pickup.data())); + shortcutsMap.insert(std::pair<std::string, std::string>(popupShortKey, _popup.data())); + shortcutsMap.insert(std::pair<std::string, std::string>(toggleHoldShortKey, _toggleHold.data())); + shortcutsMap.insert(std::pair<std::string, std::string>(togglePickupHangupShortKey, _togglePickupHangup.data())); return shortcutsMap; } diff --git a/sflphone-common/src/preferences.h b/sflphone-common/src/preferences.h index 5228b8e1998b6ea1391aa1ae3d81bdb43a5c33e8..34b42f4227ce035c749013a1b7ba02bea2703f9c 100755 --- a/sflphone-common/src/preferences.h +++ b/sflphone-common/src/preferences.h @@ -375,7 +375,7 @@ class ShortcutPreferences : public Serializable { virtual void unserialize(Conf::MappingNode *map); - std::map<std::string, int> getShortcuts(void); + std::map<std::string, std::string> getShortcuts(void); void setShortcuts(std::map<std::string, int> shortcut); std::string getHangup(void) { return _hangup; } diff --git a/tools/build-system/build-osc.sh b/tools/build-system/build-osc.sh index 8735ba83dfde2e019d8033e173f3676ac67cc4af..fac03deb08b764095b50f0f20b40d2034f4c5bf4 100755 --- a/tools/build-system/build-osc.sh +++ b/tools/build-system/build-osc.sh @@ -7,23 +7,21 @@ # Author: Julien Bonjean (julien@bonjean.info) # # Creation Date: 2009-11-02 -# Last Modified: +# Last Modified: 2010-05-27 17:39:58 -0400 ##################################################### ROOT_DIR=${HOME} OSC_REPOSITORY="${ROOT_DIR}/sflphone-osc/home:jbonjean:sflphone" -WORKING_DIR="${ROOT_DIR}/sflphone-build-repository/tools/build-system" -OSC_DIR="${WORKING_DIR}/osc" - LAUNCHPAD_PACKAGES=( "sflphone-client-gnome" "sflphone-common" ) #LAUNCHPAD_PACKAGES=( "sflphone-client-gnome" ) #LAUNCHPAD_PACKAGES=( "sflphone-common" ) REFERENCE_REPOSITORY="${ROOT_DIR}/sflphone-source-repository" +OSC_DIR="${REFERENCE_REPOSITORY}/tools/build-system/osc" -SOFTWARE_VERSION="0.9.7.rc2" +SOFTWARE_VERSION="0.9.8.3" VERSION_INDEX=1 diff --git a/tools/build-system/launch-build-machine-2.sh b/tools/build-system/launch-build-machine-2.sh index 12f8760e79c1de83f177606a64127b320fba516a..6ced3b75ee085b476231768865bf83d2c9b44293 100755 --- a/tools/build-system/launch-build-machine-2.sh +++ b/tools/build-system/launch-build-machine-2.sh @@ -7,7 +7,7 @@ # Author: Julien Bonjean (julien@bonjean.info) # # Creation Date: 2009-10-20 -# Last Modified: 2009-12-15 18:16:50 -0500 +# Last Modified: 2010-04-22 16:42:57 -0400 ##################################################### #set -x @@ -16,10 +16,12 @@ IS_RELEASE= VERSION_INDEX="1" +IS_KDE_CLIENT= DO_PUSH=1 DO_LOGGING=1 DO_UPLOAD=1 SNAPSHOT_TAG=`date +%Y%m%d` +TAG_NAME_PREFIX= LAUNCHPAD_PACKAGES=( "sflphone-client-gnome" "sflphone-common" ) @@ -37,6 +39,7 @@ do echo "Options :" echo " --skip-push" echo " --skip-upload" + echo " --kde-client" echo " --no-logging" echo " --release" echo " --version-index=[1,2,...]" @@ -46,6 +49,8 @@ do unset DO_PUSH;; --skip-upload) unset DO_UPLOAD;; + --kde-client) + IS_KDE_CLIENT=1;; --no-logging) unset DO_LOGGING;; --release) @@ -89,6 +94,10 @@ else echo "Snapshot mode" fi +if [ ${IS_KDE_CLIENT} ]; then + TAG_NAME_PREFIX="kde." +fi + ######################### # COMMON PART ######################### @@ -104,15 +113,26 @@ fi echo "Retrieve build info" # retrieve info we may need -CURRENT_RELEASE_TAG_NAME=`git tag -l "[0-9]\.[0-9]\.[0-9]\.*" | tail -n 1` -PREVIOUS_RELEASE_TAG_NAME=`git tag -l "[0-9]\.[0-9]\.[0-9]\.*" | tail -n 2 | sed -n '1p;1q'` +if [ ${IS_KDE_CLIENT} ]; then + TAG_NAME_PREFIX="kde." + LAUNCHPAD_PACKAGES=( "sflphone-client-kde" ) +fi +CURRENT_RELEASE_TAG_NAME=`git tag -l "${TAG_NAME_PREFIX}[0-9]\.[0-9]\.[0-9]\.*" | tail -n 1` +PREVIOUS_RELEASE_TAG_NAME=`git tag -l "${TAG_NAME_PREFIX}[0-9]\.[0-9]\.[0-9]\.*" | tail -n 2 | sed -n '1p;1q'` CURRENT_RELEASE_COMMIT_HASH=`git show --pretty=format:"%H" -s ${CURRENT_RELEASE_TAG_NAME} | tail -n 1` PREVIOUS_RELEASE_COMMIT_HASH=`git show --pretty=format:"%H" -s ${PREVIOUS_RELEASE_TAG_NAME} | tail -n 1` CURRENT_COMMIT=`git show --pretty=format:"%H" -s | tail -n 1` CURRENT_RELEASE_TYPE=${CURRENT_RELEASE_TAG_NAME##*.} PREVIOUS_RELEASE_TYPE=${PREVIOUS_RELEASE_TAG_NAME##*.} -CURRENT_RELEASE_VERSION=${CURRENT_RELEASE_TAG_NAME%*.*} -PREVIOUS_VERSION=${PREVIOUS_RELEASE_TAG_NAME%*.*} +if [ ${IS_KDE_CLIENT} ]; then + CURRENT_RELEASE_VERSION=${CURRENT_RELEASE_TAG_NAME%.*} + CURRENT_RELEASE_VERSION=${CURRENT_RELEASE_VERSION#*.} + PREVIOUS_VERSION=${PREVIOUS_RELEASE_TAG_NAME%.*} + PREVIOUS_VERSION=${PREVIOUS_VERSION#*.} +else + CURRENT_RELEASE_VERSION=${CURRENT_RELEASE_TAG_NAME%.*} + PREVIOUS_VERSION=${PREVIOUS_RELEASE_TAG_NAME%.*} +fi cd ${LAUNCHPAD_DIR} diff --git a/tools/build-system/launchpad/dput.conf b/tools/build-system/launchpad/dput.conf index ea85aa390ad912a626508ec49c3f2e0ec6e5d98d..8566a50799474d4c2c1b3251c63d00a75efca81c 100644 --- a/tools/build-system/launchpad/dput.conf +++ b/tools/build-system/launchpad/dput.conf @@ -12,6 +12,13 @@ incoming = ~savoirfairelinux/sflphone-testing/ubuntu/karmic login = anonymous allow_unsigned_uploads = 0 +[sflphone-lucid] +fqdn = ppa.launchpad.net +method = ftp +incoming = ~savoirfairelinux/sflphone-testing/ubuntu/lucid +login = anonymous +allow_unsigned_uploads = 0 + [sflphone-nightly-jaunty] fqdn = ppa.launchpad.net method = ftp diff --git a/tools/build-system/launchpad/mozilla-telify-sflphone/debian/changelog b/tools/build-system/launchpad/mozilla-telify-sflphone/debian/changelog index e368436b93aa5b42f1181e9c9e4022ec9e0f929f..23510a03d7a2e4ceae2c28fb88258277cb08db73 100644 --- a/tools/build-system/launchpad/mozilla-telify-sflphone/debian/changelog +++ b/tools/build-system/launchpad/mozilla-telify-sflphone/debian/changelog @@ -1,3 +1,10 @@ +mozilla-telify-sflphone (1.0) unstable; urgency=low + + [ Julien Bonjean ] + * Package update + + -- Julien Bonjean <julien.bonjean@savoirfairelinux.com> Fri, 21 Avr 2010 19:51:54 +0100 + mozilla-telify-sflphone (0.4.7.3) unstable; urgency=low [ Julien Bonjean ] diff --git a/tools/build-system/launchpad/mozilla-telify-sflphone/debian/files b/tools/build-system/launchpad/mozilla-telify-sflphone/debian/files index 8ebe49a9909755509943dd3161a8cb96e3acf7ec..320b727519610179c97214659e4e3be20f8cebc3 100644 --- a/tools/build-system/launchpad/mozilla-telify-sflphone/debian/files +++ b/tools/build-system/launchpad/mozilla-telify-sflphone/debian/files @@ -1 +1 @@ -mozilla-telify-sflphone_0.4.7.3_all.deb web optional +mozilla-telify-sflphone_1.0_all.deb web optional diff --git a/tools/build-system/launchpad/mozilla-telify-sflphone/debian/rules b/tools/build-system/launchpad/mozilla-telify-sflphone/debian/rules index 0e8b875eb41ef0f3b085984d5b6f7cdde67c6181..8522b9ee026d450490d0168c1db7a97a389fa2e2 100755 --- a/tools/build-system/launchpad/mozilla-telify-sflphone/debian/rules +++ b/tools/build-system/launchpad/mozilla-telify-sflphone/debian/rules @@ -3,7 +3,7 @@ # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 -VERSION="0.4.7.3" +VERSION="1.0" configure: configure-stamp configure-stamp: diff --git a/tools/build-system/launchpad/sflphone-client-kde/debian/control.jaunty b/tools/build-system/launchpad/sflphone-client-kde/debian/control.jaunty new file mode 100644 index 0000000000000000000000000000000000000000..a4e6a266195dad90c9132c41a8373ea5bf84ae16 --- /dev/null +++ b/tools/build-system/launchpad/sflphone-client-kde/debian/control.jaunty @@ -0,0 +1,20 @@ +Source: sflphone-client-kde +Maintainer: SavoirFaireLinux Inc <julien.bonjean@savoirfairelinux.com> +Section: kde +Priority: optional +Build-Depends: debhelper, cmake, kdepimlibs5-dev, libcommoncpp2-dev, libqt4-dev +Standards-Version: 3.7.3 + +Package: sflphone-client-kde +Priority: optional +Architecture: i386 +Depends: sflphone-common (>=${source:Version}), libcommoncpp2-1.6-0, kdepimlibs5, libqt4-dbus, libqt4-svg, libqtgui4 +Replaces: sflphone +Conflicts: sflphone +Homepage: http://www.sflphone.org +Description: KDE client for SFLphone + Provide a KDE client for SFLphone. + SFLphone is meant to be a robust enterprise-class desktop phone. + SFLphone is released under the GNU General Public License. + SFLphone is being developed by the global community, and maintained by + Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company. diff --git a/tools/build-system/launchpad/sflphone-client-kde/debian/control.karmic b/tools/build-system/launchpad/sflphone-client-kde/debian/control.karmic new file mode 100644 index 0000000000000000000000000000000000000000..a4e6a266195dad90c9132c41a8373ea5bf84ae16 --- /dev/null +++ b/tools/build-system/launchpad/sflphone-client-kde/debian/control.karmic @@ -0,0 +1,20 @@ +Source: sflphone-client-kde +Maintainer: SavoirFaireLinux Inc <julien.bonjean@savoirfairelinux.com> +Section: kde +Priority: optional +Build-Depends: debhelper, cmake, kdepimlibs5-dev, libcommoncpp2-dev, libqt4-dev +Standards-Version: 3.7.3 + +Package: sflphone-client-kde +Priority: optional +Architecture: i386 +Depends: sflphone-common (>=${source:Version}), libcommoncpp2-1.6-0, kdepimlibs5, libqt4-dbus, libqt4-svg, libqtgui4 +Replaces: sflphone +Conflicts: sflphone +Homepage: http://www.sflphone.org +Description: KDE client for SFLphone + Provide a KDE client for SFLphone. + SFLphone is meant to be a robust enterprise-class desktop phone. + SFLphone is released under the GNU General Public License. + SFLphone is being developed by the global community, and maintained by + Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company. diff --git a/tools/build-system/launchpad/sflphone-client-kde/debian/control.lucid b/tools/build-system/launchpad/sflphone-client-kde/debian/control.lucid new file mode 100644 index 0000000000000000000000000000000000000000..a4e6a266195dad90c9132c41a8373ea5bf84ae16 --- /dev/null +++ b/tools/build-system/launchpad/sflphone-client-kde/debian/control.lucid @@ -0,0 +1,20 @@ +Source: sflphone-client-kde +Maintainer: SavoirFaireLinux Inc <julien.bonjean@savoirfairelinux.com> +Section: kde +Priority: optional +Build-Depends: debhelper, cmake, kdepimlibs5-dev, libcommoncpp2-dev, libqt4-dev +Standards-Version: 3.7.3 + +Package: sflphone-client-kde +Priority: optional +Architecture: i386 +Depends: sflphone-common (>=${source:Version}), libcommoncpp2-1.6-0, kdepimlibs5, libqt4-dbus, libqt4-svg, libqtgui4 +Replaces: sflphone +Conflicts: sflphone +Homepage: http://www.sflphone.org +Description: KDE client for SFLphone + Provide a KDE client for SFLphone. + SFLphone is meant to be a robust enterprise-class desktop phone. + SFLphone is released under the GNU General Public License. + SFLphone is being developed by the global community, and maintained by + Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company. diff --git a/tools/build-system/osc/sflphone-client-gnome.spec b/tools/build-system/osc/sflphone-client-gnome.spec index dba4cd8ebbdf090931c142a83b961ed2299b0805..af37d9b0ccc98e2778aa777a0a1212dc94c8d150 100644 --- a/tools/build-system/osc/sflphone-client-gnome.spec +++ b/tools/build-system/osc/sflphone-client-gnome.spec @@ -24,6 +24,7 @@ BuildRoot: %{_tmppath}/%{name} Source0: sflphone-client-gnome-%{version}.tar.gz %if %{defined suse_version} +BuildRequires: scrollkeeper BuildRequires: update-desktop-files BuildRequires: liblog4c-devel BuildRequires: dbus-1-glib-devel @@ -32,10 +33,12 @@ BuildRequires: libgnomeui-devel %endif %if %{defined fedora_version} +BuildRequires: rarian-compat BuildRequires: log4c-devel BuildRequires: dbus-glib-devel BuildRequires: gnome-doc-utils BuildRequires: libgnomeui-devel +BuildRequires: gettext # fix libproxy-pac expansion error BuildRequires: libproxy-webkit # fix PolicyKit-authentication-agent expansion error @@ -97,6 +100,7 @@ Authors: %build +export SUSE_ASNEEDED=0 # fix opensuse linking issue (Since 11.2 uses default --as-needed for linking, the order of libraries is important) ./autogen.sh ./configure --prefix=%{_prefix} make -j diff --git a/tools/build-system/osc/sflphone-client-kde.spec b/tools/build-system/osc/sflphone-client-kde.spec index a6d78bea5fbb128152a9bb67b2be96f7aac7416d..c3a9c2de2a4c138bf8526f8d0f460d2634694e00 100644 --- a/tools/build-system/osc/sflphone-client-kde.spec +++ b/tools/build-system/osc/sflphone-client-kde.spec @@ -13,8 +13,8 @@ Name: sflphone-client-kde License: GNU General Public License (GPL) Group: Productivity/Networking/System Summary: KDE client for SFLphone -Version: 0.9.6 -Release: opensuse +Version: VERSION +Release: VERSION_INDEX%{?dist} URL: http://www.sflphone.org/ Vendor: Savoir-faire Linux Packager: Julien Bonjean <julien.bonjean@savoirfairelinux.com> diff --git a/tools/build-system/osc/sflphone-common.spec b/tools/build-system/osc/sflphone-common.spec index d44f94103e8e4e61fefc2be0a03d0e2b4a9f58c4..387fa4c52524584d9e040ac0536c12bca1354699 100644 --- a/tools/build-system/osc/sflphone-common.spec +++ b/tools/build-system/osc/sflphone-common.spec @@ -13,8 +13,8 @@ Name: sflphone-common License: GNU General Public License (GPL) Group: System Environment/Daemons Summary: SIP and IAX2 compatible softphone - Core -Version: VERSION -Release: VERSION_INDEX%{?dist} +Version: VERSION +Release: VERSION_INDEX%{?dist} URL: http://www.sflphone.org/ Vendor: Savoir-faire Linux Packager: Julien Bonjean <julien.bonjean@savoirfairelinux.com> @@ -24,13 +24,10 @@ Source0: sflphone-common-%{version}.tar.gz BuildRequires: speex-devel BuildRequires: gcc-c++ BuildRequires: expat -BuildRequires: alsa-devel -BuildRequires: dbus-1-devel BuildRequires: libzrtpcpp-devel BuildRequires: commoncpp2-devel BuildRequires: libsamplerate-devel - %if %{defined suse_version} BuildRequires: libpulse-devel BuildRequires: libccrtp-devel @@ -40,6 +37,9 @@ BuildRequires: libcppunit-devel BuildRequires: libuuid-devel BuildRequires: libopenssl-devel BuildRequires: libexpat0 +BuildRequires: alsa-devel +BuildRequires: dbus-1-devel +BuildRequires: pcre-devel %endif %if %{defined fedora_version} @@ -49,8 +49,11 @@ BuildRequires: openssl BuildRequires: expat-devel BuildRequires: ccrtp-devel BuildRequires: cppunit-devel -BuildRequires: uuid-devel +BuildRequires: libuuid-devel BuildRequires: gsm-devel +BuildRequires: alsa-lib-devel +BuildRequires: dbus-devel +BuildRequires: pcre-devel %endif Requires: libsamplerate @@ -96,6 +99,7 @@ Authors: %setup -q %build +export SUSE_ASNEEDED=0 # fix opensuse linking issue (Since 11.2 uses default --as-needed for linking, the order of libraries is important) cd libs/pjproject ./autogen.sh ./configure --prefix=%{_prefix} --libdir=%{_libdir} @@ -125,7 +129,6 @@ make clean %dir %{_libdir}/sflphone/plugins %dir %{_prefix}/share/sflphone %dir %{_prefix}/share/sflphone/ringtones -%{_libdir}/sflphone/libdbus-* %{_libdir}/sflphone/codecs/* %{_libdir}/sflphone/plugins/* %{_prefix}/share/dbus-1/services/org.sflphone.* diff --git a/tools/mozilla-telify-sflphone/telify-0.4.7.3-fx.xpi b/tools/mozilla-telify-sflphone/telify-1.0-fx.xpi similarity index 83% rename from tools/mozilla-telify-sflphone/telify-0.4.7.3-fx.xpi rename to tools/mozilla-telify-sflphone/telify-1.0-fx.xpi index ec1eff1fe541400731f1b2e5b6e33a30c8cd9a4a..8df2b63f5b8622d44eac232ed72b6d7699e54f23 100644 Binary files a/tools/mozilla-telify-sflphone/telify-0.4.7.3-fx.xpi and b/tools/mozilla-telify-sflphone/telify-1.0-fx.xpi differ