Skip to content
Commits on Source (2)
  • singpolyma's avatar
    Allow preferences window to shrink · 36b147df
    singpolyma authored
    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`
    36b147df
  • Philipp Hörist's avatar
    Merge branch 'allow-smaller-preferences-window' into 'gajim_0.16' · b5fabea5
    Philipp Hörist authored
    Allow preferences window to shrink
    
    See merge request !81
    b5fabea5
source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -115,6 +115,19 @@ def __init__(self):
'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')
......