aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--client/src/main.vala12
-rw-r--r--cmake/UseVala.cmake176
-rwxr-xr-xconfigure18
-rw-r--r--gpgme-vala/CMakeLists.txt2
-rw-r--r--libdino/CMakeLists.txt (renamed from client/CMakeLists.txt)45
-rw-r--r--libdino/data/add_conversation/add_contact_dialog.ui (renamed from client/data/add_conversation/add_contact_dialog.ui)0
-rw-r--r--libdino/data/add_conversation/add_groupchat_dialog.ui (renamed from client/data/add_conversation/add_groupchat_dialog.ui)0
-rw-r--r--libdino/data/add_conversation/conference_details_fragment.ui (renamed from client/data/add_conversation/conference_details_fragment.ui)0
-rw-r--r--libdino/data/add_conversation/list_row.ui (renamed from client/data/add_conversation/list_row.ui)0
-rw-r--r--libdino/data/add_conversation/select_jid_fragment.ui (renamed from client/data/add_conversation/select_jid_fragment.ui)0
-rw-r--r--libdino/data/chat_input.ui (renamed from client/data/chat_input.ui)0
-rw-r--r--libdino/data/conversation_list_titlebar.ui (renamed from client/data/conversation_list_titlebar.ui)0
-rw-r--r--libdino/data/conversation_selector/chat_row_tooltip.ui (renamed from client/data/conversation_selector/chat_row_tooltip.ui)0
-rw-r--r--libdino/data/conversation_selector/conversation_row.ui (renamed from client/data/conversation_selector/conversation_row.ui)0
-rw-r--r--libdino/data/conversation_selector/view.ui (renamed from client/data/conversation_selector/view.ui)0
-rw-r--r--libdino/data/conversation_summary/message_item.ui (renamed from client/data/conversation_summary/message_item.ui)0
-rw-r--r--libdino/data/conversation_summary/view.ui (renamed from client/data/conversation_summary/view.ui)0
-rw-r--r--libdino/data/conversation_titlebar.ui (renamed from client/data/conversation_titlebar.ui)0
-rw-r--r--libdino/data/gschemas.compiled (renamed from client/data/gschemas.compiled)bin316 -> 316 bytes
-rw-r--r--libdino/data/img/double_tick.svg (renamed from client/data/img/double_tick.svg)0
-rw-r--r--libdino/data/img/send.svg (renamed from client/data/img/send.svg)0
-rw-r--r--libdino/data/img/status_away.svg (renamed from client/data/img/status_away.svg)0
-rw-r--r--libdino/data/img/status_chat.svg (renamed from client/data/img/status_chat.svg)0
-rw-r--r--libdino/data/img/status_dnd.svg (renamed from client/data/img/status_dnd.svg)0
-rw-r--r--libdino/data/img/status_online.svg (renamed from client/data/img/status_online.svg)0
-rw-r--r--libdino/data/img/tick.svg (renamed from client/data/img/tick.svg)0
-rw-r--r--libdino/data/manage_accounts/account_row.ui (renamed from client/data/manage_accounts/account_row.ui)0
-rw-r--r--libdino/data/manage_accounts/add_account_dialog.ui (renamed from client/data/manage_accounts/add_account_dialog.ui)0
-rw-r--r--libdino/data/manage_accounts/dialog.ui (renamed from client/data/manage_accounts/dialog.ui)0
-rw-r--r--libdino/data/menu_add.ui (renamed from client/data/menu_add.ui)0
-rw-r--r--libdino/data/menu_app.ui (renamed from client/data/menu_app.ui)0
-rw-r--r--libdino/data/menu_conversation.ui (renamed from client/data/menu_conversation.ui)0
-rw-r--r--libdino/data/menu_encryption.ui (renamed from client/data/menu_encryption.ui)0
-rw-r--r--libdino/data/occupant_list.ui (renamed from client/data/occupant_list.ui)0
-rw-r--r--libdino/data/occupant_list_item.ui (renamed from client/data/occupant_list_item.ui)0
-rw-r--r--libdino/data/settings.gschema.xml (renamed from client/data/settings.gschema.xml)0
-rw-r--r--libdino/data/settings_dialog.ui (renamed from client/data/settings_dialog.ui)0
-rw-r--r--libdino/data/style.css (renamed from client/data/style.css)0
-rw-r--r--libdino/data/unified_window.ui (renamed from client/data/unified_window.ui)0
-rw-r--r--libdino/src/dbus/login1.vala (renamed from client/src/dbus/login1.vala)0
-rw-r--r--libdino/src/dbus/networkmanager.vala (renamed from client/src/dbus/networkmanager.vala)0
-rw-r--r--libdino/src/dbus/upower.vala (renamed from client/src/dbus/upower.vala)0
-rw-r--r--libdino/src/entity/account.vala (renamed from client/src/entity/account.vala)0
-rw-r--r--libdino/src/entity/conversation.vala (renamed from client/src/entity/conversation.vala)0
-rw-r--r--libdino/src/entity/jid.vala (renamed from client/src/entity/jid.vala)0
-rw-r--r--libdino/src/entity/message.vala (renamed from client/src/entity/message.vala)0
-rw-r--r--libdino/src/plugin.vala64
-rw-r--r--libdino/src/service/avatar_manager.vala (renamed from client/src/service/avatar_manager.vala)0
-rw-r--r--libdino/src/service/avatar_storage.vala (renamed from client/src/service/avatar_storage.vala)0
-rw-r--r--libdino/src/service/chat_interaction.vala (renamed from client/src/service/chat_interaction.vala)0
-rw-r--r--libdino/src/service/connection_manager.vala (renamed from client/src/service/connection_manager.vala)0
-rw-r--r--libdino/src/service/conversation_manager.vala (renamed from client/src/service/conversation_manager.vala)0
-rw-r--r--libdino/src/service/counterpart_interaction_manager.vala (renamed from client/src/service/counterpart_interaction_manager.vala)0
-rw-r--r--libdino/src/service/database.vala (renamed from client/src/service/database.vala)0
-rw-r--r--libdino/src/service/entity_capabilities_storage.vala (renamed from client/src/service/entity_capabilities_storage.vala)0
-rw-r--r--libdino/src/service/message_manager.vala (renamed from client/src/service/message_manager.vala)0
-rw-r--r--libdino/src/service/module_manager.vala (renamed from client/src/service/module_manager.vala)0
-rw-r--r--libdino/src/service/muc_manager.vala (renamed from client/src/service/muc_manager.vala)0
-rw-r--r--libdino/src/service/pgp_manager.vala (renamed from client/src/service/pgp_manager.vala)0
-rw-r--r--libdino/src/service/presence_manager.vala (renamed from client/src/service/presence_manager.vala)0
-rw-r--r--libdino/src/service/roster_manager.vala (renamed from client/src/service/roster_manager.vala)0
-rw-r--r--libdino/src/service/stream_interactor.vala (renamed from client/src/service/stream_interactor.vala)0
-rw-r--r--libdino/src/settings.vala (renamed from client/src/settings.vala)0
-rw-r--r--libdino/src/ui/add_conversation/chat/add_contact_dialog.vala (renamed from client/src/ui/add_conversation/chat/add_contact_dialog.vala)0
-rw-r--r--libdino/src/ui/add_conversation/chat/dialog.vala (renamed from client/src/ui/add_conversation/chat/dialog.vala)0
-rw-r--r--libdino/src/ui/add_conversation/chat/roster_list.vala (renamed from client/src/ui/add_conversation/chat/roster_list.vala)0
-rw-r--r--libdino/src/ui/add_conversation/conference/add_groupchat_dialog.vala (renamed from client/src/ui/add_conversation/conference/add_groupchat_dialog.vala)0
-rw-r--r--libdino/src/ui/add_conversation/conference/conference_details_fragment.vala (renamed from client/src/ui/add_conversation/conference/conference_details_fragment.vala)0
-rw-r--r--libdino/src/ui/add_conversation/conference/conference_list.vala (renamed from client/src/ui/add_conversation/conference/conference_list.vala)0
-rw-r--r--libdino/src/ui/add_conversation/conference/dialog.vala (renamed from client/src/ui/add_conversation/conference/dialog.vala)0
-rw-r--r--libdino/src/ui/add_conversation/list_row.vala (renamed from client/src/ui/add_conversation/list_row.vala)0
-rw-r--r--libdino/src/ui/add_conversation/select_jid_fragment.vala (renamed from client/src/ui/add_conversation/select_jid_fragment.vala)0
-rw-r--r--libdino/src/ui/application.vala (renamed from client/src/ui/application.vala)1
-rw-r--r--libdino/src/ui/avatar_generator.vala (renamed from client/src/ui/avatar_generator.vala)0
-rw-r--r--libdino/src/ui/chat_input.vala (renamed from client/src/ui/chat_input.vala)0
-rw-r--r--libdino/src/ui/conversation_list_titlebar.vala (renamed from client/src/ui/conversation_list_titlebar.vala)0
-rw-r--r--libdino/src/ui/conversation_selector/chat_row.vala (renamed from client/src/ui/conversation_selector/chat_row.vala)0
-rw-r--r--libdino/src/ui/conversation_selector/conversation_row.vala (renamed from client/src/ui/conversation_selector/conversation_row.vala)0
-rw-r--r--libdino/src/ui/conversation_selector/groupchat_row.vala (renamed from client/src/ui/conversation_selector/groupchat_row.vala)0
-rw-r--r--libdino/src/ui/conversation_selector/list.vala (renamed from client/src/ui/conversation_selector/list.vala)0
-rw-r--r--libdino/src/ui/conversation_selector/view.vala (renamed from client/src/ui/conversation_selector/view.vala)0
-rw-r--r--libdino/src/ui/conversation_summary/merged_message_item.vala (renamed from client/src/ui/conversation_summary/merged_message_item.vala)0
-rw-r--r--libdino/src/ui/conversation_summary/merged_status_item.vala (renamed from client/src/ui/conversation_summary/merged_status_item.vala)0
-rw-r--r--libdino/src/ui/conversation_summary/status_item.vala (renamed from client/src/ui/conversation_summary/status_item.vala)0
-rw-r--r--libdino/src/ui/conversation_summary/view.vala (renamed from client/src/ui/conversation_summary/view.vala)0
-rw-r--r--libdino/src/ui/conversation_titlebar.vala (renamed from client/src/ui/conversation_titlebar.vala)0
-rw-r--r--libdino/src/ui/manage_accounts/account_row.vala (renamed from client/src/ui/manage_accounts/account_row.vala)0
-rw-r--r--libdino/src/ui/manage_accounts/add_account_dialog.vala (renamed from client/src/ui/manage_accounts/add_account_dialog.vala)0
-rw-r--r--libdino/src/ui/manage_accounts/dialog.vala (renamed from client/src/ui/manage_accounts/dialog.vala)0
-rw-r--r--libdino/src/ui/notifications.vala (renamed from client/src/ui/notifications.vala)0
-rw-r--r--libdino/src/ui/occupant_list.vala (renamed from client/src/ui/occupant_list.vala)0
-rw-r--r--libdino/src/ui/occupant_list_row.vala (renamed from client/src/ui/occupant_list_row.vala)0
-rw-r--r--libdino/src/ui/settings_dialog.vala (renamed from client/src/ui/settings_dialog.vala)0
-rw-r--r--libdino/src/ui/unified_window.vala (renamed from client/src/ui/unified_window.vala)0
-rw-r--r--libdino/src/ui/util.vala (renamed from client/src/ui/util.vala)0
-rw-r--r--main/CMakeLists.txt35
-rw-r--r--main/src/main.vala20
-rw-r--r--qlite/CMakeLists.txt2
-rw-r--r--xmpp-vala/CMakeLists.txt6
-rw-r--r--xmpp-vala/src/core/xmpp_stream.vala2
101 files changed, 271 insertions, 118 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 088be9a0..aff736fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,9 +18,11 @@ endif()
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
-set (VALA_CFLAGS -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-int-conversion)
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
+set (VALA_CFLAGS -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-discarded-qualifiers)
add_subdirectory(gpgme-vala)
add_subdirectory(qlite)
add_subdirectory(xmpp-vala)
-add_subdirectory(client)
+add_subdirectory(libdino)
+add_subdirectory(main) \ No newline at end of file
diff --git a/client/src/main.vala b/client/src/main.vala
deleted file mode 100644
index 594e1704..00000000
--- a/client/src/main.vala
+++ /dev/null
@@ -1,12 +0,0 @@
-using Dino.Entities;
-using Dino.Ui;
-
-namespace Dino {
-
- void main(string[] args) {
- Notify.init("dino");
- Gtk.init(ref args);
- Dino.Ui.Application app = new Dino.Ui.Application();
- app.run(args);
- }
-} \ No newline at end of file
diff --git a/cmake/UseVala.cmake b/cmake/UseVala.cmake
index ae6a5db1..ae090bb1 100644
--- a/cmake/UseVala.cmake
+++ b/cmake/UseVala.cmake
@@ -115,9 +115,11 @@ function(_vala_mkdir_for_file file)
endfunction()
function(vala_precompile output)
- cmake_parse_arguments(ARGS "" "DIRECTORY;GENERATE_HEADER;GENERATE_VAPI"
+ cmake_parse_arguments(ARGS "FAST_VAPI" "DIRECTORY;GENERATE_HEADER;GENERATE_VAPI"
"SOURCES;PACKAGES;OPTIONS;DEFINITIONS;CUSTOM_VAPIS;GRESOURCES" ${ARGN})
+ set(ARGS_FAST_VAPI true)
+
if(ARGS_DIRECTORY)
get_filename_component(DIRECTORY ${ARGS_DIRECTORY} ABSOLUTE)
else(ARGS_DIRECTORY)
@@ -159,7 +161,8 @@ function(vala_precompile output)
set(vapi_arguments "")
if(ARGS_GENERATE_VAPI)
list(APPEND out_extra_files "${DIRECTORY}/${ARGS_GENERATE_VAPI}.vapi")
- set(vapi_arguments "--vapi=${ARGS_GENERATE_VAPI}.vapi")
+ list(APPEND out_extra_files "${DIRECTORY}/${ARGS_GENERATE_VAPI}-internal.vapi")
+ set(vapi_arguments "--vapi=${ARGS_GENERATE_VAPI}.vapi" "--internal-vapi=${ARGS_GENERATE_VAPI}-internal.vapi")
# Header and internal header is needed to generate internal vapi
if (NOT ARGS_GENERATE_HEADER)
@@ -175,80 +178,115 @@ function(vala_precompile output)
list(APPEND header_arguments "--internal-header=${DIRECTORY}/${ARGS_GENERATE_HEADER}_internal.h")
endif(ARGS_GENERATE_HEADER)
- foreach(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS})
- set(in_file "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
- list(APPEND in_files "${in_file}")
- string(REPLACE ".vala" ".c" src ${src})
- string(REPLACE ".gs" ".c" src ${src})
- string(REPLACE ".c" ".vapi" fast_vapi ${src})
- set(fast_vapi_file "${DIRECTORY}/${fast_vapi}")
- list(APPEND fast_vapi_files "${fast_vapi_file}")
- list(APPEND out_files "${DIRECTORY}/${src}")
+ if(ARGS_FAST_VAPI)
+ foreach(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS})
+ set(in_file "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
+ list(APPEND in_files "${in_file}")
+ string(REPLACE ".vala" ".c" src ${src})
+ string(REPLACE ".gs" ".c" src ${src})
+ string(REPLACE ".c" ".vapi" fast_vapi ${src})
+ set(fast_vapi_file "${DIRECTORY}/${fast_vapi}")
+ list(APPEND fast_vapi_files "${fast_vapi_file}")
+ list(APPEND out_files "${DIRECTORY}/${src}")
- _vala_mkdir_for_file("${fast_vapi_file}")
+ _vala_mkdir_for_file("${fast_vapi_file}")
- add_custom_command(OUTPUT ${fast_vapi_file}
- COMMAND
- ${VALA_EXECUTABLE}
- ARGS
- --fast-vapi ${fast_vapi_file}
- ${ARGS_OPTIONS}
- ${in_file}
- DEPENDS
- ${in_file}
- COMMENT
- "Generating fast VAPI ${fast_vapi}"
- )
- endforeach(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS})
+ add_custom_command(OUTPUT ${fast_vapi_file}
+ COMMAND
+ ${VALA_EXECUTABLE}
+ ARGS
+ --fast-vapi ${fast_vapi_file}
+ ${ARGS_OPTIONS}
+ ${in_file}
+ DEPENDS
+ ${in_file}
+ COMMENT
+ "Generating fast VAPI ${fast_vapi}"
+ )
+ endforeach(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS})
- foreach(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS})
- set(in_file "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
- string(REPLACE ".vala" ".c" c_code ${src})
- string(REPLACE ".gs" ".c" c_code ${c_code})
- string(REPLACE ".c" ".vapi" fast_vapi ${c_code})
- set(my_fast_vapi_file "${DIRECTORY}/${fast_vapi}")
- set(c_code_file "${DIRECTORY}/${c_code}")
- set(fast_vapi_flags "")
- set(fast_vapi_stamp "")
- foreach(fast_vapi_file ${fast_vapi_files})
- if(NOT "${fast_vapi_file}" STREQUAL "${my_fast_vapi_file}")
- list(APPEND fast_vapi_flags --use-fast-vapi "${fast_vapi_file}")
- list(APPEND fast_vapi_stamp "${fast_vapi_file}")
- endif()
- endforeach(fast_vapi_file)
+ foreach(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS})
+ set(in_file "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
+ string(REPLACE ".vala" ".c" c_code ${src})
+ string(REPLACE ".gs" ".c" c_code ${c_code})
+ string(REPLACE ".c" ".vapi" fast_vapi ${c_code})
+ set(my_fast_vapi_file "${DIRECTORY}/${fast_vapi}")
+ set(c_code_file "${DIRECTORY}/${c_code}")
+ set(fast_vapi_flags "")
+ set(fast_vapi_stamp "")
+ foreach(fast_vapi_file ${fast_vapi_files})
+ if(NOT "${fast_vapi_file}" STREQUAL "${my_fast_vapi_file}")
+ list(APPEND fast_vapi_flags --use-fast-vapi "${fast_vapi_file}")
+ list(APPEND fast_vapi_stamp "${fast_vapi_file}")
+ endif()
+ endforeach(fast_vapi_file)
- _vala_mkdir_for_file("${fast_vapi_file}")
- get_filename_component(dir "${c_code_file}" DIRECTORY)
+ _vala_mkdir_for_file("${fast_vapi_file}")
+ get_filename_component(dir "${c_code_file}" DIRECTORY)
- add_custom_command(OUTPUT ${c_code_file}
- COMMAND
- ${VALA_EXECUTABLE}
- ARGS
- "-C"
- "-d" ${dir}
- ${vala_pkg_opts}
- ${vala_define_opts}
- ${gresources_args}
- ${ARGS_OPTIONS}
- ${fast_vapi_flags}
- ${in_file}
- ${custom_vapi_arguments}
- DEPENDS
- ${fast_vapi_stamp}
- ${in_file}
- ${ARGS_CUSTOM_VAPIS}
- ${ARGS_GRESOURCES}
- COMMENT
- "Generating C source ${c_code}"
- )
- endforeach(src)
+ add_custom_command(OUTPUT ${c_code_file}
+ COMMAND
+ ${VALA_EXECUTABLE}
+ ARGS
+ "-C"
+ "-d" ${dir}
+ ${vala_pkg_opts}
+ ${vala_define_opts}
+ ${gresources_args}
+ ${ARGS_OPTIONS}
+ ${fast_vapi_flags}
+ ${in_file}
+ ${custom_vapi_arguments}
+ DEPENDS
+ ${fast_vapi_stamp}
+ ${in_file}
+ ${ARGS_CUSTOM_VAPIS}
+ ${ARGS_GRESOURCES}
+ COMMENT
+ "Generating C source ${c_code}"
+ )
+ endforeach(src)
+
+ if(NOT "${out_extra_files}" STREQUAL "")
+ add_custom_command(OUTPUT ${out_extra_files}
+ COMMAND
+ ${VALA_EXECUTABLE}
+ ARGS
+ -C -q --disable-warnings
+ ${header_arguments}
+ ${vapi_arguments}
+ "-b" ${CMAKE_CURRENT_SOURCE_DIR}
+ "-d" ${DIRECTORY}
+ ${vala_pkg_opts}
+ ${vala_define_opts}
+ ${gresources_args}
+ ${ARGS_OPTIONS}
+ ${in_files}
+ ${custom_vapi_arguments}
+ DEPENDS
+ ${in_files}
+ ${ARGS_CUSTOM_VAPIS}
+ ${ARGS_GRESOURCES}
+ COMMENT
+ "Generating VAPI and headers for linking"
+ )
+ endif()
+ else(ARGS_FAST_VAPI)
+ foreach(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS})
+ set(in_file "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
+ list(APPEND in_files "${in_file}")
+ string(REPLACE ".vala" ".c" src ${src})
+ string(REPLACE ".gs" ".c" src ${src})
+ list(APPEND out_files "${DIRECTORY}/${src}")
+
+ _vala_mkdir_for_file("${fast_vapi_file}")
+ endforeach(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS})
- if(NOT "${out_extra_files}" STREQUAL "")
- add_custom_command(OUTPUT ${out_extra_files}
+ add_custom_command(OUTPUT ${out_files} ${out_extra_files}
COMMAND
${VALA_EXECUTABLE}
ARGS
- -C -q --disable-warnings
+ -C
${header_arguments}
${vapi_arguments}
"-b" ${CMAKE_CURRENT_SOURCE_DIR}
@@ -264,8 +302,8 @@ function(vala_precompile output)
${ARGS_CUSTOM_VAPIS}
${ARGS_GRESOURCES}
COMMENT
- "Generating VAPI and headers for linking"
+ "Generating C code for target ${output}"
)
- endif()
+ endif(ARGS_FAST_VAPI)
set(${output} ${out_files} PARENT_SCOPE)
endfunction(vala_precompile)
diff --git a/configure b/configure
index e98db6ec..4940f9bd 100755
--- a/configure
+++ b/configure
@@ -15,27 +15,27 @@ then
fi
if [ -x "$(which ninja 2>/dev/null)" ]; then
- echo "Using Ninja ($(which ninja))"
+ echo "-- Found Ninja: $(which ninja)"
cmake_type="Ninja"
exec_bin="ninja"
elif [ -x "$(which ninja-build 2>/dev/null)" ]; then
- echo "Using Ninja ($(which ninja-build))"
+ echo "-- Found Ninja: $(which ninja-build)"
cmake_type="Ninja"
exec_bin="ninja-build"
elif [ -x "$(which make 2>/dev/null)" ]; then
- echo "Using Make ($(which make))"
+ echo "-- Found Make: $(which make)"
cmake_type="Unix Makefiles"
- exec_bin="make"
- printf "Using Ninja improves build experience, continue with Make? [y/N] "
+ exec_bin="make -j4"
+ echo "-- Using Ninja might improve build experience."
cont
else
- echo "No compatible build system (Ninja, Make) found."
+ echo "-!- No compatible build system (Ninja, Make) found."
exit 4
fi
if [ -f ./build ]
then
- echo "./build file exists. ./configure can't continue"
+ echo "-!- ./build file exists. ./configure can't continue"
exit 2
fi
@@ -43,13 +43,13 @@ if [ -d build ]
then
if [ ! -f "build/.cmake_type" ]
then
- printf "./build exists but was not created by ./configure script, continue? [y/N] "
+ printf "-!- ./build exists but was not created by ./configure script, continue? [y/N] "
cont
fi
last_type=`cat build/.cmake_type`
if [ "$cmake_type" != "$last_type" ]
then
- echo "Using different build system, cleaning build system files"
+ echo "-- Using different build system, cleaning build system files"
cd build
rm -r CMakeCache.txt CMakeFiles
cd ..
diff --git a/gpgme-vala/CMakeLists.txt b/gpgme-vala/CMakeLists.txt
index 322b4e37..519b4ce7 100644
--- a/gpgme-vala/CMakeLists.txt
+++ b/gpgme-vala/CMakeLists.txt
@@ -28,7 +28,7 @@ OPTIONS
--thread
)
-set(CFLAGS ${GPGME_VALA_CFLAGS} ${GPGME_CFLAGS} -g ${VALA_CFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/src)
+set(CFLAGS ${VALA_CFLAGS} ${GPGME_VALA_CFLAGS} ${GPGME_CFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/src)
add_definitions(${CFLAGS})
add_library(gpgme-vala SHARED ${GPGME_VALA_C} src/fix.c)
target_link_libraries(gpgme-vala ${GPGME_VALA_LIBRARIES} ${GPGME_LIBRARIES})
diff --git a/client/CMakeLists.txt b/libdino/CMakeLists.txt
index b86d63a5..faee24e5 100644
--- a/client/CMakeLists.txt
+++ b/libdino/CMakeLists.txt
@@ -1,20 +1,19 @@
find_package(Vala REQUIRED)
find_package(PkgConfig REQUIRED)
-find_package(GPGME REQUIRED)
-find_package(LIBUUID REQUIRED)
include(${VALA_USE_FILE})
include(GlibCompileResourcesSupport)
-set(CLIENT_PACKAGES
+set(LIBDINO_PACKAGES
gee-0.8
gio-2.0
glib-2.0
gtk+-3.0
+ gmodule-2.0
libnotify
sqlite3
)
-pkg_check_modules(CLIENT REQUIRED ${CLIENT_PACKAGES})
+pkg_check_modules(LIBDINO REQUIRED ${LIBDINO_PACKAGES})
set(RESOURCE_LIST
img/double_tick.svg
@@ -52,8 +51,8 @@ set(RESOURCE_LIST
)
compile_gresources(
- CLIENT_GRESOURCES_TARGET
- CLIENT_GRESOURCES_XML
+ LIBDINO_GRESOURCES_TARGET
+ LIBDINO_GRESOURCES_XML
TARGET ${CMAKE_BINARY_DIR}/resources/resources.c
TYPE EMBED_C
RESOURCES ${RESOURCE_LIST}
@@ -61,9 +60,9 @@ compile_gresources(
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data
)
-vala_precompile(CLIENT_VALA_C
+vala_precompile(LIBDINO_VALA_C
SOURCES
- src/main.vala
+ src/plugin.vala
src/dbus/login1.vala
src/dbus/networkmanager.vala
@@ -124,25 +123,31 @@ SOURCES
src/ui/settings_dialog.vala
src/ui/unified_window.vala
src/ui/util.vala
+CUSTOM_VAPIS
+ ${CMAKE_BINARY_DIR}/xmpp-vala/xmpp-vala.vapi
+ ${CMAKE_BINARY_DIR}/qlite/qlite.vapi
PACKAGES
- ${CLIENT_PACKAGES}
- xmpp-vala
- qlite
+ ${LIBDINO_PACKAGES}
+GENERATE_VAPI
+ dino
+GENERATE_HEADER
+ dino
GRESOURCES
- ${CLIENT_GRESOURCES_XML}
+ ${LIBDINO_GRESOURCES_XML}
OPTIONS
--target-glib=2.38
-g
--thread
- --vapidir=${CMAKE_BINARY_DIR}/xmpp-vala
- --vapidir=${CMAKE_BINARY_DIR}/qlite
- --vapidir=${CMAKE_SOURCE_DIR}/vapi
-
)
-set(CFLAGS ${CLIENT_CFLAGS} -g -I${CMAKE_BINARY_DIR}/xmpp-vala -I${CMAKE_BINARY_DIR}/qlite ${VALA_CFLAGS})
+set(CFLAGS ${VALA_CFLAGS} ${LIBDINO_CFLAGS} -I${CMAKE_BINARY_DIR}/xmpp-vala -I${CMAKE_BINARY_DIR}/qlite)
add_definitions(${CFLAGS})
-add_executable(dino ${CLIENT_VALA_C} ${CLIENT_GRESOURCES_TARGET})
-add_dependencies(dino xmpp-vala-vapi qlite-vapi)
-target_link_libraries(dino xmpp-vala qlite ${CLIENT_LIBRARIES} -lm)
+add_library(libdino SHARED ${LIBDINO_VALA_C} ${LIBDINO_GRESOURCES_TARGET})
+add_dependencies(libdino xmpp-vala-vapi qlite-vapi)
+target_link_libraries(libdino xmpp-vala qlite ${LIBDINO_LIBRARIES} -lm)
+set_target_properties(libdino PROPERTIES PREFIX "")
+add_custom_target(dino-vapi
+DEPENDS
+ ${CMAKE_BINARY_DIR}/libdino/dino.vapi
+)
diff --git a/client/data/add_conversation/add_contact_dialog.ui b/libdino/data/add_conversation/add_contact_dialog.ui
index 58c13e7f..58c13e7f 100644
--- a/client/data/add_conversation/add_contact_dialog.ui
+++ b/libdino/data/add_conversation/add_contact_dialog.ui
diff --git a/client/data/add_conversation/add_groupchat_dialog.ui b/libdino/data/add_conversation/add_groupchat_dialog.ui
index c6390374..c6390374 100644
--- a/client/data/add_conversation/add_groupchat_dialog.ui
+++ b/libdino/data/add_conversation/add_groupchat_dialog.ui
diff --git a/client/data/add_conversation/conference_details_fragment.ui b/libdino/data/add_conversation/conference_details_fragment.ui
index 403d9a94..403d9a94 100644
--- a/client/data/add_conversation/conference_details_fragment.ui
+++ b/libdino/data/add_conversation/conference_details_fragment.ui
diff --git a/client/data/add_conversation/list_row.ui b/libdino/data/add_conversation/list_row.ui
index 8f011bb8..8f011bb8 100644
--- a/client/data/add_conversation/list_row.ui
+++ b/libdino/data/add_conversation/list_row.ui
diff --git a/client/data/add_conversation/select_jid_fragment.ui b/libdino/data/add_conversation/select_jid_fragment.ui
index 612f1597..612f1597 100644
--- a/client/data/add_conversation/select_jid_fragment.ui
+++ b/libdino/data/add_conversation/select_jid_fragment.ui
diff --git a/client/data/chat_input.ui b/libdino/data/chat_input.ui
index dac75feb..dac75feb 100644
--- a/client/data/chat_input.ui
+++ b/libdino/data/chat_input.ui
diff --git a/client/data/conversation_list_titlebar.ui b/libdino/data/conversation_list_titlebar.ui
index 6a5996df..6a5996df 100644
--- a/client/data/conversation_list_titlebar.ui
+++ b/libdino/data/conversation_list_titlebar.ui
diff --git a/client/data/conversation_selector/chat_row_tooltip.ui b/libdino/data/conversation_selector/chat_row_tooltip.ui
index 90fbd712..90fbd712 100644
--- a/client/data/conversation_selector/chat_row_tooltip.ui
+++ b/libdino/data/conversation_selector/chat_row_tooltip.ui
diff --git a/client/data/conversation_selector/conversation_row.ui b/libdino/data/conversation_selector/conversation_row.ui
index 5f8498e9..5f8498e9 100644
--- a/client/data/conversation_selector/conversation_row.ui
+++ b/libdino/data/conversation_selector/conversation_row.ui
diff --git a/client/data/conversation_selector/view.ui b/libdino/data/conversation_selector/view.ui
index 4bac39bc..4bac39bc 100644
--- a/client/data/conversation_selector/view.ui
+++ b/libdino/data/conversation_selector/view.ui
diff --git a/client/data/conversation_summary/message_item.ui b/libdino/data/conversation_summary/message_item.ui
index f21b4969..f21b4969 100644
--- a/client/data/conversation_summary/message_item.ui
+++ b/libdino/data/conversation_summary/message_item.ui
diff --git a/client/data/conversation_summary/view.ui b/libdino/data/conversation_summary/view.ui
index 74fb507e..74fb507e 100644
--- a/client/data/conversation_summary/view.ui
+++ b/libdino/data/conversation_summary/view.ui
diff --git a/client/data/conversation_titlebar.ui b/libdino/data/conversation_titlebar.ui
index e173bdf3..e173bdf3 100644
--- a/client/data/conversation_titlebar.ui
+++ b/libdino/data/conversation_titlebar.ui
diff --git a/client/data/gschemas.compiled b/libdino/data/gschemas.compiled
index 3a010b95..3a010b95 100644
--- a/client/data/gschemas.compiled
+++ b/libdino/data/gschemas.compiled
Binary files differ
diff --git a/client/data/img/double_tick.svg b/libdino/data/img/double_tick.svg
index d65840f6..d65840f6 100644
--- a/client/data/img/double_tick.svg
+++ b/libdino/data/img/double_tick.svg
diff --git a/client/data/img/send.svg b/libdino/data/img/send.svg
index 8627d4a7..8627d4a7 100644
--- a/client/data/img/send.svg
+++ b/libdino/data/img/send.svg
diff --git a/client/data/img/status_away.svg b/libdino/data/img/status_away.svg
index d976d095..d976d095 100644
--- a/client/data/img/status_away.svg
+++ b/libdino/data/img/status_away.svg
diff --git a/client/data/img/status_chat.svg b/libdino/data/img/status_chat.svg
index 5b427cb6..5b427cb6 100644
--- a/client/data/img/status_chat.svg
+++ b/libdino/data/img/status_chat.svg
diff --git a/client/data/img/status_dnd.svg b/libdino/data/img/status_dnd.svg
index e7e17e78..e7e17e78 100644
--- a/client/data/img/status_dnd.svg
+++ b/libdino/data/img/status_dnd.svg
diff --git a/client/data/img/status_online.svg b/libdino/data/img/status_online.svg
index 13cc6592..13cc6592 100644
--- a/client/data/img/status_online.svg
+++ b/libdino/data/img/status_online.svg
diff --git a/client/data/img/tick.svg b/libdino/data/img/tick.svg
index 4a08848c..4a08848c 100644
--- a/client/data/img/tick.svg
+++ b/libdino/data/img/tick.svg
diff --git a/client/data/manage_accounts/account_row.ui b/libdino/data/manage_accounts/account_row.ui
index ab700daa..ab700daa 100644
--- a/client/data/manage_accounts/account_row.ui
+++ b/libdino/data/manage_accounts/account_row.ui
diff --git a/client/data/manage_accounts/add_account_dialog.ui b/libdino/data/manage_accounts/add_account_dialog.ui
index dd5264f1..dd5264f1 100644
--- a/client/data/manage_accounts/add_account_dialog.ui
+++ b/libdino/data/manage_accounts/add_account_dialog.ui
diff --git a/client/data/manage_accounts/dialog.ui b/libdino/data/manage_accounts/dialog.ui
index 64397fb7..64397fb7 100644
--- a/client/data/manage_accounts/dialog.ui
+++ b/libdino/data/manage_accounts/dialog.ui
diff --git a/client/data/menu_add.ui b/libdino/data/menu_add.ui
index 3b2c4c4a..3b2c4c4a 100644
--- a/client/data/menu_add.ui
+++ b/libdino/data/menu_add.ui
diff --git a/client/data/menu_app.ui b/libdino/data/menu_app.ui
index d3fa4cb7..d3fa4cb7 100644
--- a/client/data/menu_app.ui
+++ b/libdino/data/menu_app.ui
diff --git a/client/data/menu_conversation.ui b/libdino/data/menu_conversation.ui
index 9fe2a2b7..9fe2a2b7 100644
--- a/client/data/menu_conversation.ui
+++ b/libdino/data/menu_conversation.ui
diff --git a/client/data/menu_encryption.ui b/libdino/data/menu_encryption.ui
index e4d392c3..e4d392c3 100644
--- a/client/data/menu_encryption.ui
+++ b/libdino/data/menu_encryption.ui
diff --git a/client/data/occupant_list.ui b/libdino/data/occupant_list.ui
index deb4716e..deb4716e 100644
--- a/client/data/occupant_list.ui
+++ b/libdino/data/occupant_list.ui
diff --git a/client/data/occupant_list_item.ui b/libdino/data/occupant_list_item.ui
index aabe8a05..aabe8a05 100644
--- a/client/data/occupant_list_item.ui
+++ b/libdino/data/occupant_list_item.ui
diff --git a/client/data/settings.gschema.xml b/libdino/data/settings.gschema.xml
index f3d342cf..f3d342cf 100644
--- a/client/data/settings.gschema.xml
+++ b/libdino/data/settings.gschema.xml
diff --git a/client/data/settings_dialog.ui b/libdino/data/settings_dialog.ui
index 3b939216..3b939216 100644
--- a/client/data/settings_dialog.ui
+++ b/libdino/data/settings_dialog.ui
diff --git a/client/data/style.css b/libdino/data/style.css
index d143ffd3..d143ffd3 100644
--- a/client/data/style.css
+++ b/libdino/data/style.css
diff --git a/client/data/unified_window.ui b/libdino/data/unified_window.ui
index 289c00cf..289c00cf 100644
--- a/client/data/unified_window.ui
+++ b/libdino/data/unified_window.ui
diff --git a/client/src/dbus/login1.vala b/libdino/src/dbus/login1.vala
index 904f389c..904f389c 100644
--- a/client/src/dbus/login1.vala
+++ b/libdino/src/dbus/login1.vala
diff --git a/client/src/dbus/networkmanager.vala b/libdino/src/dbus/networkmanager.vala
index fb8ac0cc..fb8ac0cc 100644
--- a/client/src/dbus/networkmanager.vala
+++ b/libdino/src/dbus/networkmanager.vala
diff --git a/client/src/dbus/upower.vala b/libdino/src/dbus/upower.vala
index 8d4a5e0c..8d4a5e0c 100644
--- a/client/src/dbus/upower.vala
+++ b/libdino/src/dbus/upower.vala
diff --git a/client/src/entity/account.vala b/libdino/src/entity/account.vala
index 48be527a..48be527a 100644
--- a/client/src/entity/account.vala
+++ b/libdino/src/entity/account.vala
diff --git a/client/src/entity/conversation.vala b/libdino/src/entity/conversation.vala
index 2da6dce3..2da6dce3 100644
--- a/client/src/entity/conversation.vala
+++ b/libdino/src/entity/conversation.vala
diff --git a/client/src/entity/jid.vala b/libdino/src/entity/jid.vala
index f1da0c00..f1da0c00 100644
--- a/client/src/entity/jid.vala
+++ b/libdino/src/entity/jid.vala
diff --git a/client/src/entity/message.vala b/libdino/src/entity/message.vala
index 65d05bdf..65d05bdf 100644
--- a/client/src/entity/message.vala
+++ b/libdino/src/entity/message.vala
diff --git a/libdino/src/plugin.vala b/libdino/src/plugin.vala
new file mode 100644
index 00000000..60a99bc2
--- /dev/null
+++ b/libdino/src/plugin.vala
@@ -0,0 +1,64 @@
+namespace Dino {
+
+public errordomain PluginError {
+ NOT_SUPPORTED,
+ UNEXPECTED_TYPE,
+ NO_REGISTRATION_FUNCTION,
+ FAILED
+}
+
+public interface PluginIface : Object {
+ public abstract void registered(Dino.Ui.Application app);
+}
+
+private class PluginInfo : Object {
+ public Module module;
+ public Type gtype;
+
+ public PluginInfo(Type type, owned Module module) {
+ this.module = (owned) module;
+ this.gtype = type;
+ }
+}
+
+public class PluginLoader : Object {
+ [CCode (has_target = false)]
+ private delegate Type RegisterPluginFunction (Module module);
+
+ private PluginIface[] plugins = new PluginIface[0];
+ private PluginInfo[] infos = new PluginInfo[0];
+
+ public PluginIface load(string name, Dino.Ui.Application app) throws PluginError {
+ if (Module.supported () == false) {
+ throw new PluginError.NOT_SUPPORTED ("Plugins are not supported");
+ }
+
+ Module module = Module.open ("plugins/" + name, ModuleFlags.BIND_LAZY);
+ if (module == null) {
+ throw new PluginError.FAILED (Module.error ());
+ }
+
+ void* function;
+ module.symbol ("register_plugin", out function);
+ if (function == null) {
+ throw new PluginError.NO_REGISTRATION_FUNCTION ("register_plugin () not found");
+ }
+
+ RegisterPluginFunction register_plugin = (RegisterPluginFunction) function;
+ Type type = register_plugin (module);
+ if (type.is_a (typeof (PluginIface)) == false) {
+ throw new PluginError.UNEXPECTED_TYPE ("Unexpected type");
+ }
+
+ PluginInfo info = new PluginInfo (type, (owned) module);
+ infos += info;
+
+ PluginIface plugin = (PluginIface) Object.new (type);
+ plugins += plugin;
+ plugin.registered (app);
+
+ return plugin;
+ }
+}
+
+} \ No newline at end of file
diff --git a/client/src/service/avatar_manager.vala b/libdino/src/service/avatar_manager.vala
index de44c419..de44c419 100644
--- a/client/src/service/avatar_manager.vala
+++ b/libdino/src/service/avatar_manager.vala
diff --git a/client/src/service/avatar_storage.vala b/libdino/src/service/avatar_storage.vala
index a9a8fb86..a9a8fb86 100644
--- a/client/src/service/avatar_storage.vala
+++ b/libdino/src/service/avatar_storage.vala
diff --git a/client/src/service/chat_interaction.vala b/libdino/src/service/chat_interaction.vala
index cd6907fa..cd6907fa 100644
--- a/client/src/service/chat_interaction.vala
+++ b/libdino/src/service/chat_interaction.vala
diff --git a/client/src/service/connection_manager.vala b/libdino/src/service/connection_manager.vala
index 92827296..92827296 100644
--- a/client/src/service/connection_manager.vala
+++ b/libdino/src/service/connection_manager.vala
diff --git a/client/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala
index 716c9b39..716c9b39 100644
--- a/client/src/service/conversation_manager.vala
+++ b/libdino/src/service/conversation_manager.vala
diff --git a/client/src/service/counterpart_interaction_manager.vala b/libdino/src/service/counterpart_interaction_manager.vala
index 8ea8ba15..8ea8ba15 100644
--- a/client/src/service/counterpart_interaction_manager.vala
+++ b/libdino/src/service/counterpart_interaction_manager.vala
diff --git a/client/src/service/database.vala b/libdino/src/service/database.vala
index 13be6222..13be6222 100644
--- a/client/src/service/database.vala
+++ b/libdino/src/service/database.vala
diff --git a/client/src/service/entity_capabilities_storage.vala b/libdino/src/service/entity_capabilities_storage.vala
index 9774739a..9774739a 100644
--- a/client/src/service/entity_capabilities_storage.vala
+++ b/libdino/src/service/entity_capabilities_storage.vala
diff --git a/client/src/service/message_manager.vala b/libdino/src/service/message_manager.vala
index ec7a35c8..ec7a35c8 100644
--- a/client/src/service/message_manager.vala
+++ b/libdino/src/service/message_manager.vala
diff --git a/client/src/service/module_manager.vala b/libdino/src/service/module_manager.vala
index 5ef93da8..5ef93da8 100644
--- a/client/src/service/module_manager.vala
+++ b/libdino/src/service/module_manager.vala
diff --git a/client/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala
index be23d391..be23d391 100644
--- a/client/src/service/muc_manager.vala
+++ b/libdino/src/service/muc_manager.vala
diff --git a/client/src/service/pgp_manager.vala b/libdino/src/service/pgp_manager.vala
index 6f3b63d7..6f3b63d7 100644
--- a/client/src/service/pgp_manager.vala
+++ b/libdino/src/service/pgp_manager.vala
diff --git a/client/src/service/presence_manager.vala b/libdino/src/service/presence_manager.vala
index b89c6570..b89c6570 100644
--- a/client/src/service/presence_manager.vala
+++ b/libdino/src/service/presence_manager.vala
diff --git a/client/src/service/roster_manager.vala b/libdino/src/service/roster_manager.vala
index 106405e2..106405e2 100644
--- a/client/src/service/roster_manager.vala
+++ b/libdino/src/service/roster_manager.vala
diff --git a/client/src/service/stream_interactor.vala b/libdino/src/service/stream_interactor.vala
index f3859e3b..f3859e3b 100644
--- a/client/src/service/stream_interactor.vala
+++ b/libdino/src/service/stream_interactor.vala
diff --git a/client/src/settings.vala b/libdino/src/settings.vala
index 17177232..17177232 100644
--- a/client/src/settings.vala
+++ b/libdino/src/settings.vala
diff --git a/client/src/ui/add_conversation/chat/add_contact_dialog.vala b/libdino/src/ui/add_conversation/chat/add_contact_dialog.vala
index df8fbeb9..df8fbeb9 100644
--- a/client/src/ui/add_conversation/chat/add_contact_dialog.vala
+++ b/libdino/src/ui/add_conversation/chat/add_contact_dialog.vala
diff --git a/client/src/ui/add_conversation/chat/dialog.vala b/libdino/src/ui/add_conversation/chat/dialog.vala
index cad2b367..cad2b367 100644
--- a/client/src/ui/add_conversation/chat/dialog.vala
+++ b/libdino/src/ui/add_conversation/chat/dialog.vala
diff --git a/client/src/ui/add_conversation/chat/roster_list.vala b/libdino/src/ui/add_conversation/chat/roster_list.vala
index 92388597..92388597 100644
--- a/client/src/ui/add_conversation/chat/roster_list.vala
+++ b/libdino/src/ui/add_conversation/chat/roster_list.vala
diff --git a/client/src/ui/add_conversation/conference/add_groupchat_dialog.vala b/libdino/src/ui/add_conversation/conference/add_groupchat_dialog.vala
index 8cc5ac72..8cc5ac72 100644
--- a/client/src/ui/add_conversation/conference/add_groupchat_dialog.vala
+++ b/libdino/src/ui/add_conversation/conference/add_groupchat_dialog.vala
diff --git a/client/src/ui/add_conversation/conference/conference_details_fragment.vala b/libdino/src/ui/add_conversation/conference/conference_details_fragment.vala
index d42c79bd..d42c79bd 100644
--- a/client/src/ui/add_conversation/conference/conference_details_fragment.vala
+++ b/libdino/src/ui/add_conversation/conference/conference_details_fragment.vala
diff --git a/client/src/ui/add_conversation/conference/conference_list.vala b/libdino/src/ui/add_conversation/conference/conference_list.vala
index 17f08ff3..17f08ff3 100644
--- a/client/src/ui/add_conversation/conference/conference_list.vala
+++ b/libdino/src/ui/add_conversation/conference/conference_list.vala
diff --git a/client/src/ui/add_conversation/conference/dialog.vala b/libdino/src/ui/add_conversation/conference/dialog.vala
index ff548699..ff548699 100644
--- a/client/src/ui/add_conversation/conference/dialog.vala
+++ b/libdino/src/ui/add_conversation/conference/dialog.vala
diff --git a/client/src/ui/add_conversation/list_row.vala b/libdino/src/ui/add_conversation/list_row.vala
index b53432a6..b53432a6 100644
--- a/client/src/ui/add_conversation/list_row.vala
+++ b/libdino/src/ui/add_conversation/list_row.vala
diff --git a/client/src/ui/add_conversation/select_jid_fragment.vala b/libdino/src/ui/add_conversation/select_jid_fragment.vala
index d0b214b5..d0b214b5 100644
--- a/client/src/ui/add_conversation/select_jid_fragment.vala
+++ b/libdino/src/ui/add_conversation/select_jid_fragment.vala
diff --git a/client/src/ui/application.vala b/libdino/src/ui/application.vala
index c3f0e302..0878e50d 100644
--- a/client/src/ui/application.vala
+++ b/libdino/src/ui/application.vala
@@ -28,6 +28,7 @@ public class Dino.Ui.Application : Gtk.Application {
ConversationManager.start(stream_interaction, db);
ChatInteraction.start(stream_interaction);
+ Notify.init("dino");
notifications = new Notifications(stream_interaction);
notifications.start();
diff --git a/client/src/ui/avatar_generator.vala b/libdino/src/ui/avatar_generator.vala
index b668444c..b668444c 100644
--- a/client/src/ui/avatar_generator.vala
+++ b/libdino/src/ui/avatar_generator.vala
diff --git a/client/src/ui/chat_input.vala b/libdino/src/ui/chat_input.vala
index cc4fd24a..cc4fd24a 100644
--- a/client/src/ui/chat_input.vala
+++ b/libdino/src/ui/chat_input.vala
diff --git a/client/src/ui/conversation_list_titlebar.vala b/libdino/src/ui/conversation_list_titlebar.vala
index 5ef824d5..5ef824d5 100644
--- a/client/src/ui/conversation_list_titlebar.vala
+++ b/libdino/src/ui/conversation_list_titlebar.vala
diff --git a/client/src/ui/conversation_selector/chat_row.vala b/libdino/src/ui/conversation_selector/chat_row.vala
index 8b36b333..8b36b333 100644
--- a/client/src/ui/conversation_selector/chat_row.vala
+++ b/libdino/src/ui/conversation_selector/chat_row.vala
diff --git a/client/src/ui/conversation_selector/conversation_row.vala b/libdino/src/ui/conversation_selector/conversation_row.vala
index 0a6b7e70..0a6b7e70 100644
--- a/client/src/ui/conversation_selector/conversation_row.vala
+++ b/libdino/src/ui/conversation_selector/conversation_row.vala
diff --git a/client/src/ui/conversation_selector/groupchat_row.vala b/libdino/src/ui/conversation_selector/groupchat_row.vala
index 7fe52d89..7fe52d89 100644
--- a/client/src/ui/conversation_selector/groupchat_row.vala
+++ b/libdino/src/ui/conversation_selector/groupchat_row.vala
diff --git a/client/src/ui/conversation_selector/list.vala b/libdino/src/ui/conversation_selector/list.vala
index ea2f9622..ea2f9622 100644
--- a/client/src/ui/conversation_selector/list.vala
+++ b/libdino/src/ui/conversation_selector/list.vala
diff --git a/client/src/ui/conversation_selector/view.vala b/libdino/src/ui/conversation_selector/view.vala
index ae641664..ae641664 100644
--- a/client/src/ui/conversation_selector/view.vala
+++ b/libdino/src/ui/conversation_selector/view.vala
diff --git a/client/src/ui/conversation_summary/merged_message_item.vala b/libdino/src/ui/conversation_summary/merged_message_item.vala
index 4957b1a6..4957b1a6 100644
--- a/client/src/ui/conversation_summary/merged_message_item.vala
+++ b/libdino/src/ui/conversation_summary/merged_message_item.vala
diff --git a/client/src/ui/conversation_summary/merged_status_item.vala b/libdino/src/ui/conversation_summary/merged_status_item.vala
index 1fe8ecf3..1fe8ecf3 100644
--- a/client/src/ui/conversation_summary/merged_status_item.vala
+++ b/libdino/src/ui/conversation_summary/merged_status_item.vala
diff --git a/client/src/ui/conversation_summary/status_item.vala b/libdino/src/ui/conversation_summary/status_item.vala
index 0775d8f3..0775d8f3 100644
--- a/client/src/ui/conversation_summary/status_item.vala
+++ b/libdino/src/ui/conversation_summary/status_item.vala
diff --git a/client/src/ui/conversation_summary/view.vala b/libdino/src/ui/conversation_summary/view.vala
index d2599041..d2599041 100644
--- a/client/src/ui/conversation_summary/view.vala
+++ b/libdino/src/ui/conversation_summary/view.vala
diff --git a/client/src/ui/conversation_titlebar.vala b/libdino/src/ui/conversation_titlebar.vala
index 0f34c785..0f34c785 100644
--- a/client/src/ui/conversation_titlebar.vala
+++ b/libdino/src/ui/conversation_titlebar.vala
diff --git a/client/src/ui/manage_accounts/account_row.vala b/libdino/src/ui/manage_accounts/account_row.vala
index 5e4570f0..5e4570f0 100644
--- a/client/src/ui/manage_accounts/account_row.vala
+++ b/libdino/src/ui/manage_accounts/account_row.vala
diff --git a/client/src/ui/manage_accounts/add_account_dialog.vala b/libdino/src/ui/manage_accounts/add_account_dialog.vala
index f6ad40a2..f6ad40a2 100644
--- a/client/src/ui/manage_accounts/add_account_dialog.vala
+++ b/libdino/src/ui/manage_accounts/add_account_dialog.vala
diff --git a/client/src/ui/manage_accounts/dialog.vala b/libdino/src/ui/manage_accounts/dialog.vala
index 8f5fb7d1..8f5fb7d1 100644
--- a/client/src/ui/manage_accounts/dialog.vala
+++ b/libdino/src/ui/manage_accounts/dialog.vala
diff --git a/client/src/ui/notifications.vala b/libdino/src/ui/notifications.vala
index 17636995..17636995 100644
--- a/client/src/ui/notifications.vala
+++ b/libdino/src/ui/notifications.vala
diff --git a/client/src/ui/occupant_list.vala b/libdino/src/ui/occupant_list.vala
index ba7c01d1..ba7c01d1 100644
--- a/client/src/ui/occupant_list.vala
+++ b/libdino/src/ui/occupant_list.vala
diff --git a/client/src/ui/occupant_list_row.vala b/libdino/src/ui/occupant_list_row.vala
index 4dc7c0c5..4dc7c0c5 100644
--- a/client/src/ui/occupant_list_row.vala
+++ b/libdino/src/ui/occupant_list_row.vala
diff --git a/client/src/ui/settings_dialog.vala b/libdino/src/ui/settings_dialog.vala
index 2d3c1efa..2d3c1efa 100644
--- a/client/src/ui/settings_dialog.vala
+++ b/libdino/src/ui/settings_dialog.vala
diff --git a/client/src/ui/unified_window.vala b/libdino/src/ui/unified_window.vala
index 269799c2..269799c2 100644
--- a/client/src/ui/unified_window.vala
+++ b/libdino/src/ui/unified_window.vala
diff --git a/client/src/ui/util.vala b/libdino/src/ui/util.vala
index 0a294731..0a294731 100644
--- a/client/src/ui/util.vala
+++ b/libdino/src/ui/util.vala
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
new file mode 100644
index 00000000..cfb14eed
--- /dev/null
+++ b/main/CMakeLists.txt
@@ -0,0 +1,35 @@
+find_package(Vala REQUIRED)
+find_package(PkgConfig REQUIRED)
+include(${VALA_USE_FILE})
+
+set(MAIN_PACKAGES
+ gee-0.8
+ gio-2.0
+ glib-2.0
+ gtk+-3.0
+ gmodule-2.0
+ sqlite3
+)
+
+pkg_check_modules(MAIN REQUIRED ${MAIN_PACKAGES})
+
+vala_precompile(MAIN_VALA_C
+SOURCES
+ src/main.vala
+CUSTOM_VAPIS
+ ${CMAKE_BINARY_DIR}/xmpp-vala/xmpp-vala.vapi
+ ${CMAKE_BINARY_DIR}/qlite/qlite.vapi
+ ${CMAKE_BINARY_DIR}/libdino/dino.vapi
+PACKAGES
+ ${MAIN_PACKAGES}
+OPTIONS
+ --target-glib=2.38
+ -g
+ --thread
+)
+
+set(CFLAGS ${VALA_CFLAGS} ${MAIN_CFLAGS} -I${CMAKE_BINARY_DIR}/xmpp-vala -I${CMAKE_BINARY_DIR}/qlite -I${CMAKE_BINARY_DIR}/libdino)
+add_definitions(${CFLAGS})
+add_executable(dino ${MAIN_VALA_C})
+add_dependencies(dino dino-vapi)
+target_link_libraries(dino libdino) \ No newline at end of file
diff --git a/main/src/main.vala b/main/src/main.vala
new file mode 100644
index 00000000..80f9bea5
--- /dev/null
+++ b/main/src/main.vala
@@ -0,0 +1,20 @@
+using Dino.Entities;
+using Dino.Ui;
+
+namespace Dino {
+
+void main(string[] args) {
+ Gtk.init(ref args);
+ Dino.Ui.Application app = new Dino.Ui.Application();
+ PluginLoader loader = new PluginLoader();
+ foreach(string plugin in new string[]{}) {
+ try {
+ loader.load(plugin, app);
+ } catch (Dino.PluginError e) {
+ print(@"Error loading plugin $plugin: $(e.message)\n");
+ }
+ }
+ app.run(args);
+}
+
+} \ No newline at end of file
diff --git a/qlite/CMakeLists.txt b/qlite/CMakeLists.txt
index d19ed2d2..70ac249f 100644
--- a/qlite/CMakeLists.txt
+++ b/qlite/CMakeLists.txt
@@ -34,7 +34,7 @@ OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
)
-set(CFLAGS ${QLITE_CFLAGS} -g ${VALA_CFLAGS})
+set(CFLAGS ${VALA_CFLAGS} ${QLITE_CFLAGS})
add_definitions(${CFLAGS})
add_library(qlite SHARED ${QLITE_VALA_C})
target_link_libraries(qlite ${QLITE_LIBRARIES})
diff --git a/xmpp-vala/CMakeLists.txt b/xmpp-vala/CMakeLists.txt
index 95c9c44b..a0e91841 100644
--- a/xmpp-vala/CMakeLists.txt
+++ b/xmpp-vala/CMakeLists.txt
@@ -9,7 +9,7 @@ set(ENGINE_PACKAGES
gee-0.8
gio-2.0
glib-2.0
- gtk+-3.0
+ gdk-3.0
)
pkg_check_modules(ENGINE REQUIRED ${ENGINE_PACKAGES})
@@ -80,10 +80,10 @@ OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
)
-set(CFLAGS ${ENGINE_CFLAGS} ${GPGME_CFLAGS} ${LIBUUID_CFLAGS} -g ${VALA_CFLAGS} -I${CMAKE_BINARY_DIR}/gpgme-vala)
+set(CFLAGS ${VALA_CFLAGS} ${ENGINE_CFLAGS} ${GPGME_CFLAGS} ${LIBUUID_CFLAGS} -I${CMAKE_BINARY_DIR}/gpgme-vala)
add_definitions(${CFLAGS})
add_library(xmpp-vala SHARED ${ENGINE_VALA_C})
-add_dependencies(xmpp-vala gpgme-vala gpgme-vapi)
+add_dependencies(xmpp-vala gpgme-vapi)
target_link_libraries(xmpp-vala gpgme-vala ${ENGINE_LIBRARIES} ${GPGME_LIBRARIES} ${LIBUUID_LIBRARIES})
add_custom_target(xmpp-vala-vapi
diff --git a/xmpp-vala/src/core/xmpp_stream.vala b/xmpp-vala/src/core/xmpp_stream.vala
index 5f92113d..2cba2b54 100644
--- a/xmpp-vala/src/core/xmpp_stream.vala
+++ b/xmpp-vala/src/core/xmpp_stream.vala
@@ -93,7 +93,7 @@ public class XmppStream {
}
}
- public IOStream get_stream() {
+ public IOStream? get_stream() {
return stream;
}