Changeset 40 for conseil.py

Show
Ignore:
Timestamp:
07/17/06 01:07:24 (2 years ago)
Author:
ploum
Message:

#21 cannot add a comment to a bug

First step in bug editing ! Yeah ! I see the light ! I see the light !

Warning : now, Conseil depends from python-mechanize

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • conseil.py

    r38 r40  
    293293                                menu.append(browser) 
    294294                                menu.popup(None, None, None, event.button, event.time)   
     295 
     296                def callback_postcom(widget,buff,nbr) : 
     297                        itera = buff.get_bounds() 
     298                        content = buff.get_text(itera[0],itera[1]) 
     299                        if content.strip() != '' : 
     300                                #FIXME : support title in comments 
     301                                title="Dummy title" 
     302                                self.bts.postComment(nbr,title,content) 
    295303         
    296304                if nbr < 0 : 
     
    302310                        bugwidget = gtk.glade.XML(bugtemplate) 
    303311                        widget_comments_nbr = bugwidget.get_widget("comments_nbr") 
     312                        textcom = bugwidget.get_widget("text_comment") 
     313                        postbutton = bugwidget.get_widget("post_button") 
     314                        postbutton.connect("clicked",callback_postcom, textcom.get_buffer(),bugnbr) 
    304315                        # handle nicely plurals 
    305316                        bugtotal = zebug.comNbr()