Commit c225ae70 authored by Philipp Hörist's avatar Philipp Hörist

Add debug logging for saving roster position

parent 4cb85291
......@@ -102,7 +102,9 @@ from gajim.common import helpers
def get_total_screen_geometry():
screen = Gdk.Screen.get_default()
window = Gdk.Screen.get_root_window(screen)
return window.get_width(), window.get_height()
w, h = window.get_width(), window.get_height()
log.debug('Get screen geometry: %s %s', w, h)
return w, h
def add_image_to_button(button, icon_name):
img = Gtk.Image()
......
......@@ -43,6 +43,7 @@ import os
import sys
import time
import locale
import logging
from enum import IntEnum, unique
......@@ -72,6 +73,8 @@ from gajim.message_window import MessageWindowMgr
from nbxmpp.protocol import NS_FILE, NS_ROSTERX, NS_CONFERENCE
log = logging.getLogger('gajim.roster')
@unique
class Column(IntEnum):
IMG = 0 # image to show state (online, new message etc)
......@@ -2381,6 +2384,7 @@ class RosterWindow:
'on_event') or app.config.get('allow_hide_roster')):
if app.config.get('save-roster-position'):
x, y = self.window.get_position()
log.debug('Save roster position (get_position): %s %s', x, y)
app.config.set('roster_x-position', x)
app.config.set('roster_y-position', y)
if os.name == 'nt' or app.config.get('hide_on_roster_x_button'):
......@@ -2409,6 +2413,7 @@ class RosterWindow:
if self.window.get_window() is not None:
if app.config.get('save-roster-position'):
x, y = self.window.get_window().get_root_origin()
log.debug('Save roster position (get_root_origin): %s %s', x, y)
app.config.set('roster_x-position', x)
app.config.set('roster_y-position', y)
width, height = self.window.get_size()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment