def __init__(self, applet):
        self.applet = applet
        self.dialog = Gtk.Dialog("Workspace Name Applet Preferences",
                                 None,
                                 Gtk.DialogFlags.DESTROY_WITH_PARENT,
                                 (Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE))
        self.dialog.set_border_width(10)
        width_spin_label = Gtk.Label(label=_("Applet width in pixels:"))
        width_adj = Gtk.Adjustment(lower=30, upper=500, step_incr=1)
        self.width_spin_button = Gtk.SpinButton.new(width_adj, 0.0, 0)
        self.applet.settings.bind("width", self.width_spin_button, "value", Gio.SettingsBindFlags.DEFAULT)
        width_spin_hbox = Gtk.HBox()
        width_spin_hbox.pack_start(width_spin_label, True, True, 0)
        width_spin_hbox.pack_start(self.width_spin_button, True, True, 0)
        self.dialog.vbox.add(width_spin_hbox)