├── .gitignore ├── .gitlab └── issue_templates │ └── Bug.md ├── .gitreview ├── .tx └── config ├── AUTHORS ├── CMakeLists.txt ├── CONTRIBUTING.md ├── COPYING ├── README.md ├── cmake ├── GResources.cmake ├── GSettings.cmake └── cmake_uninstall.cmake.in ├── data └── net.jami.Jami.gschema.xml ├── doc ├── Doxyfile.in └── jami-gnome.1 ├── jami-gnome.appdata.xml ├── jami-gnome.desktop ├── jami-gnome.desktop.autostart ├── pixmaps ├── LICENSE ├── LOGO_JAMI_201106.svg ├── LOGO_JAMI_201106_white.svg ├── accept.svg ├── account.svg ├── add-device.svg ├── add.svg ├── addressbook.svg ├── baseline-exit_to_app-24px.svg ├── baseline-mic-24px.svg ├── baseline-mic-recording-24px.svg ├── baseline-send-24px.svg ├── baseline-stop-24px.svg ├── block.svg ├── block_black.svg ├── bottom_arrow.svg ├── call.svg ├── contact.svg ├── devices.svg ├── dial.svg ├── edit.svg ├── export.svg ├── extension_white_24dp.svg ├── fallbackavatar.svg ├── groups-24px.svg ├── history.svg ├── ic_add_black_24px.svg ├── ic_call_black_24px.svg ├── ic_call_end_white_24px.svg ├── ic_chat_white_24px.svg ├── ic_delete_forever_black_24px.svg ├── ic_fiber_manual_record_red_24px.svg ├── ic_high_quality_white_24px.svg ├── ic_history_black_24px.svg ├── ic_mic_off_white_24px.svg ├── ic_mic_white_24px.svg ├── ic_pause_white_24px.svg ├── ic_people_black_24px.svg ├── ic_person_add_black_24px.svg ├── ic_person_add_white_24px.svg ├── ic_play_arrow_white_24px.svg ├── ic_question_answer_black_24px.svg ├── ic_question_answer_white_24px.svg ├── ic_search_black_48px.svg ├── ic_verified_user_black_24px_with_notification.svg ├── ic_verified_user_white_24px_with_notification.svg ├── ic_video_call_black_24px.svg ├── ic_videocam_off_white_24px.svg ├── ic_videocam_white_24px.svg ├── icons_Moderator_Black_24dp.svg ├── icons_Moderator_White_24dp.svg ├── jami-gnome-new.svg ├── jami-gnome.svg ├── more_vert-24px.svg ├── pixmaps.gresource.xml ├── qrcode-white.png ├── qrcode.svg ├── reject.svg ├── retry-white.svg ├── retry.svg ├── revoke.svg ├── save.svg ├── send-white.svg ├── settings.svg ├── stop-white.svg ├── transfer.svg ├── up_arrow.svg ├── users.svg └── view.svg ├── po ├── POTFILES.in ├── README ├── ar.po ├── ar_EG.po ├── az.po ├── be.po ├── be@tarask.po ├── be_BY.po ├── bg.po ├── bg_BG.po ├── bn.po ├── ca.po ├── cs_CZ.po ├── da.po ├── da_DK.po ├── de.po ├── de_DE.po ├── el.po ├── en_GB.po ├── eo.po ├── es.po ├── es_AR.po ├── es_CO.po ├── es_MX.po ├── et.po ├── et_EE.po ├── eu.po ├── fa.po ├── fa_IR.po ├── fi.po ├── fr.po ├── fr_BE.po ├── fr_CA.po ├── fr_CH.po ├── fr_FR.po ├── ga.po ├── gl.po ├── gu.po ├── he.po ├── hi.po ├── hi_IN.po ├── hr.po ├── hu.po ├── id.po ├── ig.po ├── it.po ├── it_IT.po ├── ja.po ├── kk.po ├── kn.po ├── ko.po ├── ko_KR.po ├── lt.po ├── ml.po ├── mn_MN.po ├── mr.po ├── ms.po ├── nb.po ├── ne.po ├── nl.po ├── nl_BE.po ├── nl_NL.po ├── nn.po ├── oc.po ├── pa.po ├── pl.po ├── pl_PL.po ├── pt.po ├── pt_BR.po ├── pt_PT.po ├── ring-client-gnome.pot ├── ro.po ├── ro_RO.po ├── ru.po ├── ru_RU.po ├── si.po ├── sk.po ├── sk_SK.po ├── sl.po ├── sq_AL.po ├── sr@latin.po ├── sr_RS.po ├── sv.po ├── sw.po ├── ta.po ├── te.po ├── th.po ├── tr.po ├── tr_TR.po ├── tt.po ├── uk.po ├── uk_UA.po ├── vi.po ├── zh.po ├── zh_CN.po ├── zh_HK.po └── zh_TW.po ├── scripts └── generate_version.sh ├── sounds ├── LICENSE ├── ringtone_notify.wav └── sounds.gresource.xml ├── src ├── accountcreationwizard.cpp ├── accountcreationwizard.h ├── accountinfopointer.h ├── accountmigrationview.cpp ├── accountmigrationview.h ├── avatarmanipulation.cpp ├── avatarmanipulation.h ├── cc-crop-area.c ├── cc-crop-area.h ├── chatview.cpp ├── chatview.h ├── client.cpp ├── client.h ├── client_options.c ├── client_options.h ├── config.h.in ├── conversationpopupmenu.cpp ├── conversationpopupmenu.h ├── conversationsview.cpp ├── conversationsview.h ├── currentcallview.cpp ├── currentcallview.h ├── defines.h ├── dialogs.cpp ├── dialogs.h ├── generalsettingsview.cpp ├── generalsettingsview.h ├── incomingcallview.cpp ├── incomingcallview.h ├── jami ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── marshals.cpp ├── marshals.h ├── marshals.list ├── mediasettingsview.cpp ├── mediasettingsview.h ├── messagingwidget.cpp ├── messagingwidget.h ├── native │ ├── dbuserrorhandler.cpp │ └── dbuserrorhandler.h ├── newaccountsettingsview.cpp ├── newaccountsettingsview.h ├── notifier.cpp ├── notifier.h ├── pluginsettingsview.cpp ├── pluginsettingsview.h ├── profileview.cpp ├── profileview.h ├── usernameregistrationbox.cpp ├── usernameregistrationbox.h ├── utils │ ├── drawing.cpp │ ├── drawing.h │ ├── files.cpp │ └── files.h ├── video │ ├── video_widget.cpp │ ├── video_widget.h │ ├── xrectsel.c │ └── xrectsel.h ├── webkitchatcontainer.cpp ├── webkitchatcontainer.h ├── welcomeview.cpp └── welcomeview.h ├── ui ├── accountcreationwizard.ui ├── accountmigrationview.ui ├── avatarmanipulation.ui ├── chatview.ui ├── currentcallview.ui ├── gearsmenu.ui ├── generalsettingsview.ui ├── help-overlay.ui ├── incomingcallview.ui ├── mainwindow.ui ├── mediasettingsview.ui ├── messagingwidget.ui ├── newaccountsettingsview.ui ├── pluginsettingsview.ui ├── profile.ui ├── ui.gresource.xml ├── usernameregistrationbox.ui └── webkitchatcontainer.ui └── web ├── .eslintrc.json ├── README ├── chatview-gnome.css ├── chatview.css ├── chatview.html ├── chatview.js ├── emoji.css ├── emoji.js ├── fa.css ├── jed.js ├── linkify-html.js ├── linkify-string.js ├── linkify.js ├── qwebchannel.js └── web.gresource.xml /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | build-local/ 3 | doc/Doxyfile 4 | -------------------------------------------------------------------------------- /.gitlab/issue_templates/Bug.md: -------------------------------------------------------------------------------- 1 | Bug report form 2 | --------------- 3 | 4 | ## OS 5 | 6 | 7 | 8 | ## Jami daemon version: 9 | 10 | 11 | 12 | ## Jami GNOME client version: 13 | 14 | 15 | 16 | ## Where did you get Jami? 17 | 18 | 19 | 20 | - [x] My OS package manager (e.g. apt, yum, pacman) 21 | - [ ] I downloaded it from jami.net 22 | - [ ] I built it from source using the build.py script 23 | - [ ] I built it from source manually or other (please explain): 24 | 25 | ## Steps to reproduce bug 26 | 27 | 30 | 31 | Steps: 32 | 33 | 1. 34 | 35 | 2. 36 | 37 | ## What you expect to happen: 38 | 39 | ## What happens instead: 40 | 41 | ## Logs 42 | 43 | 48 | 49 | ## Additional information 50 | 51 | 54 | 55 | For more information about getting logs, see 56 | https://git.jami.net/savoirfairelinux/ring-project/wikis/tutorials/Bug-report-guide#logs. 57 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=review.jami.net 3 | port=29420 4 | project=jami-client-gnome 5 | defaultremote=origin 6 | defaultbranch=master 7 | -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | 4 | [jami.ring-client-gnomepot] 5 | file_filter = po/.po 6 | source_file = po/ring-client-gnome.pot 7 | source_lang = en 8 | type = PO -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Authors 2 | --------------- 3 | 4 | Adrien Béraud 5 | Alexandre Lision 6 | Edric Milaret 7 | Éloi Bail 8 | Emmanuel Lepage 9 | Guillaume Roguez 10 | Stepan Salenikovich 11 | 12 | Based on the SFLPhone project. 13 | 14 | Artists 15 | --------------- 16 | 17 | Marianne Forget -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Jami Gnome 2 | 3 | GNU Jami welcomes contribution from everyone. Here are some ideas if you want 4 | to help: 5 | 6 | ## Packaging 7 | 8 | Packaging Jami allows easier installation by end-users and in this sense it's an 9 | excellent way of contributing to Jami! 10 | 11 | If your distribution doesn't have a Jami package you can create one, and if 12 | somebody is already maintaining a Jami package for your distribution, 13 | you can help him out! 14 | 15 | ## Design 16 | 17 | Jami aims to be a universal platform of communication, accessible and usable by 18 | everybody. If you find issues with the client, or simply want to suggest 19 | improvement ideas, the bug tracker is the perfect place to submit them. 20 | 21 | ## Documentation 22 | 23 | The documentation should be as up-to-date as possible to help users, devs and 24 | anyone who wants to get information. This wiki is currently located [here](https://git.jami.net/savoirfairelinux/ring-project/wikis/home). 25 | 26 | ## Testing 27 | 28 | The client is under continuous development with new features, bugfixes, etc. 29 | Because communications software depends on a lot of conditions, we need people 30 | to test and fill tickets when necessary. To submit a new bug, go to https://git.jami.net/savoirfairelinux/ring-client-gnome/issues. 31 | 32 | Sometimes interpreting bug reports is difficult for us, for example because we 33 | can't reproduce the bug or understand what exactly the issue is. 34 | This is usually because the bug report lacks of details / is too vague. 35 | 36 | In order to make your bug report as helpful as possible, think about providing 37 | as many details, clear explanations and scenarios as possible! 38 | Also, we've written a [guide on how to report bugs](https://git.jami.net/savoirfairelinux/ring-project/wikis/Bug-report-guide), 39 | if you're unsure, check it out! 40 | 41 | ## Support 42 | 43 | Helping users when they post issues or questions on a social network or IRC for example is appreciated. Thank you! 44 | 45 | ## Communication 46 | 47 | Talk to Jami to other people is appreciated too! 48 | 49 | ## Translation 50 | 51 | We are currently using [Transifex](https://www.transifex.com/savoirfairelinux/ring/) to translate the client. 52 | 53 | ## Development 54 | 55 | Finally and not the least, you can also try to develop new features for this client. 56 | The best way is to communicate with current developers via the Contact section (see below) 57 | or by filling a new issue [here](https://git.jami.net/savoirfairelinux/ring-client-gnome/issues) 58 | or by taking one. See the [`good-first-bug` label](https://git.jami.net/savoirfairelinux/ring-client-gnome/issues?label_name%5B%5D=good+first+bug) 59 | if you don't know where to start. 60 | 61 | # Contact 62 | 63 | contributors and users frequent: 64 | + the `#ring` channel on `irc.freenode.net` 65 | + the mailing list: `ring@gnu.org` 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jami client Gnome 2 | 3 | [![Build Status](https://jenkins.jami.net/buildStatus/icon?job=client-gnome)](https://jenkins.jami.net/job/client-gnome/) 4 | 5 | Jami-client-gnome is a Jami client written in GTK+3. It uses libRingClient to 6 | communicate with the Jami daemon and for all of the underlying models and their 7 | logic. Ideally Jami-client-gnome should only contain UI related code and any 8 | wrappers necessary for interacting with libRingClient. 9 | 10 | Packages for Debian/Ubuntu/Fedora can be found at https://jami.net/ 11 | 12 | More info about the Jami project and the clients can be found on our Gitlab's instance: 13 | https://git.jami.net/ 14 | 15 | GNU Jami welcomes contribution from everyone. See [CONTRIBUTING.md](CONTRIBUTING.md) for help getting started. 16 | 17 | # Setting up your environment 18 | 19 | ## Requirements 20 | 21 | - Jami daemon 22 | - libRingClient 23 | - GTK+3 (3.10 or higher) 24 | - Qt5 Core 25 | - X11 26 | - gnome-icon-theme-symbolic (certain icons are used which other themes might be missing) 27 | - A font with symbols U+1F4DE and U+1F57D (used in some messages) 28 | - libnotify (optional, if you wish to receive desktop notifications of incoming calls, etc) 29 | - gettext (optional to compile translations) 30 | 31 | On Debian/Ubuntu these can be installed by: 32 | ```bash 33 | sudo apt-get install g++ cmake libgtk-3-dev qtbase5-dev libclutter-gtk-1.0-dev gnome-icon-theme-symbolic libnotify-dev gettext 34 | ``` 35 | 36 | On Fedora: 37 | ```bash 38 | sudo dnf install gcc-c++ cmake gtk3-devel qt5-qtbase-devel clutter-gtk-devel gnome-icon-theme-symbolic libnotify-devel gettext 39 | ``` 40 | 41 | The build instructions for the daemon and libRingClient can be found in their 42 | respective repositories. See Gerrit: 43 | - https://gerrit-ring.savoirfairelinux.com/#/admin/projects/ 44 | 45 | 46 | ## Compiling 47 | 48 | In the project root dir: 49 | ```bash 50 | mkdir build 51 | cd build 52 | cmake .. 53 | make 54 | ``` 55 | 56 | You can then simply run `./jami-gnome` from the build directory 57 | 58 | ## Installing 59 | 60 | If you're building the client for use (rather than testing of packaging), it is 61 | recommended that you install it on your system, eg: in `/usr`, `/usr/local`, or 62 | `/opt`, depending on your distro's preference to get full functionality such as 63 | desktop integration. In this case you should perform a 'make install' after 64 | building the client. 65 | 66 | 67 | ## Building without installing Jami daemon and libRingClient 68 | 69 | It is possible to build ring-client-gnome without installing the daemon and 70 | libRingClient on your system (eg: in `/usr` or `/usr/local`): 71 | 72 | 1. build the daemon 73 | 2. when building libRingClient, specify the location of the daemon lib in the 74 | cmake options with -DRING_BUILD_DIR=, eg: 75 | `-DRING_BUILD_DIR=/home/user/ring/daemon/src` 76 | 3. to get the proper headers, we still need to 'make install' libRingClient, but 77 | we don't have to install it in /usr, so just specify another location for the 78 | install prefix in the cmake options, eg: 79 | `-DCMAKE_INSTALL_PREFIX=/home/user/ringinstall` 80 | 4. now compile libRingClient and do 'make install', everything will be installed 81 | in the directory specified by the prefix 82 | 4. now we just have to point the client to the libRingClient cmake module during 83 | the configuration: 84 | `-DLibRingClient_DIR=/home/user/ringinstall/lib/cmake/LibRingClient` 85 | 86 | 87 | ## Debugging 88 | 89 | For now, the build type of the client is "Debug" by default, however it is 90 | useful to also have the debug symbols of libRingClient. To do this, specify this 91 | when compiling libRingClient with `-DCMAKE_BUILD_TYPE=Debug` in the cmake 92 | options. 93 | 94 | ## Generating marshals.* 95 | 96 | ``` 97 | glib-genmarshal --header marshals.list > marshals.h 98 | glib-genmarshal --include-header=marshals.h --body marshals.list > marshals.cpp 99 | ``` -------------------------------------------------------------------------------- /cmake/GResources.cmake: -------------------------------------------------------------------------------- 1 | # The code below was taken from the Venom project which is released under the 2 | # GNU General Public License, version 3 3 | # 4 | # Copyright (C) 2013 Venom authors and contributors 5 | # 6 | # See https://github.com/naxuroqa/Venom for a list of contributors. 7 | # 8 | # This program is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 21 | # 22 | 23 | FIND_PROGRAM(GLIB_COMPILE_RESOURCES_EXECUTABLE NAMES glib-compile-resources) 24 | MARK_AS_ADVANCED(GLIB_COMPILE_RESOURCES_EXECUTABLE) 25 | 26 | INCLUDE(CMakeParseArguments) 27 | 28 | FUNCTION(GLIB_COMPILE_RESOURCES output) 29 | CMAKE_PARSE_ARGUMENTS(ARGS "" "" "SOURCE" ${ARGN}) 30 | SET(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) 31 | SET(out_files "") 32 | 33 | FOREACH(src ${ARGS_SOURCE} ${ARGS_UNPARSED_ARGUMENTS}) 34 | SET(in_file "${CMAKE_CURRENT_SOURCE_DIR}/${src}") 35 | GET_FILENAME_COMPONENT(WORKING_DIR ${in_file} PATH) 36 | STRING(REPLACE ".xml" ".c" src ${src}) 37 | SET(out_file "${DIRECTORY}/${src}") 38 | GET_FILENAME_COMPONENT(OUPUT_DIR ${out_file} PATH) 39 | FILE(MAKE_DIRECTORY ${OUPUT_DIR}) 40 | LIST(APPEND out_files "${DIRECTORY}/${src}") 41 | 42 | #FIXME implicit depends currently not working 43 | EXECUTE_PROCESS( 44 | COMMAND 45 | ${GLIB_COMPILE_RESOURCES_EXECUTABLE} 46 | "--generate-dependencies" 47 | ${in_file} 48 | WORKING_DIRECTORY ${WORKING_DIR} 49 | OUTPUT_VARIABLE in_file_dep 50 | ) 51 | STRING(REGEX REPLACE "(\r?\n)" ";" in_file_dep "${in_file_dep}") 52 | SET(in_file_dep_path "") 53 | FOREACH(dep ${in_file_dep}) 54 | LIST(APPEND in_file_dep_path "${WORKING_DIR}/${dep}") 55 | ENDFOREACH(dep ${in_file_dep}) 56 | ADD_CUSTOM_COMMAND( 57 | OUTPUT ${out_file} 58 | WORKING_DIRECTORY ${WORKING_DIR} 59 | COMMAND 60 | ${GLIB_COMPILE_RESOURCES_EXECUTABLE} 61 | ARGS 62 | "--generate-source" 63 | "--target=${out_file}" 64 | ${in_file} 65 | DEPENDS 66 | ${in_file};${in_file_dep_path} 67 | ) 68 | ENDFOREACH(src ${ARGS_SOURCES} ${ARGS_UNPARSED_ARGUMENTS}) 69 | SET(${output} ${out_files} PARENT_SCOPE) 70 | ENDFUNCTION(GLIB_COMPILE_RESOURCES) 71 | -------------------------------------------------------------------------------- /cmake/GSettings.cmake: -------------------------------------------------------------------------------- 1 | # CMake macros adapted from those written for Marlin, released under GPLv3: 2 | # https://github.com/ammonkey/marlin/blob/master/cmake/GSettings.cmake 3 | # 4 | # Copyright (C) 2015-2022 Savoir-faire Linux Inc. 5 | # Author: Stepan Salenikovich 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | 22 | option (GSETTINGS_LOCALCOMPILE "Compile GSettings schemas locally during build to the location of the binary (no need to run 'make install')" ON) 23 | 24 | option (GSETTINGS_PREFIXINSTALL "Install GSettings Schemas relative to the location specified by the install prefix (instead of relative to where GLib is installed)" ON) 25 | 26 | option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" ${GSETTINGS_LOCALCOMPILE}) 27 | 28 | if (GSETTINGS_LOCALCOMPILE) 29 | message(STATUS "GSettings schemas will be compiled to the build directory during the build.") 30 | endif () 31 | 32 | if (GSETTINGS_PREFIXINSTALL) 33 | message (STATUS "GSettings schemas will be installed relative to the cmake install prefix.") 34 | else () 35 | message (STATUS "GSettings schemas will be installed relative to the GLib install location.") 36 | endif () 37 | 38 | if (GSETTINGS_COMPILE) 39 | message (STATUS "GSettings shemas will be compiled after install.") 40 | endif () 41 | 42 | macro (add_schema SCHEMA_NAME OUTPUT) 43 | 44 | set (PKG_CONFIG_EXECUTABLE pkg-config) 45 | 46 | if (GSETTINGS_PREFIXINSTALL) 47 | set (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/") 48 | else (GSETTINGS_PREFIXINSTALL) 49 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE) 50 | set (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/") 51 | endif (GSETTINGS_PREFIXINSTALL) 52 | 53 | # Validate the schema 54 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) 55 | execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/data/${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) 56 | 57 | if (_schemas_invalid) 58 | message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") 59 | endif (_schemas_invalid) 60 | 61 | if (GSETTINGS_LOCALCOMPILE) 62 | # compile locally during build to not force the user to 'make install' 63 | # when running from the build dir 64 | add_custom_command( 65 | OUTPUT "${PROJECT_BINARY_DIR}/gschemas.compiled" 66 | WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/data" 67 | COMMAND 68 | "${_glib_comple_schemas}" 69 | ARGS 70 | "${PROJECT_SOURCE_DIR}/data" 71 | "--targetdir=${PROJECT_BINARY_DIR}" 72 | DEPENDS 73 | "${PROJECT_SOURCE_DIR}/data/${SCHEMA_NAME}" 74 | VERBATIM 75 | ) 76 | 77 | set(${OUTPUT} "${PROJECT_BINARY_DIR}/gschemas.compiled") 78 | endif (GSETTINGS_LOCALCOMPILE) 79 | 80 | # Actually install and recompile schemas 81 | install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL) 82 | 83 | if (GSETTINGS_COMPILE) 84 | install (CODE "message (STATUS \"Compiling GSettings schemas\")") 85 | install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})") 86 | endif () 87 | endmacro() 88 | -------------------------------------------------------------------------------- /cmake/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | # Taken from: 2 | # https://cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F 3 | # 4 | # Copyright (C) 2016-2022 Savoir-faire Linux Inc. 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | # 20 | 21 | if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 22 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 23 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 24 | 25 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 26 | string(REGEX REPLACE "\n" ";" files "${files}") 27 | foreach(file ${files}) 28 | message(STATUS "Uninstalling $ENV{DESTDIR}${file}") 29 | if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 30 | exec_program( 31 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 32 | OUTPUT_VARIABLE rm_out 33 | RETURN_VALUE rm_retval 34 | ) 35 | if(NOT "${rm_retval}" STREQUAL 0) 36 | message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") 37 | endif(NOT "${rm_retval}" STREQUAL 0) 38 | else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 39 | message(STATUS "File $ENV{DESTDIR}${file} does not exist.") 40 | endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 41 | endforeach(file) 42 | -------------------------------------------------------------------------------- /data/net.jami.Jami.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | Start Jami on login. 7 | Start Jami on login. Only supported on XDG compliant desktop environments. 8 | 9 | 10 | true 11 | Show status (system tray) icon. 12 | When set to true Jami will continue to run if the main window is closed. 13 | 14 | 15 | true 16 | Bring window to foreground on incoming calls. 17 | Bring window to foreground on incoming calls. 18 | 19 | 20 | true 21 | Saves whether or not the main window is currently visible or not. 22 | This is used when launching the application with the '--restore-last-window-state' option, which will launch the application with the main window in the same state as when Jami was last quit. 23 | 24 | 25 | true 26 | Display the chat to the rigth (default) or at the bottom. 27 | If the chat pane is horizontal then the chat is displayed to the right of the video; otherwise it will be displayed bellow it. 28 | 29 | 30 | false 31 | Never display the backup key window. 32 | At the end of the account creation, the wizard show a window to export the account's key. This boolean is used to avoid to show this window again 33 | 34 | 35 | true 36 | Enable chatview to display external images. 37 | 38 | 39 | true 40 | Enable notifications for incoming calls. 41 | 42 | 43 | true 44 | Enable typing indications into the chatview. 45 | 46 | 47 | true 48 | Enable notifications for pending requests. 49 | 50 | 51 | true 52 | Enable notifications for new chat messages. 53 | 54 | 55 | 800 56 | Main window width. 57 | Main window width. 58 | 59 | 60 | 500 61 | Main window height. 62 | Main window height. 63 | 64 | 65 | false 66 | Entering a number in the search entry places a new call. 67 | Entering a number in the search entry places a new call. If false, then this will instead open a chat view. 68 | 69 | 70 | "" 71 | The user selected account. 72 | The account id of the user selected account; if empty there is no valid account selected. 73 | 74 | 75 | 0 76 | Number of days to store the history. 77 | Keep history only within the limit. 0 for unlimited history. 78 | 79 | 80 | "" 81 | Where ring downloads files. 82 | When a contact sends a file, this file will be stored in the folder previously described. 83 | 84 | 85 | false 86 | If window is maximized. 87 | 88 | 89 | false 90 | If window is fullscren. 91 | 92 | 93 | false 94 | Accept files transfer from untrusted peers 95 | Accept files transfer from untrusted peers. 96 | 97 | 98 | true 99 | Accept files transfer from trusted peers 100 | Accept files transfer from trusted peers. 101 | 102 | 103 | 20 104 | Accept files transfer with an inferior size in Mb 105 | Accept files transfer with an inferior size in Mb. 106 | 107 | 108 | false 109 | Just check if default directory for filetransfer was migrated 110 | Just check if default directory for filetransfer was migrated. 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /doc/Doxyfile.in: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "@CMAKE_PROJECT_NAME@" 2 | PROJECT_NUMBER = @PROJECT_VERSION@ 3 | INPUT = @PROJECT_SOURCE_DIR@ 4 | RECURSIVE = YES 5 | EXCLUDE = @PROJECT_BINARY_DIR@ 6 | FILE_PATTERNS = *.cpp *.h *.c *.md 7 | INPUT_ENCODING = UTF-8 8 | USE_MDFILE_AS_MAINPAGE = @PROJECT_SOURCE_DIR@/doc/README.md 9 | EXTRACT_ALL = YES 10 | EXTRACT_LOCAL_CLASSES = YES 11 | -------------------------------------------------------------------------------- /doc/jami-gnome.1: -------------------------------------------------------------------------------- 1 | .\" Manpage for jami-gnome. 2 | .TH man 8 "08 April 2016" "1.0" "jami-gnome man page" 3 | .SH NAME 4 | jami-gnome \- Gnome client for jami.net 5 | .SH SYNOPSIS 6 | jami-gnome [options] 7 | .SH DESCRIPTION 8 | jami-gnome is a gnome client for jami.net 9 | .SH OPTIONS 10 | .B \-v, \-\-version 11 | Display the version and exit. 12 | .TP 13 | .B \-d, \-\-debug 14 | Enable debug. 15 | .TP 16 | .B \-r, \-\-restore-last-window-state 17 | Restores the hidden state of the main window. This is only applicable to the primary instance. 18 | .TP 19 | .B \-h, \-\-help 20 | Display help text and exit. 21 | .SH SEE ALSO 22 | jamid(1) 23 | .SH AUTHOR 24 | Alexandre Viau (alexandre.viau@savoirfairelinux.net) 25 | -------------------------------------------------------------------------------- /jami-gnome.appdata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | net.jami.Jami 6 | CC-BY-SA-3.0 7 | GPL-3.0+ 8 | Jami (GNOME client) 9 | Jami (GNOME-ügyfél) 10 | Privacy-oriented voice, video, chat, and conference platform 11 | Adatvédelem-orientált hang-, video-, csevegés- és konferenciaplatform 12 | jami-gnome 13 | 14 |

15 | An end-to-end encrypted secure and distributed voice, video, and 16 | chat communication platform that requires no central server and 17 | leaves the power of privacy and freedom in the hands of users. 18 |

19 |

20 | Jami supports the following key features: 21 |

22 |
    23 |
  • One-to-one conversations
  • 24 |
  • File sharing
  • 25 |
  • Audio calls and conferences
  • 26 |
  • Video calls and conferences
  • 27 |
  • Screen sharing in video calls and conferences
  • 28 |
  • Recording and sending audio messages
  • 29 |
  • Recording and sending video messages
  • 30 |
  • Functioning as a SIP phone software
  • 31 |
32 |

33 | Client applications for GNU/Linux, Windows, macOS, iOS, Android, 34 | and Android TV are available, making Jami an interoperable and 35 | cross-platform communication framework. 36 |

37 | 38 |

39 | Végpontokig titkosított biztonságos és elosztott hang-, videó- 40 | és csevegés-kommunikációs platform, amely nem igényel központi 41 | kiszolgálót, és a felhasználók kezében hagyja a magánélet és a 42 | szabadság hatalmát. 43 |

44 |

45 | A Jami a következő főbb funkciókat támogatja: 46 |

47 |
    48 |
  • Személyes beszélgetések
  • 49 |
  • Fájlmegosztás
  • 50 |
  • Hanghívások és konferenciák
  • 51 |
  • Videohívások és konferenciák
  • 52 |
  • Képernyőmegosztás videohívásokban és 53 | konferenciákon
  • 54 |
  • Hangüzenetek rögzítése és küldése
  • 55 |
  • Videoüzenetek rögzítése és küldése
  • 56 |
  • SIP-telefonszoftverként működik
  • 57 |
58 |

59 | Elérhetők a GNU/Linux, Windows, macOS, iOS, Android és Android TV 60 | ügyfélalkalmazásai, így a Jami interoperábilis és többplatformos 61 | kommunikációs keretrendszerré válik. 62 |

63 | 64 |
65 | 66 | https://jami.net/ 67 | https://git.jami.net/savoirfairelinux/jami-client-gnome/-/issues 68 | https://jami.net/help/ 69 | https://git.jami.net/savoirfairelinux/jami-project/-/wikis/home 70 | https://www.paypal.com/donate/?hosted_button_id=MGUDJLQZ4TP5W 71 | https://www.transifex.com/savoirfairelinux/jami/ 72 | 73 | 74 | 75 | 76 | 77 | Send Audio, Video and Chat messages 78 | Hang-, video- és csevegőüzeneteket küldhet 79 | https://dl.jami.net/media-resources/screenshots/jami_linux_audiovideo.png 80 | 81 | 82 | Easily share desktop contents 83 | Könnyen megoszthatja az asztali tartalmat 84 | https://dl.jami.net/media-resources/screenshots/jami_linux_screenshare.png 85 | 86 | 87 | Crystal clear audio calls between Jami users 88 | Kristálytiszta hanghívások a Jami felhasználók között 89 | 90 | 91 | 92 | Conference calls with an unlimited participants 93 | Konferenciahívások korlátlan számú résztvevővel 94 | 95 | 96 | 97 | Encrypted and secure text messaging, no servers 98 | Titkosított és biztonságos csevegési üzenetküldés, kiszolgálók nélkül 99 | 100 | 101 | 102 | Send files of any size 103 | Bármilyen méretű fájl küldése 104 | 105 | 106 | 107 | 108 | jami-gnome.desktop 109 | 110 | jami-gnomejami 111 | 112 | 113 | 114 | 115 | Chat 116 | Communication 117 | FileTransfer 118 | GNOME 119 | GTK 120 | InstantMessaging 121 | Network 122 | Office 123 | P2P 124 | Productivity 125 | 126 | 127 | jami-client-gnome 128 | 129 | 130 | intense 131 | intense 132 | 133 | 134 | net.jami.daemon 135 | 136 |
137 | -------------------------------------------------------------------------------- /jami-gnome.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Jami (GNOME client) 3 | Name[hu]=Jami (GNOME-ügyfél) 4 | GenericName=Jami (GNOME client) 5 | GenericName[hu]=Jami (GNOME-ügyfél) 6 | Comment=Privacy-oriented voice, video, chat, and conference platform 7 | Comment[hu]=Adatvédelem-orientált hang-, video-, csevegés- és konferenciaplatform 8 | Comment[ru]=Jami — приложение для защищённой связи с распределённой архитектурой 9 | Exec=jami-gnome %u 10 | Icon=jami-gnome 11 | StartupNotify=true 12 | Terminal=false 13 | Type=Application 14 | Categories=GNOME;GTK;Network;Telephony; 15 | Keywords=chat;talk;im;message;voip; 16 | -------------------------------------------------------------------------------- /jami-gnome.desktop.autostart: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Jami (GNOME client) 3 | Name[hu]=Jami (GNOME-ügyfél) 4 | GenericName=Jami (GNOME client) 5 | GenericName[hu]=Jami (GNOME-ügyfél) 6 | Comment=Privacy-oriented voice, video, chat, and conference platform 7 | Comment[hu]=Adatvédelem-orientált hang-, video-, csevegés- és konferenciaplatform 8 | Comment[ru]=Jami — приложение для защищённой связи с распределённой архитектурой 9 | Exec=jami-gnome --restore-last-window-state 10 | Icon=jami-gnome 11 | StartupNotify=true 12 | Terminal=false 13 | Type=Application 14 | Categories=GNOME;GTK;Network;Telephony; 15 | -------------------------------------------------------------------------------- /pixmaps/LICENSE: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | 3 | Files: ic_history_black_24px.svg 4 | ic_people_black_24px.svg 5 | ic_question_answer_black_24px.svg 6 | Copyright: 2014-2017 Material Design Authors 7 | License: Apache-2.0 8 | 9 | License: Apache-2.0 10 | Licensed under the Apache License, Version 2.0 (the "License"); 11 | you may not use this file except in compliance with the License. 12 | You may obtain a copy of the License at 13 | . 14 | http://www.apache.org/licenses/LICENSE-2.0 15 | . 16 | Unless required by applicable law or agreed to in writing, software 17 | distributed under the License is distributed on an "AS IS" BASIS, 18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | See the License for the specific language governing permissions and 20 | limitations under the License. 21 | -------------------------------------------------------------------------------- /pixmaps/accept.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/account.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/add-device.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/baseline-exit_to_app-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/baseline-mic-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/baseline-mic-recording-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 31 | 52 | 55 | 59 | 65 | 72 | 73 | -------------------------------------------------------------------------------- /pixmaps/baseline-send-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/baseline-stop-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/block.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/block_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/bottom_arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /pixmaps/devices.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/dial.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 24 | 27 | 31 | 35 | 36 | 43 | 45 | 49 | 53 | 54 | 56 | 60 | 64 | 65 | 67 | 71 | 75 | 76 | 85 | 86 | 108 | 110 | 111 | 113 | image/svg+xml 114 | 116 | 117 | 118 | 119 | 120 | 124 | 133 | 141 | 149 | 158 | 162 | 169 | 177 | 185 | 193 | 201 | 209 | 217 | 225 | 233 | 241 | 242 | 243 | 244 | -------------------------------------------------------------------------------- /pixmaps/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/export.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/extension_white_24dp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pixmaps/fallbackavatar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /pixmaps/groups-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pixmaps/ic_add_black_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pixmaps/ic_call_black_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pixmaps/ic_call_end_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_chat_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_delete_forever_black_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_fiber_manual_record_red_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_high_quality_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_history_black_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pixmaps/ic_mic_off_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_mic_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_pause_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_people_black_24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pixmaps/ic_person_add_black_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pixmaps/ic_person_add_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pixmaps/ic_play_arrow_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_question_answer_black_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pixmaps/ic_question_answer_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pixmaps/ic_search_black_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_verified_user_black_24px_with_notification.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 30 | 32 | 52 | 56 | 59 | 65 | 66 | -------------------------------------------------------------------------------- /pixmaps/ic_verified_user_white_24px_with_notification.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 30 | 32 | 52 | 56 | 60 | 66 | 67 | -------------------------------------------------------------------------------- /pixmaps/ic_video_call_black_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pixmaps/ic_videocam_off_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/ic_videocam_white_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/icons_Moderator_Black_24dp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /pixmaps/icons_Moderator_White_24dp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /pixmaps/more_vert-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /pixmaps/pixmaps.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jami-gnome.svg 5 | jami-gnome-new.svg 6 | LOGO_JAMI_201106.svg 7 | LOGO_JAMI_201106_white.svg 8 | addressbook.svg 9 | history.svg 10 | ic_delete_forever_black_24px.svg 11 | users.svg 12 | dial.svg 13 | call.svg 14 | ic_video_call_black_24px.svg 15 | ic_call_end_white_24px.svg 16 | ic_fiber_manual_record_red_24px.svg 17 | baseline-mic-24px.svg 18 | baseline-mic-recording-24px.svg 19 | contact.svg 20 | accept.svg 21 | ic_chat_white_24px.svg 22 | ic_mic_off_white_24px.svg 23 | ic_mic_white_24px.svg 24 | ic_videocam_off_white_24px.svg 25 | ic_videocam_white_24px.svg 26 | ic_pause_white_24px.svg 27 | baseline-stop-24px.svg 28 | stop-white.svg 29 | baseline-send-24px.svg 30 | send-white.svg 31 | ic_play_arrow_white_24px.svg 32 | ic_high_quality_white_24px.svg 33 | ic_people_black_24px.svg 34 | ic_question_answer_black_24px.svg 35 | ic_question_answer_white_24px.svg 36 | ic_verified_user_black_24px_with_notification.svg 37 | ic_verified_user_white_24px_with_notification.svg 38 | ic_history_black_24px.svg 39 | add.svg 40 | reject.svg 41 | baseline-exit_to_app-24px.svg 42 | block.svg 43 | block_black.svg 44 | ic_person_add_black_24px.svg 45 | ic_person_add_white_24px.svg 46 | ic_search_black_48px.svg 47 | ic_call_black_24px.svg 48 | fallbackavatar.svg 49 | transfer.svg 50 | revoke.svg 51 | edit.svg 52 | add-device.svg 53 | devices.svg 54 | save.svg 55 | settings.svg 56 | export.svg 57 | account.svg 58 | bottom_arrow.svg 59 | up_arrow.svg 60 | qrcode.svg 61 | qrcode-white.png 62 | retry.svg 63 | retry-white.svg 64 | extension_white_24dp.svg 65 | view.svg 66 | more_vert-24px.svg 67 | groups-24px.svg 68 | icons_Moderator_Black_24dp.svg 69 | icons_Moderator_White_24dp.svg 70 | 71 | 72 | -------------------------------------------------------------------------------- /pixmaps/qrcode-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/savoirfairelinux/jami-client-gnome/d3f27548b5dac73734f660b19ded93ec1c51c84f/pixmaps/qrcode-white.png -------------------------------------------------------------------------------- /pixmaps/qrcode.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 32 | 34 | 54 | 62 | 63 | -------------------------------------------------------------------------------- /pixmaps/reject.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/retry-white.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pixmaps/retry.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pixmaps/revoke.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/save.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/send-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/settings.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/stop-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/transfer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/up_arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pixmaps/view.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | ui/help-overlay.ui 2 | ui/mainwindow.ui 3 | ui/accountmigrationview.ui 4 | ui/currentcallview.ui 5 | ui/accountcreationwizard.ui 6 | ui/gearsmenu.ui 7 | ui/generalsettingsview.ui 8 | ui/profile.ui 9 | ui/mediasettingsview.ui 10 | ui/newaccountsettingsview.ui 11 | ui/usernameregistrationbox.ui 12 | ui/webkitchatcontainer.ui 13 | ui/pluginsettingsview.ui 14 | ui/chatview.ui 15 | ui/messagingwidget.ui 16 | ui/incomingcallview.ui 17 | ui/avatarmanipulation.ui 18 | src/conversationsview.cpp 19 | src/mediasettingsview.cpp 20 | src/marshals.cpp 21 | src/pluginsettingsview.cpp 22 | src/usernameregistrationbox.cpp 23 | src/generalsettingsview.cpp 24 | src/utils/files.cpp 25 | src/utils/drawing.cpp 26 | src/welcomeview.cpp 27 | src/notifier.cpp 28 | src/video/video_widget.cpp 29 | src/video/xrectsel.c 30 | src/avatarmanipulation.cpp 31 | src/messagingwidget.cpp 32 | src/cc-crop-area.c 33 | src/main.cpp 34 | src/dialogs.cpp 35 | src/native/dbuserrorhandler.cpp 36 | src/client_options.c 37 | src/incomingcallview.cpp 38 | src/conversationpopupmenu.cpp 39 | src/profileview.cpp 40 | src/accountcreationwizard.cpp 41 | src/mainwindow.cpp 42 | src/chatview.cpp 43 | src/webkitchatcontainer.cpp 44 | src/client.cpp 45 | src/accountmigrationview.cpp 46 | src/currentcallview.cpp 47 | src/newaccountsettingsview.cpp 48 | -------------------------------------------------------------------------------- /po/README: -------------------------------------------------------------------------------- 1 | Translation guide: 2 | 3 | The client uses gettext for translations, for a comprehensive guide see: 4 | http://www.gnu.org/software/gettext/manual/gettext.htm 5 | 6 | In order to generate the .pot (template) file with all the translation strings, 7 | append all the filenames that require translation to POTFILES.in, then run the 8 | following command: 9 | xgettext -o ring-client-gnome.pot --keyword=_ --keyword=C_:1c,2 --keyword=N_ -D .. -f POTFILES.in 10 | 11 | Replace the first 3 lines of the generated header with: 12 | # Gettext PO translation template file for the GNOME client of the Ring project. 13 | # Copyright (C) 2015-2022 Savoir-faire Linux Inc. 14 | # This file is distributed under the same license as the Ring package. 15 | 16 | The translation files are expected to be located in the /po dir using the 17 | following naming convention: 18 | [_].po 19 | for example: fr_CA.po, lt.po 20 | 21 | The Ring project uses Transifex.com to facilitate the translation process. The 22 | project page can be found here: 23 | https://www.transifex.com/savoirfairelinux/ring 24 | 25 | To pull translations from transifex using the tx client, execute: 26 | tx pull -fa --minimum-perc 1 27 | -------------------------------------------------------------------------------- /scripts/generate_version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | branch_name=$1 # (release/yyyymm) 4 | if [ "x${git_cmd}" != "x" ]; then 5 | echo "git not available!" # fallback to development 6 | exit 1 7 | fi 8 | if [[ ${branch_name} = release/* ]]; then 9 | git_cmd=$(which git) 10 | 11 | major_nb=$(echo ${branch_name} | /bin/grep -Po '\d{4}') 12 | minor_nb=$(echo ${branch_name} | /bin/grep -Po '\d{2}$') 13 | patch_nb=$(git rev-list --count ${branch_name} ^master) 14 | if [ "x${major_nb}" != "x" ] && [ "x${minor_nb}" != "x" ] && [ "x${patch_nb}" != "x" ]; then 15 | echo "${major_nb}.${minor_nb}.${patch_nb}" > version.txt 16 | else 17 | echo "Incorrect version!" 18 | exit 1 19 | fi 20 | else 21 | echo $(git rev-parse HEAD) > version.txt 22 | fi 23 | exit 0 24 | -------------------------------------------------------------------------------- /sounds/LICENSE: -------------------------------------------------------------------------------- 1 | ringtone_notify.wav: 2 | https://creativecommons.org/licenses/by-sa/4.0/ 3 | made by Andreas Traczyk andreas.traczyk@savoifairelinux.com 4 | -------------------------------------------------------------------------------- /sounds/ringtone_notify.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/savoirfairelinux/jami-client-gnome/d3f27548b5dac73734f660b19ded93ec1c51c84f/sounds/ringtone_notify.wav -------------------------------------------------------------------------------- /sounds/sounds.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ringtone_notify.wav 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/accountcreationwizard.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016-2022 Savoir-faire Linux Inc. 3 | * Author: Alexandre Viau 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | 24 | #include 25 | 26 | #include 27 | 28 | #include "accountinfopointer.h" 29 | 30 | namespace lrc 31 | { 32 | namespace api 33 | { 34 | class AVModel; 35 | class NewAccountModel; 36 | } 37 | } 38 | 39 | G_BEGIN_DECLS 40 | 41 | #define ACCOUNT_CREATION_WIZARD_TYPE (account_creation_wizard_get_type ()) 42 | #define ACCOUNT_CREATION_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNT_CREATION_WIZARD_TYPE, AccountCreationWizard)) 43 | #define ACCOUNT_CREATION_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ACCOUNT_CREATION_WIZARD_TYPE, AccountCreationWizardClass)) 44 | #define IS_ACCOUNT_CREATION_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ACCOUNT_CREATION_WIZARD_TYPE)) 45 | #define IS_ACCOUNT_CREATION_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ACCOUNT_CREATION_WIZARD_TYPE)) 46 | 47 | typedef struct _AccountCreationWizard AccountCreationWizard; 48 | typedef struct _AccountCreationWizardClass AccountCreationWizardClass; 49 | 50 | GType account_creation_wizard_get_type (void) G_GNUC_CONST; 51 | GtkWidget *account_creation_wizard_new (lrc::api::AVModel& avModel, lrc::api::NewAccountModel& accountModel, bool useDarkTheme); 52 | 53 | void account_creation_wizard_show_preview (AccountCreationWizard *win, gboolean show_preview = TRUE); 54 | void show_rendezvous_creation_wizard (AccountCreationWizard *win); 55 | void account_creation_wizard_account_added (AccountCreationWizard *view, const std::string& id); 56 | void account_creation_show_error_view (AccountCreationWizard *view, const std::string& id); 57 | 58 | G_END_DECLS 59 | -------------------------------------------------------------------------------- /src/accountinfopointer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018-2022 Savoir-faire Linux Inc. 3 | * Author: Hugo Lefeuvre 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | namespace lrc 21 | { 22 | namespace api 23 | { 24 | namespace account 25 | { 26 | struct Info; 27 | } 28 | } 29 | } 30 | 31 | typedef const lrc::api::account::Info* AccountInfoPointer; 32 | -------------------------------------------------------------------------------- /src/accountmigrationview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016-2022 Savoir-faire Linux Inc. 3 | * Author: Alexandre Viau 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | 24 | #include 25 | #include "accountinfopointer.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define ACCOUNT_MIGRATION_VIEW_TYPE (account_migration_view_get_type ()) 30 | #define ACCOUNT_MIGRATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNT_MIGRATION_VIEW_TYPE, AccountMigrationView)) 31 | #define ACCOUNT_MIGRATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ACCOUNT_MIGRATION_VIEW_TYPE, AccountMigrationViewClass)) 32 | #define IS_ACCOUNT_MIGRATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ACCOUNT_MIGRATION_VIEW_TYPE)) 33 | #define IS_ACCOUNT_MIGRATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ACCOUNT_MIGRATION_VIEW_TYPE)) 34 | 35 | typedef struct _AccountMigrationView AccountMigrationView; 36 | typedef struct _AccountMigrationViewClass AccountMigrationViewClass; 37 | 38 | GType account_migration_view_get_type (void) G_GNUC_CONST; 39 | GtkWidget *account_migration_view_new (AccountInfoPointer const& accountInfo); 40 | 41 | G_END_DECLS 42 | -------------------------------------------------------------------------------- /src/avatarmanipulation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016-2022 Savoir-faire Linux Inc. 3 | * Author: Nicolas Jager 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef _AVATARMANIPULATION_H 21 | #define _AVATARMANIPULATION_H 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include "accountinfopointer.h" 28 | 29 | namespace lrc 30 | { 31 | namespace api 32 | { 33 | class AVModel; 34 | } 35 | } 36 | 37 | G_BEGIN_DECLS 38 | 39 | #define AVATAR_MANIPULATION_TYPE (avatar_manipulation_get_type ()) 40 | #define AVATAR_MANIPULATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AVATAR_MANIPULATION_TYPE, AvatarManipulation)) 41 | #define AVATAR_MANIPULATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), AVATAR_MANIPULATION_TYPE, AvatarManipulation)) 42 | #define IS_AVATAR_MANIPULATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AVATAR_MANIPULATION_TYPE)) 43 | #define IS_AVATAR_MANIPULATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), AVATAR_MANIPULATION_TYPE)) 44 | 45 | 46 | typedef struct _AvatarManipulation AvatarManipulation; 47 | typedef struct _AvatarManipulationClass AvatarManipulationClass; 48 | 49 | /** 50 | * AvatarManipulationState: 51 | * @AVATAR_MANIPULATION_STATE_CURRENT: The initial state. The widget will display the current 52 | * or the default avatar, with the possible actions being to start the camera (if available) to 53 | * take a new photo) or to select an existing image. 54 | * @AVATAR_MANIPULATION_STATE_PHOTO: The state in which the camera is on and the video is being 55 | * shown. The possible actions are to take a snapshot or to return to the previous state. 56 | * @AVATAR_MANIPULATION_STATE_EDIT: The state after selecting a new image (or snapping a photo). The 57 | * user must select the square area they wish to use for the avatar. The possible actions are to 58 | * confirm the selection or to return to the previous state. 59 | */ 60 | typedef enum 61 | { 62 | AVATAR_MANIPULATION_STATE_CURRENT, 63 | AVATAR_MANIPULATION_STATE_PHOTO, 64 | AVATAR_MANIPULATION_STATE_EDIT 65 | } AvatarManipulationState; 66 | 67 | 68 | GType avatar_manipulation_get_type (void) G_GNUC_CONST; 69 | GtkWidget *avatar_manipulation_new (AccountInfoPointer const & accountInfo, lrc::api::AVModel* avModel); 70 | 71 | /* used from the account creation wizard */ 72 | GtkWidget *avatar_manipulation_new_from_wizard(lrc::api::AVModel* avModel); 73 | void avatar_manipulation_wizard_completed(AvatarManipulation *); 74 | gchar* avatar_manipulation_get_temporary (AvatarManipulation *view); 75 | 76 | G_END_DECLS 77 | 78 | #endif /* _AVATARMANIPULATION_H */ 79 | -------------------------------------------------------------------------------- /src/cc-crop-area.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Bastien Nocera 3 | * 4 | * Licensed under the GNU General Public License Version 2 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef _CC_CROP_AREA_H_ 21 | #define _CC_CROP_AREA_H_ 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define CC_TYPE_CROP_AREA (cc_crop_area_get_type ()) 29 | #define CC_CROP_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CC_TYPE_CROP_AREA, \ 30 | CcCropArea)) 31 | #define CC_CROP_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CC_TYPE_CROP_AREA, \ 32 | CcCropAreaClass)) 33 | #define CC_IS_CROP_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CC_TYPE_CROP_AREA)) 34 | #define CC_IS_CROP_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CC_TYPE_CROP_AREA)) 35 | #define CC_CROP_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CC_TYPE_CROP_AREA, \ 36 | CcCropAreaClass)) 37 | 38 | typedef struct _CcCropAreaClass CcCropAreaClass; 39 | typedef struct _CcCropArea CcCropArea; 40 | typedef struct _CcCropAreaPrivate CcCropAreaPrivate; 41 | 42 | struct _CcCropAreaClass { 43 | GtkDrawingAreaClass parent_class; 44 | }; 45 | 46 | struct _CcCropArea { 47 | GtkDrawingArea parent_instance; 48 | CcCropAreaPrivate *priv; 49 | }; 50 | 51 | GType cc_crop_area_get_type (void) G_GNUC_CONST; 52 | 53 | GtkWidget *cc_crop_area_new (void); 54 | GdkPixbuf *cc_crop_area_get_picture (CcCropArea *area); 55 | void cc_crop_area_set_picture (CcCropArea *area, 56 | GdkPixbuf *pixbuf); 57 | void cc_crop_area_set_min_size (CcCropArea *area, 58 | gint width, 59 | gint height); 60 | void cc_crop_area_set_constrain_aspect (CcCropArea *area, 61 | gboolean constrain); 62 | 63 | G_END_DECLS 64 | 65 | #endif /* _CC_CROP_AREA_H_ */ 66 | -------------------------------------------------------------------------------- /src/chatview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * Author: Nicolas Jäger 5 | * Author: Sébastien Blin 6 | * Author: Hugo Lefeuvre 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 21 | */ 22 | 23 | #pragma once 24 | 25 | // Gtk 26 | #include 27 | 28 | // Client related 29 | #include "api/account.h" 30 | #include "webkitchatcontainer.h" 31 | #include "accountinfopointer.h" 32 | 33 | namespace lrc 34 | { 35 | namespace api 36 | { 37 | class AVModel; 38 | class PluginModel; 39 | namespace conversation 40 | { 41 | struct Info; 42 | } 43 | } 44 | } 45 | 46 | G_BEGIN_DECLS 47 | 48 | #define CHAT_VIEW_TYPE (chat_view_get_type ()) 49 | #define CHAT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAT_VIEW_TYPE, ChatView)) 50 | #define CHAT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CHAT_VIEW_TYPE, ChatViewClass)) 51 | #define IS_CHAT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CHAT_VIEW_TYPE)) 52 | #define IS_CHAT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CHAT_VIEW_TYPE)) 53 | 54 | typedef struct _ChatView ChatView; 55 | typedef struct _ChatViewClass ChatViewClass; 56 | 57 | GType chat_view_get_type (void) G_GNUC_CONST; 58 | GtkWidget *chat_view_new (WebKitChatContainer* view, 59 | AccountInfoPointer const & accountInfo, 60 | lrc::api::conversation::Info& conversation, 61 | lrc::api::AVModel& avModel, 62 | lrc::api::PluginModel& pluginModel); 63 | lrc::api::conversation::Info& chat_view_get_conversation(ChatView*); 64 | void chat_view_update_temporary(ChatView*); 65 | void chat_view_set_header_visible(ChatView*, gboolean); 66 | void chat_view_set_record_visible(ChatView*, gboolean); 67 | void chat_view_set_plugin_visible(ChatView*, gboolean); 68 | 69 | G_END_DECLS 70 | -------------------------------------------------------------------------------- /src/client.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef CLIENT_H_ 21 | #define CLIENT_H_ 22 | 23 | #include 24 | #include "config.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GSETTINGS_SCHEMA JAMI_CLIENT_APP_ID 29 | 30 | #define CLIENT_TYPE (client_get_type()) 31 | #define CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CLIENT_TYPE, Client)) 32 | #define CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CLIENT_TYPE, ClientClass)) 33 | #define IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CLIENT_TYPE)) 34 | #define IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CLIENT_TYPE)) 35 | 36 | typedef struct _ClientClass ClientClass; 37 | typedef struct _Client Client; 38 | 39 | /* Public interface */ 40 | GType client_get_type (void) G_GNUC_CONST; 41 | Client *client_new (int argc, char *argv[]); 42 | GtkWindow *client_get_main_window(Client *client); 43 | 44 | /** 45 | * Sets if the client should attempt to restore the main window state (hidden or not) to what it was 46 | * when it was last quit (stored by the "show-main-window" gsetting). This function must be 47 | * called before the main window is created for the first time for it to have an effect. 48 | */ 49 | void client_set_restore_main_window_state(Client *client, gboolean restore); 50 | 51 | G_END_DECLS 52 | 53 | #endif /* CLIENT_H_ */ 54 | -------------------------------------------------------------------------------- /src/client_options.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013-2022 Savoir-faire Linux Inc. 3 | * Author: Tristan Matthews 4 | * Author: Stepan Salenikovich 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | */ 20 | 21 | #include "client_options.h" 22 | 23 | #include "config.h" 24 | #include "client.h" 25 | #include 26 | #include 27 | #include 28 | 29 | G_GNUC_NORETURN static gboolean 30 | option_version_cb(G_GNUC_UNUSED const gchar *option_name, 31 | G_GNUC_UNUSED const gchar *value, 32 | G_GNUC_UNUSED gpointer data, 33 | G_GNUC_UNUSED GError **error) 34 | { 35 | g_print("%s\n", VERSION); 36 | exit(EXIT_SUCCESS); 37 | } 38 | 39 | static gboolean 40 | option_debug_cb(G_GNUC_UNUSED const gchar *option_name, 41 | G_GNUC_UNUSED const gchar *value, 42 | G_GNUC_UNUSED gpointer data, 43 | G_GNUC_UNUSED GError **error) 44 | { 45 | g_setenv("G_MESSAGES_DEBUG", "all", TRUE); 46 | g_setenv("CHATVIEW_DEBUG", "true", TRUE); 47 | g_debug("debug enabled"); 48 | return TRUE; 49 | } 50 | 51 | static gboolean 52 | option_restore_cb(G_GNUC_UNUSED const gchar *option_name, 53 | G_GNUC_UNUSED const gchar *value, 54 | G_GNUC_UNUSED gpointer data, 55 | G_GNUC_UNUSED GError **error) 56 | { 57 | GApplication *client = g_application_get_default(); 58 | if (IS_CLIENT(client)) 59 | client_set_restore_main_window_state(CLIENT(client), TRUE); 60 | return TRUE; 61 | } 62 | 63 | static const GOptionEntry all_options[] = { 64 | {"version", 'v', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL}, 65 | {"debug", 'd', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, option_debug_cb, N_("Enable debug"), NULL}, 66 | {"restore-last-window-state", 'r', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, option_restore_cb, 67 | N_("Restores the hidden state of the main window (only applicable to the primary instance)"), NULL}, 68 | {NULL} /* list must be NULL-terminated */ 69 | }; 70 | 71 | #if GLIB_CHECK_VERSION(2,40,0) 72 | void 73 | client_add_options(GApplication *app) { 74 | /* NOTE: using this function, the options do not get translated in glib versions <2.45 due to 75 | * bug 750322: https://bugzilla.gnome.org/show_bug.cgi?id=750322 76 | */ 77 | g_application_add_main_option_entries(app, all_options); 78 | } 79 | 80 | #else 81 | GOptionContext * 82 | client_options_get_context() 83 | { 84 | GOptionContext *context = g_option_context_new(_("- GNOME client for Jami")); 85 | g_option_context_set_ignore_unknown_options(context, TRUE); 86 | g_option_context_add_main_entries(context, all_options, PACKAGE_NAME); 87 | g_option_context_add_group(context, gtk_get_option_group(TRUE)); 88 | return context; 89 | } 90 | #endif 91 | -------------------------------------------------------------------------------- /src/client_options.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013-2022 Savoir-faire Linux Inc. 3 | * Author: Tristan Matthews 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef CLIENT_OPTIONS_H_ 21 | #define CLIENT_OPTIONS_H_ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #if GLIB_CHECK_VERSION(2,40,0) 28 | void client_add_options(GApplication *app); 29 | #else 30 | GOptionContext *client_options_get_context(void); 31 | #endif 32 | 33 | G_END_DECLS 34 | 35 | #endif /* CLIENT_OPTIONS_H_ */ 36 | -------------------------------------------------------------------------------- /src/config.h.in: -------------------------------------------------------------------------------- 1 | /* cmake will generate config.h with defines containing the values defined in cmake */ 2 | 3 | #define VERSION "@PROJECT_VERSION@" 4 | 5 | #define USE_LIBNOTIFY @USE_LIBNOTIFY@ 6 | #define HAVE_APPINDICATOR @HAVE_APPINDICATOR@ 7 | #define HAVE_AYATANAAPPINDICATOR @HAVE_AYATANAAPPINDICATOR@ 8 | #define USE_LIBNM @USE_LIBNM@ 9 | #define USE_CANBERRA @USE_CANBERRA@ 10 | 11 | #define JAMI_CLIENT_NAME "Jami" 12 | #define JAMI_CLIENT_APP_ID "net.jami.Jami" 13 | 14 | #define JAMI_CLIENT_INSTALL "@JAMI_INSTALL_PREFIX@" 15 | #define JAMI_DATA_DIR "/share/jami-gnome" 16 | 17 | #define PACKAGE_NAME "@PROJECT_NAME@" 18 | #define LOCALEDIR "@JAMI_INSTALL_PREFIX@/share/locale" 19 | #define SOUNDSDIR "@JAMI_INSTALL_PREFIX@/share/sounds/jami-gnome" 20 | -------------------------------------------------------------------------------- /src/conversationpopupmenu.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Copyright (C) 2017-2022 Savoir-faire Linux Inc. * 3 | * Author: Nicolas Jäger * 4 | * Author: Sébastien Blin * 5 | * * 6 | * This library is free software; you can redistribute it and/or * 7 | * modify it under the terms of the GNU Lesser General Public * 8 | * License as published by the Free Software Foundation; either * 9 | * version 2.1 of the License, or (at your option) any later version. * 10 | * * 11 | * This library is distributed in the hope that it will be useful, * 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 14 | * Lesser General Public License for more details. * 15 | * * 16 | * You should have received a copy of the GNU General Public License * 17 | * along with this program. If not, see . * 18 | ***************************************************************************/ 19 | #pragma once 20 | 21 | // GTK+ related 22 | #include 23 | 24 | // LRC 25 | #include "api/account.h" 26 | 27 | #include "accountinfopointer.h" 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define CONVERSATION_POPUP_MENU_TYPE (conversation_popup_menu_get_type ()) 32 | #define CONVERSATION_POPUP_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONVERSATION_POPUP_MENU_TYPE, ConversationPopupMenu)) 33 | #define CONVERSATION_POPUP_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CONVERSATION_POPUP_MENU_TYPE, ConversationPopupMenuClass)) 34 | #define IS_CONVERSATION_POPUP_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CONVERSATION_POPUP_MENU_TYPE)) 35 | #define IS_CONVERSATION_POPUP_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CONVERSATION_POPUP_MENU_TYPE)) 36 | 37 | typedef struct _ConversationPopupMenu ConversationPopupMenu; 38 | typedef struct _ConversationPopupMenuClass ConversationPopupMenuClass; 39 | 40 | GType conversation_popup_menu_get_type (void) G_GNUC_CONST; 41 | GtkWidget *conversation_popup_menu_new (GtkTreeView *treeview, AccountInfoPointer const & accountInfo); 42 | gboolean conversation_popup_menu_show (ConversationPopupMenu *self, GdkEventButton *event); 43 | 44 | G_END_DECLS 45 | -------------------------------------------------------------------------------- /src/conversationsview.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Copyright (C) 2017-2022 Savoir-faire Linux Inc. * 3 | * Author: Nicolas Jäger * 4 | * Author: Sébastien Blin * 5 | * * 6 | * This library is free software; you can redistribute it and/or * 7 | * modify it under the terms of the GNU Lesser General Public * 8 | * License as published by the Free Software Foundation; either * 9 | * version 2.1 of the License, or (at your option) any later version. * 10 | * * 11 | * This library is distributed in the hope that it will be useful, * 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 14 | * Lesser General Public License for more details. * 15 | * * 16 | * You should have received a copy of the GNU General Public License * 17 | * along with this program. If not, see . * 18 | ***************************************************************************/ 19 | #pragma once 20 | 21 | #include 22 | 23 | #include "api/account.h" 24 | 25 | #include "accountinfopointer.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define CONVERSATIONS_VIEW_TYPE (conversations_view_get_type ()) 30 | #define CONVERSATIONS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONVERSATIONS_VIEW_TYPE, ConversationsView)) 31 | #define CONVERSATIONS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CONVERSATIONS_VIEW_TYPE, ConversationsViewClass)) 32 | #define IS_CONVERSATIONS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CONVERSATIONS_VIEW_TYPE)) 33 | #define IS_CONVERSATIONS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CONVERSATIONS_VIEW_TYPE)) 34 | 35 | typedef struct _ConversationsView ConversationsView; 36 | typedef struct _ConversationsViewClass ConversationsViewClass; 37 | 38 | GType conversations_view_get_type (void) G_GNUC_CONST; 39 | GtkWidget *conversations_view_new (AccountInfoPointer const & accountInfo); 40 | void conversations_view_select_conversation (ConversationsView *self, const std::string& uid); 41 | std::string conversations_view_get_current_selected(ConversationsView *self); 42 | void conversations_view_set_theme(ConversationsView *self, bool darkTheme); 43 | 44 | G_END_DECLS 45 | -------------------------------------------------------------------------------- /src/currentcallview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * Author: Nicolas Jäger 5 | * Author: Sébastien Blin 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | */ 21 | 22 | #pragma once 23 | 24 | #include 25 | #include "api/account.h" 26 | #include "api/lrc.h" 27 | #include "webkitchatcontainer.h" 28 | #include "accountinfopointer.h" 29 | 30 | namespace lrc 31 | { 32 | namespace api 33 | { 34 | class AVModel; 35 | namespace conversation 36 | { 37 | struct Info; 38 | } 39 | } 40 | } 41 | 42 | G_BEGIN_DECLS 43 | 44 | #define CURRENT_CALL_VIEW_TYPE (current_call_view_get_type ()) 45 | #define CURRENT_CALL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CURRENT_CALL_VIEW_TYPE, CurrentCallView)) 46 | #define CURRENT_CALL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CURRENT_CALL_VIEW_TYPE, CurrentCallViewClass)) 47 | #define IS_CURRENT_CALL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CURRENT_CALL_VIEW_TYPE)) 48 | #define IS_CURRENT_CALL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CURRENT_CALL_VIEW_TYPE)) 49 | 50 | typedef struct _CurrentCallView CurrentCallView; 51 | typedef struct _CurrentCallViewClass CurrentCallViewClass; 52 | 53 | 54 | GType current_call_view_get_type (void) G_GNUC_CONST; 55 | GtkWidget *current_call_view_new (WebKitChatContainer* view, 56 | AccountInfoPointer const & accountInfo, 57 | lrc::api::conversation::Info& conversation, 58 | lrc::api::AVModel& avModel, 59 | const lrc::api::Lrc& lrc); 60 | lrc::api::conversation::Info& current_call_view_get_conversation(CurrentCallView*); 61 | GtkWidget *current_call_view_get_chat_view(CurrentCallView*); 62 | std::string current_call_view_get_rendered_call(CurrentCallView*); 63 | void current_call_view_show_chat(CurrentCallView*); 64 | void current_call_view_handup_focus(GtkWidget *current_call_view); 65 | 66 | G_END_DECLS 67 | -------------------------------------------------------------------------------- /src/defines.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef __DEFINES_H__ 21 | 22 | #define BUTTON_RIGHT_CLICK 3 23 | 24 | #endif /* __DEFINES_H__ */ 25 | -------------------------------------------------------------------------------- /src/dialogs.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #include "config.h" // for VERSION 21 | #include "dialogs.h" 22 | 23 | #include 24 | #include 25 | #include 26 | #include "utils/drawing.h" 27 | 28 | void 29 | about_dialog_set_theme(GtkAboutDialog *dialog, gboolean use_dark_theme) 30 | { 31 | GError *error = NULL; 32 | GdkPixbuf* logo = gdk_pixbuf_new_from_resource_at_scale( 33 | use_dark_theme 34 | ? "/net/jami/JamiGnome/jami-logo-white" 35 | : "/net/jami/JamiGnome/jami-logo-blue", 36 | 350, -1, TRUE, &error); 37 | if (!logo) { 38 | g_debug("Could not load logo: %s", error->message); 39 | g_clear_error(&error); 40 | } 41 | gtk_about_dialog_set_logo(dialog, logo); 42 | } 43 | 44 | gboolean 45 | about_dialog_on_redraw(GtkWidget *dialog, 46 | G_GNUC_UNUSED cairo_t *cr, 47 | G_GNUC_UNUSED gpointer user_data) 48 | { 49 | about_dialog_set_theme(GTK_ABOUT_DIALOG(dialog), 50 | use_dark_theme(get_ambient_color(dialog))); 51 | return FALSE; 52 | } 53 | 54 | void 55 | about_dialog(GtkWidget *parent) 56 | { 57 | /* get parent window */ 58 | if (parent && GTK_IS_WIDGET(parent)) 59 | parent = gtk_widget_get_toplevel(GTK_WIDGET(parent)); 60 | 61 | gchar *version = g_strdup_printf( 62 | C_("Do not translate the release name nor the status (beta, final, ...)", 63 | "\"%s\"\n(%s)"), "Taranis", VERSION); 64 | 65 | const gchar *authors[] = { 66 | "Adrien Béraud", 67 | "Albert Babí", 68 | "Alberto Eleuterio Flores Guerrero", 69 | "Alexandr Sergheev", 70 | "Alexandre Lision", 71 | "Alexandre Viau", 72 | "Aline Bonnet", 73 | "Aline Gondim Santos", 74 | "Amin Bandali", 75 | "AmirHossein Naghshzan", 76 | "Andreas Traczyk", 77 | "Anthony Léonard", 78 | "Brando Tovar", 79 | "Charlotte Hoffmann", 80 | "Cyrille Béraud", 81 | "Dorina Mosku", 82 | "Eden Abitbol", 83 | "Edric Milaret", 84 | "Éloi Bail", 85 | "Emmanuel Lepage-Vallée", 86 | "Frédéric Guimont", 87 | "Guillaume Heller", 88 | "Guillaume Roguez", 89 | "Hadrien De Sousa", 90 | "Hugo Lefeuvre", 91 | "Julien Grossholtz", 92 | "Kateryna Kostiuk", 93 | "Loïc Siret", 94 | "Marianne Forget", 95 | "Maxim Cournoyer", 96 | "Maxime Callet", 97 | "Michel Schmit", 98 | "Mingrui Zhang", 99 | "Mehdi Ghayour", 100 | "Mohamed Amine Younes Bouacida", 101 | "Mohamed Chibani", 102 | "Nicolas Jäger", 103 | "Nicolas Reynaud", 104 | "Olivier Gregoire", 105 | "Olivier Soldano", 106 | "Patrick Keroulas", 107 | "Peymane Marandi", 108 | "Philippe Gorley", 109 | "Pier-Luc Thériault", 110 | "Pierre Duchemin", 111 | "Pierre Lespagnol", 112 | "Raphaël Brulé", 113 | "Rayan Osseiran", 114 | "Romain Bertozzi", 115 | "Saher Azer", 116 | "Sébastien Blin", 117 | "Silbino Gonçalves Matado", 118 | "Simon Désaulniers", 119 | "Simon Zeni", 120 | "Stepan Salenikovich", 121 | "Thibault Wittemberg", 122 | "Vsevolod Ivanov", 123 | "Yang Wang", 124 | "Based on the SFLPhone project", 125 | NULL, 126 | }; 127 | 128 | GtkWidget *about = (GtkWidget*) g_object_get_data(G_OBJECT(GTK_WINDOW(parent)), 129 | "gtk-about-dialog"); 130 | if (!about) { 131 | about = gtk_about_dialog_new(); 132 | g_object_ref_sink(about); 133 | gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about), ""); 134 | gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), "© 2021-2022 Savoir-faire Linux"); 135 | gtk_about_dialog_set_license_type(GTK_ABOUT_DIALOG(about), GTK_LICENSE_GPL_3_0); 136 | about_dialog_set_theme(GTK_ABOUT_DIALOG(about), use_dark_theme(get_ambient_color(parent))); 137 | gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), version); 138 | gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about), _("The GNOME client for Jami.\nJami is free software for universal communication which respects the freedoms and privacy of its users.")); 139 | gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about), authors); 140 | gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about), "https://jami.net/"); 141 | gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about), "jami.net"); 142 | gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(about), "https://www.transifex.com/savoirfairelinux/jami"); 143 | g_free(version); 144 | 145 | g_signal_connect(about, "delete-event", 146 | G_CALLBACK(gtk_widget_hide_on_delete), NULL); 147 | g_signal_connect(about, "response", 148 | G_CALLBACK(gtk_widget_hide), NULL); 149 | g_signal_connect(about, "draw", 150 | G_CALLBACK(about_dialog_on_redraw), NULL); 151 | gtk_window_set_modal(GTK_WINDOW(about), TRUE); 152 | gtk_window_set_transient_for(GTK_WINDOW(about), GTK_WINDOW(parent)); 153 | gtk_window_set_destroy_with_parent(GTK_WINDOW(about), TRUE); 154 | g_object_set_data_full(G_OBJECT(parent), 155 | g_intern_static_string("gtk-about-dialog"), 156 | about, g_object_unref); 157 | } 158 | 159 | G_GNUC_BEGIN_IGNORE_DEPRECATIONS 160 | gtk_window_present(GTK_WINDOW(about)); 161 | G_GNUC_END_IGNORE_DEPRECATIONS 162 | } 163 | -------------------------------------------------------------------------------- /src/dialogs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef _DIALOGS_H 21 | #define _DIALOGS_H 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | void about_dialog(GtkWidget *parent); 28 | 29 | G_END_DECLS 30 | 31 | #endif /* _DIALOGS_H */ 32 | -------------------------------------------------------------------------------- /src/generalsettingsview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef _GENERALSETTINGSVIEW_H 21 | #define _GENERALSETTINGSVIEW_H 22 | 23 | #include 24 | 25 | namespace lrc { namespace api { 26 | class AVModel; 27 | class DataTransferModel; 28 | class NewAccountModel; 29 | }} 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GENERAL_SETTINGS_VIEW_TYPE (general_settings_view_get_type ()) 34 | #define GENERAL_SETTINGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GENERAL_SETTINGS_VIEW_TYPE, GeneralSettingsView)) 35 | #define GENERAL_SETTINGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GENERAL_SETTINGS_VIEW_TYPE, GeneralSettingsViewClass)) 36 | #define IS_GENERAL_SETTINGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GENERAL_SETTINGS_VIEW_TYPE)) 37 | #define IS_GENERAL_SETTINGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GENERAL_SETTINGS_VIEW_TYPE)) 38 | 39 | typedef struct _GeneralSettingsView GeneralSettingsView; 40 | typedef struct _GeneralSettingsViewClass GeneralSettingsViewClass; 41 | 42 | GType general_settings_view_get_type (void) G_GNUC_CONST; 43 | GtkWidget *general_settings_view_new (GtkWidget* main_window_pnt, lrc::api::AVModel& avModel, lrc::api::NewAccountModel& accountModel); 44 | 45 | G_END_DECLS 46 | 47 | #endif /* _GENERALSETTINGSVIEW_H */ 48 | -------------------------------------------------------------------------------- /src/incomingcallview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * Author: Nicolas Jäger 5 | * Author: Sébastien Blin 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | */ 21 | 22 | #pragma once 23 | 24 | // Gtk 25 | #include 26 | 27 | // client 28 | #include "api/account.h" 29 | #include "webkitchatcontainer.h" 30 | #include "accountinfopointer.h" 31 | 32 | namespace lrc 33 | { 34 | namespace api 35 | { 36 | class AVModel; 37 | class PluginModel; 38 | namespace conversation 39 | { 40 | struct Info; 41 | } 42 | } 43 | } 44 | 45 | G_BEGIN_DECLS 46 | 47 | #define INCOMING_CALL_VIEW_TYPE (incoming_call_view_get_type ()) 48 | #define INCOMING_CALL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INCOMING_CALL_VIEW_TYPE, IncomingCallView)) 49 | #define INCOMING_CALL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), INCOMING_CALL_VIEW_TYPE, IncomingCallViewClass)) 50 | #define IS_INCOMING_CALL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), INCOMING_CALL_VIEW_TYPE)) 51 | #define IS_INCOMING_CALL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), INCOMING_CALL_VIEW_TYPE)) 52 | 53 | typedef struct _IncomingCallView IncomingCallView; 54 | typedef struct _IncomingCallViewClass IncomingCallViewClass; 55 | 56 | 57 | GType incoming_call_view_get_type (void) G_GNUC_CONST; 58 | GtkWidget *incoming_call_view_new (WebKitChatContainer* view, 59 | lrc::api::AVModel& avModel, 60 | lrc::api::PluginModel& pluginModel, 61 | AccountInfoPointer const & accountInfo, 62 | lrc::api::conversation::Info& conversation); 63 | void incoming_call_view_let_a_message(IncomingCallView* view, const lrc::api::conversation::Info& conv); 64 | bool is_showing_let_a_message_view(IncomingCallView* view, lrc::api::conversation::Info& conv); 65 | lrc::api::conversation::Info& incoming_call_view_get_conversation (IncomingCallView*); 66 | 67 | G_END_DECLS 68 | -------------------------------------------------------------------------------- /src/jami: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright (C) 2015-2022 Savoir-faire Linux Inc. 4 | # Author: Emmanuel Lepage Vallee 5 | # Author: Stepan Salenikovich 6 | # Author: Albert Babí 7 | # Author: Maxim Cournoyer 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 3 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, write to the Free Software 21 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 22 | # 23 | 24 | if command -v jami-qt > /dev/null; then 25 | exec jami-qt "$@" 26 | elif command -v jami-gnome > /dev/null; then 27 | exec jami-gnome "$@" 28 | else 29 | echo "Jami not found" > /dev/error 30 | exit 1 31 | fi 32 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include "config.h" 24 | #include "client.h" 25 | 26 | int 27 | main(int argc, char *argv[]) 28 | { 29 | setenv("GDK_BACKEND", "x11", true); // workaround for Wayland 30 | 31 | /* Internationalization; localization is done automatically by gtk during init */ 32 | bindtextdomain(PACKAGE_NAME, LOCALEDIR); 33 | bind_textdomain_codeset(PACKAGE_NAME, "UTF-8"); 34 | textdomain(PACKAGE_NAME); 35 | 36 | Client *client = client_new(argc, argv); 37 | g_set_application_name(JAMI_CLIENT_NAME); 38 | return g_application_run(G_APPLICATION(client), argc, argv); 39 | } 40 | -------------------------------------------------------------------------------- /src/mainwindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define MAIN_WINDOW_TYPE (main_window_get_type ()) 27 | #define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAIN_WINDOW_TYPE, MainWindow)) 28 | #define MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), MAIN_WINDOW_TYPE, MainWindowClass)) 29 | #define IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MAIN_WINDOW_TYPE)) 30 | #define IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MAIN_WINDOW_TYPE)) 31 | 32 | 33 | typedef struct _MainWindow MainWindow; 34 | typedef struct _MainWindowClass MainWindowClass; 35 | 36 | 37 | GType main_window_get_type (void) G_GNUC_CONST; 38 | GtkWidget *main_window_new (GtkApplication *app); 39 | void main_window_reset (MainWindow *win); 40 | bool main_window_can_close(MainWindow *win); 41 | void main_window_display_account_list(MainWindow *win); 42 | void main_window_search(MainWindow *win); 43 | bool main_window_get_urgency(MainWindow *win); 44 | 45 | void main_window_conversations_list(MainWindow *win); 46 | void main_window_requests_list(MainWindow *win); 47 | void main_window_audio_call(MainWindow *win); 48 | void main_window_clear_history(MainWindow *win); 49 | void main_window_remove_conversation(MainWindow *win); 50 | void main_window_block_contact(MainWindow *win); 51 | void main_window_unblock_contact(MainWindow *win); 52 | void main_window_copy_contact(MainWindow *win); 53 | void main_window_add_contact(MainWindow *win); 54 | void main_window_accept_call(MainWindow *win); 55 | void main_window_decline_call(MainWindow *win); 56 | void main_window_toggle_fullscreen(MainWindow *win); 57 | 58 | G_END_DECLS 59 | -------------------------------------------------------------------------------- /src/marshals.cpp: -------------------------------------------------------------------------------- 1 | /* This file is generated by glib-genmarshal, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ 2 | #include "marshals.h" 3 | 4 | #include 5 | 6 | #ifdef G_ENABLE_DEBUG 7 | #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) 8 | #define g_marshal_value_peek_char(v) g_value_get_schar (v) 9 | #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) 10 | #define g_marshal_value_peek_int(v) g_value_get_int (v) 11 | #define g_marshal_value_peek_uint(v) g_value_get_uint (v) 12 | #define g_marshal_value_peek_long(v) g_value_get_long (v) 13 | #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) 14 | #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) 15 | #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) 16 | #define g_marshal_value_peek_enum(v) g_value_get_enum (v) 17 | #define g_marshal_value_peek_flags(v) g_value_get_flags (v) 18 | #define g_marshal_value_peek_float(v) g_value_get_float (v) 19 | #define g_marshal_value_peek_double(v) g_value_get_double (v) 20 | #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) 21 | #define g_marshal_value_peek_param(v) g_value_get_param (v) 22 | #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) 23 | #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) 24 | #define g_marshal_value_peek_object(v) g_value_get_object (v) 25 | #define g_marshal_value_peek_variant(v) g_value_get_variant (v) 26 | #else /* !G_ENABLE_DEBUG */ 27 | /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. 28 | * Do not access GValues directly in your code. Instead, use the 29 | * g_value_get_*() functions 30 | */ 31 | #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int 32 | #define g_marshal_value_peek_char(v) (v)->data[0].v_int 33 | #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint 34 | #define g_marshal_value_peek_int(v) (v)->data[0].v_int 35 | #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint 36 | #define g_marshal_value_peek_long(v) (v)->data[0].v_long 37 | #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong 38 | #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 39 | #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 40 | #define g_marshal_value_peek_enum(v) (v)->data[0].v_long 41 | #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong 42 | #define g_marshal_value_peek_float(v) (v)->data[0].v_float 43 | #define g_marshal_value_peek_double(v) (v)->data[0].v_double 44 | #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer 45 | #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer 46 | #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer 47 | #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer 48 | #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer 49 | #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer 50 | #endif /* !G_ENABLE_DEBUG */ 51 | 52 | /* VOID:STRING,STRING (marshals.list:1) */ 53 | void 54 | g_cclosure_user_marshal_VOID__STRING_STRING (GClosure *closure, 55 | GValue *return_value G_GNUC_UNUSED, 56 | guint n_param_values, 57 | const GValue *param_values, 58 | gpointer invocation_hint G_GNUC_UNUSED, 59 | gpointer marshal_data) 60 | { 61 | typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, 62 | gpointer arg1, 63 | gpointer arg2, 64 | gpointer data2); 65 | GCClosure *cc = (GCClosure *) closure; 66 | gpointer data1, data2; 67 | GMarshalFunc_VOID__STRING_STRING callback; 68 | 69 | g_return_if_fail (n_param_values == 3); 70 | 71 | if (G_CCLOSURE_SWAP_DATA (closure)) 72 | { 73 | data1 = closure->data; 74 | data2 = g_value_peek_pointer (param_values + 0); 75 | } 76 | else 77 | { 78 | data1 = g_value_peek_pointer (param_values + 0); 79 | data2 = closure->data; 80 | } 81 | callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback); 82 | 83 | callback (data1, 84 | g_marshal_value_peek_string (param_values + 1), 85 | g_marshal_value_peek_string (param_values + 2), 86 | data2); 87 | } 88 | -------------------------------------------------------------------------------- /src/marshals.h: -------------------------------------------------------------------------------- 1 | /* This file is generated by glib-genmarshal, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ 2 | #ifndef __G_CCLOSURE_USER_MARSHAL_MARSHAL_H__ 3 | #define __G_CCLOSURE_USER_MARSHAL_MARSHAL_H__ 4 | 5 | #include 6 | 7 | G_BEGIN_DECLS 8 | 9 | /* VOID:STRING,STRING (marshallers.list:1) */ 10 | extern 11 | void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure *closure, 12 | GValue *return_value, 13 | guint n_param_values, 14 | const GValue *param_values, 15 | gpointer invocation_hint, 16 | gpointer marshal_data); 17 | 18 | 19 | G_END_DECLS 20 | 21 | #endif /* __G_CCLOSURE_USER_MARSHAL_MARSHAL_H__ */ 22 | -------------------------------------------------------------------------------- /src/marshals.list: -------------------------------------------------------------------------------- 1 | VOID:STRING,STRING -------------------------------------------------------------------------------- /src/mediasettingsview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * Author: Sébastien Blin 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | */ 20 | 21 | #ifndef _MEDIASETTINGSVIEW_H 22 | #define _MEDIASETTINGSVIEW_H 23 | 24 | #include 25 | 26 | namespace lrc 27 | { 28 | namespace api 29 | { 30 | class AVModel; 31 | } 32 | } 33 | 34 | G_BEGIN_DECLS 35 | 36 | #define MEDIA_SETTINGS_VIEW_TYPE (media_settings_view_get_type ()) 37 | #define MEDIA_SETTINGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MEDIA_SETTINGS_VIEW_TYPE, MediaSettingsView)) 38 | #define MEDIA_SETTINGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), MEDIA_SETTINGS_VIEW_TYPE, MediaSettingsViewClass)) 39 | #define IS_MEDIA_SETTINGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MEDIA_SETTINGS_VIEW_TYPE)) 40 | #define IS_MEDIA_SETTINGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MEDIA_SETTINGS_VIEW_TYPE)) 41 | 42 | typedef struct _MediaSettingsView MediaSettingsView; 43 | typedef struct _MediaSettingsViewClass MediaSettingsViewClass; 44 | 45 | GType media_settings_view_get_type (void) G_GNUC_CONST; 46 | GtkWidget *media_settings_view_new (lrc::api::AVModel& avModel); 47 | void media_settings_view_show_preview (MediaSettingsView *self, gboolean show_preview); 48 | 49 | G_END_DECLS 50 | 51 | #endif /* _MEDIASETTINGSVIEW_H */ 52 | -------------------------------------------------------------------------------- /src/messagingwidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018-2022 Savoir-faire Linux Inc. 3 | * Author: Hugo Lefeuvre 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #pragma once 20 | 21 | // GTK 22 | #include 23 | 24 | // std 25 | #include 26 | 27 | // client 28 | #include "accountinfopointer.h" 29 | 30 | namespace lrc 31 | { 32 | namespace api 33 | { 34 | class AVModel; 35 | namespace conversation 36 | { 37 | struct Info; 38 | } 39 | } 40 | } 41 | 42 | G_BEGIN_DECLS 43 | 44 | #define MESSAGING_WIDGET_TYPE (messaging_widget_get_type ()) 45 | #define MESSAGING_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MESSAGING_WIDGET_TYPE, MessagingWidget)) 46 | #define MESSAGING_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), MESSAGING_WIDGET_TYPE, MessagingWidget)) 47 | #define IS_MESSAGING_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MESSAGING_WIDGET_TYPE)) 48 | #define IS_MESSAGING_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MESSAGING_WIDGET_TYPE)) 49 | 50 | typedef struct _MessagingWidget MessagingWidget; 51 | typedef struct _MessagingWidgetClass MessagingWidgetClass; 52 | 53 | typedef enum 54 | { 55 | MESSAGING_WIDGET_STATE_INIT, 56 | MESSAGING_WIDGET_REC_AUDIO, 57 | MESSAGING_WIDGET_AUDIO_REC_SUCCESS, 58 | MESSAGING_WIDGET_REC_SENT 59 | } MessagingWidgetState; 60 | 61 | GType messaging_widget_get_type (void) G_GNUC_CONST; 62 | GtkWidget* messaging_widget_new (lrc::api::AVModel& avModel, 63 | lrc::api::conversation::Info& conversation, 64 | AccountInfoPointer const & accountInfo); 65 | void messaging_widget_set_peer_name (MessagingWidget *self, std::string name); 66 | 67 | G_END_DECLS 68 | -------------------------------------------------------------------------------- /src/native/dbuserrorhandler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #include "dbuserrorhandler.h" 20 | 21 | #include 22 | #include 23 | #include "../client.h" 24 | #include 25 | 26 | namespace Interfaces { 27 | 28 | static GtkWidget* 29 | jamid_crash_dialog() 30 | { 31 | GtkWidget *dialog = gtk_dialog_new(); 32 | gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); 33 | gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); 34 | gtk_window_set_decorated(GTK_WINDOW(dialog), FALSE); 35 | gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); 36 | gtk_window_set_title(GTK_WINDOW(dialog), C_("Name of error window (dialog)","Jami Error")); 37 | 38 | /* get the main window */ 39 | if (auto app = g_application_get_default()) { 40 | auto win = client_get_main_window(CLIENT(app)); 41 | if (win) { 42 | gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(win)); 43 | gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ON_PARENT); 44 | } else { 45 | gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER); 46 | } 47 | } else { 48 | g_warning("no default GApplication exists"); 49 | } 50 | 51 | GtkWidget *content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); 52 | gtk_box_set_spacing(GTK_BOX(content_area), 10); 53 | gtk_widget_set_size_request(content_area, 250, -1); 54 | gtk_widget_set_margin_top(content_area, 25); 55 | 56 | auto message = gtk_label_new( 57 | _("Trying to reconnect to the Jami daemon (jamid)…") 58 | ); 59 | 60 | gtk_box_pack_start(GTK_BOX(content_area), message, FALSE, TRUE, 0); 61 | 62 | GtkWidget *spinner = gtk_spinner_new(); 63 | gtk_spinner_start(GTK_SPINNER(spinner)); 64 | 65 | gtk_box_pack_start(GTK_BOX(content_area), spinner, FALSE, TRUE, 0); 66 | 67 | gtk_widget_show_all(content_area); 68 | 69 | return dialog; 70 | } 71 | 72 | static GtkWidget* 73 | quitting_dialog() 74 | { 75 | /* get the main window */ 76 | GtkWindow *win = NULL; 77 | if (auto app = g_application_get_default()) { 78 | win = client_get_main_window(CLIENT(app)); 79 | } else { 80 | g_warning("no default GApplication exists"); 81 | } 82 | 83 | GtkWidget *dialog = gtk_message_dialog_new( 84 | win, 85 | (GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT), 86 | GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, 87 | _("Could not re-connect to the Jami daemon (jamid).\nJami will now quit.") 88 | ); 89 | 90 | if (win) { 91 | gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ON_PARENT); 92 | } else { 93 | gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER); 94 | } 95 | gtk_window_set_title(GTK_WINDOW(dialog), C_("Name of error window (dialog)","Jami Error")); 96 | gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); 97 | 98 | return dialog; 99 | } 100 | 101 | static gboolean 102 | check_connection_cb(GtkWidget *warning_dialog) 103 | { 104 | g_return_val_if_fail(GTK_IS_DIALOG(warning_dialog), G_SOURCE_REMOVE); 105 | 106 | gtk_widget_destroy(warning_dialog); 107 | 108 | if ((!lrc::api::Lrc::isConnected()) || (!lrc::api::Lrc::dbusIsValid())) { 109 | g_warning("could not reconnect to the daemon"); 110 | 111 | auto quit_dialog = quitting_dialog(); 112 | 113 | /* wait for the user to exit the dialog */ 114 | gtk_dialog_run(GTK_DIALOG(quit_dialog)); 115 | gtk_widget_destroy(quit_dialog); 116 | 117 | /* quit */ 118 | if (auto app = g_application_get_default()) { 119 | auto quit_action = G_ACTION(g_action_map_lookup_action(G_ACTION_MAP(app), "quit")); 120 | g_action_activate(quit_action, NULL); 121 | } else { 122 | g_warning("no default GApplication exists"); 123 | } 124 | } else { 125 | /* we're done handling the error */ 126 | static_cast(GlobalInstances::dBusErrorHandler()).finishedHandlingError(); 127 | } 128 | 129 | return G_SOURCE_REMOVE; 130 | } 131 | 132 | static gboolean 133 | error_cb(G_GNUC_UNUSED gpointer user_data) 134 | { 135 | g_warning("jamid has possibly crashed, or has been killed... will wait 2.5 seconds and try to reconnect"); 136 | 137 | auto warning_dialog = jamid_crash_dialog(); 138 | gtk_window_present(GTK_WINDOW(warning_dialog)); 139 | 140 | /* allow 2.5 seconds for the daemon to restart and then see if we're re-connected */ 141 | g_timeout_add(2500, (GSourceFunc)check_connection_cb, warning_dialog); 142 | 143 | return G_SOURCE_REMOVE; 144 | } 145 | 146 | void 147 | DBusErrorHandler::connectionError(const QString& error) 148 | { 149 | g_warning("%s", error.toUtf8().constData()); 150 | 151 | if (!handlingError) { 152 | handlingError = true; 153 | /* the error may come from a different thread other than the main loop, 154 | * we use an idle function to run events on the main loop */ 155 | g_idle_add((GSourceFunc)error_cb, NULL); 156 | } 157 | } 158 | 159 | void 160 | DBusErrorHandler::invalidInterfaceError(const QString& error) 161 | { 162 | g_warning("%s", error.toUtf8().constData()); 163 | 164 | if (!handlingError) { 165 | handlingError = true; 166 | /* the error may come from a different thread other than the main loop, 167 | * we use an idle function to run events on the main loop */ 168 | g_idle_add((GSourceFunc)error_cb, NULL); 169 | } 170 | } 171 | 172 | void 173 | DBusErrorHandler::finishedHandlingError() 174 | { 175 | handlingError = false; 176 | } 177 | 178 | } // namespace Interfaces 179 | -------------------------------------------------------------------------------- /src/native/dbuserrorhandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | namespace Interfaces { 27 | 28 | class DBusErrorHandler : public DBusErrorHandlerI { 29 | public: 30 | void connectionError(const QString& error) override; 31 | void invalidInterfaceError(const QString& error) override; 32 | 33 | void finishedHandlingError(); 34 | private: 35 | /* keeps track if we're in the process of handling an error already, so that we don't keep 36 | * displaying error dialogs; we use an atomic in case the errors come from multiple threads */ 37 | std::atomic_bool handlingError{false}; 38 | }; 39 | 40 | } // namespace Interfaces 41 | -------------------------------------------------------------------------------- /src/newaccountsettingsview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * Author: Sebastien Blin 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | */ 20 | 21 | #ifndef _NEWACCOUNTSETTINGSVIEW_H 22 | #define _NEWACCOUNTSETTINGSVIEW_H 23 | 24 | #include 25 | 26 | #include 27 | 28 | #include "accountinfopointer.h" 29 | 30 | namespace lrc 31 | { 32 | namespace api 33 | { 34 | class AVModel; 35 | } 36 | } 37 | 38 | G_BEGIN_DECLS 39 | 40 | #define NEW_ACCOUNT_SETTINGS_VIEW_TYPE (new_account_settings_view_get_type ()) 41 | #define NEW_ACCOUNT_SETTINGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NEW_ACCOUNT_SETTINGS_VIEW_TYPE, NewAccountSettingsView)) 42 | #define NEW_ACCOUNT_SETTINGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NEW_ACCOUNT_SETTINGS_VIEW_TYPE, NewAccountSettingsViewClass)) 43 | #define IS_NEW_ACCOUNT_SETTINGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NEW_ACCOUNT_SETTINGS_VIEW_TYPE)) 44 | #define IS_NEW_ACCOUNT_SETTINGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NEW_ACCOUNT_SETTINGS_VIEW_TYPE)) 45 | 46 | typedef struct _NewAccountSettingsView NewAccountSettingsView; 47 | typedef struct _NewAccountSettingsViewClass NewAccountSettingsViewClass; 48 | 49 | GType new_account_settings_view_get_type (void) G_GNUC_CONST; 50 | GtkWidget *new_account_settings_view_new (AccountInfoPointer const & accountInfo, lrc::api::AVModel& avModel); 51 | void new_account_settings_view_show (NewAccountSettingsView *view, gboolean show_profile); 52 | void new_account_settings_view_update (NewAccountSettingsView *view, gboolean reset_view = true); 53 | void new_account_settings_view_save_account (NewAccountSettingsView *view); 54 | 55 | G_END_DECLS 56 | 57 | #endif /* _NEWACCOUNTSETTINGSVIEW_H */ 58 | -------------------------------------------------------------------------------- /src/notifier.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * Author: Sebastien Blin 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | */ 20 | 21 | #ifndef NOTIFY_H_ 22 | #define NOTIFY_H_ 23 | 24 | #include 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | #define NOTIFIER_TYPE (notifier_get_type ()) 29 | #define NOTIFIER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NOTIFIER_TYPE, Notifier)) 30 | #define NOTIFIER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NOTIFIER_TYPE, NotifierClass)) 31 | #define IS_NOTIFIER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NOTIFIER_TYPE)) 32 | #define IS_NOTIFIER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NOTIFIER_TYPE)) 33 | 34 | typedef struct _Notifier Notifier; 35 | typedef struct _NotifierClass NotifierClass; 36 | 37 | enum class NotificationType 38 | { 39 | CALL, 40 | REQUEST, 41 | CHAT 42 | }; 43 | 44 | GType notifier_get_type (void) G_GNUC_CONST; 45 | GtkWidget* notifier_new (void); 46 | 47 | gboolean show_notification(Notifier* view, 48 | const std::string& icon, 49 | const std::string& uri, 50 | const std::string& name, 51 | const std::string& id, 52 | const std::string& title, 53 | const std::string& body, 54 | NotificationType type, 55 | const std::string& conversation = ""); 56 | gboolean hide_notification(Notifier* view, const std::string& id); 57 | gboolean has_notification(Notifier* view, const std::string& id); 58 | std::string get_notification_conversation(Notifier* view, const std::string& id); 59 | 60 | G_END_DECLS 61 | 62 | #endif /* NOTIFY_H_ */ 63 | -------------------------------------------------------------------------------- /src/pluginsettingsview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Aline Gondim Santos 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef _PLUGINSETTINGSVIEW_H 21 | #define _PLUGINSETTINGSVIEW_H 22 | 23 | #include 24 | 25 | namespace lrc 26 | { 27 | namespace api 28 | { 29 | class PluginModel; 30 | } 31 | } 32 | 33 | G_BEGIN_DECLS 34 | 35 | #define PLUGIN_SETTINGS_VIEW_TYPE (plugin_settings_view_get_type ()) 36 | #define PLUGIN_SETTINGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUGIN_SETTINGS_VIEW_TYPE, PluginSettingsView)) 37 | #define PLUGIN_SETTINGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PLUGIN_SETTINGS_VIEW_TYPE, PluginSettingsViewClass)) 38 | #define IS_PLUGIN_SETTINGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PLUGIN_SETTINGS_VIEW_TYPE)) 39 | #define IS_PLUGIN_SETTINGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PLUGIN_SETTINGS_VIEW_TYPE)) 40 | 41 | typedef struct _PluginSettingsView PluginSettingsView; 42 | typedef struct _PluginSettingsViewClass PluginSettingsViewClass; 43 | 44 | GType plugin_settings_view_get_type (void) G_GNUC_CONST; 45 | GtkWidget *plugin_settings_view_new (lrc::api::PluginModel& pluginModel); 46 | void plugin_settings_view_show (PluginSettingsView *view, gboolean show_preview); 47 | 48 | G_END_DECLS 49 | 50 | #endif /* _PLUGINSETTINGSVIEW_H */ 51 | -------------------------------------------------------------------------------- /src/profileview.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright(C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Sebastien Blin 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #include "profileview.h" 21 | 22 | #include "utils/drawing.h" 23 | 24 | #include 25 | 26 | #include 27 | #include 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | namespace { namespace details { 35 | class CppImpl; 36 | }} 37 | 38 | struct _ProfileView 39 | { 40 | GtkDialog parent; 41 | }; 42 | 43 | typedef struct _ProfileViewPrivate ProfileViewPrivate; 44 | 45 | struct _ProfileViewPrivate 46 | { 47 | AccountInfoPointer const *accountInfo_ = nullptr; 48 | details::CppImpl* cpp {nullptr}; 49 | 50 | GtkWidget* avatar; 51 | 52 | GtkWidget* grid_infos; 53 | GtkWidget* best_name_label; 54 | GtkWidget* username_label; 55 | GtkWidget* id_label; 56 | GtkWidget* qr_image; 57 | GtkWidget* is_swarm_label; 58 | }; 59 | 60 | G_DEFINE_TYPE_WITH_PRIVATE(ProfileView, profile_view, GTK_TYPE_DIALOG) 61 | #define PROFILE_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), PROFILE_VIEW_TYPE, _ProfileViewPrivate)) 62 | 63 | namespace { namespace details { 64 | class CppImpl 65 | { 66 | public: 67 | explicit CppImpl(); 68 | QString uid_; 69 | }; 70 | CppImpl::CppImpl() 71 | : uid_("") 72 | {} 73 | }} 74 | 75 | static void 76 | profile_view_init(ProfileView *prefs) 77 | { 78 | gtk_widget_init_template(GTK_WIDGET(prefs)); 79 | } 80 | 81 | static void 82 | profile_view_dispose(GObject *object) 83 | { 84 | auto* priv = PROFILE_VIEW_GET_PRIVATE(object); 85 | delete priv->cpp; 86 | priv->cpp = nullptr; 87 | G_OBJECT_CLASS(profile_view_parent_class)->dispose(object); 88 | } 89 | 90 | static void 91 | profile_view_class_init(ProfileViewClass *klass) 92 | { 93 | G_OBJECT_CLASS(klass)->dispose = profile_view_dispose; 94 | 95 | gtk_widget_class_set_template_from_resource(GTK_WIDGET_CLASS(klass), "/net/jami/JamiGnome/profile.ui"); 96 | 97 | gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), ProfileView, avatar); 98 | gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), ProfileView, grid_infos); 99 | gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), ProfileView, best_name_label); 100 | gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), ProfileView, username_label); 101 | gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), ProfileView, id_label); 102 | gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), ProfileView, qr_image); 103 | gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), ProfileView, is_swarm_label); 104 | } 105 | 106 | static bool 107 | build_view(ProfileView* view) 108 | { 109 | g_return_val_if_fail(IS_PROFILE_VIEW(view), false); 110 | auto* priv = PROFILE_VIEW_GET_PRIVATE(view); 111 | g_return_val_if_fail(priv || !(*priv->accountInfo_), false); 112 | 113 | try 114 | { 115 | const auto convOpt = (*priv->accountInfo_)->conversationModel->getConversationForUid(priv->cpp->uid_); 116 | auto contacts = (*priv->accountInfo_)->conversationModel->peersForConversation(priv->cpp->uid_); 117 | if (!convOpt || contacts.empty()) return false; 118 | const auto& contact = (*priv->accountInfo_)->contactModel->getContact(contacts.front()); 119 | 120 | auto alias = contact.profileInfo.alias; 121 | alias.remove('\r'); 122 | alias.remove('\n'); 123 | if (alias.isEmpty()) alias = contact.registeredName; 124 | if (alias.isEmpty()) alias = contact.profileInfo.uri; 125 | gtk_label_set_text(GTK_LABEL(priv->best_name_label), qUtf8Printable(alias)); 126 | GtkStyleContext* context; 127 | context = gtk_widget_get_style_context(GTK_WIDGET(priv->best_name_label)); 128 | gtk_style_context_add_class(context, "bestname"); 129 | 130 | if (contact.registeredName.isEmpty()) { 131 | gtk_label_set_text(GTK_LABEL(priv->username_label), _("(None)")); 132 | context = gtk_widget_get_style_context(GTK_WIDGET(priv->username_label)); 133 | gtk_style_context_add_class(context, "empty"); 134 | gtk_label_set_selectable(GTK_LABEL(priv->username_label), false); 135 | } else { 136 | gtk_label_set_text(GTK_LABEL(priv->username_label), qUtf8Printable(contact.registeredName)); 137 | } 138 | gtk_label_set_text(GTK_LABEL(priv->id_label), qUtf8Printable(contact.profileInfo.uri)); 139 | 140 | uint32_t img_size = 128; 141 | GdkPixbuf *p = draw_conversation_photo( 142 | *convOpt, 143 | **(priv->accountInfo_), 144 | QSize(img_size, img_size), 145 | false 146 | ); 147 | gtk_image_set_from_pixbuf(GTK_IMAGE(priv->avatar), p); 148 | g_object_unref(p); 149 | 150 | auto* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, img_size, img_size); 151 | auto* cr = cairo_create(surface); 152 | if (draw_qrcode(cr, contact.profileInfo.uri.toStdString(), img_size)) { 153 | GdkPixbuf *pixbuf = gdk_pixbuf_get_from_surface(cairo_get_target(cr), 0, 0, img_size, img_size); 154 | gtk_image_set_from_pixbuf(GTK_IMAGE(priv->qr_image), pixbuf); 155 | } 156 | 157 | g_free(surface); 158 | g_free(cr); 159 | 160 | gtk_label_set_text(GTK_LABEL(priv->is_swarm_label), convOpt->get().isSwarm() ? _("Yes") : _("No")); 161 | 162 | gtk_window_set_title(GTK_WINDOW(view), std::string("Profile - " + alias.toStdString()).c_str()); 163 | gtk_window_set_modal(GTK_WINDOW(view), false); 164 | } 165 | catch (...) 166 | { 167 | g_warning("Can't get conversation %s", priv->cpp? priv->cpp->uid_.toStdString().c_str() : ""); 168 | return false; 169 | } 170 | return true; 171 | } 172 | 173 | GtkWidget* 174 | profile_view_new(AccountInfoPointer const & accountInfo, const QString& uid) 175 | { 176 | gpointer view = g_object_new(PROFILE_VIEW_TYPE, NULL); 177 | auto* priv = PROFILE_VIEW_GET_PRIVATE(view); 178 | priv->accountInfo_ = &accountInfo; 179 | priv->cpp = new details::CppImpl(); 180 | priv->cpp->uid_ = uid; 181 | if (!build_view(PROFILE_VIEW(view))) return nullptr; 182 | 183 | auto provider = gtk_css_provider_new(); 184 | std::string css = ".bestname { font-size: 3em; font-weight: 100; }"; 185 | css += ".section_title { font-size: 1.2em; font-weight: bold; }"; 186 | css += ".sub_section_title { font-size: 1.2em; opacity: 0.7; }"; 187 | css += ".value { font-size: 1.2em; }"; 188 | css += ".empty { font-size: 1.2em; font-style: italic; opacity: 0.7; }"; 189 | gtk_css_provider_load_from_data(provider, css.c_str(), -1, nullptr); 190 | gtk_style_context_add_provider_for_screen(gdk_display_get_default_screen(gdk_display_get_default()), 191 | GTK_STYLE_PROVIDER(provider), 192 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); 193 | 194 | return static_cast(view); 195 | } 196 | -------------------------------------------------------------------------------- /src/profileview.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Sebastien Blin 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | #include 24 | 25 | #include "accountinfopointer.h" 26 | 27 | #define PROFILE_VIEW_TYPE (profile_view_get_type ()) 28 | #define IS_PROFILE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PROFILE_VIEW_TYPE)) 29 | #define IS_PROFILE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PROFILE_VIEW_TYPE)) 30 | 31 | G_DECLARE_FINAL_TYPE (ProfileView, profile_view, PROFILE, VIEW, GtkDialog) 32 | 33 | GtkWidget* profile_view_new(AccountInfoPointer const & accountInfo, const QString& uid); -------------------------------------------------------------------------------- /src/usernameregistrationbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016-2022 Savoir-faire Linux Inc. 3 | * Author: Alexandre Viau 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | 24 | #include 25 | #include "accountinfopointer.h" 26 | 27 | class Account; 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define USERNAME_REGISTRATION_BOX_TYPE (username_registration_box_get_type ()) 32 | #define USERNAME_REGISTRATION_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), USERNAME_REGISTRATION_BOX_TYPE, UsernameRegistrationBox)) 33 | #define USERNAME_REGISTRATION_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), USERNAME_REGISTRATION_BOX_TYPE, UsernameRegistrationBoxClass)) 34 | #define IS_USERNAME_REGISTRATION_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), USERNAME_REGISTRATION_BOX_TYPE)) 35 | #define IS_USERNAME_REGISTRATION_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), USERNAME_REGISTRATION_BOX_TYPE)) 36 | 37 | typedef struct _UsernameRegistrationBox UsernameRegistrationBox; 38 | typedef struct _UsernameRegistrationBoxClass UsernameRegistrationBoxClass; 39 | 40 | GType username_registration_box_get_type (void) G_GNUC_CONST; 41 | GtkWidget *username_registration_box_new_empty (bool register_button); 42 | GtkWidget *username_registration_box_new (AccountInfoPointer const & accountInfo, bool register_button); 43 | GtkEntry* username_registration_box_get_entry (UsernameRegistrationBox *view); 44 | void username_registration_box_set_use_blockchain (UsernameRegistrationBox* view, gboolean use_blockchain); 45 | 46 | G_END_DECLS 47 | -------------------------------------------------------------------------------- /src/utils/drawing.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * Author: Sebastien Blin 5 | * Author: Amin Bandali 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef _DRAWING_H 23 | #define _DRAWING_H 24 | 25 | #include 26 | 27 | #include 28 | 29 | #include 30 | 31 | namespace lrc 32 | { 33 | namespace api 34 | { 35 | namespace account 36 | { 37 | struct Info; 38 | } 39 | namespace conversation 40 | { 41 | struct Info; 42 | } 43 | } 44 | } 45 | 46 | G_BEGIN_DECLS 47 | 48 | enum class IconStatus { 49 | ABSENT, 50 | PRESENT, 51 | DISCONNECTED, 52 | TRYING, 53 | CONNECTED, 54 | INVALID 55 | }; 56 | 57 | GdkPixbuf *draw_fallback_avatar(int size, const std::string& letter, 58 | const char color = 0); 59 | GdkPixbuf *draw_conference_avatar(int size); 60 | GdkPixbuf *frame_avatar(GdkPixbuf *avatar); 61 | GdkPixbuf *draw_unread_messages(const GdkPixbuf *avatar, 62 | int unread_count); 63 | gboolean draw_qrcode(cairo_t *cr, const std::string& to_encode, 64 | uint32_t size); 65 | GdkPixbuf *draw_status(const GdkPixbuf *avatar, IconStatus status); 66 | GdkRGBA get_ambient_color(GtkWidget *widget); 67 | gboolean use_dark_theme(GdkRGBA color); 68 | GdkPixbuf *draw_conversation_photo( 69 | const lrc::api::conversation::Info& conversation, 70 | const lrc::api::account::Info& accountInfo, 71 | const QSize& size, 72 | gboolean displayInformation = true); 73 | GdkPixbuf *draw_person_photo(const QByteArray& data); 74 | GdkPixbuf *draw_generate_avatar(const std::string& alias, 75 | const std::string& uri); 76 | GdkPixbuf *draw_scale_and_frame( 77 | const GdkPixbuf *photo, 78 | const QSize &size, 79 | gboolean displayInformation = false, 80 | IconStatus status = IconStatus::INVALID, 81 | uint unreadMessages = 0); 82 | QByteArray gdkpixbuf_to_QByteArray(GdkPixbuf *pxm); 83 | 84 | G_END_DECLS 85 | 86 | #endif /* _DRAWING */ 87 | -------------------------------------------------------------------------------- /src/utils/files.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef _FILES_H 21 | #define _FILES_H 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | void autostart_symlink(gboolean autostart); 29 | 30 | GSettingsSchema *get_settings_schema(); 31 | 32 | /** 33 | * Split the string `uris' using `g_strsplit()' with "\r\n" as the delimiter, 34 | * passing each split part through `g_filename_from_uri()', and passing the 35 | * result as an argument to the provided `cb' callback function. 36 | */ 37 | void 38 | foreach_file(const gchar *uris, const std::function& cb); 39 | 40 | G_END_DECLS 41 | 42 | #endif /* _FILES_H */ 43 | -------------------------------------------------------------------------------- /src/video/video_widget.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2022 Savoir-faire Linux Inc. 3 | * Author: Stepan Salenikovich 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef __VIDEO_WIDGET_H__ 21 | #define __VIDEO_WIDGET_H__ 22 | 23 | #include 24 | #include