bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7l-softfloat-linux-gnueabi" self.settings["CFLAGS"]="-Os -march=armv7 -pipe" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7l-softfloat-linux-gnueabi" self.settings["CFLAGS"]="-Os -march=armv7 -pipe" | 458,800 |
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7al-softfloat-linux-gnueabi" self.settings["CFLAGS"]="-Os -march=armv7-a -pipe" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7al-softfloat-linux-gnueabi" self.settings["CFLAGS"]="-Os -march=armv7-a -pipe" | 458,801 |
def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | 458,802 |
def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | 458,803 |
def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | 458,804 |
def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | 458,805 |
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv6j-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv6j -mfpu=vfp -mfloat-abi=softfp" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv6j-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv6j -mfpu=vfp -mfloat-abi=softfp" | 458,806 |
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7a-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfp -mfloat-abi=softfp" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7a-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfp -mfloat-abi=softfp" | 458,807 |
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7a-hardfloat-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfp -mfloat-abi=hard" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7a-hardfloat-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfp -mfloat-abi=hard" | 458,808 |
def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | 458,809 |
def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | def __init__(self,myspec): generic_armeb.__init__(self,myspec) self.settings["CFLAGS"]+=" -mcpu=xscale" self.settings["CHOST"]="armv5teb-softfloat-linux-gnueabi" | 458,810 |
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7rl-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-r -mfpu=vfp -mfloat-abi=softfp" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7r-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-r -mfpu=vfp -mfloat-abi=softfp" | 458,811 |
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7rl-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-r -mfpu=vfp -mfloat-abi=softfp" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7r-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-r -mfpu=vfp -mfloat-abi=softfp" | 458,812 |
def rsync(src, dest, delete=False, extra_opts=""): retval = catalyst.spawn.spawn_bash("rsync -a --delete %s %s %s" % (extra_opts, src, dest)) if retval != 0: raise CatalystError("Could not rsync '%s' to '%s'" % (src, dest)) | def rsync(src, dest, delete=False, extra_opts=""): delete_opts = "" if delete: delete_opts = "--delete" retval = catalyst.spawn.spawn_bash("rsync -a %s %s %s %s" % (delete_opts, extra_opts, src, dest)) if retval != 0: raise CatalystError("Could not rsync '%s' to '%s'" % (src, dest)) | 458,813 |
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv6j-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv6j -mfpu=vfp -mfloat-abi=softfp" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv6j-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv6j -mfpu=vfp -mfloat-abi=softfp" | 458,814 |
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7a-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfp -mfloat-abi=softfp" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7a-unknown-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfp -mfloat-abi=softfp" | 458,815 |
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7a-hardfloat-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfp -mfloat-abi=hardfp" | def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7a-hardfloat-linux-gnueabi" self.settings["CFLAGS"]+=" -march=armv7-a -mfpu=vfp -mfloat-abi=hardfp" | 458,816 |
def register(): "Inform main catalyst program of the contents of this plugin." return ({ "arm" : arch_arm, "armv4l" : arch_armv4l, "armv4tl": arch_armv4tl, "armv5tl": arch_armv5tl, "armv5tel": arch_armv5tel, "armv5tejl": arch_armv5tejl, "armv6j" : arch_armv6j, "armv6t2" : arch_armv6t2, "armv6z" : arch_armv6z, "armv6... | def register(): "Inform main catalyst program of the contents of this plugin." return ({ "arm" : arch_arm, "armv4l" : arch_armv4l, "armv4tl": arch_armv4tl, "armv5tl": arch_armv5tl, "armv5tel": arch_armv5tel, "armv5tejl": arch_armv5tejl, "armv6j" : arch_armv6j, "armv6z" : arch_armv6z, "armv6zk" : arch_armv6zk, "armv7... | 458,817 |
def register(): "Inform main catalyst program of the contents of this plugin." return ({ "arm" : arch_arm, "armv4l" : arch_armv4l, "armv4tl": arch_armv4tl, "armv5tl": arch_armv5tl, "armv5tel": arch_armv5tel, "armv5tejl": arch_armv5tejl, "armv6j" : arch_armv6j, "armv6t2" : arch_armv6t2, "armv6z" : arch_armv6z, "armv6... | def register(): "Inform main catalyst program of the contents of this plugin." return ({ "arm" : arch_arm, "armv4l" : arch_armv4l, "armv4tl": arch_armv4tl, "armv5tl": arch_armv5tl, "armv5tel": arch_armv5tel, "armv5tejl": arch_armv5tejl, "armv6j" : arch_armv6j, "armv6t2" : arch_armv6t2, "armv6z" : arch_armv6z, "armv6... | 458,818 |
def __stop_ignore(self, *args): self.__ignore = False self.disconnect(self.__sig) | def __stop_ignore(self, *args): self.__ignore = False self.disconnect(self.__sig) | 458,819 |
def set_song(self, activator, song): if not self.child: return if song: cover = song.find_cover() self.__albumfn = cover and cover.name self.child.set_path(self.__albumfn) else: self.child.set_path(None) self.__song = song | def set_song(self, activator, song): if not self.child: return if song: self.__file = song.find_cover() self.child.set_path(self.__file and self.__file.name) else: self.child.set_path(None) self.__song = song | 458,820 |
def __nonzero__(self): return bool(self.__albumfn) | def __nonzero__(self): return bool(self.__albumfn) | 458,821 |
def do_setup(rev): PYVER='2.6' deps = [ (PythonDep('Python', PYVER), MSIInst('Python')), (OnePageDep('setuptools', None, 'http://pypi.python.org/pypi/setuptools', '[^"]*setuptools[^"]*tar.gz[^"#]*'), SetuptoolsInst()), (SFDep('gnuwin32', None, 'unrar-[1234567890.]*-bin.zip'), ZipInst('Python')), (SFDep('innounp', None,... | def do_setup(rev): PYVER='2.6' deps = [ (PythonDep('Python', PYVER), MSIInst('Python')), (OnePageDep('setuptools', None, 'http://pypi.python.org/pypi/setuptools', '[^"]*setuptools[^"]*tar.gz[^"#]*'), SetuptoolsInst()), (SFDep('gnuwin32', None, 'unrar-[1234567890.]*-bin.zip'), ZipInst('Python')), (SFDep('innounp', None,... | 458,822 |
def celldata(layout, cell, model, iter): release = model[iter][0] if not release: return date = release.getEarliestReleaseDate() if date: date = '%s, ' % date else: date = '' markup = "<b>%s</b>\n%s - %s%s tracks" % ( util.escape(release.title), util.escape(release.artist.name), date, release.tracksCount) cell.set_prop... | def celldata(layout, cell, model, iter): release = model[iter][0] if not release: return date = release.getEarliestReleaseDate() if date: date = '%s, ' % date else: date = '' markup = "<b>%s</b>\n%s - %s%s tracks" % ( util.escape(release.title), util.escape(release.artist.name), date, release.tracksCount) cell.set_prop... | 458,823 |
def __init__(self): self.model = gtk.ListStore(object, str) super(ReleaseEventComboBox, self).__init__(self.model) render = gtk.CellRendererText() self.pack_start(render) self.set_attributes(render, markup=1) self.set_sensitive(False) | def __init__(self): self.model = gtk.ListStore(object, str) self.combo = gtk.ComboBox(self.model) render = gtk.CellRendererText() self.pack_start(render) self.set_attributes(render, markup=1) self.set_sensitive(False) | 458,824 |
def __init__(self): self.model = gtk.ListStore(object, str) super(ReleaseEventComboBox, self).__init__(self.model) render = gtk.CellRendererText() self.pack_start(render) self.set_attributes(render, markup=1) self.set_sensitive(False) | def __init__(self): self.model = gtk.ListStore(object, str) super(ReleaseEventComboBox, self).__init__(self.model) render = gtk.CellRendererText() self.pack_start(render) self.set_attributes(render, markup=1) self.set_sensitive(False) | 458,825 |
def update(self, release): self.model.clear() events = release.getReleaseEvents() # The catalog number is the most important of these fields, as it's # the source for the 'labelid' tag, which we'll use until MB NGS is # up and running to deal with multi-disc albums properly. We sort to # find the earliest release with ... | def update(self, release): self.model.clear() events = release.getReleaseEvents() # The catalog number is the most important of these fields, as it's # the source for the 'labelid' tag, which we'll use until MB NGS is # up and running to deal with multi-disc albums properly. We sort to # find the earliest release with ... | 458,826 |
def get_release_event(self): itr = self.get_active_iter() if itr: return self.model[itr][0] else: return None | def get_release_event(self): itr = self.combo.get_active_iter() if itr: return self.model[itr][0] else: return None | 458,827 |
def __save(self, widget=None, response=None): """Writes values to Song objects.""" self._qthread.stop() if response != gtk.RESPONSE_ACCEPT: self.destroy() return | def __save(self, widget=None, response=None): """Writes values to Song objects.""" self._qthread.stop() if response != gtk.RESPONSE_ACCEPT: self.destroy() return | 458,828 |
def __save(self, widget=None, response=None): """Writes values to Song objects.""" self._qthread.stop() if response != gtk.RESPONSE_ACCEPT: self.destroy() return | def __save(self, widget=None, response=None): """Writes values to Song objects.""" self._qthread.stop() if response != gtk.RESPONSE_ACCEPT: self.destroy() return | 458,829 |
def __save(self, widget=None, response=None): """Writes values to Song objects.""" self._qthread.stop() if response != gtk.RESPONSE_ACCEPT: self.destroy() return | def __save(self, widget=None, response=None): """Writes values to Song objects.""" self._qthread.stop() if response != gtk.RESPONSE_ACCEPT: self.destroy() return | 458,830 |
def __init__(self, album, cache): self.album = album | def __init__(self, album, cache): self.album = album | 458,831 |
def parse_url(self, url, post = {}, get = {}, enc = 'utf-8'): """Will read the data and parse it into the data variable. A tag will be ['tagname', {all attributes}, 'data until the next tag'] Only starttags are handled/used.""" | def parse_url(self, url, post = {}, get = {}): """Will read the data and parse it into the data variable. A tag will be ['tagname', {all attributes}, 'data until the next tag'] Only starttags are handled/used.""" | 458,832 |
def parse_url(self, url, post = {}, get = {}, enc = 'utf-8'): """Will read the data and parse it into the data variable. A tag will be ['tagname', {all attributes}, 'data until the next tag'] Only starttags are handled/used.""" | def parse_url(self, url, post = {}, get = {}, enc = 'utf-8'): """Will read the data and parse it into the data variable. A tag will be ['tagname', {all attributes}, 'data until the next tag'] Only starttags are handled/used.""" | 458,833 |
def parse_url(self, url, post = {}, get = {}, enc = 'utf-8'): """Will read the data and parse it into the data variable. A tag will be ['tagname', {all attributes}, 'data until the next tag'] Only starttags are handled/used.""" | def parse_url(self, url, post = {}, get = {}, enc = 'utf-8'): """Will read the data and parse it into the data variable. A tag will be ['tagname', {all attributes}, 'data until the next tag'] Only starttags are handled/used.""" | 458,834 |
def start(self, query, limit=10): """Start the search and return a list of covers""" | def start(self, query, limit=10): """Start the search and return a list of covers""" | 458,835 |
def __parse_search_list(self, offset): """Will parse a specific page of a search""" | def __parse_search_list(self, offset): """Will parse a specific page of a search""" | 458,836 |
def __get_search_page(self, page, query): """Returns the XML dom of a search result page. Starts with 1.""" | def __get_search_page(self, page, query): """Returns the XML dom of a search result page. Starts with 1.""" | 458,837 |
def __parse_release(self, id, name): """Parse the release page and add the cover to the list.""" | def __parse_release(self, id, name): """Parse the release page and add the cover to the list.""" | 458,838 |
def __parse_release(self, id, name): """Parse the release page and add the cover to the list.""" | def __parse_release(self, id, name): """Parse the release page and add the cover to the list.""" | 458,839 |
def __parse_page(self, page, query): """Gets all item tags and calls the item parsing function for each""" | def __parse_page(self, page, query): """Gets all item tags and calls the item parsing function for each""" | 458,840 |
def start(self, query, limit=10): """Start the search and returns the covers""" | def start(self, query, limit=10): """Start the search and returns the covers""" | 458,841 |
def __parse_all_covers(self): """Reads all URLs and adds the covers to the list""" | def __parse_all_covers(self): """Reads all URLs and adds the covers to the list""" | 458,842 |
def __parse_page(self, page, query): """Parses the search result page and saves the data to self.data""" | def __parse_page(self, page, query): """Parses the search result page and saves the data to self.data""" | 458,843 |
def __set_async(self, url): """manages various stuff like fast switching of covers (aborting old HTTP requests), managing the image cache etc.""" | def __set_async(self, url): """manages various stuff like fast switching of covers (aborting old HTTP requests), managing the image cache etc.""" | 458,844 |
def get_size_of_url(url): url_sock = urllib2.urlopen(url) size = url_sock.headers.get('content-length') url_sock.close() if size: size = int(size) / 1024.0 if size < 1024: return '%.2f KB' % size else: return '%.2f MB' % size / 1024 else: return '' | def get_size_of_url(url): request = urllib2.Request(url) request.add_header('Accept-Encoding', 'gzip') request.add_header('User-Agent', USER_AGENT) url_sock = urllib2.urlopen(request) size = url_sock.headers.get('content-length') url_sock.close() if size: size = int(size) / 1024.0 if size < 1024: return '%.2f KB' % s... | 458,845 |
def __save_files(self, save, revert, model, library): updated = {} deleted = {} added = {} renamed = {} for row in model: if row[EDITED] and not (row[DELETED] or row[RENAMED]): if row[ORIGVALUE] is not None: updated.setdefault(row[TAG], []) updated[row[TAG]].append((util.decode(row[VALUE]), util.decode(row[ORIGVALUE]))... | def __save_files(self, save, revert, model, library): updated = {} deleted = {} added = {} renamed = {} for row in model: if row[EDITED] and not (row[DELETED] or row[RENAMED]): if row[ORIGVALUE] is not None: updated.setdefault(row[TAG], []) updated[row[TAG]].append((util.decode(row[VALUE]), util.decode(row[ORIGVALUE]))... | 458,846 |
def __save_files(self, save, revert, model, library): updated = {} deleted = {} added = {} renamed = {} for row in model: if row[EDITED] and not (row[DELETED] or row[RENAMED]): if row[ORIGVALUE] is not None: updated.setdefault(row[TAG], []) updated[row[TAG]].append((util.decode(row[VALUE]), util.decode(row[ORIGVALUE]))... | def __save_files(self, save, revert, model, library): updated = {} deleted = {} added = {} renamed = {} for row in model: if row[EDITED] and not (row[DELETED] or row[RENAMED]): if row[ORIGVALUE] is not None: updated.setdefault(row[TAG], []) updated[row[TAG]].append((util.decode(row[VALUE]), util.decode(row[ORIGVALUE]))... | 458,847 |
def __save_files(self, save, revert, model, library): updated = {} deleted = {} added = {} renamed = {} for row in model: if row[EDITED] and not (row[DELETED] or row[RENAMED]): if row[ORIGVALUE] is not None: updated.setdefault(row[TAG], []) updated[row[TAG]].append((util.decode(row[VALUE]), util.decode(row[ORIGVALUE]))... | def __save_files(self, save, revert, model, library): updated = {} deleted = {} added = {} renamed = {} for row in model: if row[EDITED] and not (row[DELETED] or row[RENAMED]): if row[ORIGVALUE] is not None: updated.setdefault(row[TAG], []) updated[row[TAG]].append((util.decode(row[VALUE]), util.decode(row[ORIGVALUE]))... | 458,848 |
def __save_files(self, save, revert, model, library): updated = {} deleted = {} added = {} renamed = {} for row in model: if row[EDITED] and not (row[DELETED] or row[RENAMED]): if row[ORIGVALUE] is not None: updated.setdefault(row[TAG], []) updated[row[TAG]].append((util.decode(row[VALUE]), util.decode(row[ORIGVALUE]))... | def __save_files(self, save, revert, model, library): updated = {} deleted = {} added = {} renamed = {} for row in model: if row[EDITED] and not (row[DELETED] or row[RENAMED]): if row[ORIGVALUE] is not None: updated.setdefault(row[TAG], []) updated[row[TAG]].append((util.decode(row[VALUE]), util.decode(row[ORIGVALUE]))... | 458,849 |
def tuple_to_str(t): return ' '.join(map(str, t)) | def tuple_to_str(t): return ' '.join(map(str, t)) | 458,850 |
def Label(text): l = gtk.Label(text) l.set_alignment(0.0, 0.5) return l | def Label(text): l = gtk.Label(text) l.set_alignment(0.0, 0.5) return l | 458,851 |
def set_text(button): color = button.get_color() cstring = "#%02x%02x%02x" % ( color.red//256, color.green//256, color.blue//256) config.set("plugins", "animosd_text", cstring) self.conf.text = cstring | def set_text(button): color = button.get_color() cstring = "#%02x%02x%02x" % ( color.red//256, color.green//256, color.blue//256) config.set("plugins", "animosd_text", cstring) self.conf.text = cstring | 458,852 |
def set_fill(button): color = button.get_color() cstring = "#%02x%02x%02x%02x" % ( color.red//256, color.green//256, color.blue//256, button.get_alpha()//256) config.set("plugins", "animosd_fill", cstring) self.conf.fill = cstring | def set_fill(button): color = button.get_color() cstring = "#%02x%02x%02x%02x" % ( color.red//256, color.green//256, color.blue//256, button.get_alpha()//256) config.set("plugins", "animosd_fill", cstring) self.conf.fill = cstring | 458,853 |
def change_position(button): value = button.get_active() / 2.0 config.set("plugins", "animosd_pos_y", str(value)) self.conf.pos = 0.5, value | def change_position(button): value = button.get_active() / 2.0 config.set("plugins", "animosd_pos_y", str(value)) self.conf.pos = 0.5, value | 458,854 |
def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | 458,855 |
def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | 458,856 |
def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | 458,857 |
def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | 458,858 |
def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | 458,859 |
def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | 458,860 |
def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | def set_string(window): value = window.child.text config.set("plugins", "animosd_string", value) self.conf.string = value | 458,861 |
def __init__(self): window = self.__window = gtk.Window(gtk.WINDOW_POPUP) window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_NOTIFICATION) window.add_events(gtk.gdk.BUTTON_PRESS_MASK) window.connect('button-press-event', self.__buttonpress) darea = self.__darea = gtk.DrawingArea() window.add(self.__darea) darea.show() darea... | def __init__(self): self.__current_window = None def str_to_tuple(s): return tuple(map(float, s.split())) def tuple_to_str(t): return ' '.join(map(str, t)) config_map = [ ('text', config.get, str_to_tuple, tuple_to_str), ('fill', config.get, str_to_tuple, tuple_to_str), ('font', config.get, None, str), ('delay', conf... | 458,862 |
def __init__(self): window = self.__window = gtk.Window(gtk.WINDOW_POPUP) window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_NOTIFICATION) window.add_events(gtk.gdk.BUTTON_PRESS_MASK) window.connect('button-press-event', self.__buttonpress) darea = self.__darea = gtk.DrawingArea() window.add(self.__darea) darea.show() darea... | def __init__(self): window = self.__window = gtk.Window(gtk.WINDOW_POPUP) window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_NOTIFICATION) window.add_events(gtk.gdk.BUTTON_PRESS_MASK) window.connect('button-press-event', self.__buttonpress) darea = self.__darea = gtk.DrawingArea() window.add(self.__darea) darea.show() darea... | 458,863 |
def render(self): w = self.__width h = self.__height x = self.__winx y = self.__winy darea = self.__darea self.__step = max(0, min(255, self.__step + self.__stepby)) | def render(self): w = self.__width h = self.__height x = self.__winx y = self.__winy darea = self.__darea self.__step = max(0, min(255, self.__step + self.__stepby)) | 458,864 |
def counter(i): if i == 0: return _("Never") else: return ngettext("%d time", "%d times", i) % i | def counter(i): if i == 0: return _("Never") else: return ngettext("%d time", "%d times", i) % i | 458,865 |
def __disconnect(self, sig, parent): parent.window.set_cursor(None) parent.disconnect(sig) | def __disconnect(self, sig, parent): if parent.window: parent.window.set_cursor(None) parent.disconnect(sig) | 458,866 |
def enabled(self): global gtk_216 filename = os.path.join(const.IMAGEDIR, "quodlibet.") if gtk_216: self.__icon = gtk.StatusIcon() else: self.__icon = EggTrayIconWrapper() self.__update_icon() | def enabled(self): global gtk_216 filename = os.path.join(const.IMAGEDIR, "quodlibet.") if gtk_216: self.__icon = gtk.StatusIcon() else: self.__icon = EggTrayIconWrapper() self.__update_icon() | 458,867 |
def reload(self, item, changed=None, removed=None): """Reload a song.""" re_add = [] print_d("Reloading %r" % item.key, self) for library in self.libraries.itervalues(): try: del(library._contents[item.key]) except KeyError: pass else: re_add.append(library) try: library = re_add[0] except IndexError: return # Rely on ... | def reload(self, item, changed=None, removed=None): """Reload a song.""" re_add = [] print_d("Reloading %r" % item.key, self) for library in self.libraries.itervalues(): try: del(library._contents[item.key]) except KeyError: pass else: re_add.append(library) try: library = re_add[0] except IndexError: return # Rely on ... | 458,868 |
def _format_song(self, song): """Returns a dict with the keys formatted as required by spec.""" store = { "l": str(song("~#length")), "n": str(song("~#track")), "b": song.comma("album"), "m": song("musicbrainz_trackid") } | def _format_song(self, song): """Returns a dict with the keys formatted as required by spec.""" store = { "l": str(song("~#length")), "n": str(song("~#track")), "b": song.comma("album"), "m": song("musicbrainz_trackid") } | 458,869 |
def __init__(self): self.nowplaying_song = None self.nowplaying_sent = False self.sessionid = None | def __init__(self): self.nowplaying_song = None self.nowplaying_sent = False self.sessionid = None | 458,870 |
def check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: self.quick_dialog("Please visit the Preferences window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", gtk.MESSAGE_INFO) self.broken =... | def _check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: self.quick_dialog("Please visit the Preferences window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", gtk.MESSAGE_INFO) self.broken ... | 458,871 |
def check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: self.quick_dialog("Please visit the Preferences window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", gtk.MESSAGE_INFO) self.broken =... | def check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: if self.queue and not self.broken: self.quick_dialog("Please visit the Plugins window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", ... | 458,872 |
def check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: self.quick_dialog("Please visit the Preferences window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", gtk.MESSAGE_INFO) self.broken =... | def check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: self.quick_dialog("Please visit the Preferences window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", gtk.MESSAGE_INFO) self.broken =... | 458,873 |
def check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: self.quick_dialog("Please visit the Preferences window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", gtk.MESSAGE_INFO) self.broken =... | def check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: self.quick_dialog("Please visit the Preferences window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", gtk.MESSAGE_INFO) self.broken =... | 458,874 |
def check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: self.quick_dialog("Please visit the Preferences window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", gtk.MESSAGE_INFO) self.broken =... | def check_config(self): user = config_get('username') passw = md5(config_get('password')).hexdigest() url = config_get_url() if not user or not passw or not url: self.quick_dialog("Please visit the Preferences window to set " "QLScrobbler up. Until then, songs will not be " "submitted.", gtk.MESSAGE_INFO) self.broken =... | 458,875 |
def destroyed(*args): self.queue.check_config() | def destroyed(*args): self.queue.check_config() | 458,876 |
def update(self): if not self.__dirty: self.__dirty = True gobject.idle_add(self.__update) | defupdate(self):ifnotself.__dirty:self.__dirty=Truegobject.idle_add(self.__update) | 458,877 |
def __init__(self, song): super(LyricsPane, self).__init__(spacing=12) self.set_border_width(12) view = gtk.TextView() sw = gtk.ScrolledWindow() sw.add(view) refresh = qltk.Button(_("_Download"), gtk.STOCK_CONNECT) save = gtk.Button(stock=gtk.STOCK_SAVE) delete = gtk.Button(stock=gtk.STOCK_DELETE) add = gtk.Button(stoc... | def __init__(self, song): super(LyricsPane, self).__init__(spacing=12) self.set_border_width(12) view = gtk.TextView() sw = gtk.ScrolledWindow() sw.add(view) refresh = qltk.Button(_("_Download"), gtk.STOCK_CONNECT) save = gtk.Button(stock=gtk.STOCK_SAVE) delete = gtk.Button(stock=gtk.STOCK_DELETE) add = gtk.Button(stoc... | 458,878 |
def __init__(self, song): super(LyricsPane, self).__init__(spacing=12) self.set_border_width(12) view = gtk.TextView() sw = gtk.ScrolledWindow() sw.add(view) refresh = qltk.Button(_("_Download"), gtk.STOCK_CONNECT) save = gtk.Button(stock=gtk.STOCK_SAVE) delete = gtk.Button(stock=gtk.STOCK_DELETE) add = gtk.Button(stoc... | def __init__(self, song): super(LyricsPane, self).__init__(spacing=12) self.set_border_width(12) view = gtk.TextView() sw = gtk.ScrolledWindow() sw.add(view) refresh = qltk.Button(_("_Download"), gtk.STOCK_CONNECT) save = gtk.Button(stock=gtk.STOCK_SAVE) delete = gtk.Button(stock=gtk.STOCK_DELETE) add = gtk.Button(stoc... | 458,879 |
def __init__(self, song): super(LyricsPane, self).__init__(spacing=12) self.set_border_width(12) view = gtk.TextView() sw = gtk.ScrolledWindow() sw.add(view) refresh = qltk.Button(_("_Download"), gtk.STOCK_CONNECT) save = gtk.Button(stock=gtk.STOCK_SAVE) delete = gtk.Button(stock=gtk.STOCK_DELETE) add = gtk.Button(stoc... | def __init__(self, song): super(LyricsPane, self).__init__(spacing=12) self.set_border_width(12) view = gtk.TextView() sw = gtk.ScrolledWindow() sw.add(view) refresh = qltk.Button(_("_Download"), gtk.STOCK_CONNECT) save = gtk.Button(stock=gtk.STOCK_SAVE) delete = gtk.Button(stock=gtk.STOCK_DELETE) add = gtk.Button(stoc... | 458,880 |
def __extract_from_list(self): """Extracts all the needed information from the already parsed search result page and adds the found cover to the list.""" | def __extract_from_list(self): """Extracts all the needed information from the already parsed search result page and adds the found cover to the list.""" | 458,881 |
def __set_async(self, url): """manages various stuff like fast switching of covers (aborting old HTTP requests), managing the image cache etc.""" | def __set_async(self, url): """manages various stuff like fast switching of covers (aborting old HTTP requests), managing the image cache etc.""" | 458,882 |
def delayed_song_set(): song = library.get(config.get("memory", "song")) seek_pos = config.getint("memory", "seek") config.set("memory", "seek", 0) player.setup(self.playlist, song, seek_pos) | def delayed_song_set(): song = library.get(config.get("memory", "song")) seek_pos = config.getint("memory", "seek") config.set("memory", "seek", 0) player.setup(self.playlist, song, seek_pos) | 458,883 |
def __window_state_changed(self, window, event): assert window is self self.__window_state = event.new_window_state | def __window_state_changed(self, window, event): assert window is self self.__window_state = event.new_window_state | 458,884 |
def hide(self): self.__hidden_state = self.__window_state if self.__hidden_state & gtk.gdk.WINDOW_STATE_MAXIMIZED: self.unmaximize() super(QuodLibetWindow, self).hide() map(gtk.Window.hide, qltk.Window.childs) | def hide(self): super(QuodLibetWindow, self).hide() map(gtk.Window.hide, qltk.Window.childs) | 458,885 |
def present(self): super(QuodLibetWindow, self).present() if self.__hidden_state & gtk.gdk.WINDOW_STATE_MAXIMIZED: self.maximize() map(gtk.Window.present, qltk.Window.childs) | def present(self): super(QuodLibetWindow, self).present() map(gtk.Window.present, qltk.Window.childs) | 458,886 |
def show(self): super(QuodLibetWindow, self).show() if self.__hidden_state & gtk.gdk.WINDOW_STATE_MAXIMIZED: self.maximize() map(gtk.Window.show, qltk.Window.childs) | def show(self): super(QuodLibetWindow, self).show() map(gtk.Window.show, qltk.Window.childs) | 458,887 |
def __save(self, widget=None, response=None): """Writes values to Song objects.""" self._qthread.stop() if response != gtk.RESPONSE_ACCEPT: self.destroy() return | def __save(self, widget=None, response=None): """Writes values to Song objects.""" self._qthread.stop() if response != gtk.RESPONSE_ACCEPT: self.destroy() return | 458,888 |
def test_numcmp(self): self.failUnless(Query("#(track = 0)").search(self.s1)) self.failUnless(Query("#(notatag = 0)").search(self.s1)) self.failUnless(Query("#(track = 12)").search(self.s2)) | def test_numcmp(self): self.failUnless(Query("#(track = 0)").search(self.s1)) self.failUnless(Query("#(notatag = 0)").search(self.s1)) self.failUnless(Query("#(track = 12)").search(self.s2)) | 458,889 |
def __create_menu(self, player, library): ag = gtk.ActionGroup('QuodLibetWindowActions') | def __create_menu(self, player, library): ag = gtk.ActionGroup('QuodLibetWindowActions') | 458,890 |
def select_browser(self, activator, current, library, player, restore): if isinstance(current, gtk.RadioAction): current = current.get_current_value() Browser = browsers.get(current) config.set("memory", "browser", Browser.__name__) if self.browser: container = self.browser.__container self.browser.unpack(container, se... | def select_browser(self, activator, current, library, player, restore=False): if isinstance(current, gtk.RadioAction): current = current.get_current_value() Browser = browsers.get(current) config.set("memory", "browser", Browser.__name__) if self.browser: container = self.browser.__container self.browser.unpack(contain... | 458,891 |
def hide(self): pos = self.get_position() config.set('memory', 'position', '%s %s' % pos) super(QuodLibetWindow, self).hide() map(gtk.Window.hide, qltk.Window.childs) | def hide(self): super(QuodLibetWindow, self).hide() map(gtk.Window.hide, qltk.Window.childs) | 458,892 |
def destroy(self, *args): # For saving the window position self.hide() # The tray icon plugin tries to unhide QL because it gets disabled # on Ql exit. The window should be hidden after destroy gets called. self.show = lambda: None self.present = self.show super(QuodLibetWindow, self).destroy() | def destroy(self, *args): # For saving the window position# The tray icon plugin tries to unhide QL because it gets disabled # on Ql exit. The window should be hidden after destroy gets called. self.show = lambda: None self.present = self.show super(QuodLibetWindow, self).destroy() | 458,893 |
def create_device(self, backend_id, device_id, protocols): """backend_id is the string that gets passed to the backend so it can identify the device. device_id should be a something including the device serial (so it's unique) and maybe the model name.""" device = None | def create_device(self, backend_id, device_id, protocols): """backend_id is the string that gets passed to the backend so it can identify the device. device_id should be a something including the device serial (so it's unique) and maybe the model name.""" device = None | 458,894 |
def destroyed(*args): self.queue.changed() | def destroyed(*args): self.queue.changed() | 458,895 |
def update_remote_album(self, remote_album): """Updates the TreeView, handling results with a different number of tracks than the album being tagged.""" for i in range(len(self.model), len(remote_album)): self.model.append((None, )) for i in range(len(self.model), len(remote_album), -1): if self.model[-1][0] is not Non... | def update_remote_album(self, remote_album): """Updates the TreeView, handling results with a different number of tracks than the album being tagged.""" for i in range(len(self.model), len(remote_album)): self.model.append((None, )) for i in range(len(self.model), len(remote_album), -1): if self.model[-1][0] is not Non... | 458,896 |
def format(self): return "<b>%s</b>\n<small>%s (%s)</small>" % ( util.escape(self.name), ngettext("%d song", "%d songs", len(self)) % len(self), util.format_time(sum([t.get("~#length") for t in self if isinstance(t, AudioFile)]))) | def format(self): return "<b>%s</b>\n<small>%s (%s)</small>" % ( util.escape(self.name), ngettext("%d song", "%d songs", len(self)) % len(self), util.format_time(sum([t.get("~#length") for t in self if isinstance(t, AudioFile)]))) | 458,897 |
def _set_paused(self, paused): if paused != self._paused: self._paused = paused if self.song: if not self.bin: if self.__init_pipeline(): self.bin.set_property('uri', self.song("~uri")) else: # Backend error; show message and halt playback ErrorMessage(None, _("Output Error"), _("GStreamer output pipeline could not be ... | def _set_paused(self, paused): if paused != self._paused: self._paused = paused if self.song: if not self.bin: if self.__init_pipeline(): self.bin.set_property('uri', self.song("~uri")) else: # Backend error; show message and halt playback ErrorMessage(None, _("Output Error"), _("GStreamer output pipeline could not be ... | 458,898 |
def __expanded(self, iter, path, model): window = self.window if window: window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) gtk.main_iteration() try: try: if model is None: return while model.iter_has_child(iter): model.remove(model.iter_children(iter)) folder = model[iter][0] for path in util.listdir(folder): try: for f... | def __expanded(self, iter, path, model): window = self.window if window: window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) gtk.main_iteration(block=False) try: try: if model is None: return while model.iter_has_child(iter): model.remove(model.iter_children(iter)) folder = model[iter][0] for path in util.listdir(folder):... | 458,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.