Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gajim/gajim
  • lovetox/gajim
  • ag/gajim
  • linkmauve/gajim
  • asterix/gajim
  • andre/gajim
  • mimi89999/gajim
  • bronko/gajim
  • wurstsalat/gajim
  • baitisj/gajim
  • Dicson/gajim
  • PolynomialDivision/gajim
  • troom/gajim
  • sophie-h/gajim
  • marmistrz/gajim
  • mrDoctorWho/gajim
  • orhideous/gajim
  • jjrh/gajim
  • streaps/gajim
  • jhuffine/gajim
  • maltel/gajim
  • Dominion/gajim
  • norstbox/gajim
  • synchrone/gajim
  • mick3247652/gajim
  • Yuki/gajim
  • l-n-s/gajim
  • ehuelsmann/gajim
  • hrxi/gajim
  • SaltyBones/gajim
  • rlgh/gajim
  • genofire/gajim
  • weblate/gajim
  • PapaTutuWawa/gajim
  • eta/gajim
  • jelmer/gajim
  • Ge0rG/gajim
  • TSRh/gajim
  • tolosaeduard/gajim
  • pitchum/gajim
  • mexicarne/gajim
  • prmcgs/gajim
  • mehw/gajim
  • ecxod/gajim
  • wannestas/gajim
  • XutaxKamay/gajim
  • emil/gajim-fork
  • gs/gajim
  • jurajlutter/gajim
  • Sheldon/gajim-cme
  • dexgs/gajim
  • bodqhrohro/gajim
  • Ermine/gajim
  • mesonium/gajim
  • mjk/gajim
  • nicoco/gajim
  • Polarian/gajim
  • izaya/gajim
  • kurion/gajim
  • npmania/gajim
  • ebertus/gajim
  • intelfx/gajim
  • musipusi/gajim
  • wusspuss/gajim
  • slicht/gajim
  • toms/gajim
  • singpolyma/gajim
  • Antiz/gajim
  • hendursaga/gajim
  • cve-1312/gajim
  • smemes2/gajim
  • amlor/gajim
72 results
Show changes
Commits on Source (368)
Showing with 729 additions and 330 deletions
[flake8]
ignore =
exclude = .git,__pycache__,.gitlab
max-complexity = 15
builtins=_
\ No newline at end of file
...@@ -7,6 +7,7 @@ syntax: glob ...@@ -7,6 +7,7 @@ syntax: glob
*.pyc *.pyc
*.pyo *.pyo
*~ *~
*#
autom4te.cache autom4te.cache
data/org.gajim.Gajim.appdata.xml data/org.gajim.Gajim.appdata.xml
data/org.gajim.Gajim.desktop data/org.gajim.Gajim.desktop
...@@ -19,11 +20,13 @@ po/stamp-it ...@@ -19,11 +20,13 @@ po/stamp-it
stamp-h1 stamp-h1
Makefile Makefile
__pycache__/ __pycache__/
.mypy_cache/
build/ build/
dist/ dist/
gajim.egg-info/ gajim.egg-info/
src/gtk/ src/gtk/
win/_build_root win/_build_root
.vscode
syntax: regexp syntax: regexp
^config\.* ^config\.*
......
before_script: before_script:
- sudo apt-get update -qq && sudo apt-get install -y -qq libtool pkg-config python3-openssl gir1.2-gtk-3.0 python3-gi python3-nbxmpp-nightly pylint3 - sudo apt-get update -qq && sudo apt-get install -y -qq libtool pkg-config gir1.2-gtk-3.0 python3-gi python3-cairo
- sudo apt-get build-dep -y -qq gajim-default-nightly - sudo apt-get build-dep -y -qq gajim-default-nightly
stages: stages:
- test - test
- build - build
run-test: run-tests:
stage: test stage: test
script: script:
- python3 setup.py test_nogui - rm -rf civenv-master
- virtualenv --system-site-packages civenv
- . ./civenv/bin/activate
- pip3 install mypy
- pip3 install nbxmpp
- pip3 install pylint==2.1.1
- mypy gajim
- scripts/dev/pylint-ci.sh --jobs=2 gajim
- python3 setup.py test -s test.no_gui
- deactivate
- rm -rf civenv-master
run-pylint: run-appdata:
stage: test stage: test
script: script:
- pylint3 --additional-builtins=_ --disable=all --enable=E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0106,E0107,E0108,E0202,E0221,E0222,E0235,E0501,E0502,E0503,E0602,E0603,E0604,E0701,E0702,E1001,E1002,E1003,E1004,E1111,E1120,E1121,E1122,E1123,E1124,E1125,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701,W0102 gajim - appstream-util validate data/org.gajim.Gajim.appdata.xml.in
run-build: run-build:
stage: build stage: build
...@@ -44,4 +54,4 @@ run-build: ...@@ -44,4 +54,4 @@ run-build:
name: "gajim-default-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA" name: "gajim-default-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
expire_in: 1 week expire_in: 1 week
paths: paths:
- gajim-default-2???-??-??.tar.gz - gajim-default-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA.tar.gz
Gajim 1.1.2 (15 January 2019)
Bug fixes
* #9518 Windows: Pressing "^" yields "^^"
* #9522 Windows: Switching keyboard layouts leads to a crash
* #9525 Windows/Mac: Links are not clickable in the About dialog
* #9535 Jingle Audio: Update codecs
* #9537 DiscoveryWindow: Fix bookmarking a group chat
* DBus: Correctly raise NewMessage signal
* Clicking on tray notifications does not open the chat
Gajim 1.1.1 (23 December 2018)
Bug fixes
* #8362 DBus: Incorrect unread message count
* #9427 Placeholder not cleared if pasting text into message input
* #9444 Determine the delay timestamp correctly when using mam:1
* #9453 Fix opening links inside the group chat subject (MacOS/Windows)
* #9465 Allow the full range of possible nicknames in group chats
* #9067 Gajim crashes when receiving xhtml messages
* #9096 Error when clicking on a subscription notification
* #9446 Chatstate error in MUC conversation
* #9471 Conversation Textview: Error on key press
* #9472 Handle presences without from attr correctly
* #9473 Error when creating a new group chat
* #9491 Identify group chat subject changes correctly
* #9496 Error on MUC roster selection change
* Determine soundplayer correctly on unix systems
* In some circumstances plugins could not be deleted
* Show correct contact status on tabs
* Dont answer group chat receipt requests
* Fix receipts for private messages
* Pressing the back button in the Accounts window leads to an error
* Better handle not available keyring backends
* Dont show incorrect contact on private messages
* Join group chat menu is disabled when there are no bookmarks
* Error on start chat menu action
* Error when opening sign-in/out notification
* Copying text does not work with different keyboard layouts
Gajim 1.1.0 (06 November 2018)
New
* Remove support for XEP-0091
Bug fixes
* #8968 Windows: Gajim loads DLLs from wrong location
* #9322 Error when adding contact
* #9357 Acquire sleep inhibtor correctly after sleep
* #9385 Ignore invalid bookmarks
* #9386 Discovery: Browsing nodes without identity
* #9393 Error when parsing invalid timestamps
* #9398 Error on jingle file transfer
Gajim 1.0.99.1 (07 October 2018)
New
* Implement XEP-0398
* MUC: Set Threshold for requesting history
* Show icon for unencrypted messages
* Support more media players for broadcasting the current tune
* Windows: Add a debug logging switch in preferences
* Preferences: enable/disable dark theme
* Preferences: enable/disable the MUC subject beeing shown on join
* Preferences: enable/disable ascii emoji conversion
Bug fixes
* #9198 Creating new MUCs with captial letters is not possible
* #9210 Error when clicking on new message indicator
* #9280 Inviting users to a MUC causes error
* #9301 Error when opening service discovery window
* #9309 Error when clicking on a groupchat invite notification
* #9311 Error when requesting server info
* #9117 Windows UAC changes status not available
* #9324 No menus/dialogs on Win7
* #9326 IPV6 Connection problem on Win10
* #9334 Joining big MUCs takes very long
* #9339 Error caused by remote_control
Gajim 1.0.99 (19 August 2018) Gajim 1.0.99 (19 August 2018)
New New
...@@ -19,16 +104,16 @@ Gajim 1.0.99 (19 August 2018) ...@@ -19,16 +104,16 @@ Gajim 1.0.99 (19 August 2018)
Bug fixes Bug fixes
* 8658 Translation doesnt work on Windows * #8658 Translation doesnt work on Windows
* 8750 Increase time frame for duplicate search in MUCs * #8750 Increase time frame for duplicate search in MUCs
* 9138 Translation in Flatpak does not work * #9138 Translation in Flatpak does not work
* 9140 Error when clicking on the notification of an incoming message * #9140 Error when clicking on the notification of an incoming message
* 9159 Wrong form type when responding to a voice request * #9159 Wrong form type when responding to a voice request
* 9069 Send cancel IQ if muc configuration is aborted * #9069 Send cancel IQ if muc configuration is aborted
* 9167 Flatpak fails to determine locale settings * #9167 Flatpak fails to determine locale settings
* 9171 Gajim requests vcard multiple times * #9171 Gajim requests vcard multiple times
* 9198 Creating new MUCs with capital letters is not possible * #9198 Creating new MUCs with capital letters is not possible
* 9211 Punycode and Unicode with Internationalized Domain Names * #9211 Punycode and Unicode with Internationalized Domain Names
Other changes Other changes
...@@ -50,9 +135,9 @@ Gajim 1.0.3 (20 May 2018) ...@@ -50,9 +135,9 @@ Gajim 1.0.3 (20 May 2018)
Bugs fixed: Bugs fixed:
* 8296 Fix errors on roster updates after stream management resume * #8296 Fix errors on roster updates after stream management resume
* 9106 Convert font weight from pango to css values * #9106 Convert font weight from pango to css values
* 9124 Bring ChatControl to front when notification is clicked * #9124 Bring ChatControl to front when notification is clicked
* Set no-store hint on groupchat chatstates * Set no-store hint on groupchat chatstates
* Dont show OOB uri if message body is the same * Dont show OOB uri if message body is the same
...@@ -66,26 +151,26 @@ Gajim 1.0.2 (30 April 2018) ...@@ -66,26 +151,26 @@ Gajim 1.0.2 (30 April 2018)
Bugs fixed: Bugs fixed:
* 7879 Server name is rejected for group chat bookmarks * #7879 Server name is rejected for group chat bookmarks
* 8964 setup.py install misses some files if used with "--skip-build" * #8964 setup.py install misses some files if used with "--skip-build"
* 9017 Password was sometimes stored in plaintext * #9017 Password was sometimes stored in plaintext
* 9022 Dont show error when receiving invalid avatars * #9022 Dont show error when receiving invalid avatars
* 9031 Windows: Always hide roster window on X * #9031 Windows: Always hide roster window on X
* 9038 No License in About dialog * #9038 No License in About dialog
* 9039 Encode filenames before sending * #9039 Encode filenames before sending
* 9044 Catch invalid IQ stanzas and log them * #9044 Catch invalid IQ stanzas and log them
* 9049 XMPP logo in "Add New Contact" window instead Gajim logo * #9049 XMPP logo in "Add New Contact" window instead Gajim logo
* 9050 Mark some strings as translatable * #9050 Mark some strings as translatable
* 9054 Error on file send completion * #9054 Error on file send completion
* 9055 Removing a bookmark causes error * #9055 Removing a bookmark causes error
* 9057 Avatar is deleted when updating vCard * #9057 Avatar is deleted when updating vCard
* 9065 Account label isn't change in tooltip of notification area icon * #9065 Account label isn't change in tooltip of notification area icon
* 9066 Placeholder text does't disappear * #9066 Placeholder text does't disappear
* 9068 Missing pulseaudio in Flatpak image * #9068 Missing pulseaudio in Flatpak image
* 9070 Fix History Manager search * #9070 Fix History Manager search
* 9074 Proxy comobobox in accounts/connections doesn't get update after ManageProxies * #9074 Proxy comobobox in accounts/connections doesn't get update after ManageProxies
* 9094 problem receiving file * #9094 problem receiving file
* 9101 Notification never autohides in gnome * #9101 Notification never autohides in gnome
* Correctly reload Plugins * Correctly reload Plugins
* Save history export with utf8 encoding * Save history export with utf8 encoding
......
...@@ -7,17 +7,17 @@ ...@@ -7,17 +7,17 @@
- python3-gi - python3-gi
- python3-gi-cairo - python3-gi-cairo
- gir1.2-gtk-3.0 (>=3.22) - gir1.2-gtk-3.0 (>=3.22)
- python3-nbxmpp - python3-nbxmpp (>=0.6.9,<0.7.0)
- python3-openssl (>=0.14) - python3-openssl (>=0.14)
- python3-cssutils (>=1.0.2) - python3-cssutils (>=1.0.2)
- python3-keyring - python3-keyring
- python3-precis-i18n
### Optional Runtime Requirements ### Optional Runtime Requirements
- python3-pil (pillow) for support of webp avatars - python3-pil (pillow) for support of webp avatars
- python3-gnupg to enable GPG encryption - python3-gnupg to enable GPG encryption
- For zeroconf (bonjour) you need python3-dbus - For zeroconf you need python3-dbus on Linux or [pybonjour](https://dev.gajim.org/lovetox/pybonjour-python3) on Windows/macOS
- gir1.2-gspell-1 and hunspell-LANG where lang is your locale eg. en, fr etc - gir1.2-gspell-1 and hunspell-LANG where lang is your locale eg. en, fr etc
- gir1.2-secret-1 for GNOME Keyring or KDE support as password storage - gir1.2-secret-1 for GNOME Keyring or KDE support as password storage
- D-Bus running to have gajim-remote working - D-Bus running to have gajim-remote working
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
- gir1.2-gupnpigd-1.0 for better NAT traversing - gir1.2-gupnpigd-1.0 for better NAT traversing
- gir1.2-networkmanager-1.0 for network lose detection - gir1.2-networkmanager-1.0 for network lose detection
- gir1.2-geoclue-2.0 for sharing your location - gir1.2-geoclue-2.0 for sharing your location
- python3-idna and python3-precis-i18n for correctly parsing JIDs
### Compile-time Requirements ### Compile-time Requirements
...@@ -87,7 +86,7 @@ Execute gajim with --verbose ...@@ -87,7 +86,7 @@ Execute gajim with --verbose
That is all, **enjoy**! That is all, **enjoy**!
(C) 2003-2018 (C) 2003-2019
The Gajim Team The Gajim Team
[https://gajim.org](https://gajim.org) [https://gajim.org](https://gajim.org)
......
...@@ -10,7 +10,7 @@ environment: ...@@ -10,7 +10,7 @@ environment:
branches: branches:
only: only:
- master - gajim_1.1
clone_depth: 1 clone_depth: 1
...@@ -18,8 +18,9 @@ clone_depth: 1 ...@@ -18,8 +18,9 @@ clone_depth: 1
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) # - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
build_script: build_script:
- C:\msys64\usr\bin\pacman -Syu --needed --noconfirm --ask=20 - del C:\Windows\System32\libssl-*.dll C:\Windows\system32\libcrypto-*.dll
- C:\msys64\usr\bin\pacman -Su --needed --noconfirm - del C:\Windows\SysWOW64\libssl-*.dll C:\Windows\SysWOW64\libcrypto-*.dll
- C:\msys64\usr\bin\pacman -Syuu --needed --noconfirm --noprogressbar --overwrite \\*
- ps: | - ps: |
$env:TIME_STRING=(get-date -UFormat "%Y-%m-%d").ToString() $env:TIME_STRING=(get-date -UFormat "%Y-%m-%d").ToString()
$env:BUILDROOT="C:\msys64\home\appveyor\gajim\win\_build_root" $env:BUILDROOT="C:\msys64\home\appveyor\gajim\win\_build_root"
...@@ -31,8 +32,8 @@ build_script: ...@@ -31,8 +32,8 @@ build_script:
bash "git clone C:/projects/gajim C:/msys64/home/appveyor/gajim" bash "git clone C:/projects/gajim C:/msys64/home/appveyor/gajim"
bash "C:/msys64/home/appveyor/gajim/win/build.sh $($env:MSYS_ARCH)" bash "C:/msys64/home/appveyor/gajim/win/build.sh $($env:MSYS_ARCH)"
Push-AppveyorArtifact "$($env:BUILDROOT)/Gajim.exe" -FileName "Gajim-Master-$($env:ARCH)-$($env:TIME_STRING).exe" Push-AppveyorArtifact "$($env:BUILDROOT)/Gajim.exe" -FileName "Gajim-1.1.1-$($env:ARCH)-$($env:TIME_STRING).exe"
Push-AppveyorArtifact "$($env:BUILDROOT)/Gajim-Portable.exe" -FileName "Gajim-Portable-Master-$($env:ARCH)-$($env:TIME_STRING).exe" Push-AppveyorArtifact "$($env:BUILDROOT)/Gajim-Portable.exe" -FileName "Gajim-Portable-1.1.1-$($env:ARCH)-$($env:TIME_STRING).exe"
# on_finish: # on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
......
...@@ -46,7 +46,7 @@ and ...@@ -46,7 +46,7 @@ and
.Pa THANKS , .Pa THANKS ,
for a complete list. for a complete list.
.Sh COPYRIGHT .Sh COPYRIGHT
Copyright (C) 2003-2018 Gajim Team Copyright (C) 2003-2019 Gajim Team
.Pp .Pp
.Nm .Nm
is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 only. is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 only.
......
...@@ -89,7 +89,7 @@ and ...@@ -89,7 +89,7 @@ and
.Pa THANKS , .Pa THANKS ,
for a complete list. for a complete list.
.Sh COPYRIGHT .Sh COPYRIGHT
Copyright (C) 2003-2018 Gajim Team Copyright (C) 2003-2019 Gajim Team
.Pp .Pp
.Nm .Nm
is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 only. is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 only.
......
...@@ -93,7 +93,7 @@ and ...@@ -93,7 +93,7 @@ and
with contributions and patches merged from many individuals around the world. with contributions and patches merged from many individuals around the world.
See the About Dialog for a complete list. See the About Dialog for a complete list.
.Sh COPYRIGHT .Sh COPYRIGHT
Copyright (C) 2003-2018 Gajim Team Copyright (C) 2003-2019 Gajim Team
.Pp .Pp
.Nm .Nm
is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 only. is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 only.
......
...@@ -7,32 +7,37 @@ ...@@ -7,32 +7,37 @@
<metadata_license>CC-BY-SA-3.0</metadata_license> <metadata_license>CC-BY-SA-3.0</metadata_license>
<project_license>GPL-3.0</project_license> <project_license>GPL-3.0</project_license>
<name>Gajim</name> <name>Gajim</name>
<summary>A GTK+ Jabber client</summary> <summary>A GTK+ XMPP client</summary>
<description> <description>
<p>Gajim is a chat client to be used with Jabber.org, Live Journal Talk, <p>Gajim aims to be an easy to use and fully-featured XMPP client.
Nimbuzz, Ovi, Talkonaut, and thousands of other services With Gajim you can chat through various XMPP services of your choice
run by companies and ISPs, and volunteers around the world. (e.g. Jabber.org) as well as transports (e.g. Facebook, IRC).
</p> </p>
<p>If you have a few accounts on different servers, if you want to be in <p>Just chat with your friends or family, easily share pictures and
contact with your friends and family all the time, then Gajim is for you. thoughts or discuss the news with your groups.
</p>
<p>Gajim integrates well with your other devices: just chat and see what's
been said on your mobile device.
</p> </p>
<p>Features:</p> <p>Features:</p>
<ul> <ul>
<li>Tabbed chat window and single window modes</li> <li>Never miss a message, keep all your chat clients synchronized</li>
<li>Group chat support (with Multi-User Chat protocol), invitation, chat to group chat transformation</li> <li>Invite friends to group chats or join one</li>
<li>Emoticons, avatars, PEP (user activity, mood and tune)</li> <li>Easily send pictures, videos or other files to friends and groups</li>
<li>Audio / video conferences</li> <li>Chat securely with End-to-End encryption via OMEMO or PGP</li>
<li>File transfer, room bookmarks</li> <li>Use your favorite emoticons, set your own profile picture</li>
<li>Metacontacts support</li> <li>Keep and manage all your chat history</li>
<li>Trayicon, speller, extended chat history functionalities</li> <li>Organize your chats with tabs</li>
<li>TLS, GPG and End-To-End encryption support</li> <li>Automatic spell-checking for your messages</li>
<li>Transport registration support</li> <li>Connect to other Messengers via Transports (Facebook, IRC, ...)</li>
<li>Service discovery including nodes, user search</li> <li>Lookup things on Wikipedia, dictionaries or other search engines directly from the chat window</li>
<li>Wikipedia, dictionary and search engine lookup</li> <li>Set your activity, tune, and mood to show your friends how you are feeling</li>
<li>Multiple accounts support</li> <li>Support for multiple accounts</li>
<li>XML console interface</li> <li>Group multiple contacts from one friend to a single Meta-Contact</li>
<li>Link local (bonjour / zeroconf), BOSH</li> <li>XML console to see what's happening on the protocol layer</li>
<li>Other features via plugins </li> <li>Serverless messaging (Bonjour/Zeroconf), BOSH</li>
<li>Support for service discovery including nodes and search for users</li>
<li>Even more features via plugins</li>
</ul> </ul>
</description> </description>
<categories> <categories>
...@@ -43,7 +48,7 @@ ...@@ -43,7 +48,7 @@
</categories> </categories>
<screenshots> <screenshots>
<screenshot type="default"> <screenshot type="default">
<image>https://gajim.org/imgs/gajim_roster.png</image> <image>https://gajim.org/imgs/gajim_single_window_mode.png</image>
<caption>Roster, list of contacts</caption> <caption>Roster, list of contacts</caption>
</screenshot> </screenshot>
<screenshot> <screenshot>
...@@ -69,7 +74,7 @@ ...@@ -69,7 +74,7 @@
<url type="homepage">https://gajim.org/</url> <url type="homepage">https://gajim.org/</url>
<url type="bugtracker">https://dev.gajim.org/gajim/gajim</url> <url type="bugtracker">https://dev.gajim.org/gajim/gajim</url>
<url type="faq">https://dev.gajim.org/gajim/gajim/wikis/help/gajimfaq</url> <url type="faq">https://dev.gajim.org/gajim/gajim/wikis/help/gajimfaq</url>
<url type="help">https://dev.gajim.org/gajim/gajim/wikis/help/home</url> <url type="help">https://dev.gajim.org/gajim/gajim/wikis/help/Help</url>
<url type="donation">https://gajim.org/dev.php#donate</url> <url type="donation">https://gajim.org/dev.php#donate</url>
<url type="translate">https://dev.gajim.org/gajim/gajim/wikis/development/DevTranslate</url> <url type="translate">https://dev.gajim.org/gajim/gajim/wikis/development/DevTranslate</url>
<translation type="gettext">gajim</translation> <translation type="gettext">gajim</translation>
...@@ -96,6 +101,9 @@ ...@@ -96,6 +101,9 @@
<content_attribute id="money-gambling">none</content_attribute> <content_attribute id="money-gambling">none</content_attribute>
</content_rating> </content_rating>
<releases> <releases>
<release version="1.1.2" date="2019-01-15" />
<release version="1.1.1" date="2018-12-23" />
<release version="1.1.0" date="2018-11-06" />
<release version="1.0.3" date="2018-05-20" /> <release version="1.0.3" date="2018-05-20" />
<release version="1.0.2" date="2018-04-30" /> <release version="1.0.2" date="2018-04-30" />
<release version="1.0.1" date="2018-04-01" /> <release version="1.0.1" date="2018-04-01" />
......
...@@ -13,3 +13,14 @@ StartupWMClass=Gajim ...@@ -13,3 +13,14 @@ StartupWMClass=Gajim
Terminal=false Terminal=false
Type=Application Type=Application
MimeType=x-scheme-handler/xmpp; MimeType=x-scheme-handler/xmpp;
Actions=StartChat;ShowNextPendingEvent;
[Desktop Action StartChat]
Exec=gajim --start-chat
Name=Start a new chat
Icon=org.gajim.Gajim
[Desktop Action ShowNextPendingEvent]
Exec=gajim --show-next-pending-event
Name=Show next pending event
Icon=org.gajim.Gajim
[epydoc]
# Information about the project.
name: Gajim
url: http://gajim.org
verbosity: 3
imports: yes
redundant-details: yes
docformat: restructuredtext
# top: gajim
# The list of modules to document. Modules can be named using
# dotted names, module filenames, or package directory names.
# This option may be repeated.
modules: gajim/* test/*
# Write html output to the directory "apidocs"
#output: pdf
output: html
target: doc/apidocs/
# Include all automatically generated graphs. These graphs are
# generated using Graphviz dot.
graph: all
dotpath: /usr/bin/dot
graph-font: Sans
graph-font-size: 10
...@@ -23,9 +23,9 @@ Replace install path `~/Gajim/gajim_flatpak` with an install path of your choice ...@@ -23,9 +23,9 @@ Replace install path `~/Gajim/gajim_flatpak` with an install path of your choice
*Note: Remove `--user` if you want a system-wide installation.* *Note: Remove `--user` if you want a system-wide installation.*
1. `flatpak --user remote-add --from gnome https://sdk.gnome.org/gnome.flatpakrepo` 1. `flatpak --user remote-add --from gnome https://sdk.gnome.org/gnome.flatpakrepo`
2. `flatpak --user install gnome org.gnome.Platform//3.28` 2. `flatpak --user install gnome org.gnome.Platform//3.30`
3. `flatpak --user install gnome org.gnome.Sdk//3.28` 3. `flatpak --user install gnome org.gnome.Sdk//3.30`
4. `flatpak-builder --repo=gajim_flatpak_repo ~/Gajim/gajim_flatpak ~/Gajim/org.gajim.Gajim.json` 4. `flatpak-builder --repo=gajim_flatpak_repo ~/Gajim/gajim_flatpak ~/Gajim/flatpak/org.gajim.Gajim.yaml`
5. `flatpak --user remote-add --no-gpg-verify gajim_flatpak_repo gajim_flatpak_repo` 5. `flatpak --user remote-add --no-gpg-verify gajim_flatpak_repo gajim_flatpak_repo`
6. `flatpak --user install gajim_flatpak_repo org.gajim.Gajim` 6. `flatpak --user install gajim_flatpak_repo org.gajim.Gajim`
7. `flatpak run org.gajim.Gajim` 7. `flatpak run org.gajim.Gajim`
...@@ -51,7 +51,7 @@ In this example, we use `git` to update the repository. You can also download th ...@@ -51,7 +51,7 @@ In this example, we use `git` to update the repository. You can also download th
### Install and update Gajim ### Install and update Gajim
1. `flatpak-builder --repo=gajim_flatpak_repo ~/Gajim/gajim_flatpak ~/Gajim/org.gajim.Gajim.json` 1. `flatpak-builder --repo=gajim_flatpak_repo ~/Gajim/gajim_flatpak ~/Gajim/flatpak/org.gajim.Gajim.yaml`
2. `flatpak --user update` 2. `flatpak --user update`
3. `flatpak run org.gajim.Gajim` 3. `flatpak run org.gajim.Gajim`
......
app-id: org.gajim.Gajim
runtime: org.gnome.Platform
runtime-version: 3.30
sdk: org.gnome.Sdk
command: gajim
tags: nightly
desktop-file-name-prefix: '(Nightly) '
finish-args:
- --share=ipc
- --share=network
- --socket=fallback-x11
- --socket=wayland
- --socket=pulseaudio
- --system-talk-name=org.freedesktop.GeoClue2
- --system-talk-name=org.freedesktop.login1
- --talk-name=org.gnome.ScreenSaver
- --talk-name=org.mpris.MediaPlayer2.*
# Keyring
- --talk-name=org.freedesktop.secrets
# dconf
- --filesystem=xdg-run/dconf
- --filesystem=~/.config/dconf:ro
- --talk-name=ca.desrt.dconf
- --env=DCONF_USER_CONFIG_DIR=.config/dconf
# extensions
- --env=PYTHONPATH=/app/plugins/lib/python3.7/site-packages
add-extensions:
org.gajim.Gajim.Plugin:
directory: plugins
merge-dirs: lib/python3.7/site-packages
subdirectories: true
no-autodownload: true
autodelete: true
cleanup:
- '/bin/easy*'
- /include
- /lib/debug
- /lib/pkgconfig
- /lib/python2.7
- /share/aclocal
- /share/doc
- /share/gtk-doc
- /share/man
- '*.a'
- '*.la'
modules:
- name: python3-pycparser
buildsystem: simple
build-commands:
- pip3 install --prefix=/app .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
sha256: a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3
- name: python3-cffi
buildsystem: simple
build-commands:
- pip3 install --prefix=/app .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz
sha256: e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4
- name: python3-asn1crypto
buildsystem: simple
build-commands:
- pip3 install --prefix=/app asn1crypto-0.24.0-py2.py3-none-any.whl
sources:
- type: file
url: https://pypi.python.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
sha256: 2f1adbb7546ed199e3c90ef23ec95c5cf3585bac7d11fb7eb562a3fe89c64e87
- name: python3-idna
buildsystem: simple
build-commands:
- pip3 install --prefix=/app idna-2.7-py2.py3-none-any.whl
sources:
- type: file
url: https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
sha256: 156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e
- name: python3-cryptography
buildsystem: simple
build-commands:
- pip3 install --prefix=/app .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz
sha256: 8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6
- name: python3-pyopenssl
buildsystem: simple
build-commands:
- pip3 install --prefix=/app pyOpenSSL-18.0.0-py2.py3-none-any.whl
sources:
- type: file
url: https://files.pythonhosted.org/packages/96/af/9d29e6bd40823061aea2e0574ccb2fcf72bfd6130ce53d32773ec375458c/pyOpenSSL-18.0.0-py2.py3-none-any.whl
sha256: 26ff56a6b5ecaf3a2a59f132681e2a80afcc76b4f902f612f518f92c2a1bf854
- name: python3-dbus-python
build-options:
env:
PYTHON_VERSION: '3'
sources:
- type: archive
url: https://files.pythonhosted.org/packages/3f/e7/4edb582d1ffd5ac3c84188deea32e960b5c8c0fe1da56ce70224f85ce542/dbus-python-1.2.8.tar.gz
sha256: abf12bbb765e300bf8e2a1b2f32f85949eab06998dbda127952c31cb63957b6f
- name: python3-jeepney
buildsystem: simple
build-commands:
- pip3 install --prefix=/app jeepney-0.4-py3-none-any.whl
sources:
- type: file
url: https://files.pythonhosted.org/packages/2b/f7/ff23b9b59534f501d47c327576aadda59da5b83d76ff837e6075bc325b9f/jeepney-0.4-py3-none-any.whl
sha256: f6f8b1428403b4afad04b6b82f9ab9fc426c253d7504c9031c41712a2c01dc74
- name: python3-secretstorage
buildsystem: simple
build-commands:
- pip3 install --prefix=/app SecretStorage-3.1.0-py3-none-any.whl
sources:
- type: file
url: https://files.pythonhosted.org/packages/d8/e8/80975fd281764c80b2eb581a7f25d2109786e273b8925e8161bd2d06d10a/SecretStorage-3.1.0-py3-none-any.whl
sha256: 20196abd1a9d1310df7573d58ca6e7ed9292218c98ca3638eea07beb16080343
- name: python3-entrypoints
buildsystem: simple
build-commands:
- pip3 install --prefix=/app entrypoints-0.2.3-py2.py3-none-any.whl
sources:
- type: file
url: https://files.pythonhosted.org/packages/cc/8b/4eefa9b47f1910b3d2081da67726b066e379b04ca897acfe9f92bac56147/entrypoints-0.2.3-py2.py3-none-any.whl
sha256: 10ad569bb245e7e2ba425285b9fa3e8178a0dc92fc53b1e1c553805e15a8825b
- name: python3-keyring
buildsystem: simple
build-commands:
- pip3 install --prefix=/app keyring-16.0.2-py2.py3-none-any.whl
cleanup:
- /bin
sources:
- type: file
url: https://files.pythonhosted.org/packages/5f/cb/dc7b2215cd82b77e7b8b48abd8989c1b09990d4c91a3ccfdc18a61157b36/keyring-16.0.2-py2.py3-none-any.whl
sha256: 2a5cf5e596cbf8b66b98b8df2c214adfe21e6e18baa82006b2c482bd0c4be94c
- name: python3-cssutils
buildsystem: simple
build-commands:
- pip3 install --prefix=/app cssutils-1.0.2-py3-none-any.whl
cleanup:
- /bin
sources:
- type: file
url: https://files.pythonhosted.org/packages/6b/15/a9fb9010f58d1c55dd0b7779db2334feb9a572d407024f39a60f44293861/cssutils-1.0.2-py3-none-any.whl
sha256: c74dbe19c92f5052774eadb15136263548dd013250f1ed1027988e7fef125c8d
- name: python3-precis_i18n
buildsystem: simple
build-commands:
- pip3 install --prefix=/app precis_i18n-1.0.0-py3-none-any.whl
sources:
- type: file
url: https://files.pythonhosted.org/packages/08/9d/d32f1b7c6d280c82a786b629ba89bd9e3e8409b9e23a7309f76a78e46971/precis_i18n-1.0.0-py3-none-any.whl
sha256: f6942bbffec698d0d7e30c42f589f3f6da13e723d047997d0761a41facf2986f
- name: gspell
cleanup:
- /bin
sources:
- type: archive
url: https://download.gnome.org/sources/gspell/1.8/gspell-1.8.1.tar.xz
sha256: 819a1d23c7603000e73f5e738bdd284342e0cd345fb0c7650999c31ec741bbe5
- name: python3-nbxmpp
buildsystem: simple
build-commands:
- pip3 install --prefix=/app .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/24/54/23a475a0d7d3664ea21b14ce907245dc390496f31d229a9aac2ae20c7c28/nbxmpp-0.6.8.tar.gz
sha256: 8c2b4b8aac1a8c6d07c1e30af542fde20a70a9b8c7c04017e9cea0db654437c6
- name: gajim
buildsystem: simple
build-commands:
- pip3 install --prefix=/app .
- touch /app/share/run-as-flatpak
sources:
- type: git
url: https://dev.gajim.org/gajim/gajim.git
post-install:
- install -d /app/plugins
import os import os
import subprocess import subprocess
__version__ = "1.0.3" __version__ = "1.1.2"
IS_FLATPAK = False IS_FLATPAK = False
if os.path.exists('/app/share/run-as-flatpak'): if os.path.exists('/app/share/run-as-flatpak'):
......
# -*- coding: utf-8 -*- # Copyright (C) 2006 Nikos Kouremenos <kourem AT gmail.com>
## src/adhoc_commands.py # Copyright (C) 2006-2007 Tomasz Melcer <liori AT exroot.org>
## # Copyright (C) 2006-2014 Yann Leboulanger <asterix AT lagaule.org>
## Copyright (C) 2006 Nikos Kouremenos <kourem AT gmail.com> # Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org>
## Copyright (C) 2006-2007 Tomasz Melcer <liori AT exroot.org> # Stephan Erb <steve-e AT h3c.de>
## Copyright (C) 2006-2014 Yann Leboulanger <asterix AT lagaule.org> #
## Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org> # This file is part of Gajim.
## Stephan Erb <steve-e AT h3c.de> #
## # Gajim is free software; you can redistribute it and/or modify
## This file is part of Gajim. # it under the terms of the GNU General Public License as published
## # by the Free Software Foundation; version 3 only.
## Gajim is free software; you can redistribute it and/or modify #
## it under the terms of the GNU General Public License as published # Gajim is distributed in the hope that it will be useful,
## by the Free Software Foundation; version 3 only. # but WITHOUT ANY WARRANTY; without even the implied warranty of
## # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## Gajim is distributed in the hope that it will be useful, # GNU General Public License for more details.
## but WITHOUT ANY WARRANTY; without even the implied warranty of #
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # You should have received a copy of the GNU General Public License
## GNU General Public License for more details. # along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
## You should have received a copy of the GNU General Public License
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
# FIXME: think if we need caching command list. it may be wrong if there will # FIXME: think if we need caching command list. it may be wrong if there will
# be entities that often change the list, it may be slow to fetch it every time # be entities that often change the list, it may be slow to fetch it every time
from gi.repository import Gtk from gi.repository import Gtk
import nbxmpp import nbxmpp
from gajim.common import app from gajim.common import app
from gajim.common.i18n import _
from gajim.common.modules import dataforms from gajim.common.modules import dataforms
from gajim.common import ged from gajim.common import ged
from gajim import gtkgui_helpers from gajim import gtkgui_helpers
from gajim.gtk import HigDialog
from gajim import dataforms_widget from gajim import dataforms_widget
from gajim.gtk.dialogs import HigDialog
class CommandWindow: class CommandWindow:
""" """
...@@ -64,6 +62,7 @@ class CommandWindow: ...@@ -64,6 +62,7 @@ class CommandWindow:
self.stage_back_button_cb = None self.stage_back_button_cb = None
self.stage_forward_button_cb = None self.stage_forward_button_cb = None
self.stage_execute_button_cb = None self.stage_execute_button_cb = None
self.stage_finish_button_cb = None
self.stage_close_button_cb = None self.stage_close_button_cb = None
self.stage_restart_button_cb = None self.stage_restart_button_cb = None
self.stage_window_delete_cb = None self.stage_window_delete_cb = None
...@@ -239,7 +238,7 @@ class CommandWindow: ...@@ -239,7 +238,7 @@ class CommandWindow:
# close old stage # close old stage
self.stage_finish() self.stage_finish()
assert len(self.commandlist)>0 assert self.commandlist
self.stages_notebook.set_current_page( self.stages_notebook.set_current_page(
self.stages_notebook.page_num(self.command_list_stage_vbox)) self.stages_notebook.page_num(self.command_list_stage_vbox))
...@@ -408,7 +407,7 @@ class CommandWindow: ...@@ -408,7 +407,7 @@ class CommandWindow:
self.commandnode = command.getAttr('node') self.commandnode = command.getAttr('node')
if command.getTag('x'): if command.getTag('x'):
self.dataform = dataforms.ExtendForm(node=command.getTag('x')) self.dataform = dataforms.extend_form(node=command.getTag('x'))
self.data_form_widget.set_sensitive(True) self.data_form_widget.set_sensitive(True)
try: try:
......
#
# Copyright (C) 2017 Philipp Hörist <philipp AT hoerist.com> # Copyright (C) 2017 Philipp Hörist <philipp AT hoerist.com>
# #
# This file is part of Gajim. # This file is part of Gajim.
...@@ -15,31 +14,36 @@ ...@@ -15,31 +14,36 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>. # along with Gajim. If not, see <http://www.gnu.org/licenses/>.
from gi.repository import Gtk
from gi.repository import Gdk
from gajim.common import app from gajim.common import app
from gajim.common import helpers from gajim.common import helpers
from gajim.common.app import interface from gajim.common.app import interface
from gajim.common.exceptions import GajimGeneralException from gajim.common.exceptions import GajimGeneralException
from gajim import config from gajim import config
from gajim import dialogs from gajim import dialogs
from gajim.gtk import shortcuts_window
from gajim.accounts_window import AccountsWindow
import gajim.plugins.gui
from gajim import disco from gajim import disco
import gajim.plugins.gui
from gajim.gtk.dialogs import ShortcutsWindow
from gajim.gtk.history_sync import HistorySyncAssistant from gajim.gtk.history_sync import HistorySyncAssistant
from gajim.gtk.server_info import ServerInfoDialog from gajim.gtk.server_info import ServerInfoDialog
from gajim.gtk.mam_preferences import MamPreferences from gajim.gtk.mam_preferences import MamPreferences
from gajim.gtk.preferences import Preferences from gajim.gtk.preferences import Preferences
from gajim.gtk import JoinGroupchatWindow from gajim.gtk.join_groupchat import JoinGroupchatWindow
from gajim.gtk import StartChatDialog from gajim.gtk.start_chat import StartChatDialog
from gajim.gtk import AddNewContactWindow from gajim.gtk.add_contact import AddNewContactWindow
from gajim.gtk import SingleMessageWindow from gajim.gtk.single_message import SingleMessageWindow
from gajim.gtk import XMLConsoleWindow from gajim.gtk.xml_console import XMLConsoleWindow
from gajim.gtk import AboutDialog from gajim.gtk.about import AboutDialog
from gajim.gtk import PrivacyListsWindow from gajim.gtk.privacy_list import PrivacyListsWindow
from gajim.gtk import ManageBookmarksWindow from gajim.gtk.bookmarks import ManageBookmarksWindow
from gajim.gtk import FeaturesDialog from gajim.gtk.features import FeaturesDialog
from gajim.gtk import AccountCreationWizard from gajim.gtk.account_wizard import AccountCreationWizard
from gajim.gtk import HistoryWindow from gajim.gtk.history import HistoryWindow
from gajim.gtk.accounts import AccountsWindow
# General Actions # General Actions
...@@ -131,24 +135,29 @@ def on_service_disco(action, param): ...@@ -131,24 +135,29 @@ def on_service_disco(action, param):
pass pass
def on_join_gc(action, param): def on_join_gc(_action, param):
account = None account, jid = None, None
if param is None: if param is None:
if not app.get_connected_accounts(): if not app.get_connected_accounts():
return return
else: else:
account = param.get_string() account, jid = param.get_strv()
if not jid:
jid = None
window = app.get_app_window(JoinGroupchatWindow) window = app.get_app_window(JoinGroupchatWindow)
if window is None: if window is None:
JoinGroupchatWindow(account, None) JoinGroupchatWindow(account, jid)
else: else:
window.present() window.present()
def on_add_contact(action, param): def on_add_contact(_action, param):
window = app.get_app_window(AddNewContactWindow) account, jid = param.get_strv()
if not jid:
jid = None
window = app.get_app_window(AddNewContactWindow, account)
if window is None: if window is None:
AddNewContactWindow(param.get_string()) AddNewContactWindow(account, jid)
else: else:
window.present() window.present()
...@@ -282,7 +291,7 @@ def on_faq(action, param): ...@@ -282,7 +291,7 @@ def on_faq(action, param):
def on_keyboard_shortcuts(action, param): def on_keyboard_shortcuts(action, param):
shortcuts_window.show(app.app.get_active_window()) ShortcutsWindow()
def on_features(action, param): def on_features(action, param):
...@@ -338,3 +347,25 @@ def show_next_pending_event(action, param): ...@@ -338,3 +347,25 @@ def show_next_pending_event(action, param):
if not event: if not event:
return return
app.interface.handle_event(account, jid, event.type_) app.interface.handle_event(account, jid, event.type_)
def open_link(_action, param):
kind, link = param.get_strv()
helpers.launch_browser_mailer(kind, link)
def copy_link(_action, param):
text = param.get_string()
clip = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
clip.set_text(text, -1)
def start_chat(_action, param):
account, jid = param.get_strv()
app.interface.new_chat_from_jid(account, jid)
def join_groupchat(_action, param):
account, jid = param.get_strv()
room_jid = jid.split('?')[0]
app.interface.join_gc_minimal(account, room_jid)
# -*- coding:utf-8 -*- # Copyright (C) 2003-2017 Yann Leboulanger <asterix AT lagaule.org>
## src/gajim.py # Copyright (C) 2004-2005 Vincent Hanquez <tab AT snarc.org>
## # Copyright (C) 2005 Alex Podaras <bigpod AT gmail.com>
## Copyright (C) 2003-2017 Yann Leboulanger <asterix AT lagaule.org> # Norman Rasmussen <norman AT rasmussen.co.za>
## Copyright (C) 2004-2005 Vincent Hanquez <tab AT snarc.org> # Stéphan Kochen <stephan AT kochen.nl>
## Copyright (C) 2005 Alex Podaras <bigpod AT gmail.com> # Copyright (C) 2005-2006 Dimitur Kirov <dkirov AT gmail.com>
## Norman Rasmussen <norman AT rasmussen.co.za> # Alex Mauer <hawke AT hawkesnest.net>
## Stéphan Kochen <stephan AT kochen.nl> # Copyright (C) 2005-2007 Travis Shirk <travis AT pobox.com>
## Copyright (C) 2005-2006 Dimitur Kirov <dkirov AT gmail.com> # Nikos Kouremenos <kourem AT gmail.com>
## Alex Mauer <hawke AT hawkesnest.net> # Copyright (C) 2006 Junglecow J <junglecow AT gmail.com>
## Copyright (C) 2005-2007 Travis Shirk <travis AT pobox.com> # Stefan Bethge <stefan AT lanpartei.de>
## Nikos Kouremenos <kourem AT gmail.com> # Copyright (C) 2006-2008 Jean-Marie Traissard <jim AT lapin.org>
## Copyright (C) 2006 Junglecow J <junglecow AT gmail.com> # Copyright (C) 2007 Lukas Petrovicky <lukas AT petrovicky.net>
## Stefan Bethge <stefan AT lanpartei.de> # James Newton <redshodan AT gmail.com>
## Copyright (C) 2006-2008 Jean-Marie Traissard <jim AT lapin.org> # Copyright (C) 2007-2008 Brendan Taylor <whateley AT gmail.com>
## Copyright (C) 2007 Lukas Petrovicky <lukas AT petrovicky.net> # Julien Pivotto <roidelapluie AT gmail.com>
## James Newton <redshodan AT gmail.com> # Stephan Erb <steve-e AT h3c.de>
## Copyright (C) 2007-2008 Brendan Taylor <whateley AT gmail.com> # Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org>
## Julien Pivotto <roidelapluie AT gmail.com> # Copyright (C) 2016-2017 Emmanuel Gil Peyrot <linkmauve AT linkmauve.fr>
## Stephan Erb <steve-e AT h3c.de> # Philipp Hörist <philipp AT hoerist.com>
## Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org> #
## Copyright (C) 2016-2017 Emmanuel Gil Peyrot <linkmauve AT linkmauve.fr> # This file is part of Gajim.
## Philipp Hörist <philipp AT hoerist.com> #
## # Gajim is free software; you can redistribute it and/or modify
## This file is part of Gajim. # it under the terms of the GNU General Public License as published
## # by the Free Software Foundation; version 3 only.
## Gajim is free software; you can redistribute it and/or modify #
## it under the terms of the GNU General Public License as published # Gajim is distributed in the hope that it will be useful,
## by the Free Software Foundation; version 3 only. # but WITHOUT ANY WARRANTY; without even the implied warranty of
## # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## Gajim is distributed in the hope that it will be useful, # GNU General Public License for more details.
## but WITHOUT ANY WARRANTY; without even the implied warranty of #
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # You should have received a copy of the GNU General Public License
## GNU General Public License for more details. # along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
## You should have received a copy of the GNU General Public License
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
import sys import sys
import os from datetime import datetime
from pathlib import Path
from urllib.parse import unquote from urllib.parse import unquote
from gi.repository import GLib, Gio, Gtk from gi.repository import GLib, Gio, Gtk
import gajim
from gajim.common import app from gajim.common import app
from gajim.common import i18n
from gajim.common import configpaths from gajim.common import configpaths
from gajim.common import logging_helpers from gajim.common import logging_helpers
from gajim.common import exceptions from gajim.common import exceptions
from gajim.common import caps_cache from gajim.common import caps_cache
from gajim.common import logger from gajim.common import logger
from gajim.common.i18n import _
class GajimApplication(Gtk.Application): class GajimApplication(Gtk.Application):
'''Main class handling activation and command line.''' '''Main class handling activation and command line.'''
def __init__(self): def __init__(self):
Gtk.Application.__init__(self, application_id='org.gajim.Gajim', flags = (Gio.ApplicationFlags.HANDLES_COMMAND_LINE |
flags=( Gio.ApplicationFlags.HANDLES_OPEN)
Gio.ApplicationFlags.HANDLES_COMMAND_LINE | Gtk.Application.__init__(self,
Gio.ApplicationFlags.HANDLES_OPEN)) application_id='org.gajim.Gajim',
flags=flags)
self.add_main_option('version', ord('V'), GLib.OptionFlags.NONE,
GLib.OptionArg.NONE, self.add_main_option(
_('Show the application\'s version')) 'version',
self.add_main_option('quiet', ord('q'), GLib.OptionFlags.NONE, ord('V'),
GLib.OptionArg.NONE, GLib.OptionFlags.NONE,
_('Show only critical errors')) GLib.OptionArg.NONE,
self.add_main_option('separate', ord('s'), GLib.OptionFlags.NONE, _('Show the application\'s version'))
GLib.OptionArg.NONE,
_('Separate profile files completely (even ' self.add_main_option(
'history database and plugins)')) 'quiet',
self.add_main_option('verbose', ord('v'), GLib.OptionFlags.NONE, ord('q'),
GLib.OptionArg.NONE, GLib.OptionFlags.NONE,
_('Print XML stanzas and other debug ' GLib.OptionArg.NONE,
'information')) _('Show only critical errors'))
self.add_main_option('profile', ord('p'), GLib.OptionFlags.NONE,
GLib.OptionArg.STRING, self.add_main_option(
_('Use defined profile in configuration ' 'separate',
'directory'), 'NAME') ord('s'),
self.add_main_option('config-path', ord('c'), GLib.OptionFlags.NONE, GLib.OptionFlags.NONE,
GLib.OptionArg.STRING, GLib.OptionArg.NONE,
_('Set configuration directory'), 'PATH') _('Separate profile files completely '
self.add_main_option('loglevel', ord('l'), GLib.OptionFlags.NONE, '(even history database and plugins)'))
GLib.OptionArg.STRING,
_('Configure logging system'), 'LEVEL') self.add_main_option(
self.add_main_option('warnings', ord('w'), GLib.OptionFlags.NONE, 'verbose',
GLib.OptionArg.NONE, ord('v'),
_('Show all warnings')) GLib.OptionFlags.NONE,
self.add_main_option('ipython', ord('i'), GLib.OptionFlags.NONE, GLib.OptionArg.NONE,
GLib.OptionArg.NONE, _('Print XML stanzas and other debug information'))
_('Open IPython shell'))
self.add_main_option('show-next-pending-event', 0, GLib.OptionFlags.NONE, self.add_main_option(
GLib.OptionArg.NONE, 'profile',
_('Pops up a window with the next pending event')) ord('p'),
self.add_main_option('start-chat', 0, GLib.OptionFlags.NONE, GLib.OptionFlags.NONE,
GLib.OptionArg.NONE, GLib.OptionArg.STRING,
_('Start a new chat')) _('Use defined profile in configuration directory'),
'NAME')
self.add_main_option(
'config-path',
ord('c'),
GLib.OptionFlags.NONE,
GLib.OptionArg.STRING,
_('Set configuration directory'),
'PATH')
self.add_main_option(
'loglevel',
ord('l'),
GLib.OptionFlags.NONE,
GLib.OptionArg.STRING,
_('Configure logging system'),
'LEVEL')
self.add_main_option(
'warnings',
ord('w'),
GLib.OptionFlags.NONE,
GLib.OptionArg.NONE,
_('Show all warnings'))
self.add_main_option(
'ipython',
ord('i'),
GLib.OptionFlags.NONE,
GLib.OptionArg.NONE,
_('Open IPython shell'))
self.add_main_option(
'show-next-pending-event',
0,
GLib.OptionFlags.NONE,
GLib.OptionArg.NONE,
_('Pops up a window with the next pending event'))
self.add_main_option(
'start-chat', 0,
GLib.OptionFlags.NONE,
GLib.OptionArg.NONE,
_('Start a new chat'))
self.add_main_option(
'simulate-network-lost',
0,
GLib.OptionFlags.NONE,
GLib.OptionArg.NONE,
_('Simulate loss of connectivity'))
self.add_main_option(
'simulate-network-connected',
0,
GLib.OptionFlags.NONE,
GLib.OptionArg.NONE,
_('Simulate regaining connectivity'))
self.add_main_option_entries(self._get_remaining_entry()) self.add_main_option_entries(self._get_remaining_entry())
...@@ -144,8 +201,8 @@ class GajimApplication(Gtk.Application): ...@@ -144,8 +201,8 @@ class GajimApplication(Gtk.Application):
# Set Application Menu # Set Application Menu
app.app = self app.app = self
from gajim import gtkgui_helpers from gajim.gtk.util import get_builder
builder = gtkgui_helpers.get_gtk_builder('application_menu.ui') builder = get_builder('application_menu.ui')
menubar = builder.get_object("menubar") menubar = builder.get_object("menubar")
appmenu = builder.get_object("appmenu") appmenu = builder.get_object("appmenu")
if app.prefers_app_menu(): if app.prefers_app_menu():
...@@ -186,11 +243,12 @@ class GajimApplication(Gtk.Application): ...@@ -186,11 +243,12 @@ class GajimApplication(Gtk.Application):
attributes = cmd.split(';') attributes = cmd.split(';')
message = None message = None
for key in attributes: for key in attributes:
if key.startswith('body'): if not key.startswith('body'):
try: continue
message = unquote(key.split('=')[1]) try:
except Exception: message = unquote(key.split('=')[1])
app.log('uri_handler').error('Invalid URI: %s', cmd) except Exception:
app.log('uri_handler').error('Invalid URI: %s', cmd)
accounts = list(app.connections.keys()) accounts = list(app.connections.keys())
if not accounts: if not accounts:
continue continue
...@@ -214,10 +272,11 @@ class GajimApplication(Gtk.Application): ...@@ -214,10 +272,11 @@ class GajimApplication(Gtk.Application):
# Parse all options that should be executed on a remote instance # Parse all options that should be executed on a remote instance
options = command_line.get_options_dict() options = command_line.get_options_dict()
remote_commands = ['ipython', remote_commands = [
'show-next-pending-event', 'ipython',
'start-chat', 'show-next-pending-event',
] 'start-chat',
]
remaining = options.lookup_value(GLib.OPTION_REMAINING, remaining = options.lookup_value(GLib.OPTION_REMAINING,
GLib.VariantType.new('as')) GLib.VariantType.new('as'))
...@@ -227,6 +286,14 @@ class GajimApplication(Gtk.Application): ...@@ -227,6 +286,14 @@ class GajimApplication(Gtk.Application):
self.activate_action(cmd) self.activate_action(cmd)
return 0 return 0
if options.contains('simulate-network-lost'):
app.interface.network_status_changed(None, False)
return 0
if options.contains('simulate-network-connected'):
app.interface.network_status_changed(None, True)
return 0
if remaining is not None: if remaining is not None:
self._open_uris(remaining.unpack()) self._open_uris(remaining.unpack())
return 0 return 0
...@@ -234,9 +301,13 @@ class GajimApplication(Gtk.Application): ...@@ -234,9 +301,13 @@ class GajimApplication(Gtk.Application):
self.activate() self.activate()
return 0 return 0
def _handle_local_options(self, application, def _handle_local_options(self,
application: Gtk.Application,
options: GLib.VariantDict) -> int: options: GLib.VariantDict) -> int:
# Parse all options that have to be executed before ::startup # Parse all options that have to be executed before ::startup
if options.contains('version'):
print(gajim.__version__)
return 0
if options.contains('profile'): if options.contains('profile'):
# Incorporate profile name into application id # Incorporate profile name into application id
# to have a single app instance for each profile. # to have a single app instance for each profile.
...@@ -251,7 +322,14 @@ class GajimApplication(Gtk.Application): ...@@ -251,7 +322,14 @@ class GajimApplication(Gtk.Application):
configpaths.set_config_root(path) configpaths.set_config_root(path)
configpaths.init() configpaths.init()
logging_helpers.init()
if app.get_win_debug_mode():
# Redirect has to happen before logging init
self._redirect_output()
logging_helpers.init()
logging_helpers.set_verbose()
else:
logging_helpers.init()
if options.contains('quiet'): if options.contains('quiet'):
logging_helpers.set_quiet() logging_helpers.set_quiet()
...@@ -278,6 +356,14 @@ class GajimApplication(Gtk.Application): ...@@ -278,6 +356,14 @@ class GajimApplication(Gtk.Application):
warnings.showwarning = warn_with_traceback warnings.showwarning = warn_with_traceback
warnings.filterwarnings(action="always") warnings.filterwarnings(action="always")
@staticmethod
def _redirect_output():
debug_folder = Path(configpaths.get('DEBUG'))
date = datetime.today().strftime('%Y-%m-%d')
filename = '%s-debug.log' % date
fd = open(debug_folder / filename, 'a')
sys.stderr = sys.stdout = fd
def add_actions(self): def add_actions(self):
''' Build Application Actions ''' ''' Build Application Actions '''
from gajim import app_actions from gajim import app_actions
...@@ -323,6 +409,14 @@ class GajimApplication(Gtk.Application): ...@@ -323,6 +409,14 @@ class GajimApplication(Gtk.Application):
act.connect("activate", app_actions.on_add_contact_jid) act.connect("activate", app_actions.on_add_contact_jid)
self.add_action(act) self.add_action(act)
act = Gio.SimpleAction.new('copy-link', GLib.VariantType.new('s'))
act.connect("activate", app_actions.copy_link)
self.add_action(act)
act = Gio.SimpleAction.new('open-link', GLib.VariantType.new('as'))
act.connect("activate", app_actions.open_link)
self.add_action(act)
for action in general_actions: for action in general_actions:
action_name, func = action action_name, func = action
act = Gio.SimpleAction.new(action_name, None) act = Gio.SimpleAction.new(action_name, None)
...@@ -339,33 +433,32 @@ class GajimApplication(Gtk.Application): ...@@ -339,33 +433,32 @@ class GajimApplication(Gtk.Application):
self.add_account_actions(accounts_list[0]) self.add_account_actions(accounts_list[0])
def _get_account_actions(self, account): def _get_account_actions(self, account):
from gajim import app_actions from gajim import app_actions as a
if account == 'Local': if account == 'Local':
return [ return [
('-xml-console', app_actions.on_xml_console, 'always', 's') ('-xml-console', a.on_xml_console, 'always', 's')
] ]
return [ return [
('-start-single-chat', app_actions.on_single_message, 'online', 's'), ('-start-single-chat', a.on_single_message, 'online', 's'),
('-join-groupchat', app_actions.on_join_gc, 'online', 's'), ('-start-chat', a.start_chat, 'online', 'as'),
('-add-contact', app_actions.on_add_contact, 'online', 's'), ('-join-groupchat', a.on_join_gc, 'online', 'as'),
('-services', app_actions.on_service_disco, 'online', 's'), ('-add-contact', a.on_add_contact, 'online', 'as'),
('-profile', app_actions.on_profile, 'feature', 's'), ('-services', a.on_service_disco, 'online', 's'),
('-xml-console', app_actions.on_xml_console, 'always', 's'), ('-profile', a.on_profile, 'feature', 's'),
('-server-info', app_actions.on_server_info, 'online', 's'), ('-xml-console', a.on_xml_console, 'always', 's'),
('-archive', app_actions.on_mam_preferences, 'feature', 's'), ('-server-info', a.on_server_info, 'online', 's'),
('-sync-history', app_actions.on_history_sync, 'online', 's'), ('-archive', a.on_mam_preferences, 'feature', 's'),
('-privacylists', app_actions.on_privacy_lists, 'feature', 's'), ('-sync-history', a.on_history_sync, 'online', 's'),
('-send-server-message', ('-privacylists', a.on_privacy_lists, 'feature', 's'),
app_actions.on_send_server_message, 'online', 's'), ('-send-server-message', a.on_send_server_message, 'online', 's'),
('-set-motd', app_actions.on_set_motd, 'online', 's'), ('-set-motd', a.on_set_motd, 'online', 's'),
('-update-motd', app_actions.on_update_motd, 'online', 's'), ('-update-motd', a.on_update_motd, 'online', 's'),
('-delete-motd', app_actions.on_delete_motd, 'online', 's'), ('-delete-motd', a.on_delete_motd, 'online', 's'),
('-activate-bookmark', ('-activate-bookmark', a.on_activate_bookmark, 'online', 'a{sv}'),
app_actions.on_activate_bookmark, 'online', 'a{sv}'), ('-open-event', a.on_open_event, 'always', 'a{sv}'),
('-open-event', app_actions.on_open_event, 'always', 'a{sv}'), ('-import-contacts', a.on_import_contacts, 'online', 's'),
('-import-contacts', app_actions.on_import_contacts, 'online', 's'),
] ]
def add_account_actions(self, account): def add_account_actions(self, account):
......
# -*- coding:utf-8 -*- # Copyright (C) 2006 Tomasz Melcer <liori AT exroot.org>
## src/atom_window.py # Copyright (C) 2006-2014 Yann Leboulanger <asterix AT lagaule.org>
## # Copyright (C) 2007 Nikos Kouremenos <kourem AT gmail.com>
## Copyright (C) 2006 Tomasz Melcer <liori AT exroot.org> # Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org>
## Copyright (C) 2006-2014 Yann Leboulanger <asterix AT lagaule.org> #
## Copyright (C) 2007 Nikos Kouremenos <kourem AT gmail.com> # This file is part of Gajim.
## Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org> #
## # Gajim is free software; you can redistribute it and/or modify
## This file is part of Gajim. # it under the terms of the GNU General Public License as published
## # by the Free Software Foundation; version 3 only.
## Gajim is free software; you can redistribute it and/or modify #
## it under the terms of the GNU General Public License as published # Gajim is distributed in the hope that it will be useful,
## by the Free Software Foundation; version 3 only. # but WITHOUT ANY WARRANTY; without even the implied warranty of
## # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## Gajim is distributed in the hope that it will be useful, # GNU General Public License for more details.
## but WITHOUT ANY WARRANTY; without even the implied warranty of #
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # You should have received a copy of the GNU General Public License
## GNU General Public License for more details. # along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
## You should have received a copy of the GNU General Public License from typing import List # pylint: disable=unused-import
## along with Gajim. If not, see <http://www.gnu.org/licenses/>. from typing import Any # pylint: disable=unused-import
##
from gi.repository import Gdk from gi.repository import Gdk
from gi.repository import GLib from gi.repository import GLib
from gajim import gtkgui_helpers
from gajim.common import helpers from gajim.common import helpers
from gajim.common import i18n from gajim.common import i18n
from gajim.common.i18n import _
from gajim import gtkgui_helpers
class AtomWindow: class AtomWindow:
window = None window = None
entries = [] entries = [] # type: List[Any]
@classmethod @classmethod
def newAtomEntry(cls, entry): def newAtomEntry(cls, entry):
...@@ -53,7 +53,7 @@ class AtomWindow: ...@@ -53,7 +53,7 @@ class AtomWindow:
""" """
Create new window... only if we have anything to show Create new window... only if we have anything to show
""" """
assert len(self.__class__.entries) assert self.__class__.entries
self.entry = None # the entry actually displayed self.entry = None # the entry actually displayed
...@@ -77,7 +77,7 @@ class AtomWindow: ...@@ -77,7 +77,7 @@ class AtomWindow:
""" """
Get next entry from the queue and display it in the window Get next entry from the queue and display it in the window
""" """
assert len(self.__class__.entries)>0 assert self.__class__.entries
newentry = self.__class__.entries.pop(0) newentry = self.__class__.entries.pop(0)
......
# -*- coding:utf-8 -*- # Copyright (C) 2003-2014 Yann Leboulanger <asterix AT lagaule.org>
## src/cell_renderer_image.py # Copyright (C) 2005 Vincent Hanquez <tab AT snarc.org>
## # Copyright (C) 2005-2007 Nikos Kouremenos <kourem AT gmail.com>
## Copyright (C) 2003-2014 Yann Leboulanger <asterix AT lagaule.org> # Copyright (C) 2006 Travis Shirk <travis AT pobox.com>
## Copyright (C) 2005 Vincent Hanquez <tab AT snarc.org> #
## Copyright (C) 2005-2007 Nikos Kouremenos <kourem AT gmail.com> # This file is part of Gajim.
## Copyright (C) 2006 Travis Shirk <travis AT pobox.com> #
## # Gajim is free software; you can redistribute it and/or modify
## This file is part of Gajim. # it under the terms of the GNU General Public License as published
## # by the Free Software Foundation; version 3 only.
## Gajim is free software; you can redistribute it and/or modify #
## it under the terms of the GNU General Public License as published # Gajim is distributed in the hope that it will be useful,
## by the Free Software Foundation; version 3 only. # but WITHOUT ANY WARRANTY; without even the implied warranty of
## # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## Gajim is distributed in the hope that it will be useful, # GNU General Public License for more details.
## but WITHOUT ANY WARRANTY; without even the implied warranty of #
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # You should have received a copy of the GNU General Public License
## GNU General Public License for more details. # along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
## You should have received a copy of the GNU General Public License
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
from gi.repository import GLib from gi.repository import GLib
from gi.repository import Gtk from gi.repository import Gtk
...@@ -46,11 +42,11 @@ class CellRendererImage(Gtk.CellRendererPixbuf): ...@@ -46,11 +42,11 @@ class CellRendererImage(Gtk.CellRendererPixbuf):
def do_get_property(self, pspec): def do_get_property(self, pspec):
return getattr(self, pspec.name) return getattr(self, pspec.name)
def do_activate(event, widget, path, bg_area, cell_area, flags): def do_activate(self, *args, **kwargs):
"""Renderers cannot be activated; always return True.""" """Renderers cannot be activated; always return True."""
return True return True
def do_editing_started(event, widget, path, fb_area, cell_area, flags): def do_editing_started(self, *args, **kwargs):
"""Renderers cannot be edited; always return None.""" """Renderers cannot be edited; always return None."""
return None return None
......