One big happy class for the Glade part of the UI. The main window, prefs
dialog and the head alignment assistant
were made in Glade and the
skeleton code was generated using GladeGen. This class also includes the
code for the tray icon and tray menu. At one point, this used egg.trayicon
,
but now it uses gtk.StatusIcon
, because I don't want dependencies on GNOME.
(No offense -- I use GNOME -- but I want this to work nicely in XFCE with no
GNOME libaries.
Methods
|
|
|
|
__init__
|
__init__ ( self )
|
|
aboutBox
|
aboutBox ( self, *args )
Displays the about box.
|
|
alignPrintHeads
|
alignPrintHeads ( self, *args )
An assistant to walk the user through aligning the printheads.
|
|
alignPrintHeadsStep1
|
alignPrintHeadsStep1 ( self, *args )
Display step 1 of the assistant and initialize the Printer.Align instance
|
|
alignPrintHeadsStep2
|
alignPrintHeadsStep2 ( self, *args )
Display Step 2 of the align assistant
|
|
alignPrintHeadsStep3
|
alignPrintHeadsStep3 ( self, *args )
Display Step 3 of the align assistant
|
|
alignPrintHeadsStep4
|
alignPrintHeadsStep4 ( self, *args )
Display step 4 of the align assistant
|
|
alignPrintHeadsStep5
|
alignPrintHeadsStep5 ( self, *args )
Display step 5 of the align assistant
|
|
alignPrintHeadsStep6
|
alignPrintHeadsStep6 ( self, *args )
Display step 6 of the align assistant
|
|
alignPrintHeadsStep7
|
alignPrintHeadsStep7 ( self, *args )
Display step 7 of the align assistant
|
|
alignPrintHeadsStep8
|
alignPrintHeadsStep8 ( self, save )
Display step 8 of the align assisant
|
|
first_time
|
first_time ( self, *args )
Read prefs from configuration file; if not, display prefs dialog
|
|
init
|
init ( self )
We separate the main init code from the attribute creation for enhnanced
readability
|
|
on_PrefsCancel_clicked
|
on_PrefsCancel_clicked ( self, *args )
Calls resetPrefs and hides the prefs window.
|
|
on_PrefsWindow_closed
|
on_PrefsWindow_closed ( self, *args )
Avoids destruction of the prefs window and calls resetPrefs. MUST return
True
|
|
on_about1_activate
|
on_about1_activate ( self, *args )
display the about box on user request
|
|
on_btnAlign_clicked
|
on_btnAlign_clicked ( self, *args )
call the align assistant upon request
|
|
on_btnClean_clicked
|
on_btnClean_clicked ( self, *args )
display a QueryDialog, and if so requested, clean the print heads
|
|
on_btnClose_clicked
|
on_btnClose_clicked ( self, *args )
this isn't needed anymore, but it's still in the glade file. :)
|
|
on_btnDevBrowse_clicked
|
on_btnDevBrowse_clicked ( self, *args )
Browse /dev for the device
|
|
on_btnEscputilBrowse_clicked
|
on_btnEscputilBrowse_clicked ( self, *args )
Browse /usr/bin for the escputil binary
|
|
on_btnFCOpen_clicked
|
on_btnFCOpen_clicked ( self, *args )
Fill in the text entry in the file chooser from the selected file
|
|
on_btnPrint_clicked
|
on_btnPrint_clicked ( self, *args )
display a QueryDialog and then print a nozzle test if so requested
|
|
on_btnRefresh_clicked
|
on_btnRefresh_clicked ( self, *args )
refresh the window on user request
|
|
on_btnStep1Cancel_clicked
|
on_btnStep1Cancel_clicked ( self, *args )
Cancel the alignment assistant
|
|
on_btnStep1Forward_clicked
|
on_btnStep1Forward_clicked ( self, *args )
Call on the first pass handler and move on to step 2
|
|
on_btnStep2Back_clicked
|
on_btnStep2Back_clicked ( self, *args )
Go back to step 1 (does this work?)
|
|
on_btnStep2Cancel_clicked
|
on_btnStep2Cancel_clicked ( self, *args )
Cancel the alignment assistant
|
|
on_btnStep2Forward_clicked
|
on_btnStep2Forward_clicked ( self, *args )
Handle the 1st pass using the next_pass handler and move on to step 3
|
|
on_btnStep3Back_clicked
|
on_btnStep3Back_clicked ( self, *args )
The back button doesn't work here.
|
|
on_btnStep3Cancel_clicked
|
on_btnStep3Cancel_clicked ( self, *args )
Cancel the alignment assistant
|
|
on_btnStep3Forward_clicked
|
on_btnStep3Forward_clicked ( self, *args )
Handle the 2nd pass via the next_pass handler and move on to step 4
|
|
on_btnStep4Back_clicked
|
on_btnStep4Back_clicked ( self, *args )
The back button doesn't work here.
|
|
on_btnStep4Cancel_clicked
|
on_btnStep4Cancel_clicked ( self, *args )
Cancel the alignment assistant
|
|
on_btnStep4Forward_clicked
|
on_btnStep4Forward_clicked ( self, *args )
Handle the 3rd pass via the next_pass handler and move on to step 5
|
|
on_btnStep5Cancel_clicked
|
on_btnStep5Cancel_clicked ( self, *args )
Cancel the alignment assistant
|
|
on_btnStep5FowardButton_clicked
|
on_btnStep5FowardButton_clicked ( self, *args )
Handle the 4th pass via the next_pass handler and move on to step 6
|
|
on_btnStep6Back_clicked
|
on_btnStep6Back_clicked ( self, *args )
The back button doesn't work here.
|
|
on_btnStep6Cancel_clicked
|
on_btnStep6Cancel_clicked ( self, *args )
Cancel the alignment assistant
|
|
on_btnStep6Forward_clicked
|
on_btnStep6Forward_clicked ( self, *args )
Move on to step 7
|
|
on_btnStep7Back_clicked
|
on_btnStep7Back_clicked ( self, *args )
The back button doesn't work here.
|
|
on_btnStep7Cancel_activate
|
on_btnStep7Cancel_activate ( self, *args )
Cancel the alignment assistant
|
|
on_btnStep7Forward_clicked
|
on_btnStep7Forward_clicked ( self, *args )
Save, repeat, or quit the alignment.
|
|
on_btnStep8Close_clicked
|
on_btnStep8Close_clicked ( self, *args )
We're done
|
|
on_cmbModel_changed
|
on_cmbModel_changed ( self, *args )
We don't care if cmbModel changed really, so we do nothing.
|
|
on_cmbPrinter_changed
|
on_cmbPrinter_changed (
self,
combobox,
*args,
)
When cmpPrinter has changed,
|
|
on_copy1_activate
|
on_copy1_activate ( self, *args )
Does nothing.
|
|
on_cut1_activate
|
on_cut1_activate ( self, *args )
Does nothing.
|
|
on_delete1_activate
|
on_delete1_activate ( self, *args )
Does nothing.
|
|
on_dlgFileChooser_delete_event
|
on_dlgFileChooser_delete_event ( self, *args )
Avoids destruction of the dlgFileChooser dialog. MUST return True.
|
|
on_expander1_activate
|
on_expander1_activate (
self,
expander,
*args,
)
Expand the expander - resizes the window as required
|
|
on_fileChooserCancel_clicked
|
on_fileChooserCancel_clicked ( self, *args )
Hide the file chooser
|
|
on_paste1_activate
|
on_paste1_activate ( self, *args )
Does nothing.
|
|
on_preferences1_activate
|
on_preferences1_activate ( self, *args )
Populate the combo boxes and show, if necessary, and show the
preferences dialog on user request
|
|
on_prefsOkButton_clicked
|
on_prefsOkButton_clicked ( self, *args )
Saves the config changes made in the prefs window and hides the window
|
|
on_quit1_activate
|
on_quit1_activate ( self, *args )
Logout of the primary SSH session, if any, write the config and cause the
main loop to terminate
|
|
on_radAutoDetect_toggled
|
on_radAutoDetect_toggled ( self, *args )
Sets the model to autodetect.
|
|
on_refresh1_activate
|
on_refresh1_activate ( self, *args )
refresh the window on user request
|
|
on_settings1_activate
|
on_settings1_activate ( self, *args )
Call the printer settings program via os.spawnvp()
|
|
on_tray_icon_activate
|
on_tray_icon_activate (
self,
widget,
data=None,
)
on a left click on the tray icon, toggle the main window.
|
|
on_tray_menu_popup
|
on_tray_menu_popup (
self,
widget,
button,
time,
data=None,
)
show the popup menu upon a right click on the tray icon
|
|
on_wndToolbox_activate_default
|
on_wndToolbox_activate_default ( self, *args )
Doesn't do anything
|
|
on_wndToolbox_delete
|
on_wndToolbox_delete ( self, *args )
Avoids destruction of the main window. MUST return True.
|
|
populateModels
|
populateModels ( self, *args )
|
|
populatePrinters
|
populatePrinters ( self )
|
|
refreshWindow
|
refreshWindow ( self, *args )
Refresh main window with ink-levels and printer name from escputil
|
|
resetPrefs
|
resetPrefs ( self, *args )
Reset prefs dialog widgets from internal configuration data
|
|
toggleWindow
|
toggleWindow ( self, *args )
Turns the main window on and off
|