Changeset 1089

Show
Ignore:
Timestamp:
07/23/07 11:15:00 (6 years ago)
Author:
kop-labs
Message:

Command Manager work with buttons and Label upload

Location:
branch/k0p/umitInterfaceEditor
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branch/k0p/umitInterfaceEditor/Command.py

    r1088 r1089  
    177177        cmd = self._stack.pop_undo() 
    178178        cmd.execute() 
     179        self.emit('changed',None ) 
    179180     
    180181    def do_redo(self): 
    181182        cmd = self._stack.pop_redo() 
    182183        cmd.execute() 
     184        self.emit('changed',None ) 
    183185 
    184186    def add_command(self, command): 
  • branch/k0p/umitInterfaceEditor/Profile.py

    r1088 r1089  
    7474    _execute_1 = _add_label 
    7575    def _remove_label(self): 
    76         self._widget.show_voidplace() 
     76        self._widget.voidplace() 
    7777        log.debug('Removing label, Adding Void Place') 
    7878    _execute_2 = _remove_label 
    79  
    8079 
    8180 
     
    142141        if _keyval == "Delete": 
    143142            if self._old_select.is_voidplace(): 
    144                 self._old_select.hide_voidplace() 
     143                self._old_select.unload_voidplace() 
    145144                self.remove_page(self.get_current_page()) 
    146145            else:  
     
    152151 
    153152        else:  
    154             self._old_select.hide_voidplace() 
     153            self._old_select.unload_voidplace() 
    155154    def label_drag_data_received(self, w, context, x, y, data, info, time): 
    156155        print "received" 
  • branch/k0p/umitInterfaceEditor/selectborder/WrapperWidgets.py

    r1088 r1089  
    421421        self._xmp = background_xpm 
    422422        win_tmp = self.get_parent_window() 
    423         self.voidplace = gtk.gdk.Window(win_tmp, 
     423        self._voidplace = gtk.gdk.Window(win_tmp, 
    424424                             self.allocation.width , 
    425425                             self.allocation.height, 
     
    434434                             gtk.gdk.Cursor(self.get_display(), gdk.LEFT_PTR), 
    435435                             '', '', True) 
    436         self.voidplace.set_user_data(self) 
     436        self._voidplace.set_user_data(self) 
    437437        self.style.attach(self.window) 
    438         temp_map = gdk.pixmap_colormap_create_from_xpm_d(self.voidplace, 
     438        temp_map = gdk.pixmap_colormap_create_from_xpm_d(self._voidplace, 
    439439                                                         self.get_colormap(), 
    440440                                                         None, 
    441441                                                         self._xmp) 
    442         self.voidplace.set_back_pixmap(temp_map[0], False) 
    443         c= self.voidplace.get_colormap() 
     442        self._voidplace.set_back_pixmap(temp_map[0], False) 
     443        c= self._voidplace.get_colormap() 
    444444        color = c.alloc_color(0,65555,0) 
    445         self._draw_gc = gtk.gdk.GC(self.voidplace,  
     445        self._draw_gc = gtk.gdk.GC(self._voidplace,  
    446446                                   line_width=6,  
    447447                                   foreground = color ) 
    448         self.voidplace.draw_rectangle(self._draw_gc, True, self.allocation.x,  
     448        self._voidplace.draw_rectangle(self._draw_gc, True, self.allocation.x,  
    449449                                   self.allocation.y, self.allocation.width, 
    450450                                   self.allocation.height) 
    451         self.voidplace.show() 
     451        self._voidplace.show() 
    452452        self._vp = True  
    453453    def unload(self): 
     
    455455            self._icon.unconstruct() 
    456456        if self._vp: 
    457             #self.voidplace.set_background(self.style.base[gtk.STATE_NORMAL]) 
    458             self.voidplace.set_user_data(None) 
    459             self.voidplace.destroy() 
     457            #self._voidplace.set_background(self.style.base[gtk.STATE_NORMAL]) 
     458            self._voidplace.set_user_data(None) 
     459            self._voidplace.destroy() 
     460            self._voidplace = None 
    460461    def hide_voidplace(self): 
    461462        ''' 
    462463        Hide voidplace 
    463464        ''' 
    464         self.voidplace.hide() 
     465        self._voidplace.hide() 
    465466    def show_voidplace(self): 
    466467        '''  
    467468        Show Voidplace  
    468469        ''' 
    469         self.voidplace.show() 
     470        self._voidplace.show() 
    470471     
    471472    def unload_voidplace(self): 
    472         self.voidplace.set_user_data(None) 
    473         self.voidplace.destroy() 
     473        self._voidplace.set_user_data(None) 
     474        self._voidplace.destroy() 
     475        self._voidplace = None 
    474476        self._vp=False 
    475477        self._selected=True