Check-in [c02e9a3ec0]
Overview
Comment: | Add spacing for config dialog options (indented per plugin). Narrower labels, icons now show up. Undo newline-removal for Gtk3 tooltips (work with preformatted text instead). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
c02e9a3ec035ff2fb0a63f328becfee3 |
User & Date: | mario on 2015-04-24 21:54:58 |
Other Links: | manifest | tags |
Context
2015-04-24
| ||
22:55 | More examples for recording/streamripper configuration. check-in: e8560b51b5 user: mario tags: trunk | |
21:54 | Add spacing for config dialog options (indented per plugin). Narrower labels, icons now show up. Undo newline-removal for Gtk3 tooltips (work with preformatted text instead). check-in: c02e9a3ec0 user: mario tags: trunk | |
21:53 | Fallback for Gtk3 using set_text() now. Fix "href" vs "raw" format probing. check-in: 9f0bce8535 user: mario tags: trunk | |
Changes
Modified channels/configwin.py from [905b0713ca] to [55e5421a33].
︙ | ︙ | |||
135 136 137 138 139 140 141 | + "<span weight='bold' foreground='#777777'>%s</span>\n"\ + "<span size='smaller' stretch='ultraexpanded'>%s</span>" def add_plg(self, name, meta, add_): # add plugin load entry cb = gtk.CheckButton(name) cb.set_sensitive(not meta.get("priority") in ("core", "required", "builtin")) cb.get_children()[0].set_markup(self.plugin_text % (meta.get("title", name), meta.get("type", "plugin"), meta.get("category", "addon"), meta.get("version", "./."), meta.get("description", "no description"))) | > > > | | | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | + "<span weight='bold' foreground='#777777'>%s</span>\n"\ + "<span size='smaller' stretch='ultraexpanded'>%s</span>" def add_plg(self, name, meta, add_): # add plugin load entry cb = gtk.CheckButton(name) cb.set_sensitive(not meta.get("priority") in ("core", "required", "builtin")) cb.get_children()[0].set_markup(self.plugin_text % (meta.get("title", name), meta.get("type", "plugin"), meta.get("category", "addon"), meta.get("version", "./."), meta.get("description", "no description"))) doc = meta.get("doc", "").strip() if ver < 3: doc = re.sub("(?<=\S) *\n(?! *\n)", " ", doc) cb.set_tooltip_text(doc) add_( "config_plugins_"+name, cb, color=meta.get("color"), image=meta.get("png"), align=0) # default values are already in conf[] dict (now done in conf.add_plugin_defaults) for opt in meta["config"]: color = opt.get("color", None) # display checkbox if opt["type"] == "boolean": cb = gtk.CheckButton(opt["description"]) |
︙ | ︙ | |||
158 159 160 161 162 163 164 | add_( "config_"+opt["name"], gtk.Entry(), opt["description"], color ) # spacer add_( "filler_pl_"+name, gtk.HSeparator() ) # Wrap entries/checkboxes with extra label, background, images, etc. | | > > > > > | | | | | 161 162 163 164 165 166 167 168 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 | add_( "config_"+opt["name"], gtk.Entry(), opt["description"], color ) # spacer add_( "filler_pl_"+name, gtk.HSeparator() ) # Wrap entries/checkboxes with extra label, background, images, etc. def wrap_entry(self, id, w, label, color, image, align=1): if id: self.widgets[id] = w if label: if type(w) is gtk.Entry: w.set_width_chars(11) w = uikit.hbox(w, uikit.label(label)) if image: pix = gtk.image_new_from_pixbuf(uikit.pixbuf(image)) if pix: w = uikit.hbox(w, pix, exr=False) if color: w = uikit.bg(w, color) if align: a = gtk.Alignment() a.set_padding(0, 0, align, 0) a.add(w) w = a return w # Put config widgets into channels/features configwin notebooks def add_channels(self, id=None, w=None, label=None, color=None, image=None, align=20): self.plugin_options.pack_start(self.wrap_entry(id, w, label, color, image, align)) # Separate tab for non-channel plugins def add_features(self, id=None, w=None, label=None, color=None, image=None, align=20): self.feature_options.pack_start(self.wrap_entry(id, w, label, color, image, align)) # save config def save(self, widget): self.save_config(conf.__dict__, "config_") self.save_config(conf.plugins, "config_plugins_") [callback() for callback in self.hooks["config_save"]] conf.save(nice=1) self.hide() |
Modified channels/streamedit.py from [eaca2a9f8d] to [24f4e6c91a].
︙ | ︙ | |||
20 21 22 23 24 25 26 | # aux win: stream data editing dialog class streamedit (AuxiliaryWindow): # show stream data editing dialog def open(self, mw): self.main.configwin.load_config(self.main.row(), "streamedit_") | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | # aux win: stream data editing dialog class streamedit (AuxiliaryWindow): # show stream data editing dialog def open(self, mw): self.main.configwin.load_config(self.main.row(), "streamedit_") self.win_streamedit.show_all() # copy widget contents to stream def save(self, w): self.main.configwin.save_config(self.main.row(), "streamedit_") self.main.channel().save() self.cancel(w) |
︙ | ︙ |
Modified gtk3.xml.gz from [6d8c078f9d] to [075cbcb73a].
cannot compute difference between binary files
Modified uikit.py from [36c3fef689] to [0b23e6b513].
︙ | ︙ | |||
459 460 461 462 463 464 465 | w.modify_bg(gtk.STATE_NORMAL, c) # return modified or wrapped widget return w # Create GtkLabel @staticmethod | | | | 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | w.modify_bg(gtk.STATE_NORMAL, c) # return modified or wrapped widget return w # Create GtkLabel @staticmethod def label(text, size=305, markup=0): label = gtk.Label(text) if markup: label.set_markup(text) #######label.set_property("visible", True) label.set_line_wrap(True) label.set_size_request(size, -1) return label # Wrap two widgets in horizontal box @staticmethod def hbox(w1, w2, exr=True): b = gtk.HBox(homogeneous=False, spacing=5) ######b.set_property("visible", True) b.pack_start(w1, expand=not exr, fill=not exr) b.pack_start(w2, expand=exr, fill=exr) return b # Attach textual menu entry and callback |
︙ | ︙ |