Changeset 652

Show
Ignore:
Timestamp:
05/12/07 16:51:16 (6 years ago)
Author:
boltrix
Message:

Added Guilherme's higframe to higwidgets trunk. Also, some fixes to prepare a new and stable release of umit.

Files:
4 modified
1 copied

Legend:

Unmodified
Added
Removed
  • branch/hildon/umitGUI/MainWindow.py

    r624 r652  
    5353try: 
    5454    if sys.platform == 'win32': root = True 
     55    elif is_maemo(): root = True 
    5556    elif os.getuid() == 0: root = True 
    5657except: pass 
     
    6667            hildon.Window.__init__(self) 
    6768            self.set_resizable(False) 
    68             self.set_border_width(5) 
     69            self.set_border_width(0) 
     70            self.vbox = gtk.VBox() 
     71            self.vbox.set_border_width(0) 
     72            self.vbox.set_spacing(0) 
    6973 
    7074else: 
     
    7276        def __init__(self): 
    7377            HIGMainWindow.__init__(self) 
     78            self.vbox = gtk.VBox() 
    7479 
    7580 
     
    8489        self.add_accel_group(self.main_accel_group) 
    8590         
    86         self.vbox = gtk.VBox() 
    8791        self.add(self.vbox) 
    8892         
     
    550554        self.scan_notebook = ScanNotebook() 
    551555        self.scan_notebook.show_all() 
    552         self.vbox.pack_start(self.scan_notebook, True, True, 4) 
     556        if is_maemo(): 
     557            # No padding. We need space! 
     558            self.vbox.pack_start(self.scan_notebook, True, True, 0) 
     559        else: 
     560            self.vbox.pack_start(self.scan_notebook, True, True, 4) 
    553561 
    554562    def _create_statusbar(self): 
  • branch/hildon/umitGUI/ScanNotebook.py

    r567 r652  
    3737from umitCore.NmapCommand import NmapCommand 
    3838from umitCore.NmapCommand import CommandConstructor 
    39 from umitCore.UmitConf import CommandProfile, ProfileNotFound 
     39from umitCore.UmitConf import CommandProfile, ProfileNotFound, is_maemo 
    4040from umitCore.NmapParser import NmapParser 
    4141from umitCore.Paths import Path 
     
    262262    def __init__(self): 
    263263        HIGVBox.__init__(self) 
     264 
     265        # The borders are consuming too much space on Maemo. Setting it to 
     266        # 0 pixels while on Maemo 
     267        if is_maemo(): 
     268            self.set_border_width(0) 
     269         
    264270        self.set_spacing(0) 
    265271        self.status = PageStatus() 
  • branch/hildon/umitGUI/ScanToolbar.py

    r470 r652  
    5656        self._create_profile() 
    5757         
    58         self.scan_button = gtk.Button(_("Start Scan")) 
     58        self.scan_button = gtk.Button(_("Scan")) 
    5959 
    6060        self._pack_noexpand_nofill(self.target_label) 
  • branch/hildon/umitGUI/SearchWindow.py

    r484 r652  
    2222 
    2323from umitCore.I18N import _ 
     24from umitCore.UmitConf import is_maemo 
    2425 
    2526from higwidgets.higboxes import HIGVBox 
    2627from higwidgets.higbuttons import HIGButton 
    2728 
    28 class SearchWindow(gtk.Window, object): 
     29BaseSearchWindow = None 
     30hildon = None 
     31 
     32if is_maemo(): 
     33    import hildon 
     34    class BaseSearchWindow(hildon.Window): 
     35        def __init__(self): 
     36            hildon.Window.__init__(self) 
     37else: 
     38    class BaseSearchWindow(gtk.Window): 
     39        def __init__(self): 
     40            gtk.Window.__init__(self) 
     41            self.set_title(_("Search Window")) 
     42            self.set_position(gtk.WIN_POS_CENTER) 
     43 
     44class SearchWindow(BaseSearchWindow, object): 
    2945    def __init__(self, load_method): 
    30         gtk.Window.__init__(self) 
    31         self.set_title(_("Search Window")) 
    32         self.set_position(gtk.WIN_POS_CENTER) 
     46        BaseSearchWindow.__init__(self) 
    3347 
    3448        self.load_method = load_method