def init(icon=None, proc_title=None, name=None): global quodlibet print_d("Entering quodlibet.init") _gtk_init() _gtk_icons_init(get_image_dir(), icon) _gst_init() _dbus_init() _init_debug() from gi.repository import GLib if proc_title: GLib.set_prgname(proc_title) set_process_title(proc_title) # Issue 736 - set after main loop has started (gtk seems to reset it) GLib.idle_add(set_process_title, proc_title) if name: GLib.set_application_name(name) mkdir(get_user_dir(), 0750) print_d("Finished initialization.")
def set_application_info(app): """Call after init() and before creating any windows to apply default values for names and icons. """ from quodlibet._init import is_init assert is_init() from gi.repository import Gtk, GLib assert app.process_name set_process_title(app.process_name) # Issue 736 - set after main loop has started (gtk seems to reset it) GLib.idle_add(set_process_title, app.process_name) assert app.id # https://honk.sigxcpu.org/con/GTK__and_the_application_id.html GLib.set_prgname(app.id) assert app.name GLib.set_application_name(app.name) assert app.icon_name theme = Gtk.IconTheme.get_default() assert theme.has_icon(app.icon_name) Gtk.Window.set_default_icon_name(app.icon_name)
def set_application_info(icon_name, process_title, app_name): """Call after init() and before creating any windows to apply default values for names and icons. """ assert _initialized from gi.repository import Gtk, GLib set_process_title(process_title) # Issue 736 - set after main loop has started (gtk seems to reset it) GLib.idle_add(set_process_title, process_title) GLib.set_prgname(process_title) GLib.set_application_name(app_name) theme = Gtk.IconTheme.get_default() assert theme.has_icon(icon_name) Gtk.Window.set_default_icon_name(icon_name)