Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
c6ad7550 by wurstsalat at 2023-04-23T18:58:43+02:00
imprv: GroupchatRoster: Highlight own nick and sort it to the top
Fixes #11431
- - - - -
1 changed file:
- gajim/gtk/groupchat_roster.py
Changes:
=====================================
gajim/gtk/groupchat_roster.py
=====================================
@@ -36,6 +36,7 @@
from gajim.common.helpers import get_uf_affiliation
from gajim.common.helpers import get_uf_role
from gajim.common.helpers import jid_is_blocked
+from gajim.common.i18n import p_
from gajim.common.modules.contacts import GroupchatContact
from gajim.gtk.builder import get_builder
@@ -488,10 +489,15 @@ def _tree_compare_iters(self,
nick1 = model[iter1][Column.NICK_OR_GROUP]
nick2 = model[iter2][Column.NICK_OR_GROUP]
+ assert self._contact is not None
+ our_nick = self._contact.nickname
+ if our_nick in (nick1, nick2):
+ # Always show our nickname at the top
+ return -1 if our_nick == nick1 else 1
+
if not app.settings.get('sort_by_show_in_muc'):
return locale.strcoll(nick1.lower(), nick2.lower())
- assert self._contact is not None
contact1 = self._contact.get_resource(nick1)
contact2 = self._contact.get_resource(nick2)
@@ -574,6 +580,9 @@ def _draw_contact(self, nick: str) -> None:
self._draw_avatar(contact)
name = GLib.markup_escape_text(contact.name)
+ self_contact = self._contact.get_self()
+ if self_contact is not None and self_contact.name == nick:
+ name = p_('own nickname in group chat', '%s (You)' % nick)
# Strike name if blocked
fjid = f'{self._contact.jid}/{nick}'
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/c6ad7550db227b45c823bd9cebabed8b…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/c6ad7550db227b45c823bd9cebabed8b…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
534f9f7e by Philipp Hörist at 2023-04-23T16:27:26+02:00
other: Regenerate man files with pandoc
- - - - -
b475635f by Philipp Hörist at 2023-04-23T16:27:26+02:00
change: Raise gajim when no cmdline options are provided
- Remove the --show cmdline option because it is now obsolete
Fixes #11482
- - - - -
4 changed files:
- data/gajim-remote.1
- data/gajim.1
- data/gajim.1.md
- gajim/gtk/application.py
Changes:
=====================================
data/gajim-remote.1
=====================================
@@ -1,5 +1,19 @@
-.\" Automatically generated by Pandoc 2.9.2.1
+.\" Automatically generated by Pandoc 2.17.1.1
.\"
+.\" Define V font for inline verbatim, using C font in formats
+.\" that render this, and otherwise B font.
+.ie "\f[CB]x\f[]"x" \{\
+. ftr V B
+. ftr VI BI
+. ftr VB B
+. ftr VBI BI
+.\}
+.el \{\
+. ftr V CR
+. ftr VI CI
+. ftr VB CB
+. ftr VBI CBI
+.\}
.TH "gajim-remote" "1" "August 2022" "" "Manual"
.hy
.SH NAME
@@ -18,38 +32,38 @@ gajim-remote is an application to control and communicate with a running
instance of \f[B]gajim\f[R](1) via dbus.
.SH OPTIONS
.TP
-\f[B]\f[CB]-h, --help\f[B]\f[R]
+\f[V]-h, --help\f[R]
Display the help
.TP
-\f[B]\f[CB]--app-id\f[B]\f[R] APP_ID
+\f[V]--app-id\f[R] APP_ID
The application id of the running \f[B]gajim\f[R](1) instance
.SH COMMANDS
.TP
-\f[B]\f[CB]list_contacts\f[B]\f[R] account
+\f[V]list_contacts\f[R] account
Get all roster contacts
.TP
-\f[B]\f[CB]list_accounts\f[B]\f[R]
+\f[V]list_accounts\f[R]
Get the list of accounts
.TP
-\f[B]\f[CB]change_status\f[B]\f[R] {offline,online,away,xa,dnd} message account
+\f[V]change_status\f[R] {offline,online,away,xa,dnd} message account
Change the status
.TP
-\f[B]\f[CB]send_chat_message\f[B]\f[R] address message account
+\f[V]send_chat_message\f[R] address message account
Send a chat message to a contact
.TP
-\f[B]\f[CB]send_groupchat_message\f[B]\f[R] address message account
+\f[V]send_groupchat_message\f[R] address message account
Send a chat message to a group chat
.TP
-\f[B]\f[CB]account_info\f[B]\f[R] account
+\f[V]account_info\f[R] account
Get account details
.TP
-\f[B]\f[CB]get_status\f[B]\f[R] account
+\f[V]get_status\f[R] account
Get the current status
.TP
-\f[B]\f[CB]get_status_message\f[B]\f[R] account
+\f[V]get_status_message\f[R] account
Get the current status message
.TP
-\f[B]\f[CB]get_unread_msgs_number\f[B]\f[R]
+\f[V]get_unread_msgs_number\f[R]
Get the unread message count
.SH BUGS
.PP
=====================================
data/gajim.1
=====================================
@@ -1,5 +1,19 @@
-.\" Automatically generated by Pandoc 2.9.2.1
+.\" Automatically generated by Pandoc 2.17.1.1
.\"
+.\" Define V font for inline verbatim, using C font in formats
+.\" that render this, and otherwise B font.
+.ie "\f[CB]x\f[]"x" \{\
+. ftr V B
+. ftr VI BI
+. ftr VB B
+. ftr VBI BI
+.\}
+.el \{\
+. ftr V CR
+. ftr VI CI
+. ftr VB CB
+. ftr VBI CBI
+.\}
.TH "gajim" "1" "August 2022" "" "Manual"
.hy
.SH NAME
@@ -38,28 +52,28 @@ syndication, and generalized routing of XML data.
For more information on the XMPP protocol see https://xmpp.org/about/.
.SH OPTIONS
.TP
-\f[B]\f[CB]-h, --help\f[B]\f[R]
+\f[V]-h, --help\f[R]
Show help options
.TP
-\f[B]\f[CB]-V, --version\f[B]\f[R]
+\f[V]-V, --version\f[R]
Show the application\[cq]s version
.TP
-\f[B]\f[CB]-q, --quiet\f[B]\f[R]
+\f[V]-q, --quiet\f[R]
Show only critical errors
.TP
-\f[B]\f[CB]-s, --separate\f[B]\f[R]
+\f[V]-s, --separate\f[R]
Separate profile files completely (even history database and plugins)
.TP
-\f[B]\f[CB]-v, --verbose\f[B]\f[R]
+\f[V]-v, --verbose\f[R]
Print XML stanzas and other debug information
.TP
-\f[B]\f[CB]-p, --profile=NAME\f[B]\f[R]
+\f[V]-p, --profile=NAME\f[R]
Use defined profile in configuration directory
.TP
-\f[B]\f[CB]-c, --config-path=PATH\f[B]\f[R]
+\f[V]-c, --config-path=PATH\f[R]
Set configuration directory
.TP
-\f[B]\f[CB]-l, --loglevel=SUBSYSTEM=LEVEL\f[B]\f[R]
+\f[V]-l, --loglevel=SUBSYSTEM=LEVEL\f[R]
Configure logging.
.RS
.PP
@@ -72,20 +86,17 @@ LEVEL (DEBUG, INFO, WARNING, ERROR, CRITICAL)
Example: gajim.c.m=DEBUG
.RE
.TP
-\f[B]\f[CB]-w, --warnings\f[B]\f[R]
+\f[V]-w, --warnings\f[R]
Show all warnings
.TP
-\f[B]\f[CB]--gdebug\f[B]\f[R]
+\f[V]--gdebug\f[R]
Sets an environment variable so GLib debug messages are printed
.TP
-\f[B]\f[CB]--cprofile\f[B]\f[R]
+\f[V]--cprofile\f[R]
Profile application with cprofile
.TP
-\f[B]\f[CB]--start-chat\f[B]\f[R]
+\f[V]--start-chat\f[R]
Start a new chat
-.TP
-\f[B]\f[CB]--show\f[B]\f[R]
-Show Gajim
.SH FILES
.TP
$XDG_CACHE_HOME/gajim/
=====================================
data/gajim.1.md
=====================================
@@ -69,9 +69,6 @@ # OPTIONS
`--start-chat`
: Start a new chat
-`--show`
-: Show Gajim
-
# FILES
$XDG_CACHE_HOME/gajim/
=====================================
gajim/gtk/application.py
=====================================
@@ -193,14 +193,9 @@ def __init__(self):
GLib.OptionArg.NONE,
_('Start a new chat'))
- self.add_main_option(
- 'show', 0,
- GLib.OptionFlags.NONE,
- GLib.OptionArg.NONE,
- _('Show Gajim'))
-
self.add_main_option_entries(self._get_remaining_entry())
+ self.connect('activate', self._on_activate)
self.connect('handle-local-options', self._handle_local_options)
self.connect('command-line', self._command_line)
self.connect('shutdown', self._shutdown)
@@ -343,21 +338,25 @@ def _command_line(self,
remote_commands = [
('start-chat', GLib.Variant('as', ['', ''])),
- ('show', None)
]
- remaining = options.lookup_value(GLib.OPTION_REMAINING,
- GLib.VariantType.new('as'))
-
for cmd, parameter in remote_commands:
if options.contains(cmd):
self.activate_action(cmd, parameter)
return 0
+ remaining = options.lookup_value(GLib.OPTION_REMAINING,
+ GLib.VariantType.new('as'))
+
if remaining is not None:
self._open_uris(remaining.unpack())
return 0
+ if not options.contains('is-first-startup'):
+ # If no commands have been handled and it's not the first
+ # startup, raise the application.
+ self.activate()
+
return 0
def _handle_local_options(self,
@@ -383,10 +382,14 @@ def _handle_local_options(self,
'The primary instance will handle remote commands')
return -1
+ options.insert_value('is-first-startup', GLib.Variant('b', True))
self._core_command_line(options)
self._startup()
return -1
+ def _on_activate(self, _application: Gtk.Application) -> None:
+ app.window.show()
+
def _add_app_actions(self) -> None:
for action in APP_ACTIONS:
action_name, variant = action
@@ -423,7 +426,6 @@ def _connect_app_actions(self) -> None:
('forget-groupchat', self._on_forget_groupchat_action),
('open-chat', self._on_open_chat_action),
('mute-chat', self._on_mute_chat_action),
- ('show', self._on_show),
]
for action in actions:
@@ -872,7 +874,3 @@ def _on_forget_groupchat_action(_action: Gio.SimpleAction,
client.get_module('Bookmarks').remove(params.jid)
app.storage.archive.remove_history(params.account, params.jid)
-
- @staticmethod
- def _on_show(_action: Gio.SimpleAction, param: GLib.Variant) -> None:
- app.window.show()
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/afc5a11e6c2d620946e6bfd6ff9b37b…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/afc5a11e6c2d620946e6bfd6ff9b37b…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
7cd4a1e7 by Philipp Hörist at 2023-04-23T15:45:27+02:00
imprv: Lower log level for missing GSSAPI dependency
- - - - -
1 changed file:
- nbxmpp/sasl.py
Changes:
=====================================
nbxmpp/sasl.py
=====================================
@@ -41,7 +41,7 @@ try:
gssapi = __import__('gssapi')
GSSAPI_AVAILABLE = True
except (ImportError, OSError) as error:
- log.warning('GSSAPI not available: %s', error)
+ log.info('GSSAPI not available: %s', error)
GSSAPI_AVAILABLE = False
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/7cd4a1e7afe2c11191a629de…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/7cd4a1e7afe2c11191a629de…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
afc5a11e by wurstsalat at 2023-04-23T11:59:23+02:00
cfix: ChatBanner: Disable share button for PM contacts
- - - - -
1 changed file:
- gajim/gtk/chat_banner.py
Changes:
=====================================
gajim/gtk/chat_banner.py
=====================================
@@ -329,7 +329,8 @@ def _update_account_badge(self) -> None:
def _update_share_box(self) -> None:
assert self._contact is not None
- self._ui.share_menu_button.set_sensitive(True)
+ self._ui.share_menu_button.set_sensitive(
+ not self._contact.is_pm_contact)
self._ui.jid_label.set_text(str(self._contact.jid))
def _on_share_clicked(self, _button: Gtk.Button) -> None:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/afc5a11e6c2d620946e6bfd6ff9b37b2…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/afc5a11e6c2d620946e6bfd6ff9b37b2…
You're receiving this email because of your account on dev.gajim.org.