Ejemplo n.º 1
0
static void
druid_disable_next_button(ABInitialInfo *info)
{
    g_return_if_fail(info);
    gnome_druid_set_buttons_sensitive(GNOME_DRUID(info->druid),
                                      TRUE, FALSE, TRUE, TRUE);
}
Ejemplo n.º 2
0
/*--------------------------------------------------------------------------*/
static void
prepare_finish_page( GnomeDruidPage *page, GnomeDruid *druid, gpointer data )
{

	gb_debug (DEBUG_UPDATE, "START");

	gnome_druid_set_show_finish( GNOME_DRUID(druid), TRUE );

	gnome_druid_set_buttons_sensitive( GNOME_DRUID(druid),
					   FALSE, TRUE, FALSE, FALSE );

	gb_debug (DEBUG_UPDATE, "END");
}
gboolean
on_ContactsImport_activate (GtkWidget * widget, GdkEvent * event, gpointer user_data)
{
	GnomeDruid *druid;
	gladexml_import_userlist = glade_xml_new (PACKAGE_DATA_DIR "/gnomegadu.glade", "ImportUserlist", NULL);

	druid = GNOME_DRUID (glade_xml_get_widget (gladexml_import_userlist, "ImportUserlistDruid"));

	gnome_druid_set_buttons_sensitive (druid, FALSE, TRUE, TRUE, FALSE);
	glade_xml_signal_autoconnect (gladexml_import_userlist);
	gtk_widget_show_all (GTK_WIDGET (druid));
	return TRUE;
}
gboolean
on_userlist_import_page_1_next (GnomeDruidPage * druidpage, GtkWidget * widget, gpointer user_data)
{
	GtkWidget *radio_import_server, *radio_import_file;
	GnomeDruid *druid = GNOME_DRUID (glade_xml_get_widget (gladexml_import_userlist, "ImportUserlistDruid"));
	GnomeDruidPage *page_last = GNOME_DRUID_PAGE (glade_xml_get_widget (gladexml_import_userlist, "userlist_import_page_last"));

	radio_import_server = glade_xml_get_widget (gladexml_import_userlist, "RadioImportServer");
	radio_import_file = glade_xml_get_widget (gladexml_import_userlist, "RadioImportFile");
	g_assert (radio_import_file);

	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio_import_server)))
	{
		GtkWidget *progress_window;

		if (!gnomegadu_gadugadu_session)
		{
			GtkDialog *msgdialog = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
										   "<span weight=\"bold\"size=\"larger\">Brak połączenia</span>\n\nPołącz się z siecią Gadu-Gadu i spróbuj ponownie.");
			gtk_dialog_run (GTK_DIALOG (msgdialog));
			gtk_widget_destroy (GTK_WIDGET (msgdialog));
			return TRUE;
		}

		gladexml_import_userlist_progress = glade_xml_new (PACKAGE_DATA_DIR "/gnomegadu.glade", "ImportUserlistServerProgressWindow", NULL);
		glade_xml_signal_autoconnect (gladexml_import_userlist_progress);

		g_assert (gladexml_import_userlist_progress);

		progress_window = glade_xml_get_widget (gladexml_import_userlist_progress, "ImportUserlistServerProgressWindow");
		g_assert(progress_window);
		gtk_widget_show_all (GTK_WIDGET(progress_window));

		gg_userlist_request (gnomegadu_gadugadu_session, GG_USERLIST_GET, NULL);

		gnome_druid_set_page (druid, page_last);
		gnome_druid_set_buttons_sensitive (druid, TRUE, FALSE, TRUE, FALSE);
		gnome_druid_set_show_finish (druid, TRUE);
	}
	else
	{
		//gtk_file_chooser_get_filename ()
		//gnomegadu_import_userlist_from_file();
	}
	return FALSE;
}
Ejemplo n.º 5
0
void
dai_match_page_prepare_cb(GnomeDruidPage *druid_page, GtkWidget *widget,
                          gpointer user_data)
{
    ABInitialInfo *info = user_data;
    Account *root;
    AccCbData data;

    g_return_if_fail(info && info->api);

    /* No way back */
    gnome_druid_set_buttons_sensitive(GNOME_DRUID(info->druid),
                                      FALSE, TRUE, TRUE, TRUE);

    /* Do not run this twice */
    if (info->match_page_prepared)
        return;
    else
        info->match_page_prepared = TRUE;

    /* Load aqbanking accounts */
#ifdef AQBANKING_VERSION_4_PLUS
    AB_Banking_OnlineInit(info->api, 0);
#else
    AB_Banking_OnlineInit(info->api);
#endif

    /* Determine current mapping */
    root = gnc_book_get_root_account(gnc_get_current_book());
    info->gnc_hash = g_hash_table_new(&g_direct_hash, &g_direct_equal);
    data.api = info->api;
    data.hash = info->gnc_hash;
    gnc_account_foreach_descendant(
        root, (AccountCb) hash_from_kvp_acc_cb, &data);

    /* Update the graphical representation */
    update_account_list(info);
}
Ejemplo n.º 6
0
/*--------------------------------------------------------------------------*/
static void
prepare_downloading_page( GnomeDruidPage *page, GnomeDruid *druid,
			  gpointer data )
{
	const gchar *site_name;
	GList *p;
	Site *site;

	gb_debug (DEBUG_UPDATE, "START");

	gnome_druid_set_buttons_sensitive( druid, FALSE, FALSE, TRUE, FALSE );
	site_name = gtk_entry_get_text( GTK_ENTRY(site_entry) );
	for ( p = site_list; p != NULL; p=p->next ) {
		site = (Site *)p->data;
		if ( strcmp( site_name, site->name ) == 0 ) {
			site_uri = site->uri;
			break;
		}
	}

	get_remote_file_list( gnome_vfs_uri_new( site_uri ) );

	gb_debug (DEBUG_UPDATE, "END");
}
Ejemplo n.º 7
0
gboolean cmd_changed(GtkEntry *entry, GnomeDruid *druid) {
  const char *text = gtk_entry_get_text(entry);
  gnome_druid_set_buttons_sensitive(druid, TRUE, text && *text, TRUE, TRUE);
  return TRUE;
}
Ejemplo n.º 8
0
static void
balsa_druid_page_finish_prepare(GnomeDruidPage * page, GnomeDruid * druid)
{
    gnome_druid_set_buttons_sensitive(druid, TRUE, FALSE, TRUE, FALSE);
    gnome_druid_set_show_finish(druid, TRUE);
}