IRC logs of #tryton for Friday, 2008-07-11 #tryton log beginning Fri Jul 11 00:00:02 CEST 2008
CIA-53tryton: Bertrand Chenal <> default * 157:486a4e289443 stock/ Fix : allow to delete cancelled moves00:28
CIA-53tryton: Bertrand Chenal <> default * 158:9c718732a3cd stock/ ( inventory.xml): Added expected on inventory line, improved inventory update.00:28
-!- FWiesing(n=FWiesing@ has left #tryton05:06
-!- yangoon( has joined #tryton05:19
-!- kultviech( has joined #tryton06:11
-!- FWiesing(n=FWiesing@ has joined #tryton07:04
-!- FWiesing(n=FWiesing@ has left #tryton07:04
-!- ChanServ(ChanServ@services.) has joined #tryton07:18
-!- yangoon( has joined #tryton07:18
-!- CIA-53(n=CIA@ has joined #tryton07:18
-!- Timitos(n=Timitos@ has joined #tryton07:44
-!- Gedd(n=ged@ has joined #tryton08:19
-!- udono( has joined #tryton08:24
-!- bechamel( has joined #tryton09:58
-!- cedk(n=ced@gentoo/developer/cedk) has joined #tryton10:05
udonohello all11:01
-!- markusleist(n=markus@ has joined #tryton11:24
udonocedk: I have some success in converting glade2py-gtk!12:00
udonocedk: the way is hard...12:00
udonocedk: like you mentioned before12:00
udonocedk: there is no tool wich helps directly, but I use the C coverter and re-script to py-gtk by hand12:01
udonocedk: but there are some design decisions we should clear before...12:02
udonocedk: the file is 6200 Line long and the is 1300 lines long. That sums up to 7500 lines. Minus 1/3 for the XML overhead in glade is 5000 lines in one file. Thats more than ugly...12:09
udonoI like to divide the into model and view but need some help with the python classes.12:10
udonoMy aim is to hold inside the the Model and create a directory which contain all the gtk-view things one in a single file.12:11
udonoIs it possible to show me an example when I provide you my first convert to pygtk?12:12
cedkudono: can you show me how is the code generated ?12:24
cedkbecause I'm not sure that generator is a good solution, because glade is fill of usefull things12:25
udonocedk: just open the with glade-2 and generate the code.12:26
udonocedk: I got the login converted, and it wors12:26
udonoOf course we need to overwork the final py-gtk but this is the fastest way I found... but it takes his time12:27
cedkudono: I don't have generate code option in glade12:29
udonocedk: its Project > build12:30
udonocedk: I choose C as language12:30
cedkudono: I don't have it12:31
udono:-) gento, ha12:31
cedkmaybe it comes with the gnome option12:32
udonoNo, glade 3 doesnt support this...12:32
udonoI think12:32
udonoI use glade212:32
cedkany way, you have C code so you must rewrite it12:32
udonoits 90% dummyjob12:32
cedkhow many lines of code do you have for the login window ?12:32
udonobut Iam to dummy to write an XSLT parser for the job...12:33
cedkudono: i think that if I write it in pygtk directly, I will have ~25 lines of code12:34
udono_server_ask: 42lines, loginwindow: 84 lines12:36
udonomaybe it can be smarter, but Iam new to Python and to GTK...12:36
udonoOptimising won't be this hard if we have the converted structure...12:37
cedkthat why I think code convertor is bad, they generate uggly code12:37
cedkudono: I think also, re-read those codes may be a good oportunity to improve those windows12:38
udonocedk: yes, of course. But you know all beginning is hard and sub-optimated...12:39
udonocedk: BTW I read a lot in the and so on, but Its easyer for me to convert it to c, than rewrite it to py-gtk. Bring it to run and after all optimising the code...12:41
cedkudono: you don't need to convert all in one shot12:42
cedkudono: that is why I suggest you the login window12:42
udonocedk: ok, ready12:42
cedkudono: it is a small dialog box and there some example of dialog box in common.py12:42
cedkudono: if you can send me, just the begining of your work, I can help you by reviewing it12:43
udonocedk: This is a very good idea12:46
udonoI open a issue and provide the patches12:46
cedkudono: good12:47
CIA-53tryton: udono roundup * #176/Moving glade to pygtk: [new] Why: - more easy client translation - future integration of the webclient13:16
CIA-53tryton: udono roundup * #176/Moving glade to pygtk: [chatting] First draft: Moving login dialog from glade to pygtk. See attachment patch.13:20
udonocedk: done13:21
cedkudono: ok I check13:21
udonocedk: Thanks a lot!13:21
cedkudono: first you don't need to add comment in the glade file13:29
cedkudono: you can remove the call to glade instead of commenting it13:29
cedkudono: try to avoid end empty space on lines13:30
cedkudono: I think it will be great to have better naming for gtk object13:30
cedkudono: not dialog_vbox23 but just vbox13:31
cedkudono: I don't see the usefull of those lines: #Start GTK13:31
cedkudono: set directly the variable name that we use after instead of: host_widget = ent_host13:32
cedkudono: for your remarks about the RE, there is no protocols there13:33
cedkudono: it is just servername:port13:33
udonocedk: but then we can avoid or filter protocols...13:34
cedkudono: but we don't support different protocols13:35
cedkudono: for the combo_label, I think you can set directly his content13:35
udonocedk: ok, I look in for examples13:36
cedkudono: otherwize, it seems good13:36
udonook, thanks13:37
cedkalso try to not exceed 80 chars in a line13:37
cedkif you can fix that, and put the 2 changeset in roundup. I will put it in the main branch13:38
udonocedk: ok. But what about my ideas from beginning of our talk. Moving all the View into own small Modules?13:38
cedkudono: I don't think it is a good idea, I think better will be to move DB creation etc... in his own module instead of main13:39
cedkudono: because for me, it is a gtk application so it is normal to have gtk call inside13:40
-!- kultviech( has joined #tryton13:40
cedkudono: but you are right that is to big, it must be split in,, etc ...13:41
udonocedk: no problem with this, but I like to work on horizontal complexity by splitting the big thing into modules, and not on vertical complexity by having one single file...13:41
udonocedk: and your idea is better than mine... its all gtk, so we should divide the classes of ando not of the View part...13:42
cedkudono: yes but the class Main is all about interface13:42
cedkudono: yes, especially that gtk object must be link by callback to function of the object13:43
cedkudono: but make one things at once13:43
cedkudono: split must be done in an other changeset13:44
udonocedk: ok, you are right, but its ugly for me to work on a huge file...13:44
cedkudono: after the login stuff, we can split and come back after with the glade stuff13:45
udonocedk: yes13:46
cedkudono: and by the way, it will be easier to test pyjamas with small files than one big13:47
udonocedk: :-)13:47
udonocedk: one thing about the combo_label you mentioned. I dont know how to do this, but iam very interesting in this, because I have problems with this function in another module... Did you know how it could work? Signals?13:49
cedkudono: oups sorry, you can not set directly the text in it because there is two value possible13:52
udonocedk: what is the naming convention for Variables? dialogbox = gtk.VBox() or dialog_box = gtk.VBox()15:15
udonobechamel: ?15:16
bechameludono: i thing both are ok, what cedk was saiying is to avoid box6129 and other genereated names15:17
udonobechamel: ok, thank you15:17
cedkudono: I will use vbox = gtk.VBox()15:21
udonocedk: but this is a meaningless name... you see already that it is a vbox in the caller...15:37
cedkudono: I don't think, because you will use it later15:38
udonocedk: you doesn't find dialog_vbox for the overall vbox of the dialog better?15:40
CIA-53tryton: C?dric Krier <> default * 514:451064cd85ce tryton/tryton/gui/window/ ( view_form/screen/
CIA-53tryton: Backed out changeset 04c9af13b24f15:42
CIA-53tryton: show_search is used for xxx2Many views15:42
CIA-53tryton: C?dric Krier <> default * 515:28f0ed01a985 tryton/: merge15:43
cedkudono: I don't see what dialog means there15:43
udonocedk: dialog_vbox is the primary vbox inside the main gtk.Dialog. And i.e. image_vbox is the vbox of the image, entry_password for passwordfield, button_password_change and so on... I find this is a good naming for visual identification of gui elements and their gtk constructors...16:00
cedkudono: but if you change a little bit the construction of the dialog, like adding a hbox overall, you must rename all your variables16:12
udonocedk: no, because than it is a dialog_hbox. And what is the alternative? entry_password, button_password_change,  image_vbox is the visual and functional name... how should I name image_vbox other than this? vbox57? or vboxi? If you dont like sensefull variable names, than we can let all like they are...16:21
cedkudono: ok, I don't understand well the naming rules but ok let's go with yours16:23
CIA-53tryton: C?dric Krier <> default * 701:67741ba06caa trytond/trytond/osv/ Fix exception error message17:27
CIA-53tryton: C?dric Krier <> default * 702:2d81c7d72d4d trytond/trytond/osv/ Add error message for wrong field name args17:27
CIA-53tryton: C?dric Krier <> default * 132:becf69798792 account/ ( account.xml Move code from account.type to account.account and rename it in kind.17:27
CIA-53tryton: C?dric Krier <> default * 74:7e7a329c4532 account_invoice/ Move code from account.type to account.account17:27
CIA-53tryton: C?dric Krier <> default * 516:e868ec0434a6 tryton/tryton/gui/window/view_tree/ Improve tree view for wrong field name17:32
-!- kultviec1( has joined #tryton18:19
-!- kultviec2( has joined #tryton18:31
udonofull of kultviecher ;-)18:40
kultviecha lot of  thunder and lightnings in our area19:06
-!- kultviec1( has joined #tryton19:20
CIA-53tryton: C?dric Krier <> default * 133:6ce2669f8e22 account/ ( account.xml):19:27
CIA-53tryton: Change childs on account.account(.template) from Many2Many into One2Many and19:27
CIA-53tryton: parent into Many2One.19:27
-!- kultviech( has left #tryton22:11
-!- yangoon3( has joined #tryton23:05
CIA-53tryton: Bertrand Chenal <> default * 159:768706443c07 stock/ ( location.xml product.xml): Improved stock computation behaviour23:19

Generated by 2.11.0 by Marius Gedminas - find it at!