'Initializes the simple preferences dialog. If force is set to
True, user will NOT be able to cancel the dialog and app_exit_callback
must NOT be None'

def __init__(self, reload_ws_callback, connect_to_couch, parent):

    Gtk.Dialog.__init__(self, title='Preferences')
    self.parent = parent
    self.set_modal(True)
    self.set_size_request(400, 100)
    self.set_type_hint(Gdk.WindowTypeHint.DIALOG)
    self.set_transient_for(parent)
    self.reloadWorkspaces = reload_ws_callback
    self.connectCouchCallback = connect_to_couch
    main_box = self.get_content_area()
    ip_label = Gtk.Label()
    ip_label.set_text('Faraday    Server    IP    or    URL')
    main_box.pack_start(ip_label, True, False, 10)
    couch_uri = CONF.getCouchURI()
    self.ip_entry = Gtk.Entry()
    text = (couch_uri if couch_uri else 'http://127.0.0.1:5050')
    self.ip_entry.set_text(text)
    main_box.pack_start(self.ip_entry, True, False, 10)
    button_box = Gtk.Box(spacing=6)
    main_box.pack_end(button_box, False, True, 10)
    OK_button = Gtk.Button.new_with_label('OK')
    OK_button.connect('clicked', self.on_click_ok)
    button_box.pack_start(OK_button, False, True, 10)
    cancel_button = Gtk.Button.new_with_label('Cancel')
    self.connect('key_press_event', key_reactions)
    cancel_button.connect('clicked', self.on_click_cancel)
    button_box.pack_end(cancel_button, False, True, 10)
    self.show_all()
