Commit 8762e136 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

refactor some code out of sflphone_const.h

parent 8855870a
...@@ -32,7 +32,7 @@ sflphone_client_gnome_SOURCES = \ ...@@ -32,7 +32,7 @@ sflphone_client_gnome_SOURCES = \
noinst_HEADERS = actions.h sflnotify.h mainwindow.h dialpad.h codeclist.h \ noinst_HEADERS = actions.h sflnotify.h mainwindow.h dialpad.h codeclist.h \
reqaccount.h sflphone_const.h uimanager.h \ reqaccount.h sflphone_const.h uimanager.h \
accountlist.h sliders.h statusicon.h callable_obj.h conference_obj.h \ accountlist.h sliders.h statusicon.h callable_obj.h conference_obj.h \
shortcuts.h eel-gconf-extensions.h logger.h imwindow.h shortcuts.h eel-gconf-extensions.h logger.h imwindow.h unused.h
sflphone_client_gnome_LDADD = $(DBUSGLIB_LIBS) $(LIBNOTIFY_LIBS) $(NOTIFY_LIBS) $(SFLPHONEGTK_LIBS) $(X11_LIBS) \ sflphone_client_gnome_LDADD = $(DBUSGLIB_LIBS) $(LIBNOTIFY_LIBS) $(NOTIFY_LIBS) $(SFLPHONEGTK_LIBS) $(X11_LIBS) \
$(GTK_LIBS) $(GLIB_LIBS) $(WEBKIT_LIBS) $(LIBGNOMEUI_LIBS) $(GNOMEDOCUTILS_LIBS) $(LD_LIBS) $(GTK_LIBS) $(GLIB_LIBS) $(WEBKIT_LIBS) $(LIBGNOMEUI_LIBS) $(GNOMEDOCUTILS_LIBS) $(LD_LIBS)
......
...@@ -29,8 +29,9 @@ ...@@ -29,8 +29,9 @@
* as that of the covered work. * as that of the covered work.
*/ */
#include <accountlist.h> #include "accountlist.h"
#include <actions.h> #include "actions.h"
#include "unused.h"
static GQueue * accountQueue; static GQueue * accountQueue;
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include "audioconf.h" #include "audioconf.h"
#include "dbus/dbus.h" #include "dbus/dbus.h"
#include "utils.h" #include "utils.h"
#include "unused.h"
/** /**
* TODO: tidy this up * TODO: tidy this up
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "actions.h" #include "actions.h"
#include "mainwindow.h" #include "mainwindow.h"
#include "utils.h" #include "utils.h"
#include "unused.h"
#include "logger.h" #include "logger.h"
#include <string.h> #include <string.h>
#include <libgnome/gnome-help.h> #include <libgnome/gnome-help.h>
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "addressbook-config.h" #include "addressbook-config.h"
#include "dbus.h" #include "dbus.h"
#include "unused.h"
#include "logger.h" #include "logger.h"
#include "searchbar.h" #include "searchbar.h"
#include "contacts/addrbookfactory.h" #include "contacts/addrbookfactory.h"
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <string.h> #include <string.h>
#include "unused.h"
#include "assistant.h" #include "assistant.h"
#include "logger.h" #include "logger.h"
#include "dbus.h" #include "dbus.h"
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "dbus/dbus.h" #include "dbus/dbus.h"
#include "uimanager.h" #include "uimanager.h"
#include "mainwindow.h" #include "mainwindow.h"
#include "unused.h"
/* FIXME: these should be in a struct rather than at file scope */ /* FIXME: these should be in a struct rather than at file scope */
static GtkListStore *pluginlist; static GtkListStore *pluginlist;
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "hooks-config.h" #include "hooks-config.h"
#include "audioconf.h" #include "audioconf.h"
#include "uimanager.h" #include "uimanager.h"
#include "unused.h"
#include "mainwindow.h" #include "mainwindow.h"
/** /**
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "shortcuts-config.h" #include "shortcuts-config.h"
#include "shortcuts.h" #include "shortcuts.h"
#include "unused.h"
#include "logger.h" #include "logger.h"
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#include "calllist.h" #include "calllist.h"
#include "calltab.h" #include "calltab.h"
#include "calltree.h" #include "calltree.h"
#include "unused.h"
#include "logger.h" #include "logger.h"
#include "contacts/searchbar.h"
#include "eel-gconf-extensions.h" #include "eel-gconf-extensions.h"
static static
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <glib/gprintf.h> #include <glib/gprintf.h>
#include "eel-gconf-extensions.h" #include "eel-gconf-extensions.h"
#include "unused.h"
#include "dbus.h" #include "dbus.h"
#include "calltab.h" #include "calltab.h"
#include "logger.h" #include "logger.h"
......
...@@ -28,10 +28,11 @@ ...@@ -28,10 +28,11 @@
* as that of the covered work. * as that of the covered work.
*/ */
#include <history.h>
#include <string.h> #include <string.h>
#include <searchbar.h> #include "history.h"
#include <calltab.h> #include "searchbar.h"
#include "calltab.h"
#include "unused.h"
static GtkTreeModel *history_filter; static GtkTreeModel *history_filter;
static GtkEntry *history_searchbar_widget; static GtkEntry *history_searchbar_widget;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "calltab.h" #include "calltab.h"
#include "dbus.h" #include "dbus.h"
#include "logger.h" #include "logger.h"
#include "unused.h"
#include "config/addressbook-config.h" #include "config/addressbook-config.h"
#include "contacts/addressbook.h" #include "contacts/addressbook.h"
#include "contacts/addrbookfactory.h" #include "contacts/addrbookfactory.h"
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "dbus.h" #include "dbus.h"
#include "actions.h" #include "actions.h"
#include "unused.h"
#include "widget/imwidget.h" #include "widget/imwidget.h"
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "dialpad.h" #include "dialpad.h"
#include "actions.h" #include "actions.h"
#include "calltab.h" #include "calltab.h"
#include "unused.h"
/** /**
* button pressed event * button pressed event
......
...@@ -32,6 +32,28 @@ ...@@ -32,6 +32,28 @@
#ifdef __cplusplus #ifdef __cplusplus
BEGIN_EXTERN_C BEGIN_EXTERN_C
#endif #endif
/**
* Gconf
*/
#define CONF_PREFIX "/apps/sflphone-client-gnome"
#define CONF_MAIN_WINDOW_WIDTH CONF_PREFIX "/state/window_width"
#define CONF_MAIN_WINDOW_HEIGHT CONF_PREFIX "/state/window_height"
#define CONF_MAIN_WINDOW_POSITION_X CONF_PREFIX "/state/window_position_x"
#define CONF_MAIN_WINDOW_POSITION_Y CONF_PREFIX "/state/window_position_y"
#define CONF_IM_WINDOW_WIDTH CONF_PREFIX "/state/im_width"
#define CONF_IM_WINDOW_HEIGHT CONF_PREFIX "/state/im_height"
#define CONF_IM_WINDOW_POSITION_X CONF_PREFIX "/state/im_position_x"
#define CONF_IM_WINDOW_POSITION_Y CONF_PREFIX "/state/im_position_y"
/** Show/Hide the dialpad */
#define CONF_SHOW_DIALPAD CONF_PREFIX "/state/dialpad"
#define SHOW_VOLUME_CONTROLS CONF_PREFIX "/state/volume_controls"
#define SHOW_STATUSICON CONF_PREFIX "/state/statusicon"
#define NOTIFY_ALL CONF_PREFIX "/state/notify_all"
#define START_HIDDEN CONF_PREFIX "/state/start_hidden"
#define POPUP_ON_CALL CONF_PREFIX "/state/popup"
#define HISTORY_ENABLED CONF_PREFIX "/state/history"
#define INSTANT_MESSAGING_ENABLED CONF_PREFIX "/state/instant_messaging"
#define EEL_GCONF_UNDEFINED_CONNECTION 0 #define EEL_GCONF_UNDEFINED_CONNECTION 0
......
...@@ -32,11 +32,12 @@ ...@@ -32,11 +32,12 @@
#include "config.h" #include "config.h"
#include "eel-gconf-extensions.h" #include "eel-gconf-extensions.h"
#include "sflphone_const.h"
#include "logger.h" #include "logger.h"
#include "imwindow.h" #include "imwindow.h"
#include "unused.h"
#include "contacts/calltab.h" #include "contacts/calltab.h"
#include "contacts/calltab.h" #include "contacts/calltab.h"
#include "sflphone_const.h"
#include <sys/stat.h> #include <sys/stat.h>
/** Local variables */ /** Local variables */
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "widget/gtkscrollbook.h" #include "widget/gtkscrollbook.h"
#include "widget/minidialog.h" #include "widget/minidialog.h"
#include "uimanager.h" #include "uimanager.h"
#include "unused.h"
#include "config/audioconf.h" #include "config/audioconf.h"
#include <sys/stat.h> #include <sys/stat.h>
......
...@@ -55,11 +55,6 @@ ...@@ -55,11 +55,6 @@
#define IP2IP "IP2IP" #define IP2IP "IP2IP"
/** Warnings unused variables **/
#define UNUSED_VAR(var) (void*)var
#define UNUSED __attribute__((__unused__))
#define IP2IP_PROFILE "IP2IP" #define IP2IP_PROFILE "IP2IP"
#define ACCOUNT_ID "Account.id" #define ACCOUNT_ID "Account.id"
...@@ -170,26 +165,4 @@ ...@@ -170,26 +165,4 @@
/** Desktop notifications - Time before to close the notification*/ /** Desktop notifications - Time before to close the notification*/
#define __TIMEOUT_TIME 18000 // 30 secondes #define __TIMEOUT_TIME 18000 // 30 secondes
/**
* Gconf
*/
#define CONF_PREFIX "/apps/sflphone-client-gnome"
#define CONF_MAIN_WINDOW_WIDTH CONF_PREFIX "/state/window_width"
#define CONF_MAIN_WINDOW_HEIGHT CONF_PREFIX "/state/window_height"
#define CONF_MAIN_WINDOW_POSITION_X CONF_PREFIX "/state/window_position_x"
#define CONF_MAIN_WINDOW_POSITION_Y CONF_PREFIX "/state/window_position_y"
#define CONF_IM_WINDOW_WIDTH CONF_PREFIX "/state/im_width"
#define CONF_IM_WINDOW_HEIGHT CONF_PREFIX "/state/im_height"
#define CONF_IM_WINDOW_POSITION_X CONF_PREFIX "/state/im_position_x"
#define CONF_IM_WINDOW_POSITION_Y CONF_PREFIX "/state/im_position_y"
/** Show/Hide the dialpad */
#define CONF_SHOW_DIALPAD CONF_PREFIX "/state/dialpad"
#define SHOW_VOLUME_CONTROLS CONF_PREFIX "/state/volume_controls"
#define SHOW_STATUSICON CONF_PREFIX "/state/statusicon"
#define NOTIFY_ALL CONF_PREFIX "/state/notify_all"
#define START_HIDDEN CONF_PREFIX "/state/start_hidden"
#define POPUP_ON_CALL CONF_PREFIX "/state/popup"
#define HISTORY_ENABLED CONF_PREFIX "/state/history"
#define INSTANT_MESSAGING_ENABLED CONF_PREFIX "/state/instant_messaging"
#endif #endif
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "sflphone_const.h" #include "sflphone_const.h"
#include "dbus.h" #include "dbus.h"
#include "actions.h" #include "actions.h"
#include "unused.h"
static void static void
ungrab_key(guint key, GdkModifierType mask, const GdkWindow *root); ungrab_key(guint key, GdkModifierType mask, const GdkWindow *root);
......
Supports Markdown
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