def run(self): font = self.get_setting("font", "Sans 14") self.font_button.set_font_name(font) color = gtk.gdk.color_parse(self.get_setting("color", "#FFFFFF")) self.color_button.set_color(color) self.cf_entry.set_text( self.get_setting("custom_format", DEFAULT_CUSTOM_FORMAT)) td = self.get_setting("text_direction", "default") tds = ["default", "left-right", "top-down", "bottom-up"] self.td_cbt.set_active(tds.index(td)) cf = self.get_setting("use_custom_format", False) self.custom_clock_cb.set_active(cf) self.font_button.set_sensitive(not cf) self.color_button.set_sensitive(not cf) self.date_cb.set_sensitive(not cf) self.cf_entry.set_sensitive(cf) self.cf_button.set_sensitive(cf) return DockXAppletDialog.run(self)
def run(self): font = self.get_setting("font", "Sans 14") self.font_button.set_font_name(font) color = gtk.gdk.color_parse(self.get_setting("color", "#FFFFFF")) self.color_button.set_color(color) self.cf_entry.set_text(self.get_setting("custom_format", DEFAULT_CUSTOM_FORMAT)) td = self.get_setting("text_direction", "default") tds = ["default", "left-right", "top-down", "bottom-up"] self.td_cbt.set_active(tds.index(td)) cf = self.get_setting("use_custom_format", False) self.custom_clock_cb.set_active(cf) self.font_button.set_sensitive(not cf) self.color_button.set_sensitive(not cf) self.date_cb.set_sensitive(not cf) self.cf_entry.set_sensitive(cf) self.cf_button.set_sensitive(cf) return DockXAppletDialog.run(self)
def run(self): self.scroll_enabled_btn.set_active(self.get_setting("scroll_enabled", CFG_SCROLL_ENABLED)) col_raw = self.get_setting("color", CFG_COLOR) col = map(float, col_raw.split(',')) self.color_btn.set_color(gtk.gdk.Color(int(col[0] * 65535), int(col[1] * 65535), int(col[2] * 65535))) self.color_btn.set_alpha(int(col[3] * 65535)) acol_raw = self.get_setting("active_color", CFG_ACTIVE_COLOR) acol = map(float, acol_raw.split(',')) self.active_color_btn.set_color(gtk.gdk.Color(int(acol[0] * 65535), int(acol[1] * 65535), int(acol[2] * 65535))) self.active_color_btn.set_alpha(int(acol[3] * 65535)) self.padding_input.set_value(self.get_setting("padding", CFG_PADDING)) self.cell_spacing_input.set_value(self.get_setting("cell_spacing", CFG_CELL_SPACING)) self.aspect_ratio_input.set_value(self.get_setting("aspect_ratio", CFG_ASPECT_RATIO)) self.desk_name_pattern_input.set_text(self.get_setting("desk_name_pattern", CFG_DESK_NAME_PATTERN)) return DockXAppletDialog.run(self)