~ubuntu-branches/debian/jessie/phatch/jessie

« back to all changes in this revision

Viewing changes to phatch/pyWx/gui.py

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski, Stani M, Piotr Ożarowski
  • Date: 2008-07-21 12:53:17 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080721125317-sqk2sdl3pwl2u4gl
Tags: 0.1.5-1
[ Stani M ]
* New upstream release(Closes LP: #228259, #232436, #236282, #236462, #237359)
* debian/control:
  - Added pkg-config and python-nautilus to build-depends, as
    setup.py uses nautilus-python.pc to look for the nautilus
    extensions path. Closes: #475233.
* debian/patches:
  - All patches of Ubuntu and Debian are implemented upstream and are removed
    from the package

[ Piotr Ożarowski ]
* Bump Standards-Version to 3.8.0 (no changes needed)
* debian/copyright wrapped at column 80 (where possible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
"""
28
28
#---Global import
29
29
 
30
 
#import & check wx
 
30
#import
31
31
import new, sys
 
32
 
 
33
#check wx
32
34
from wxcheck import ensure
33
35
wx = ensure('2.8','2.6')
34
36
 
203
205
        self._title()
204
206
        self._description()
205
207
        self._drop()
 
208
        self._set_size()
206
209
        self._events()
207
210
        self._pubsub()
208
211
        if actionlist.endswith(ct.EXTENSION):
209
212
            self._open(actionlist)
 
213
            
 
214
    def _set_size(self):
 
215
        #make it eee pc friendly
 
216
        self._width       = 400
 
217
        self._max_height  = wx.Display(0).GetGeometry().GetHeight()-50
 
218
        self.SetSize((self._width,min(600,self._max_height)))
 
219
        super(Frame,self).__set_properties()
210
220
        
211
221
    def _plugin(self):
212
222
        plugin.install_frame(self)
395
405
        self._open(filename)
396
406
        
397
407
    def on_menu_edit_add(self, event): 
398
 
        dlg = dialogs.ActionDialog(self,api.ACTIONS,-1,size=(400, 400),
 
408
        dlg = dialogs.ActionDialog(self,api.ACTIONS,-1,
 
409
            size=(self._width, min(400,self._max_height)),
399
410
            title="%(name)s "%ct.INFO+_("actions"), )
400
411
        if dlg.ShowModal() == wx.ID_OK:
401
412
            self.set_dirty(True)
447
458
        
448
459
    def on_menu_tools_image_inspector(self, event):
449
460
        frame   = imageInspector.SingleFrame(self,
450
 
            size    = imageInspector.SIZE,
 
461
            size    = (470,min(510,self._max_height)),
451
462
            icon    = self.icon)
452
463
        frame.Show()
453
464
        
695
706
        if folder is None:
696
707
            return
697
708
        try:
698
 
            create_phatch_droplet(self.filename,folder)
 
709
            method(folder=folder,*args)
699
710
            self.show_info(_('Phatch successfully created the droplet.'))
700
711
        except Exception, details:
701
712
            reason  = exception_to_unicode(details,WX_ENCODING)