Changeset 4505

Show
Ignore:
Timestamp:
04/15/09 11:15:54 (4 years ago)
Author:
nopper
Message:

Implemented position restore for trayicon plugin. Various bug fixes.

Location:
branch/UmitPlugins
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branch/UmitPlugins/higwidgets/higtooltips.py

    r4497 r4505  
    431431 
    432432        self.hide() 
    433         self.destroy() 
     433        #self.destroy() 
    434434 
    435435        return False 
     
    460460        if y > s_h - offset: self._is_top = True 
    461461        else: self._is_top = False 
    462          
     462 
    463463        if not data: 
    464464            data = self._widgets[w] 
     
    466466        self.title = data.title 
    467467        self.message = data.message 
    468          
     468 
    469469        if data.stock: 
    470470            self.icon = data.stock 
  • branch/UmitPlugins/source-plugins/notifier/sources/main.py

    r4504 r4505  
    5959    def __on_scan_finished(self, page): 
    6060        if not self.tray: 
     61            log.debug('Cannot procede: self.tray == None') 
    6162            return 
    6263 
     
    6970            icon = gtk.STOCK_DIALOG_INFO 
    7071 
     72        log.debug('Showing notification (%s, %s)' % (title, msg)) 
    7173        self.tray.show_notification(msg, title, stock=icon, timeout=2000) 
    7274 
  • branch/UmitPlugins/source-plugins/tray-icon/sources/main.py

    r4503 r4505  
    101101    def start(self, reader): 
    102102        self.reader = reader 
    103         self.toggle_visibility = True 
    104103 
    105104        self.icon = None 
     105        self.wnd_pos = (0, 0) 
    106106 
    107107        self.menu = gtk.Menu() 
     
    182182 
    183183    def __on_activate(self, widget): 
    184         self.toggle_visibility = not self.toggle_visibility 
    185  
    186         if self.toggle_visibility: 
    187             Core().mainwindow.show() 
    188         else: 
    189             Core().mainwindow.hide() 
     184        mainwnd = Core().mainwindow 
     185 
     186        if mainwnd.flags() & gtk.VISIBLE: 
     187            self.wndpos = mainwnd.get_position() 
     188            mainwnd.hide() 
     189        else: 
     190            mainwnd.move(*self.wndpos) 
     191            mainwnd.show() 
    190192 
    191193    def __on_quit(self, action):