# File gnomeprintui/sample/dialog.rb, line 26
  def dialog
    args = [
      @job,
      "preview",
      Gnome::PrintDialog::RANGE | Gnome::PrintDialog::COPIES
    ]
    dialog = Gnome::PrintDialog.new(*args)
    args = [
      Gnome::PrintDialog::RANGE_CURRENT |
        Gnome::PrintDialog::RANGE_ALL |
        Gnome::PrintDialog::RANGE_RANGE |
        Gnome::PrintDialog::RANGE_SELECTION,
      1,
      @context.pages,
      "Current",
      "Range",
    ]
    dialog.construct_range_page(*args)
    response = dialog.run
    dialog.hide_all
    case response
    when Gnome::PrintDialog::RESPONSE_PRINT
      print(dialog)
    when Gnome::PrintDialog::RESPONSE_PREVIEW
      preview(dialog)
    when Gnome::PrintDialog::RESPONSE_CANCEL
      puts "canceled"
    else
      puts "???"
    end
    dialog.destroy
  end