From 16a577f93f780e92bdfe6c18eab8910c779fc261 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Tue, 13 Aug 2013 10:30:33 +0200 Subject: [PATCH] Add config parameter (still uses main linphonerc for LANG). --- gtk/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gtk/main.c b/gtk/main.c index b7505dd87..7b0bbe9b1 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -82,6 +82,7 @@ static gchar *workingdir=NULL; static char *progpath=NULL; gchar *linphone_logfile=NULL; static gboolean workaround_gtk_entry_chinese_bug=FALSE; +static gchar *custom_config_file=NULL; static GOptionEntry linphone_options[]={ { @@ -133,6 +134,13 @@ static GOptionEntry linphone_options[]={ .arg_data = (gpointer) & workingdir, .description = N_("Specifiy a working directory (should be the base of the installation, eg: c:\\Program Files\\Linphone)") }, + { + .long_name = "config", + .short_name = '\0', + .arg = G_OPTION_ARG_STRING, + .arg_data = (gpointer) &custom_config_file, + .description = N_("Configuration file") + }, {0} }; @@ -1925,6 +1933,8 @@ int main(int argc, char *argv[]){ gdk_threads_leave(); return -1; } + if (config_file) free(config_file); + config_file=linphone_gtk_get_config_file(custom_config_file); settings=gtk_settings_get_default(); g_type_class_unref (g_type_class_ref (GTK_TYPE_IMAGE_MENU_ITEM));