Exemplo n.º 1
0
static void connman_up(void *user_data)
{
	connman_manager_init(connman_manager_changed, NULL);
	connman_service_init();
	connman_technology_init();
	connman_agent_init();
	cui_agent_init_callbacks();

	cui_trayicon_update_icon();

	cui_tray_enable();
	cui_right_menu_enable_all();
}
Exemplo n.º 2
0
static void settings_cancel_callback(GtkButton *button, gpointer user_data)
{
	gtk_widget_destroy(GTK_WIDGET(service_settings_dbox));
	service_settings_dbox = NULL;

	connman_service_set_property_changed_callback(path, NULL, NULL);
	connman_service_set_property_error_callback(path, NULL, NULL);

	connman_service_deselect();

	g_free(path);
	path = NULL;

	cui_tray_enable();
}
Exemplo n.º 3
0
int main(int argc, char *argv[])
{
	int ret;

	setlocale(LC_ALL, "");

	bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
	bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");

	textdomain(GETTEXT_PACKAGE);

	printf("%s\n", GETTEXT_PACKAGE);

	gtk_init(&argc, &argv);

	cui_builder = gtk_builder_new();
	if (cui_builder == NULL)
		return -ENOMEM;

	cui_load_theme();

	if (cui_load_trayicon(cui_builder) != 0)
		return -EINVAL;

	if (cui_load_agent_dialogs() != 0)
		return -EINVAL;

	cui_tray_enable();

	ret = connman_interface_init(connman_up, connman_down, NULL);
	if (ret < 0)
		return ret;

	gtk_main();

	connman_agent_finalize();
	connman_service_finalize();
	connman_technology_finalize();
	connman_manager_finalize();
	connman_interface_finalize();

	return 0;
}