Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim
Commits:
36b147df by Stephen Paul Weber at 2017-04-09T20:32:08-05:00
Allow preferences window to shrink
Previously, it would always be the size needed to fit the largest
page from the notebook. This is death on small-screen devices like
the pocketCHIP.
Just adding a ScrolledWindow allows is to get smaller (at least
vertically, which is the main issue). However, we want to still be a
nice size on large screens. So, we ask each page in the notebook how
tall it wishes to be, and default the window to the tallest one (plus
the size of the extra controls). However, if the screen is shorter than
this, we do not allow the default window size to exceed the screen size.
Because of the large amount of re-indentation in the XML file, it is
suggested to view this diff with `-b`
- - - - -
b5fabea5 by Philipp Hörist at 2017-04-10T16:42:48+02:00
Merge branch 'allow-smaller-preferences-window' into 'gajim_0.16'
Allow preferences window to shrink
See merge request !81
- - - - -
2 changed files:
- data/gui/preferences_window.ui
- src/config.py
Changes:
=====================================
data/gui/preferences_window.ui
=====================================
The diff for this file was not included because it is too large.
=====================================
src/config.py
=====================================
--- a/src/config.py
+++ b/src/config.py
@@ -115,6 +115,19 @@ class PreferencesWindow:
'auto_xa_time_spinbutton')
self.auto_xa_message_entry = self.xml.get_object('auto_xa_message_entry')
+ ### Default Window Size ###
+ tallest = 0
+ for n in range(0, self.notebook.get_n_pages()):
+ page = self.notebook.get_nth_page(n)
+ content = page.get_children()[0].get_children()[0]
+ width, height = content.size_request()
+ if height > tallest:
+ tallest = height
+
+ wwidth, wheight = self.window.get_size()
+ tallest += wheight
+ self.window.set_default_size(-1, min(gtk.gdk.screen_height(), tallest))
+
### General tab ###
# Display avatars in roster
st = gajim.config.get('show_avatars_in_roster')
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/755b9bed1bc6adc955d077de9c0d29671…
Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim
Commits:
0296e863 by Philipp Hörist at 2017-03-31T22:19:20+02:00
Handle MUC-PM Sent-Carbons correctly
Previously they were shown as 'incoming', when they
should correctly show as 'outgoing'
- - - - -
cf3049f0 by Philipp Hörist at 2017-03-31T22:22:20+02:00
Dont notify on MUC-PM Sent-Carbons
Additionally remove all previous Events if we receive a Sent-Carbon,
because we know the user answered from another device
- - - - -
c799f182 by Philipp Hörist at 2017-04-02T21:54:14+02:00
Merge branch 'mucpm' into 'gajim_0.16'
Improve carbon handling of MUC-PM messages
See merge request !78
- - - - -
1 changed file:
- src/groupchat_control.py
Changes:
=====================================
src/groupchat_control.py
=====================================
--- a/src/groupchat_control.py
+++ b/src/groupchat_control.py
@@ -1074,12 +1074,24 @@ class GroupchatControl(ChatControlBase):
correct_id=(obj.stanza.getID(), None))
obj.needs_highlight = self.needs_visual_notification(obj.msgtxt)
- def on_private_message(self, nick, msg, tim, xhtml, session, msg_log_id=None,
- encrypted=False, displaymarking=None):
+ def on_private_message(self, nick, msg, tim, xhtml, session, sent_forwarded,
+ msg_log_id=None, encrypted=False, displaymarking=None):
# Do we have a queue?
fjid = self.room_jid + '/' + nick
no_queue = len(gajim.events.get_events(self.account, fjid)) == 0
+ if sent_forwarded:
+ '''
+ We remove all muc-pm events for that jid because the
+ Message was answered from one of our other devices
+ '''
+ gajim.events.remove_events(self.account, fjid, types=['pm'])
+ if self.parent_win:
+ self.parent_win.show_title()
+ self.parent_win.redraw_tab(self)
+ self.update_ui()
+ return
+
event = events.PmEvent(msg, '', 'incoming', tim, encrypted, '',
msg_log_id, xhtml=xhtml, session=session, form_node=None,
displaymarking=displaymarking, sent_forwarded=False)
@@ -1365,16 +1377,21 @@ class GroupchatControl(ChatControlBase):
if obj.gc_control == self and obj.resource:
# We got a pm from this room
nick = obj.resource
+ typ = ''
+ sent_forwarded = False
+ if obj.forwarded and obj.sent:
+ typ = 'out'
+ sent_forwarded = True
if obj.session.control:
# print if a control is open
- obj.session.control.print_conversation(obj.msgtxt,
+ obj.session.control.print_conversation(obj.msgtxt, typ,
tim=obj.timestamp, xhtml=obj.xhtml, encrypted=obj.encrypted,
displaymarking=obj.displaymarking, correct_id=(obj.id_,
obj.correct_id))
else:
# otherwise pass it off to the control to be queued
self.on_private_message(nick, obj.msgtxt, obj.timestamp,
- obj.xhtml, self.session, msg_log_id=obj.msg_log_id,
+ obj.xhtml, self.session, sent_forwarded, msg_log_id=obj.msg_log_id,
encrypted=obj.encrypted, displaymarking=obj.displaymarking)
def _nec_ping_reply(self, obj):
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/d826d9402b887bb0b8d06d0e493a483ad…