/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2002-2011 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 2002-2015 Match Grun and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
/*
#ifdef HAVE_CONFIG_H
# include "config.h"
+#include "claws-features.h"
#endif
#include "defs.h"
* \param data User data.
*/
static gboolean export_html_key_pressed( GtkWidget *widget, GdkEventKey *event, gpointer data ) {
- if (event && event->keyval == GDK_Escape) {
+ if (event && event->keyval == GDK_KEY_Escape) {
export_html_cancel( widget, data );
}
return FALSE;
AlertValue aval;
sFile = gtk_editable_get_chars( GTK_EDITABLE(exphtml_dlg.entryHtml), 0, -1 );
- g_strchug( sFile ); g_strchomp( sFile );
+ g_strstrip( sFile );
gtk_entry_set_text( GTK_ENTRY(exphtml_dlg.entryHtml), sFile );
exporthtml_parse_filespec( _exportCtl_, sFile );
g_free( sFile );
/* Test for directory */
- if( exporthtml_test_dir( _exportCtl_ ) ) {
+ if( g_file_test(_exportCtl_->dirOutput,
+ G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) ) {
return TRUE;
}
/* Prompt to create */
msg = g_strdup_printf( _(
- "HTML Output Directory '%s'\n" \
- "does not exist. OK to create new directory?" ),
+ "The HTML output directory '%s'\n" \
+ "does not exist. Do you want to create it?" ),
_exportCtl_->dirOutput );
- aval = alertpanel( _("Create Directory" ),
- msg, GTK_STOCK_NO, GTK_STOCK_YES, NULL );
+ aval = alertpanel( _("Create directory" ),
+ msg, GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST );
g_free( msg );
if( aval != G_ALERTALTERNATE ) return FALSE;
"Could not create output directory for HTML file:\n%s" ),
reason );
aval = alertpanel_full(_("Failed to Create Directory"), msg,
- GTK_STOCK_CLOSE, NULL, NULL, FALSE,
- NULL, ALERT_ERROR, G_ALERTDEFAULT);
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_ERROR);
g_free( msg );
return FALSE;
}
/* First row */
top = 0;
- label = gtk_label_new( _( "Address Book :" ) );
+ label = gtk_label_new( _( "Address Book:" ) );
gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
/* Second row */
top++;
- label = gtk_label_new( _( "File Name :" ) );
+ label = gtk_label_new( _( "File Name:" ) );
gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
gtk_window_set_title( GTK_WINDOW(window),
_("Export Address Book to HTML File") );
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
+ gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_DIALOG);
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(export_html_delete_event),
NULL );