Beispiel #1
0
/**
 * Test whether we can move off format page.
 * \return <i>TRUE</i> if OK to move off page.
 */
static gboolean exp_html_move_format( void ) {
	gboolean retVal = FALSE;
	gint id;

	/* Set stylesheet */
	id = combobox_get_active_data(GTK_COMBO_BOX(exphtml_dlg.optmenuCSS));
	exporthtml_set_stylesheet( _exportCtl_, id );

	/* Set name format */
	id = combobox_get_active_data(GTK_COMBO_BOX(exphtml_dlg.optmenuName));
	exporthtml_set_name_format( _exportCtl_, id );

	exporthtml_set_banding( _exportCtl_,
		gtk_toggle_button_get_active(
			GTK_TOGGLE_BUTTON( exphtml_dlg.checkBanding ) ) );
	exporthtml_set_link_email( _exportCtl_,
		gtk_toggle_button_get_active(
			GTK_TOGGLE_BUTTON( exphtml_dlg.checkLinkEMail ) ) );
	exporthtml_set_attributes( _exportCtl_,
		gtk_toggle_button_get_active(
			GTK_TOGGLE_BUTTON( exphtml_dlg.checkAttributes ) ) );

	/* Process export */
	exporthtml_process( _exportCtl_, _addressCache_ );
	if( _exportCtl_->retVal == MGU_SUCCESS ) {
		retVal = TRUE;
	}
	else {
		export_html_status_show( _( "Error creating HTML file" ) );
	}
	return retVal;
}
Beispiel #2
0
/**
 * Test whether we can move off format page.
 * \return <i>TRUE</i> if OK to move off page.
 */
static gboolean exp_html_move_format( void ) {
	gboolean retVal = FALSE;
	GtkWidget *menu, *menuItem;
	gint id;

	/* Set stylesheet */
	menu = gtk_option_menu_get_menu( GTK_OPTION_MENU( exphtml_dlg.optmenuCSS ) );
	menuItem = gtk_menu_get_active( GTK_MENU( menu ) );
	id = GPOINTER_TO_INT( gtk_object_get_user_data(GTK_OBJECT(menuItem)) );
	exporthtml_set_stylesheet( _exportCtl_, id );

	/* Set name format */
	menu = gtk_option_menu_get_menu( GTK_OPTION_MENU( exphtml_dlg.optmenuName ) );
	menuItem = gtk_menu_get_active( GTK_MENU( menu ) );
	id = GPOINTER_TO_INT( gtk_object_get_user_data(GTK_OBJECT(menuItem)) );
	exporthtml_set_name_format( _exportCtl_, id );

	exporthtml_set_banding( _exportCtl_,
		gtk_toggle_button_get_active(
			GTK_TOGGLE_BUTTON( exphtml_dlg.checkBanding ) ) );
	exporthtml_set_link_email( _exportCtl_,
		gtk_toggle_button_get_active(
			GTK_TOGGLE_BUTTON( exphtml_dlg.checkLinkEMail ) ) );
	exporthtml_set_attributes( _exportCtl_,
		gtk_toggle_button_get_active(
			GTK_TOGGLE_BUTTON( exphtml_dlg.checkAttributes ) ) );

	/* Process export */
	exporthtml_process( _exportCtl_, _addressCache_ );
	if( _exportCtl_->retVal == MGU_SUCCESS ) {
		retVal = TRUE;
	}
	else {
		export_html_status_show( _( "Error creating HTML file" ) );
	}
	return retVal;
}