Class: PDFWalker::Walker::UsageRightsWizard
- Inherits:
-
Assistant
- Object
- Assistant
- PDFWalker::Walker::UsageRightsWizard
- Includes:
- SignatureDialogs
- Defined in:
- lib/pdfwalker/signing.rb
Instance Method Summary collapse
-
#initialize(parent, pdf) ⇒ UsageRightsWizard
constructor
A new instance of UsageRightsWizard.
Constructor Details
#initialize(parent, pdf) ⇒ UsageRightsWizard
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/pdfwalker/signing.rb', line 169 def initialize(parent, pdf) super() @parent = parent @pkey, @cert = nil, nil create_intro_page create_keypair_import_page create_rights_selection_page create_termination_page signal_connect('delete_event') { self.destroy } signal_connect('cancel') { self.destroy } signal_connect('close') { self.destroy } signal_connect('apply') { rights = selected_usage_rights begin pdf.enable_usage_rights(@cert, @pkey, *rights) set_page_title(@lastpage, "Usage Rights have been enabled") @msg_status.text = "Usage Rights have been enabled for the current document.\n You should consider saving it now." @parent.reload rescue @parent.error("#{$!}: #{$!.backtrace.join($/)}") set_page_title(@lastpage, "Usage Rights have not been enabled") @msg_status.text = "An error occured during the signature process." end } set_modal(true) show_all end |