Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate

#dextrose, 2010-10-07

 « Previous day | Index | Today | Next day »     Channels | Search | Join

All times shown according to UTC.

Time Nick Message
03:27 manusheel is now known as manusheel_afk
06:09 ishan <ishan!~ishan@> has joined #dextrose
06:16 mukul_afk is now known as mukul
07:02 ishan has quit IRC
07:29 ayushg <ayushg!~ayushg@> has joined #dextrose
07:36 ayushg has quit IRC
07:57 ayushg <ayushg!~ayushg@> has joined #dextrose
08:10 ayushg has quit IRC
10:25 mukul is now known as mukul_afk
10:36 manusheel_afk is now known as manusheel
11:21 ishan <ishan!~ishan@> has joined #dextrose
12:59 ishan alsroot, around?
12:59 hi
13:00 alsroot ishan: yup
13:01 ishan alsroot, as you said yesterday i have tried to study the whole code and understood most of it
13:01 please correct if i am worng
13:02 alsroot, if i am correct does line 196 langiter = self.lang2combo.get_active() checks if the totransalte box is active
13:04 alsroot, right?
13:04 alsroot ishan: it returns index of active entry in combo, http://library.gnome.org/devel[…]bo-box-get-active
13:05 ishan alsroot, can you explain what do you mean by index of active entry
13:07 alsroot ishan: see gtk doc url I posted, can't explain better :)
13:07 ishan: if you don't know what combo is, http://library.gnome.org/devel[…].html#Description
13:10 ishan alsroot, i have the above links but what i am not able to understand is "index of active item"
13:10 what do you understand by this phase
13:10 alsroot ishan: I meant, index of the currently active item
13:11 ishan alsroot, i think i got it
14:12 alsroot, i have figured out and corrected the code
14:13 alsroot, can you tell me how can i make patch for this since there is not repo present for it at git so from where can i clone it
14:13 *clone the source
14:14 alsroot ishan: you can untar sources to another directory and do `diff -Naur <new-untarred-file> <changed-file> > patch`
14:15 ishan alsroot, okay
14:15 is tryiing
14:35 ayushg <ayushg!~ayushg@> has joined #dextrose
15:08 anuragc <anuragc!~anurag@> has joined #dextrose
15:49 ayushg has quit IRC
15:55 ishan has quit IRC
16:07 mukul_afk is now known as mukul
16:17 ayushg <ayushg!~ayushg@> has joined #dextrose
16:34 anuragc has quit IRC
16:51 anuragc <anuragc!~anurag@> has joined #dextrose
17:08 anuragc has quit IRC
17:18 ishan <ishan!~ishan@> has joined #dextrose
17:21 mukul is now known as mukul_afk
17:38 ishan alsroot, around?
17:39 ishan_ <ishan_!~ishan@> has joined #dextrose
17:43 alsroot ishan: yup
17:45 ishan alsroot, i have been able to clear both the text boxes when the language is changed
17:45 but i am facing some problem in displaying the translated text once language is changed
17:45 can you explain the difference between the code http://pastebin.com/9GRhXJJt
17:48 alsroot ishan: could you specify what you mean, both parts looks abs different
17:49 ishan alsroot, i want to know the difference between the function performed by the parts
17:51 alsroot ishan: if I got it right, 1st code uses gtk.TreeView's current item to set self.translated text, 2nd one uses current value from combo
17:52 ishan alsroot, both code are displaying the translated text right?
17:52 alsroot ishan: yup
17:53 ishan alsroot, so how is it being decided that which code will display the translated text
17:54 mukul_afk is now known as mukul
17:56 alsroot ishan: what the names of function these two parts belong to?
17:56 *functions
17:57 ishan alsroot, for code 1 its as mentioned in the link and the 2nd one is not under any function
17:57 check http://pastebin.com/9V3xnwA3
17:59 alsroot ishan: ok, whats the name of 1st function?
17:59 ishan def lang1sel_cb(self, column):
18:00 alsroot ishan: see how this function is used in the rest of code
18:01 ishan alsroot, its just used at one place lang1view.get_selection().connect("changed", self.lang1sel_cb)
18:02 alsroot ishan: and what does this mean? (hint: "connect")
18:03 ishan: also see gtk.TreeView docs, http://library.gnome.org/devel[…]/GtkTreeView.html
18:04 ishan: btw what is the class of lang1view object?
18:05 ishan alsroot, class WordsActivity(ViewSourceActivity):
18:06 alsroot ishan: thats activity class, I mean class of lang1view object itself
18:07 ishan alsroot, sorry didnt get you
18:11 alsroot ishan: lang1view is python object
18:11 ishan alsroot, i know
18:11 alsroot ishan: I'm just curious whats that class of this object
18:13 ishan alsroot, since the file import gtk that means the object must be in some class of gtk.py
18:15 alsroot ishan: nope, the thing is that lang1view should be initilized in code, something like "lang1view = ..."
18:16 ishan: so, looking at this line you can find out the class
18:16 ishan        self.lang1model = gtk.ListStore(str)
18:16        lang1view = gtk.TreeView(self.lang1model)
18:19 alsroot ishan: so, gtk.TreeView is the class?
18:20 ishan: see docs of gtk.TreeView on http://library.gnome.org/devel[…]/GtkTreeView.html to know about get_selection()
18:22 ishan alsroot, but i am still not clear as to how it is decided that which code would display the text
18:29 alsroot ishan: "lang1view.get_selection().connect" means that self.lang1sel_cb will be a handler on "changed" signal,
18:29 so it will be invoked on "changed" singal
18:29 ishan: btw youd better to learn a bit about pygtk
18:31 ishan alsroot, true but i am confused because there is a similar signal  as well         self.totranslate = gtk.Entry(max=50)
18:31        self.totranslate.connect("changed", self.totranslate_cb)
18:31        self.totranslate.modify_font​(pango.FontDescription("Sans 14"))
18:31        self.totranslate = gtk.Entry(max=50)
18:31        self.totranslate.connect("changed", self.totranslate_cb)
18:31        self.totranslate.modify_font​(pango.FontDescription("Sans 14"))
18:31 here also ""changed" signal is being passed
18:31 so i am still confused as to which box is being used to display text?
18:33 alsroot ishan: self.translated will be changed on both signals
18:33 ishan: from combo and treeview
18:33 ..at least should
18:34 ishan alsroot, but when i delete the code from treeview it still shows the text in translated box but when i delete code from combo box it stops displaying text in translated box
18:37 alsroot ishan: looks like activities doesn't work well, it logs bunch of errors while..
18:38 ishan alsroot, also i am bit confused as to why two boxes has been used to do same function
18:39 alsroot, can we ask for the solution to be text cleared from both boxes when ever language is changed?
18:40 alsroot, sorry that wont work
18:40 i have to somehow get the translated text to display
18:41 alsroot ishan: ok, lets work from original issue, whats the ticket number?
18:41 ishan alsroot, 2210
18:42 alsroot ishan: lets fix issues step-by-step from the first...
18:43 ishan: in new activity, tyoing "monday" affect edit box "Transaltion" but 2nd treeview is empty
18:44 ishan alsroot, yup
18:44 alsroot ishan: thats the 1st issue, you need to fix
18:45 ishan alsroot, till now what i have figured out is that once the language is changes it calls the function     def lang2combo_cb(self, combo):
18:46 which passes the language as parameters and call the function from languagemodel.py
18:46 self.languagemodel.SetLanguages("English", self.langs[combo.get_active()])
18:46 alsroot ishan: yup, except that it is only for changing 2nd combo
18:46 mukul is now known as mukul_afk
18:47 ishan alsroot, that what we want to change the 2nd combo box?
18:48 alsroot ishan: sorry, lets fix issues step-by-step, otherwise we are trying to fix issues in the middle..
18:48 ishan alsroot, sure
18:48 so what should be my first step
18:49 alsroot ishan: the first issue is typing "monday" which affects "Transaltion" edit properly but second treeview is empty
18:50 ishan: if I got it right, we should have (at least), "monday" in the left treeview and "el lunes" in tre right one
18:50 ishan alsroot,it should be
18:51 alsroot, check "hello" it would show hello on both left and right side for spanish
18:52 alsroot ishan: "hello" works, but bug exists anyway and "monday" triggers it
18:53 ishan alsroot, it could be possible to not have monday in both the list ?
18:54 since these translations are being done from a fix set of library
18:56 alsroot ishan: it should be "monday" in left and "el lunes" in the right, if you are talking about this
18:57 ishan alsroot, then shoudnt it be "hello" on left and "bonjour" on right but it still shows "hello" on both sides
18:58 alsroot ishan: I guess it is just inproper transaltion..
18:58 ishan alsroot, may be
18:59 alsroot, how should i be proceeding further
19:00 alsroot ishan: you have "monday" issue and you know how it should be after fixing, so go ahead :)
19:01 ishan alsroot, the issue is not particular to monday
19:01 its for every word that we enter
19:01 alsroot ishan: well "monday" is just a testcase you can use it to recheck your current implementation
19:03 ishan alsroot, presently after adding the set_text command i am able to clear both the text both once lang is cleared
19:03    def lang2combo_cb(self, combo):
19:03        self.languagemodel.SetLanguages("English", self.langs[combo.get_active()])
19:03        self.translated.set_text("")
19:03        self.totranslate.set_text("")
19:03 s/cleared/changed
19:06 alsroot, the problem is that what ever code i write to implement translation after set_text command is not displayed
19:07 is not able to display the translation
19:10 alsroot ishan: let me figure it out..
19:15 ishan__ <ishan__!~ishan@> has joined #dextrose
19:19 ishan has quit IRC
19:19 ishan_ has quit IRC
19:19 ishan <ishan!~ishan@> has joined #dextrose
19:20 ishan__ alsroot, any leads
19:25 alsroot ishan__: you are working on this for several days, let me some minutes ;)
19:25 ishan__ alsroot, sure
19:25 alsroot is preparing a cup of coffee
19:31 ayushg has quit IRC
19:40 ishan__ alsroot, i am logging off
19:41 can you send me a message over this issue if you provide some new pointers
19:41 thank you for the help
19:41 ishan__ has quit IRC
19:41 ishan has quit IRC
19:43 ayushg <ayushg!~ayushg@> has joined #dextrose
22:26 ayushg has quit IRC

 « Previous day | Index | Today | Next day »     Channels | Search | Join

Powered by ilbot/Modified.