Mercurial > pidgin.yaz
comparison src/dialogs.c @ 229:e8ea7f37e28f
[gaim-migrate @ 239]
One minor tweak to the buddy list cache. If we read a non-zero buddy list
from TOC and there is not a cache yet, create it.
committer: Tailor Script <tailor@pidgin.im>
author | Syd Logan <slogan> |
---|---|
date | Wed, 10 May 2000 08:29:02 +0000 |
parents | f3b61c04f44e |
children | 83dd297aa363 |
comparison
equal
deleted
inserted
replaced
228:f3b61c04f44e | 229:e8ea7f37e28f |
---|---|
1936 /* The dialog for import/export */ | 1936 /* The dialog for import/export */ |
1937 /*------------------------------------------------------------------------*/ | 1937 /*------------------------------------------------------------------------*/ |
1938 | 1938 |
1939 #define PATHSIZE 1024 | 1939 #define PATHSIZE 1024 |
1940 | 1940 |
1941 /* if dummy is 0, save to ~/.gaimbdcache_screenname */ | 1941 /* see if a buddy list cache file for this user exists */ |
1942 | |
1943 gboolean | |
1944 bud_list_cache_exists( void ) | |
1945 { | |
1946 gboolean ret = FALSE; | |
1947 char path[PATHSIZE]; | |
1948 char *file; | |
1949 struct stat sbuf; | |
1950 extern char g_screenname[]; | |
1951 | |
1952 file = getenv( "HOME" ); | |
1953 if ( file != (char *) NULL ) { | |
1954 sprintf( path, "%s/.gaimbdcache_%s", file, g_screenname ); | |
1955 if ( !stat(path, &sbuf) ) | |
1956 ret = TRUE; | |
1957 } | |
1958 return ret; | |
1959 } | |
1960 | |
1961 /* if dummy is 0, save to ~/.gaimbdcache_screenname. Else, let user choose */ | |
1942 | 1962 |
1943 void do_export(GtkWidget *w, void *dummy) | 1963 void do_export(GtkWidget *w, void *dummy) |
1944 { | 1964 { |
1945 FILE *f; | 1965 FILE *f; |
1946 gint show_dialog = (int) dummy; | 1966 gint show_dialog = (int) dummy; |
2006 gtk_widget_show(exportdialog); | 2026 gtk_widget_show(exportdialog); |
2007 gdk_window_raise(exportdialog->window); | 2027 gdk_window_raise(exportdialog->window); |
2008 | 2028 |
2009 } | 2029 } |
2010 | 2030 |
2011 /* if dummy is 0, then import from ~/.gaimbdcache_screenname */ | 2031 /* if dummy is 0, then import from ~/.gaimbdcache_screenname, else let user |
2032 choose */ | |
2012 | 2033 |
2013 void do_import(GtkWidget *w, void *dummy) | 2034 void do_import(GtkWidget *w, void *dummy) |
2014 { | 2035 { |
2015 gint show_dialog = (int) dummy; | 2036 gint show_dialog = (int) dummy; |
2016 GList *grp, *grp2; | 2037 GList *grp, *grp2; |