Check-in [c3c0ce1553]
Overview
Comment: | Set default win_config size (for Gtk3) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
c3c0ce155379f0d846751766a18d993d |
User & Date: | mario on 2014-05-28 15:53:29 |
Other Links: | manifest | tags |
Context
2014-05-28
| ||
15:54 | Updates for 2.1.1 release check-in: e091ecf510 user: mario tags: trunk | |
15:53 | Set default win_config size (for Gtk3) check-in: c3c0ce1553 user: mario tags: trunk | |
15:52 | Fix regex URL extraction. check-in: 21aac94806 user: mario tags: trunk | |
Changes
Modified st2.py from [b5a74c8063] to [9bfb28d3f0].
︙ | ︙ | |||
180 181 182 183 184 185 186 | # menu "menu_toolbar_standard": lambda w: (self.toolbar.unset_style(), self.toolbar.unset_icon_size()), "menu_toolbar_style_icons": lambda w: (self.toolbar.set_style(gtk.TOOLBAR_ICONS)), "menu_toolbar_style_both": lambda w: (self.toolbar.set_style(gtk.TOOLBAR_BOTH)), "menu_toolbar_size_small": lambda w: (self.toolbar.set_icon_size(gtk.ICON_SIZE_SMALL_TOOLBAR)), "menu_toolbar_size_medium": lambda w: (self.toolbar.set_icon_size(gtk.ICON_SIZE_DND)), "menu_toolbar_size_large": lambda w: (self.toolbar.set_icon_size(gtk.ICON_SIZE_DIALOG)), | | > > > | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | # menu "menu_toolbar_standard": lambda w: (self.toolbar.unset_style(), self.toolbar.unset_icon_size()), "menu_toolbar_style_icons": lambda w: (self.toolbar.set_style(gtk.TOOLBAR_ICONS)), "menu_toolbar_style_both": lambda w: (self.toolbar.set_style(gtk.TOOLBAR_BOTH)), "menu_toolbar_size_small": lambda w: (self.toolbar.set_icon_size(gtk.ICON_SIZE_SMALL_TOOLBAR)), "menu_toolbar_size_medium": lambda w: (self.toolbar.set_icon_size(gtk.ICON_SIZE_DND)), "menu_toolbar_size_large": lambda w: (self.toolbar.set_icon_size(gtk.ICON_SIZE_DIALOG)), # win_config "menu_properties": config_dialog.open, "config_cancel": config_dialog.hide, "config_save": config_dialog.save, "config_play_list_edit_col0": lambda w,path,txt: (config_dialog.list_edit(self.config_play, path, 0, txt)), "config_play_list_edit_col1": lambda w,path,txt: (config_dialog.list_edit(self.config_play, path, 1, txt)), "config_record_list_edit_col0": lambda w,path,txt: (config_dialog.list_edit(self.config_record, path, 0, txt)), "config_record_list_edit_col1": lambda w,path,txt: (config_dialog.list_edit(self.config_record, path, 1, txt)), # else "update_categories": self.update_categories, "update_favicons": self.update_favicons, "app_state": self.app_state, "bookmark": self.bookmark, "save_as": self.save_as, "menu_about": lambda w: AboutStreamtuner2(), "menu_help": action.action.help, "menu_onlineforum": lambda w: action.browser("http://sourceforge.net/projects/streamtuner2/forums/forum/1173108"), "menu_fossilwiki": lambda w: action.browser("http://fossil.include-once.org/streamtuner2/"), "menu_projhomepage": lambda w: action.browser("http://milki.include-once.org/streamtuner2/"), # "menu_bugreport": lambda w: BugReport(), "menu_copy": self.menu_copy, "delete_entry": self.delete_entry, # search dialog "quicksearch_set": search.quicksearch_set, "search_open": search.menu_search, "search_go": search.start, "search_srv": search.start, "search_google": search.google, "search_cancel": search.cancel, "true": lambda w,*args: True, # win_streamedit "streamedit_open": streamedit.open, "streamedit_save": streamedit.save, "streamedit_new": streamedit.new, "streamedit_cancel": streamedit.cancel, }.items() ) + list( self.add_signals.items() ) )) # actually display main window |
︙ | ︙ | |||
472 473 474 475 476 477 478 | except Exception as e: __print__(dbg.INIT, "load_plugin_channels: error initializing:", module, ", exception:") import traceback traceback.print_exc() # default plugins conf.add_plugin_defaults(self.channels["bookmarks"].config, "bookmarks") | < | 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | except Exception as e: __print__(dbg.INIT, "load_plugin_channels: error initializing:", module, ", exception:") import traceback traceback.print_exc() # default plugins conf.add_plugin_defaults(self.channels["bookmarks"].config, "bookmarks") # store window/widget states (sizes, selections, etc.) def app_state(self, widget): # gtk widget states widgetnames = ["win_streamtuner2", "toolbar", "notebook_channels", ] \ + [id+"_list" for id in self.channel_names] + [id+"_cat" for id in self.channel_names] |
︙ | ︙ | |||
581 582 583 584 585 586 587 | self.search_dialog.show(); # hide dialog box again def cancel(self, *args): self.search_dialog.hide() return True # stop any other gtk handlers | < | 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | self.search_dialog.show(); # hide dialog box again def cancel(self, *args): self.search_dialog.hide() return True # stop any other gtk handlers # perform search def start(self, *w): self.cancel() # prepare variables |
︙ | ︙ | |||
738 739 740 741 742 743 744 745 746 747 748 749 750 751 | # Display win_config, pre-fill text fields from global conf. object def open(self, widget): if self.first_open: self.add_plugins() self.combobox_theme() self.first_open = 0 self.load_config(conf.__dict__, "config_") self.load_config(conf.plugins, "config_plugins_") self.win_config.show() first_open = 1 # Hide window def hide(self, *args): | > | 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 | # Display win_config, pre-fill text fields from global conf. object def open(self, widget): if self.first_open: self.add_plugins() self.combobox_theme() self.first_open = 0 self.win_config.resize(565, 625) self.load_config(conf.__dict__, "config_") self.load_config(conf.plugins, "config_plugins_") self.win_config.show() first_open = 1 # Hide window def hide(self, *args): |
︙ | ︙ | |||
1140 1141 1142 1143 1144 1145 1146 | #-- run main --------------------------------------------- if __name__ == "__main__": | < < | 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 | #-- run main --------------------------------------------- if __name__ == "__main__": # graphical if len(sys.argv) < 2 or "--gtk3" in sys.argv: # prepare for threading in Gtk+ callbacks gobject.threads_init() |
︙ | ︙ |