Logo Search packages:      
Sourcecode: rapid-photo-downloader version File versions  Download package

def rapid::rapid::SelectionVBox::__init__ (   self,
  parentApp 
)

Initialize values for log dialog, but do not display.

Definition at line 4324 of file rapid.py.

04324                                  :
        """
        Initialize values for log dialog, but do not display.
        """
        
        gtk.VBox.__init__(self)
        self.parentApp = parentApp
        
        tiny_screen = gtk.gdk.screen_height() <= config.TINY_SCREEN_HEIGHT
        
        selection_scrolledwindow = gtk.ScrolledWindow()
        selection_scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
        selection_viewport = gtk.Viewport()
        
        
        self.selection_treeview = SelectionTreeView(self)
        
        selection_scrolledwindow.add(self.selection_treeview)


        # Job code controls
        self.add_job_code_combo()
        left_pane_vbox = gtk.VBox(spacing = 12)
        left_pane_vbox.pack_start(selection_scrolledwindow, True, True)
        left_pane_vbox.pack_start(self.job_code_hbox, False, True)
                
        # Window sizes
        #selection_scrolledwindow.set_size_request(350, -1)
        
        
        #Preview pane
        
        #Preview title
        self.preview_title_label = gtk.Label()
        self.preview_title_label.set_markup("<b>%s</b>" % _("Preview"))
        self.preview_title_label.set_alignment(0, 0.5)
        self.preview_title_label.set_padding(12, 0)
        
        #Preview image
        self.preview_image = gtk.Image()
        self.preview_image.set_alignment(0, 0.5)
        #leave room for thumbnail shadow
        if DROP_SHADOW:
            shadow_size = 21
        else:
            shadow_size = 0
        self.preview_image.set_size_request(MAX_THUMBNAIL_SIZE + shadow_size, MAX_THUMBNAIL_SIZE + shadow_size)
        
        #labels to display file information
        
        #Original filename
        self.preview_original_name_label = gtk.Label()
        self.preview_original_name_label.set_alignment(0, 0.5)
        self.preview_original_name_label.set_ellipsize(pango.ELLIPSIZE_END)
        
        
        #Device (where it will be downloaded from)
        self.preview_device_expander = gtk.Expander()
        self.preview_device_label = gtk.Label()
        self.preview_device_label.set_alignment(0, 0.5)
        self.preview_device_image = gtk.Image()
        
        self.preview_device_path_label = gtk.Label()
        self.preview_device_path_label.set_alignment(0, 0.5)
        self.preview_device_path_label.set_ellipsize(pango.ELLIPSIZE_MIDDLE)
        self.preview_device_path_label.set_padding(30, 0)
        self.preview_device_expander.add(self.preview_device_path_label)
        
        device_hbox = gtk.HBox(False, spacing = 6)
        device_hbox.pack_start(self.preview_device_image)
        device_hbox.pack_start(self.preview_device_label, True, True)
        
        self.preview_device_expander.set_label_widget(device_hbox)
        
        #Filename that has been generated
        self.preview_name_label = gtk.Label()
        self.preview_name_label.set_alignment(0, 0.5)
        self.preview_name_label.set_ellipsize(pango.ELLIPSIZE_END)
        
        #Download destination
        self.preview_destination_expander = gtk.Expander()
        self.preview_destination_label = gtk.Label()
        self.preview_destination_label.set_alignment(0, 0.5)
        self.preview_destination_image = gtk.Image()
        
        self.preview_destination_path_label = gtk.Label()
        self.preview_destination_path_label.set_alignment(0, 0.5)
        self.preview_destination_path_label.set_ellipsize(pango.ELLIPSIZE_MIDDLE)        
        self.preview_destination_path_label.set_padding(30, 0)
        self.preview_destination_expander.add(self.preview_destination_path_label)

        destination_hbox = gtk.HBox(False, spacing = 6)
        destination_hbox.pack_start(self.preview_destination_image)
        destination_hbox.pack_start(self.preview_destination_label, True, True)
        
        self.preview_destination_expander.set_label_widget(destination_hbox)

        
        #Status of the file
        
        self.preview_status_icon = gtk.Image()
        self.preview_status_icon.set_size_request(16,16)

        self.preview_status_label = gtk.Label()
        self.preview_status_label.set_alignment(0, 0.5)
        self.preview_status_label.set_ellipsize(pango.ELLIPSIZE_END)
        self.preview_status_label.set_padding(12, 0)

        #Title of problems encountered in generating the name / subfolder
        self.preview_problem_title_label = gtk.Label()
        self.preview_problem_title_label.set_alignment(0, 0.5)
        self.preview_problem_title_label.set_ellipsize(pango.ELLIPSIZE_END)
        self.preview_problem_title_label.set_padding(12, 0)
        
        #Details of what the problem(s) are
        self.preview_problem_label = gtk.Label()
        self.preview_problem_label.set_alignment(0, 0)
        self.preview_problem_label.set_line_wrap(True)
        self.preview_problem_label.set_padding(12, 0)
        #Can't combine wrapping and ellipsize, sadly
        #self.preview_problem_label.set_ellipsize(pango.ELLIPSIZE_END)
                
        #Put content into table
        # Use a table so we can do the Gnome HIG layout more easily
        self.preview_table = gtk.Table(10, 4)
        self.preview_table.set_row_spacings(12)
        left_spacer = gtk.Label('')
        left_spacer.set_padding(12, 0)
        right_spacer = gtk.Label('')
        right_spacer.set_padding(6, 0)
        

        spacer2 = gtk.Label('')
        
        #left and right spacers
        self.preview_table.attach(left_spacer, 0, 1, 1, 2, xoptions=gtk.SHRINK, yoptions=gtk.SHRINK)
        self.preview_table.attach(right_spacer, 3, 4, 1, 2, xoptions=gtk.SHRINK, yoptions=gtk.SHRINK)
        
        row = 0
        if not tiny_screen:
            self.preview_table.attach(self.preview_title_label, 0, 3, row, row+1, yoptions=gtk.SHRINK)
            row += 1
        self.preview_table.attach(self.preview_image, 1, 3, row, row+1, yoptions=gtk.SHRINK)
        row += 1
        
        self.preview_table.attach(self.preview_original_name_label, 1, 3, row, row+1, xoptions=gtk.EXPAND|gtk.FILL, yoptions=gtk.SHRINK)
        row += 1
        if not tiny_screen:
            self.preview_table.attach(self.preview_device_expander, 1, 3, row, row+1, xoptions=gtk.EXPAND|gtk.FILL, yoptions=gtk.SHRINK)
            row += 1
        
        self.preview_table.attach(self.preview_name_label, 1, 3, row, row+1, xoptions=gtk.EXPAND|gtk.FILL, yoptions=gtk.SHRINK)
        row += 1
        if not tiny_screen:
            self.preview_table.attach(self.preview_destination_expander, 1, 3, row, row+1, xoptions=gtk.EXPAND|gtk.FILL, yoptions=gtk.SHRINK)
            row += 1

        if not tiny_screen:
            self.preview_table.attach(spacer2, 0, 7, row, row+1, yoptions=gtk.SHRINK)
            row += 1
        
        self.preview_table.attach(self.preview_status_icon, 1, 2, row, row+1, xoptions=gtk.SHRINK, yoptions=gtk.SHRINK)
        self.preview_table.attach(self.preview_status_label, 2, 3, row, row+1, yoptions=gtk.SHRINK)
        row += 1
        
        self.preview_table.attach(self.preview_problem_title_label, 2, 3, row, row+1, yoptions=gtk.SHRINK)
        row += 1
        self.preview_table.attach(self.preview_problem_label, 2, 4, row, row+1, xoptions=gtk.EXPAND|gtk.FILL, yoptions=gtk.EXPAND|gtk.FILL)
        row += 1
        
        self.file_hpaned = gtk.HPaned()
        self.file_hpaned.pack1(left_pane_vbox, shrink=False)
        self.file_hpaned.pack2(self.preview_table, resize=True, shrink=False)
        self.pack_start(self.file_hpaned, True, True)
        if self.parentApp.prefs.hpaned_pos > 0:
            self.file_hpaned.set_position(self.parentApp.prefs.hpaned_pos)
        else:
            # this is what the user will see the first time they run the app
            self.file_hpaned.set_position(300)

        self.show_all()
    
    
    def set_display_preview_folders(self, value):


Generated by  Doxygen 1.6.0   Back to index