comparison src/dialogs.c @ 1186:c00fc3adfd66

[gaim-migrate @ 1196] mostly libfaim updates, and a fix for something i broke in the import dialog. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 02 Dec 2000 18:41:58 +0000
parents 47cf56b72d4b
children 3fba730602be
comparison
equal deleted inserted replaced
1185:47cf56b72d4b 1186:c00fc3adfd66
2932 char *file; 2932 char *file;
2933 char path[PATHSIZE]; 2933 char path[PATHSIZE];
2934 char g_screenname[64]; 2934 char g_screenname[64];
2935 int i; 2935 int i;
2936 FILE *f; 2936 FILE *f;
2937 gboolean from_dialog = FALSE;
2937 2938
2938 if ( !gc ) { 2939 if ( !gc ) {
2939 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(importdialog)); 2940 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(importdialog));
2940 strncpy( path, file, PATHSIZE - 1 ); 2941 strncpy( path, file, PATHSIZE - 1 );
2941 if (file_is_dir(path, importdialog)) { 2942 if (file_is_dir(path, importdialog)) {
2943 g_free (first); 2944 g_free (first);
2944 return; 2945 return;
2945 } 2946 }
2946 /* FIXME : import buddy list file. moderately important */ 2947 /* FIXME : import buddy list file. moderately important */
2947 gc = connections->data; 2948 gc = connections->data;
2949 from_dialog = TRUE;
2948 } 2950 }
2949 else { 2951 else {
2950 for (i = 0; i < strlen(gc->username); i++) 2952 for (i = 0; i < strlen(gc->username); i++)
2951 g_screenname[i] = toupper(gc->username[i]); 2953 g_screenname[i] = toupper(gc->username[i]);
2952 g_screenname[i] = '\0'; 2954 g_screenname[i] = '\0';
3020 3022
3021 build_edit_tree(); 3023 build_edit_tree();
3022 3024
3023 fclose( f ); 3025 fclose( f );
3024 3026
3025 if ( !gc ) { 3027 if ( from_dialog ) {
3026 /* save what we just did to cache */ 3028 /* save what we just did to cache */
3027 3029
3028 do_export( (GtkWidget *) NULL, 0 ); 3030 do_export( (GtkWidget *) NULL, 0 );
3029 destroy_dialog(NULL, importdialog); 3031 destroy_dialog(NULL, importdialog);
3030 importdialog = NULL; 3032 importdialog = NULL;