forked from mirrors/linphone-iphone
Restore option to enable/disable the assistant.
This commit is contained in:
parent
24d86a55cf
commit
a7baa4bc7a
11 changed files with 66 additions and 14 deletions
|
|
@ -51,6 +51,7 @@ option(ENABLE_TUTORIALS "Enable compilation of tutorials." YES)
|
|||
option(ENABLE_UNIT_TESTS "Enable compilation of unit tests." YES)
|
||||
option(ENABLE_UPNP "Build with uPnP support." YES)
|
||||
option(ENABLE_VIDEO "Build with video support." YES)
|
||||
cmake_dependent_option(ENABLE_ASSISTANT "Turn on assistant compiling." YES "ENABLE_GTK_UI" NO)
|
||||
option(ENABLE_DEBUG_LOGS "Turn on or off debug level logs." NO)
|
||||
|
||||
|
||||
|
|
@ -120,6 +121,20 @@ if(ENABLE_NOTIFY)
|
|||
set(ENABLE_NOTIFY OFF CACHE BOOL "Enable libnotify support." FORCE)
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_GTK_UI)
|
||||
if(WIN32)
|
||||
set(GTK2_ADDITIONAL_SUFFIXES "../lib/glib-2.0/include" "../lib/gtk-2.0/include")
|
||||
endif()
|
||||
find_package(GTK2 2.18 REQUIRED gtk)
|
||||
find_package(Intl REQUIRED)
|
||||
if(ENABLE_ASSISTANT AND GTK2_VERSION VERSION_LESS 2.22)
|
||||
message(WARNING "You need at least GTK 2.22 to enable the assistant")
|
||||
set(ENABLE_ASSISTANT OFF CACHE BOOL "Turn on assistant compiling." FORCE)
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_ASSISTANT)
|
||||
set(BUILD_WIZARD 1)
|
||||
endif()
|
||||
find_package(Gettext)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@
|
|||
/* Define if tools enabled */
|
||||
/* #undef BUILD_TOOLS */
|
||||
|
||||
/* Define if wizard enabled */
|
||||
/* #undef BUILD_WIZARD */
|
||||
|
||||
/* Tells whether localisation is possible */
|
||||
/* #undef ENABLE_NLS */
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#define PACKAGE_DATA_DIR "${PACKAGE_DATA_DIR}"
|
||||
#define PACKAGE_SOUND_DIR "${PACKAGE_SOUND_DIR}"
|
||||
|
||||
#cmakedefine BUILD_WIZARD
|
||||
#cmakedefine HAVE_NOTIFY4
|
||||
#cmakedefine HAVE_ZLIB 1
|
||||
#cmakedefine HAVE_CU_GET_SUITE 1
|
||||
|
|
|
|||
26
configure.ac
26
configure.ac
|
|
@ -729,6 +729,31 @@ if test "$has_sighandler_t" = "yes" ; then
|
|||
AC_DEFINE( HAVE_SIGHANDLER_T, 1, [Define if sighandler_t available] )
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(assistant,
|
||||
[AS_HELP_STRING([--enable-assistant], [Turn on assistant compiling])],
|
||||
[case "${enableval}" in
|
||||
yes) build_wizard=true ;;
|
||||
no) build_wizard=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-assistant) ;;
|
||||
esac],
|
||||
[build_wizard=check]
|
||||
)
|
||||
|
||||
if test "$build_wizard" != "false" ; then
|
||||
PKG_CHECK_MODULES(LIBGTKWIZARD, [gtk+-2.0 >= 2.22.0],[],
|
||||
[if test "$build_wizard" = "true" ; then
|
||||
AC_MSG_ERROR([gtk+-2.0 < 2.22.0, assistant cannot be compiled.])
|
||||
else
|
||||
build_wizard=false
|
||||
fi]
|
||||
)
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_WIZARD, test x$build_wizard != xfalse)
|
||||
if test "$build_wizard" != "false" ; then
|
||||
build_wizard=true
|
||||
AC_DEFINE(BUILD_WIZARD, 1, [Define if wizard enabled] )
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(libudev.h)
|
||||
AC_CHECK_LIB(udev,udev_new)
|
||||
|
||||
|
|
@ -1037,6 +1062,7 @@ echo "Linphone build configuration ended."
|
|||
echo "Summary of build options:"
|
||||
printf "* %-30s %s\n" "Video support" $video
|
||||
printf "* %-30s %s\n" "GTK interface" $gtk_ui
|
||||
printf "* %-30s %s\n" "Account assistant" $build_wizard
|
||||
printf "* %-30s %s\n" "Console interface" $console_ui
|
||||
printf "* %-30s %s\n" "Tools" $build_tools
|
||||
printf "* %-30s %s\n" "Message storage" $enable_msg_storage
|
||||
|
|
|
|||
|
|
@ -181,6 +181,10 @@ COMMON_CFLAGS=\
|
|||
$(SASL_CFLAGS) \
|
||||
$(ZLIB_CFLAGS)
|
||||
|
||||
if BUILD_WIZARD
|
||||
COMMON_CFLAGS+= -DBUILD_WIZARD
|
||||
endif
|
||||
|
||||
COMMON_CFLAGS+= -DUSE_BELLESIP
|
||||
|
||||
AM_CFLAGS=$(COMMON_CFLAGS) $(STRICT_OPTIONS_CC)
|
||||
|
|
|
|||
|
|
@ -20,12 +20,6 @@
|
|||
#
|
||||
############################################################################
|
||||
|
||||
if(WIN32)
|
||||
set(GTK2_ADDITIONAL_SUFFIXES "../lib/glib-2.0/include" "../lib/gtk-2.0/include")
|
||||
endif()
|
||||
find_package(GTK2 2.18 REQUIRED gtk)
|
||||
find_package(Intl REQUIRED)
|
||||
|
||||
set(UI_FILES
|
||||
about.ui
|
||||
audio_assistant.ui
|
||||
|
|
@ -63,7 +57,6 @@ set(SOURCE_FILES
|
|||
loginframe.c
|
||||
main.c
|
||||
propertybox.c
|
||||
setupwizard.c
|
||||
singleinstance.c
|
||||
status_icon.c
|
||||
status_notifier.c
|
||||
|
|
@ -72,6 +65,9 @@ set(SOURCE_FILES
|
|||
utils.c
|
||||
videowindow.c
|
||||
)
|
||||
if(ENABLE_ASSISTANT)
|
||||
list(APPEND SOURCE_FILES setupwizard.c)
|
||||
endif()
|
||||
if(WIN32)
|
||||
list(APPEND SOURCE_FILES linphone.rc)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -53,12 +53,16 @@ linphone_SOURCES= \
|
|||
singleinstance.c \
|
||||
conference.c \
|
||||
config-fetching.c \
|
||||
setupwizard.c \
|
||||
audio_assistant.c \
|
||||
videowindow.c \
|
||||
status_icon.c status_icon.h \
|
||||
linphone.h
|
||||
|
||||
if BUILD_WIZARD
|
||||
linphone_SOURCES+= \
|
||||
setupwizard.c
|
||||
endif
|
||||
|
||||
if BUILD_STATUS_NOTIFIER
|
||||
linphone_SOURCES+= \
|
||||
status_notifier.c \
|
||||
|
|
|
|||
|
|
@ -1979,7 +1979,9 @@ static void linphone_gtk_check_soundcards(){
|
|||
static void linphone_gtk_quit_core(void){
|
||||
linphone_gtk_unmonitor_usb();
|
||||
g_source_remove_by_user_data(linphone_gtk_get_core());
|
||||
#ifdef BUILD_WIZARD
|
||||
linphone_gtk_close_assistant();
|
||||
#endif
|
||||
linphone_gtk_set_ldap(NULL);
|
||||
linphone_gtk_destroy_log_window();
|
||||
linphone_core_destroy(the_core);
|
||||
|
|
@ -2019,10 +2021,12 @@ static gboolean on_block_termination(void){
|
|||
static void linphone_gtk_init_ui(void){
|
||||
linphone_gtk_init_main_window();
|
||||
|
||||
#ifdef BUILD_WIZARD
|
||||
// Veryfing if at least one sip account is configured. If not, show wizard
|
||||
if (linphone_core_get_proxy_config_list(linphone_gtk_get_core()) == NULL) {
|
||||
linphone_gtk_show_assistant(the_ui);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(run_audio_assistant){
|
||||
linphone_gtk_show_audio_assistant();
|
||||
|
|
|
|||
|
|
@ -923,7 +923,6 @@
|
|||
<child>
|
||||
<object class="GtkImageMenuItem" id="assistant_item">
|
||||
<property name="label" translatable="yes">Account assistant</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="image">connect_image</property>
|
||||
<property name="use_stock">False</property>
|
||||
|
|
|
|||
|
|
@ -1584,6 +1584,11 @@ void linphone_gtk_show_parameters(void){
|
|||
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"username")),linphone_address_get_username(contact));
|
||||
linphone_address_destroy(contact);
|
||||
}
|
||||
#ifdef BUILD_WIZARD
|
||||
gtk_widget_show(linphone_gtk_get_widget(pb,"wizard"));
|
||||
#else
|
||||
gtk_widget_hide(linphone_gtk_get_widget(pb,"wizard"));
|
||||
#endif
|
||||
linphone_gtk_show_sip_accounts(pb);
|
||||
/* CODECS CONFIG */
|
||||
linphone_gtk_init_codec_list(GTK_TREE_VIEW(codec_list));
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@
|
|||
#
|
||||
############################################################################
|
||||
|
||||
if(WIN32)
|
||||
set(GTK2_ADDITIONAL_SUFFIXES "../lib/glib-2.0/include" "../lib/gtk-2.0/include")
|
||||
endif()
|
||||
find_package(GTK2 2.18 COMPONENTS gtk)
|
||||
|
||||
set(SOURCE_FILES
|
||||
common/bc_tester_utils.c
|
||||
accountmanager.c
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue