def __init__( self ): self._invoicetable = msmgui.widgets.invoicetable.InvoiceTable() msmgui.widgets.base.RefreshableWindow.__init__( self, [self._invoicetable] ) self.builder = Gtk.Builder() self.builder.add_from_file( paths.data("ui","widgets","invoicewindow", "invoicewindow.glade")) self.builder.get_object( "content" ).reparent( self ) self.builder.connect_signals( self ) self.builder.get_object( "tablebox" ).add( self._invoicetable ) self._invoicetable.connect( "selection-changed", self.invoicetable_selection_changed_cb ) self._invoicingassistant = msmgui.assistants.invoicing.InvoicingAssistant() self._invoicingassistant.connect( "saved", self.invoicingassistant_saved_cb ) self._letterexportassistant = msmgui.assistants.letterexport.LetterExportAssistant() active_only = Config.getboolean( "Interface", "active_only" ) if not active_only: self.builder.get_object( "invoices_showall_switch" ).set_active( not active_only )
def __init__( self ): self._customertable = msmgui.widgets.customertable.CustomerTable() msmgui.widgets.base.RefreshableWindow.__init__( self, [self._customertable] ) self.builder = Gtk.Builder() self.builder.add_from_file( paths.data("ui","widgets","customerwindow", "customerwindow.glade")) self.builder.add_from_file( "data/ui/widgets/customerwindow/customerwindow.glade" ) self.builder.get_object( "content" ).reparent( self ) self.builder.connect_signals( self ) self._customereditor = msmgui.widgets.customereditor.CustomerEditor() self.builder.get_object( "editorbox" ).add( self._customereditor ) self._customereditor.connect( "edit-started", self.customereditor_edit_started_cb ) self._customereditor.connect( "edit-ended", self.customereditor_edit_ended_cb ) self._customereditor.connect( "changed", self.customereditor_changed_cb ) self._customereditor.connect( "save", self.customereditor_saved_cb ) self._customereditor.connect( "expanded-changed", self.customereditor_expanded_changed_cb ) self.builder.get_object( "tablebox" ).add( self._customertable ) self._customertable.connect( "selection-changed", self.customertable_selection_changed_cb ) active_only = Config.getboolean( "Interface", "active_only" ) if not active_only: self.builder.get_object( "customers_showall_switch" ).set_active( not active_only )