本文整理汇总了Python中foobnix.regui.model.signal.FControl类的典型用法代码示例。如果您正苦于以下问题:Python FControl类的具体用法?Python FControl怎么用?Python FControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, controls):
FControl.__init__(self, controls)
self.controls = controls
bbox = gtk.VBox(False, 0)
bbox.pack_start(controls.notetabs, True, True)
bbox.pack_start(controls.movie_window, False, False)
center_box = gtk.VBox(False, 0)
center_box.pack_start(controls.searchPanel, False, False)
center_box.pack_start(bbox, True, True)
self.hpaned_left = gtk.HPaned()
self.hpaned_left.connect("motion-notify-event", self.on_save_and_normilize_columns)
self.hpaned_left.pack1(child=controls.perspective, resize=True, shrink=True)
self.hpaned_left.pack2(child=center_box, resize=True, shrink=True)
self.hpaned_right = gtk.HPaned()
self.hpaned_right.connect("motion-notify-event", self.on_save_and_normilize_columns)
self.hpaned_right.pack1(child=self.hpaned_left, resize=True, shrink=True)
self.hpaned_right.pack2(child=controls.coverlyrics, shrink=False)
vbox = gtk.VBox(False, 0)
vbox.pack_start(controls.top_panel, False, False)
vbox.pack_start(self.hpaned_right, True, True)
vbox.pack_start(controls.statusbar, False, True)
vbox.show_all()
#controls.main_window.connect("configure-event", self.on_change_window_size) #if pull sides of window
controls.main_window.connect("size-allocate", self.on_allocate_window_size) #if maximize and restore window
controls.main_window.add(vbox)
示例2: __init__
def __init__(self, controls):
FControl.__init__(self, controls)
gtk.VBox.__init__(self, False, 0)
self.perspectivs = {
LEFT_PERSPECTIVE_NAVIGATION:controls.tabhelper,
LEFT_PERSPECTIVE_RADIO:controls.radio.scroll,
LEFT_PERSPECTIVE_VIRTUAL:controls.virtual.scroll,
LEFT_PERSPECTIVE_INFO:controls.info_panel,
LEFT_PERSPECTIVE_LASTFM:controls.lastfm_integration.scroll,
LEFT_PERSPECTIVE_VK:controls.vk_integration.scroll
}
self.buttons = PerspectiveButtonControlls(self.activate_perspective, controls)
self.buttons.show_all()
self.add_button = ButtonStockText(_("Add Folder(s) in tree"), gtk.STOCK_ADD)
self.add_button.connect("clicked", lambda * a :controls.tree.add_folder())
self.pack_start(self.add_button, False, False)
for widget in self.perspectivs.values():
self.pack_start(widget, True, True)
self.pack_start(controls.filter, False, False)
self.pack_start(self.buttons, False, False)
示例3: __init__
def __init__(self, controls, collback):
self.collback = collback
FControl.__init__(self, controls)
ChildTopWindow.__init__(self, _("Equalizer"))
self.eq_lines = []
for label in EQUALIZER_LABLES:
self.eq_lines.append(EqLine(label, self.on_collback))
lbox = gtk.VBox(False, 0)
lbox.show()
self.combo = gtk.combo_box_entry_new_text()
self.combo.connect("changed", self.on_combo_chage)
lbox.pack_start(self.top_row(), False, False, 0)
lbox.pack_start(self.middle_lines_box(), False, False, 0)
self.add(lbox)
self.models = []
self.default_models = []
示例4: __init__
def __init__(self, controls):
FControl.__init__(self, controls)
vbox = gtk.VBox(False, 0)
vbox.pack_start(controls.top_panel, False, False)
center_box = gtk.VBox(False, 0)
# self.hpaned_right = gtk.HPaned()
bbox = gtk.VBox(False, 0)
bbox.pack_start(controls.notetabs, True, True)
bbox.pack_start(controls.movie_window, False, False)
# self.hpaned_right.pack1(child=bbox, resize=True, shrink=True)
# self.hpaned_right.pack2(child=controls.info_panel, resize=True, shrink=True)
center_box.pack_start(controls.searchPanel, False, False)
center_box.pack_start(bbox, True, True)
self.hpaned_left = gtk.HPaned()
self.hpaned_left.pack1(child=controls.perspective, resize=True, shrink=True)
self.hpaned_left.pack2(child=center_box, resize=True, shrink=True)
self.hpaned_left.show_all()
vbox.pack_start(self.hpaned_left, True, True)
vbox.pack_start(controls.statusbar, False, True)
vbox.show_all()
controls.main_window.add(vbox)
示例5: __init__
def __init__(self, controls):
gtk.HBox.__init__(self, False, 0)
FControl.__init__(self, controls)
self.entry = gtk.Entry()
self.entry.connect("key-release-event", self.on_key_press)
self.search_func = self.controls.filter_by_file
file_search = ToggleImageButton(gtk.STOCK_FILE, func=self.set_search_by, param=self.controls.filter_by_file)
file_search.set_tooltip_text(_("File search"))
file_search.set_active(True)
folder_search = ToggleImageButton(gtk.STOCK_DIRECTORY, func=self.set_search_by, param=self.controls.filter_by_folder)
folder_search.set_tooltip_text(_("Folder search"))
self.list = [file_search, folder_search]
OneActiveToggledButton(self.list)
"""search button"""
search = tab_close_button(func=self.on_filter, stock=gtk.STOCK_FIND)
self.pack_start(file_search, False, False)
self.pack_start(folder_search, False, False)
self.pack_start(self.entry, True, True)
self.pack_start(search, False, False)
示例6: __init__
def __init__(self, controls):
FControl.__init__(self, controls)
bbox = gtk.VBox(False, 0)
bbox.pack_start(controls.notetabs, True, True)
bbox.pack_start(controls.movie_window, False, False)
center_box = gtk.VBox(False, 0)
center_box.pack_start(controls.searchPanel, False, False)
center_box.pack_start(bbox, True, True)
self.hpaned_left = gtk.HPaned()
self.hpaned_left.connect("motion-notify-event", self.on_save_and_normilize_columns)
self.hpaned_left.pack1(child=controls.perspective, resize=True, shrink=True)
self.hpaned_left.pack2(child=center_box, resize=True, shrink=True)
self.hpaned_right = gtk.HPaned()
self.hpaned_right.connect("motion-notify-event", self.on_save_and_normilize_columns)
self.hpaned_right.pack1(child=self.hpaned_left, resize=True, shrink=True)
self.hpaned_right.pack2(child=controls.coverlyrics, resize=True, shrink=True)
vbox = gtk.VBox(False, 0)
vbox.pack_start(controls.top_panel, False, False)
vbox.pack_start(self.hpaned_right, True, True)
vbox.pack_start(controls.statusbar, False, True)
vbox.show_all()
controls.main_window.add(vbox)
示例7: __init__
def __init__(self, controls):
FControl.__init__(self, controls)
gtk.HBox.__init__(self, False, 0)
self.old_menu = MenuBarWidget(controls)
self.pack_start(self.old_menu.widget, False, False)
self.new_menu_button = ImageButton(gtk.STOCK_PREFERENCES)
self.new_menu_button.connect("button-press-event", self.on_button_press)
self.pack_start(self.new_menu_button, False, False)
self.pack_start(controls.playback, False, False)
self.pack_start(controls.os, False, False)
self.pack_start(controls.volume, False, False)
self.pack_start(gtk.SeparatorToolItem(), False, False)
self.pack_start(controls.seek_bar, True, True)
self.show_all()
"""menu init"""
menu = Popup()
decorator = MenuStyleDecorator()
MenuBarWidget(self.controls, menu)
menu.add_separator()
menu.add_item(_("Preferences"), gtk.STOCK_PREFERENCES, self.controls.show_preferences)
menu.add_separator()
menu.add_item(_("Quit"), gtk.STOCK_QUIT, self.controls.quit)
decorator.apply(menu)
self.menu = menu
示例8: __init__
def __init__(self, controls):
gtk.VBox.__init__(self, False, 0)
FControl.__init__(self, controls)
self.controls = controls
label = gtk.Label()
label.set_markup("<b>%s:</b>" % _("Search music online"))
#self.set_label_widget(label)
#self.set_border_width(0)
"""default search function"""
self.search_function = self.controls.search_top_tracks
self.buttons = []
self.pack_start(self.search_line(), False, False, 0)
#self.pack_start(controls.search_progress, False, False, 0)
self.show_all()
"""search on enter"""
for button in self.buttons:
button.connect("key-press-event", self.on_search_key_press)
"""only one button active"""
OneActiveToggledButton(self.buttons)
示例9: __init__
def __init__(self, controls, seek_bar_movie=None):
FControl.__init__(self, controls)
self.seek_bar_movie =seek_bar_movie
gtk.Alignment.__init__(self, xalign=0.5, yalign=0.5, xscale=1.0, yscale=1.0)
self.set_padding(padding_top=7, padding_bottom=7, padding_left=0, padding_right=7)
self.tooltip = gtk.Window(gtk.WINDOW_POPUP)
self.tooltip.set_position(gtk.WIN_POS_CENTER)
self.tooltip_label = gtk.Label()
self.tooltip.add(self.tooltip_label)
self.progresbar = gtk.ProgressBar()
self.progresbar.set_text("00:00 / 00:00")
try:
self.progresbar.set_has_tooltip(True)
except:
pass
self.progresbar.connect("leave-notify-event", lambda *a: self.tooltip.hide())
self.progresbar.connect("motion-notify-event", self.on_pointer_motion)
event = gtk.EventBox()
event.add(self.progresbar)
event.connect("button-press-event", self.on_seek)
self.add(event)
self.show_all()
self.tooltip.hide()
示例10: __init__
def __init__(self, controls):
FControl.__init__(self, controls)
MyToolbar.__init__(self)
self.add_separator()
self.add_button("Stop", gtk.STOCK_MEDIA_STOP, controls.state_stop, None)
self.add_button("Play", gtk.STOCK_MEDIA_PLAY, controls.state_play, None)
self.add_button("Pause", gtk.STOCK_MEDIA_PAUSE, controls.state_pause, None)
self.add_button("Previous", gtk.STOCK_MEDIA_PREVIOUS, controls.prev, None)
self.add_button("Next", gtk.STOCK_MEDIA_NEXT, controls.next, None)
self.add_separator()
示例11: __init__
def __init__(self, controls):
FControl.__init__(self, controls)
box = gtk.VBox(False, 0)
box.hide()
box.pack_start(self.tabs_mode(), False, True, 0)
box.pack_start(self.dirs(), False, True, 0)
box.pack_start(self.formats(), False, True, 0)
box.pack_start(self.gap(), False, True, 0)
self.widget = box
示例12: __init__
def __init__(self, controls):
FControl.__init__(self, controls)
gtk.ProgressBar.__init__(self)
self.set_size_request(20, -1)
# self.hide()
self.set_pulse_step(0.2)
self.set_fraction(0)
self.flag = True
self.started = False
self.set_text("...")
示例13: __init__
def __init__(self, controls):
FControl.__init__(self, controls)
gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
self.set_title("Foobnix " + FOOBNIX_VERSION)
self.set_position(gtk.WIN_POS_CENTER)
self.set_resizable(True)
self.connect("delete-event", self.hide_window)
self.connect("configure-event", self.on_configure_event)
self.connect("key-press-event", self.on_key_press)
self.set_icon(self.controls.trayicon.get_pixbuf())
self.set_opacity(FC().window_opacity)
示例14: __init__
def __init__(self, controls):
gtk.Notebook.__init__(self)
FControl.__init__(self, controls)
self.controls = controls
self.set_properties("tab-expand", True)
self.set_scrollable(True)
self.save_lock = threading.Lock()
self.connect("page-reordered", self.reorder_callback)
add_button = ImageButton(gtk.STOCK_ADD, func=self.on_add_button_click, size=gtk.ICON_SIZE_BUTTON)
add_button.show()
self.set_action_widget(add_button, gtk.PACK_START)
self.default_angle = 0
self.navig = False if isinstance(self, NoteTabControl) else True
示例15: __init__
def __init__(self, controls, object_path=MPRIS_ROOT_PATH):
FControl.__init__(self, controls)
try:
bus = dbus.SessionBus()
bus_name = dbus.service.BusName(DBUS_NAME, bus=bus)
dbus.service.Object.__init__(self, bus_name, object_path)
self._player = MprisPlayer(controls)
#dbus_interface =
dbus_interface = 'org.gnome.SettingsDaemon.MediaKeys'
mm_object = bus.get_object('org.gnome.SettingsDaemon', '/org/gnome/SettingsDaemon/MediaKeys')
mm_object.GrabMediaPlayerKeys("MyMultimediaThingy", 0, dbus_interface=dbus_interface)
mm_object.connect_to_signal('MediaPlayerKeyPressed', self.on_mediakey)
except Exception, e:
logging.error("DBUS Initialization Error" + str(e))