/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2002-2007 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"
#include <glib.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtktable.h>
-#include <gtk/gtkbutton.h>
+#include <gtk/gtk.h>
#include "addrbook.h"
#include "addressbook.h"
else {
addrbook_free_book( abf );
}
+ pine_free(pdf);
return retVal;
}
gboolean errFlag = FALSE;
sFile = gtk_editable_get_chars( GTK_EDITABLE(imppine_dlg.file_entry), 0, -1 );
- g_strchug( sFile ); g_strchomp( sFile );
+ g_strstrip( sFile );
gtk_entry_set_text( GTK_ENTRY(imppine_dlg.file_entry), sFile );
sName = gtk_editable_get_chars( GTK_EDITABLE(imppine_dlg.name_entry), 0, -1 );
- g_strchug( sName ); g_strchomp( sName );
+ g_strstrip( sName );
gtk_entry_set_text( GTK_ENTRY(imppine_dlg.name_entry), sName );
if( *sFile == '\0'|| strlen( sFile ) < 1 ) {
}
static gboolean imp_pine_key_pressed( GtkWidget *widget, GdkEventKey *event, gboolean *cancelled ) {
- if (event && event->keyval == GDK_Escape) {
+ if (event && event->keyval == GDK_KEY_Escape) {
*cancelled = TRUE;
gtk_main_quit();
}
gtk_container_set_border_width( GTK_CONTAINER(window), 0 );
gtk_window_set_title( GTK_WINDOW(window), _("Import Pine file into Address Book") );
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
- gtk_window_set_modal(GTK_WINDOW(window), TRUE);
+ gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_DIALOG);
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(imp_pine_delete_event), cancelled);
g_signal_connect(G_OBJECT(window), "key_press_event",
gtk_widget_grab_focus(imppine_dlg.file_entry);
gtk_widget_show(imppine_dlg.window);
manage_window_set_transient(GTK_WINDOW(imppine_dlg.window));
+ gtk_window_set_modal(GTK_WINDOW(imppine_dlg.window), TRUE);
imp_pine_status_show( _( "Please select a file to import." ) );
pineFile = pine_find_file();
gtk_main();
gtk_widget_hide(imppine_dlg.window);
+ gtk_window_set_modal(GTK_WINDOW(imppine_dlg.window), FALSE);
_imp_addressIndex_ = NULL;
if (cancelled == TRUE) return NULL;