Philipp Hörist pushed to branch master at gajim / gajim
Commits:
ecd5c652 by Philipp Hörist at 2017-10-31T18:13:31+01:00
Get drag and drop data correctly
Fixes #8773
- - - - -
1 changed file:
- gajim/chat_control.py
Changes:
=====================================
gajim/chat_control.py
=====================================
--- a/gajim/chat_control.py
+++ b/gajim/chat_control.py
@@ -1268,8 +1268,9 @@ class ChatControl(ChatControlBase):
if target_type == self.TARGET_TYPE_URI_LIST:
if not c.resource: # If no resource is known, we can't send a file
return
- uri = selection.get_data().strip()
- uri_splitted = uri.split() # we may have more than one file dropped
+
+ # we may have more than one file dropped
+ uri_splitted = selection.get_uris()
for uri in uri_splitted:
path = helpers.get_file_path_from_dnd_dropped_uri(uri)
if os.path.isfile(path): # is it file?
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/ecd5c652a24c156460f782d15362f9a3e2…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/ecd5c652a24c156460f782d15362f9a3e2…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
417464d9 by Philipp Hörist at 2017-10-31T17:29:54+01:00
Remove advanced commandline handling
Its enough to connect to the handle-local-options signal for what we
currently want to do.
- - - - -
cb3d4f46 by Philipp Hörist at 2017-10-31T17:33:02+01:00
Update nbxmpp dependency to 0.6.0
- - - - -
a7e53eb0 by Philipp Hörist at 2017-10-31T17:33:32+01:00
Catch Application signals instead of overwriting
- - - - -
1b9c5066 by Philipp Hörist at 2017-10-31T17:33:32+01:00
Add Option to hide Gajim on pressing close
This also adds that Gajim gets present if Gajim is launched a second time
- - - - -
4 changed files:
- gajim/common/config.py
- gajim/gajim.py
- gajim/roster_window.py
- setup.py
Changes:
=====================================
gajim/common/config.py
=====================================
--- a/gajim/common/config.py
+++ b/gajim/common/config.py
@@ -237,6 +237,7 @@ class Config:
'notification_position_y': [opt_int, -1],
'muc_highlight_words': [opt_str, '', _('A semicolon-separated list of words that will be highlighted in group chats.')],
'quit_on_roster_x_button': [opt_bool, False, _('If True, quits Gajim when X button of Window Manager is clicked. This setting is taken into account only if notification icon is used.')],
+ 'hide_on_roster_x_button': [opt_bool, False, _('If True, Gajim hides the Roster window on pressing the X button instead of minimizing into the Dock.')],
'show_unread_tab_icon': [opt_bool, False, _('If True, Gajim will display an icon on each tab containing unread messages. Depending on the theme, this icon may be animated.')],
'show_status_msgs_in_roster': [opt_bool, True, _('If True, Gajim will display the status message, if not empty, for every contact under the contact name in roster window.'), True],
'show_avatars_in_roster': [opt_bool, True, '', True],
=====================================
gajim/gajim.py
=====================================
--- a/gajim/gajim.py
+++ b/gajim/gajim.py
@@ -53,15 +53,14 @@ from gajim.common import i18n
from gajim.common import logging_helpers
from gajim.common import crypto
-MIN_NBXMPP_VER = "0.5.6"
+MIN_NBXMPP_VER = "0.6.0"
class GajimApplication(Gtk.Application):
'''Main class handling activation and command line.'''
def __init__(self):
- Gtk.Application.__init__(self, application_id='org.gajim.Gajim',
- flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE)
+ Gtk.Application.__init__(self, application_id='org.gajim.Gajim')
self.add_main_option('version', ord('V'), GLib.OptionFlags.NONE,
GLib.OptionArg.NONE,
@@ -94,6 +93,10 @@ class GajimApplication(Gtk.Application):
GLib.OptionArg.STRING_ARRAY,
"")
+ self.connect('handle-local-options', self._handle_local_options)
+ self.connect('startup', self._startup)
+ self.connect('activate', self._activate)
+
self.profile = ''
self.config_path = None
self.profile_separation = False
@@ -103,9 +106,7 @@ class GajimApplication(Gtk.Application):
if GLib.get_application_name() != 'Gajim':
GLib.set_application_name('Gajim')
- def do_startup(self):
- Gtk.Application.do_startup(self)
-
+ def _startup(self, application):
from gajim import gtkexcepthook
gtkexcepthook.init()
@@ -222,8 +223,10 @@ class GajimApplication(Gtk.Application):
menubar.prepend_submenu('Gajim', appmenu)
self.set_menubar(menubar)
- def do_activate(self):
- Gtk.Application.do_activate(self)
+ def _activate(self, application):
+ if self.interface is not None:
+ self.interface.roster.window.present()
+ return
from gajim.gui_interface import Interface
from gajim import gtkgui_helpers
self.interface = Interface()
@@ -243,7 +246,8 @@ class GajimApplication(Gtk.Application):
from gajim.common import app
app.logger.commit()
- def do_handle_local_options(self, options: GLib.VariantDict) -> int:
+ def _handle_local_options(self, application,
+ options: GLib.VariantDict) -> int:
logging_helpers.init()
@@ -277,12 +281,6 @@ class GajimApplication(Gtk.Application):
return 0
return -1
- def do_command_line(self, command_line: Gio.ApplicationCommandLine) -> int:
- Gtk.Application.do_command_line(self, command_line)
- if not command_line.get_is_remote():
- self.activate()
- return 0
-
def show_warnings(self):
import traceback
import warnings
=====================================
gajim/roster_window.py
=====================================
--- a/gajim/roster_window.py
+++ b/gajim/roster_window.py
@@ -2406,7 +2406,10 @@ class RosterWindow:
x, y = self.window.get_position()
app.config.set('roster_x-position', x)
app.config.set('roster_y-position', y)
- self.window.iconify()
+ if app.config.get('hide_on_roster_x_button'):
+ self.window.hide()
+ else:
+ self.window.iconify()
elif app.config.get('quit_on_roster_x_button'):
self.on_quit_request()
else:
@@ -3755,7 +3758,10 @@ class RosterWindow:
'quit_on_roster_x_button') and ((app.interface.systray_enabled and\
app.config.get('trayicon') == 'always') or app.config.get(
'allow_hide_roster')):
- self.window.iconify()
+ if app.config.get('hide_on_roster_x_button'):
+ self.window.hide()
+ else:
+ self.window.iconify()
elif event.get_state() & Gdk.ModifierType.CONTROL_MASK and event.keyval == \
Gdk.KEY_i:
treeselection = self.tree.get_selection()
=====================================
setup.py
=====================================
--- a/setup.py
+++ b/setup.py
@@ -269,7 +269,7 @@ setup(
data_files=data_files,
install_requires=[
'dbus-python;sys_platform=="linux"',
- 'nbxmpp',
+ 'nbxmpp>=0.6.0',
'pyOpenSSL>=0.12',
'pyasn1',
],
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/0b21c12c416aa79b64a9654fc90ca7150…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/0b21c12c416aa79b64a9654fc90ca7150…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
7ee06365 by Philipp Hörist at 2017-10-30T21:11:27+01:00
Pass iter to print_special_text extension point
- - - - -
1 changed file:
- gajim/conversation_textview.py
Changes:
=====================================
gajim/conversation_textview.py
=====================================
--- a/gajim/conversation_textview.py
+++ b/gajim/conversation_textview.py
@@ -892,7 +892,7 @@ class ConversationTextview(GObject.GObject):
# PluginSystem: adding GUI extension point for ConversationTextview
self.plugin_modified = False
app.plugin_manager.extension_point('print_special_text', self,
- special_text, other_tags, graphics, additional_data)
+ special_text, other_tags, graphics, additional_data, iter_)
if self.plugin_modified:
return
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/7ee0636574f346215ea0c9f344366419fe…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/7ee0636574f346215ea0c9f344366419fe…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
04904140 by Philipp Hörist at 2017-10-29T00:37:05+02:00
Fix saving MUC-PMs
If the JID is not in the DB we need a type to insert
- - - - -
1 changed file:
- gajim/common/logger.py
Changes:
=====================================
gajim/common/logger.py
=====================================
--- a/gajim/common/logger.py
+++ b/gajim/common/logger.py
@@ -290,13 +290,17 @@ class Logger:
:param jid: The JID
- :param type_: The JIDConstant type
+ :param kind: The KindConstant
+
+ :param type_: The JIDConstant
return the jid id
"""
if kind in (KindConstant.GC_MSG, KindConstant.GCSTATUS):
type_ = JIDConstant.ROOM_TYPE
+ elif kind is not None:
+ type_ = JIDConstant.NORMAL_TYPE
result = self._jid_ids.get(jid, None)
if result is not None:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/049041407919a0d58790ccac7be1eab7b3…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/049041407919a0d58790ccac7be1eab7b3…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
12783e03 by Philipp Hörist at 2017-10-27T10:42:43+02:00
Catch require_version ValueError
- - - - -
87b65401 by Philipp Hörist at 2017-10-27T10:46:59+02:00
Fix height of MessageTextView in some cases
- - - - -
2 changed files:
- gajim/chat_control_base.py
- gajim/gtkspell.py
Changes:
=====================================
gajim/chat_control_base.py
=====================================
--- a/gajim/chat_control_base.py
+++ b/gajim/chat_control_base.py
@@ -1343,15 +1343,23 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
class ScrolledWindow(Gtk.ScrolledWindow):
def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
+ Gtk.ScrolledWindow.__init__(self, *args, **kwargs)
def do_get_preferred_height(self):
min_height, natural_height = Gtk.ScrolledWindow.do_get_preferred_height(self)
child = self.get_child()
- if natural_height and self.get_max_content_height() > -1 and child:
- _, child_nat_height = child.get_preferred_height()
- if natural_height > child_nat_height:
- if child_nat_height < 26:
- return 26, 26
+ # Gtk Bug: If policy is set to Automatic, the ScrolledWindow
+ # has a min size of around 46 depending on the System. Because
+ # we want it smaller, we set policy NEVER if the height is < 50
+ # so the ScrolledWindow will shrink to around 26 (1 line heigh).
+ # Once it gets over 50 its no problem to restore the policy.
+ if natural_height < 50:
+ GLib.idle_add(self.set_policy,
+ Gtk.PolicyType.AUTOMATIC,
+ Gtk.PolicyType.NEVER)
+ else:
+ GLib.idle_add(self.set_policy,
+ Gtk.PolicyType.AUTOMATIC,
+ Gtk.PolicyType.AUTOMATIC)
return min_height, natural_height
=====================================
gajim/gtkspell.py
=====================================
--- a/gajim/gtkspell.py
+++ b/gajim/gtkspell.py
@@ -25,7 +25,7 @@ try:
gi.require_version('GtkSpell', '3.0')
from gi.repository import GtkSpell
HAS_GTK_SPELL = True
-except ImportError:
+except (ImportError, ValueError):
HAS_GTK_SPELL = False
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/40547c4d4be712f43407283827de0cd70…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/40547c4d4be712f43407283827de0cd70…
You're receiving this email because of your account on dev.gajim.org.