Example #1
0
def on_Updater_RefreshButton_clicked(*args):
	UpdaterWindow.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH))
	while Gtk.events_pending():
		Gtk.main_iteration()
	transaction.refresh()
Example #2
0
def on_ManagerRefreshButton_clicked(*args):
    ManagerWindow.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH))
    while Gtk.events_pending():
        Gtk.main_iteration()
    transaction.refresh()
Example #3
0
		'on_UpdaterWindow_delete_event' : on_UpdaterWindow_delete_event,
		'on_UpdaterPreferencesButton_clicked': on_UpdaterPreferencesButton_clicked,
		'on_Updater_ApplyButton_clicked' : on_Updater_ApplyButton_clicked,
		'on_Updater_RefreshButton_clicked' : on_Updater_RefreshButton_clicked,
		'on_Updater_CloseButton_clicked' : on_Updater_CloseButton_clicked}

def config_dbus_signals():
	bus = dbus.SystemBus()
	bus.add_signal_receiver(handle_reply, dbus_interface = "org.manjaro.pamac", signal_name = "EmitTransactionDone")
	bus.add_signal_receiver(handle_error, dbus_interface = "org.manjaro.pamac", signal_name = "EmitTransactionError")
	bus.add_signal_receiver(handle_updates, dbus_interface = "org.manjaro.pamac", signal_name = "EmitAvailableUpdates")
	bus.add_signal_receiver(reload_config, dbus_interface = "org.manjaro.pamac", signal_name = "EmitReloadConfig")

if common.pid_file_exists():
	transaction.ErrorDialog.format_secondary_text(_('Pamac is already running'))
	response = transaction.ErrorDialog.run()
	if response:
		transaction.ErrorDialog.hide()
else:
	common.write_pid_file()
	interface.connect_signals(signals)
	transaction.get_dbus_methods()
	transaction.config_dbus_signals()
	config_dbus_signals()
	UpdaterWindow.show()
	UpdaterWindow.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH))
	while Gtk.events_pending():
		Gtk.main_iteration()
	transaction.refresh()
	Gtk.main()
Example #4
0
                            signal_name="EmitTransactionDone")
    bus.add_signal_receiver(handle_error,
                            dbus_interface="org.manjaro.pamac",
                            signal_name="EmitTransactionError")
    bus.add_signal_receiver(handle_updates,
                            dbus_interface="org.manjaro.pamac",
                            signal_name="EmitAvailableUpdates")
    bus.add_signal_receiver(reload_config,
                            dbus_interface="org.manjaro.pamac",
                            signal_name="EmitReloadConfig")


if common.pid_file_exists():
    transaction.ErrorDialog.format_secondary_text(
        _('Pamac is already running'))
    response = transaction.ErrorDialog.run()
    if response:
        transaction.ErrorDialog.hide()
else:
    common.write_pid_file()
    interface.connect_signals(signals)
    transaction.get_dbus_methods()
    transaction.config_dbus_signals()
    config_dbus_signals()
    UpdaterWindow.show()
    UpdaterWindow.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH))
    while Gtk.events_pending():
        Gtk.main_iteration()
    transaction.refresh()
    Gtk.main()