[vlc-devel] [PATCH] -- persistence for main window in qt4

Jean-Baptiste Kempf jb at videolan.org
Sat Jan 24 00:50:18 CET 2009


On Sat, Jan 24, 2009 at 12:39:50AM +0100, brezhoneg1 wrote :
> This patch is an attempt to save/restore qt4 main window size and
> confine video within this predefined resizeable window. 
> It is not meant to replace the current behaviour (where windows expand
> to fit original video size) but rather to come as an alternative. For
> that purpose, a --qt-keep-size has been created.

This is very wanted, yes.

> This is a working patch (tested on Ubuntu7.10).

1) Could you avoid calling config_GetInt( p_intf, "qt-keep-size" ) every
other line? Especially in such a critical function that sizeHint() is?
Store it in MainInterface at construction or something similar.

2) Could you simplify a bit the code of sizeHint() ? Do you really need
this switch ?

3) Setting a value in QSeting during resizeHint() and accessing it in
sizeHint() is not a good solution for the same reason as 1).
Please change.


Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/



More information about the vlc-devel mailing list