From: Christoph Hohmann Date: Sat, 7 Jun 2003 20:18:22 +0000 (+0000) Subject: 0.9.0claws20 X-Git-Tag: rel_0_9_3~94 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=f246acfb3c4ccbea386d9f9472ff437e8861dcb4 0.9.0claws20 * src/Makefile.am * src/crash.c * src/export.c * src/filesel.[ch] ** REMOVE ** * src/folder.c * src/main.[ch] * src/common/sylpheed.[ch] * src/gtk/Makefile.am * src/gtk/filesel.[ch] ** NEW ** * src/gtk/pluginwindow.c * src/gtk/sslcertwindow.c move filesel.[ch] to gtk directory --- diff --git a/ChangeLog.claws b/ChangeLog.claws index cb4cffceb..77143f67e 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,18 @@ +2003-06-07 [christoph] 0.9.0claws20 + + * src/Makefile.am + * src/crash.c + * src/export.c + * src/filesel.[ch] ** REMOVE ** + * src/folder.c + * src/main.[ch] + * src/common/sylpheed.[ch] + * src/gtk/Makefile.am + * src/gtk/filesel.[ch] ** NEW ** + * src/gtk/pluginwindow.c + * src/gtk/sslcertwindow.c + move filesel.[ch] to gtk directory + 2003-06-07 [alfons] 0.9.0claws19 * src/filesel.c diff --git a/configure.ac b/configure.ac index 42585dcd4..e2911f3c6 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws19 +EXTRA_VERSION=claws20 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/doc/src/ui_seperation.txt b/doc/src/ui_seperation.txt index 4f3b9ccd9..d00a02a44 100644 --- a/doc/src/ui_seperation.txt +++ b/doc/src/ui_seperation.txt @@ -48,3 +48,5 @@ gtkutils.[ch] gtk/gtkutils.[ch] ok about.[ch] gtk/about.[ch] ok colorlabel.[ch] gtk/colorlabel.[ch] ok + +filesel.[ch] gtk/filesel.[ch] ok diff --git a/src/Makefile.am b/src/Makefile.am index 9b15e03d3..4501133a8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -62,7 +62,6 @@ sylpheed_SOURCES = \ addrgather.c addrgather.h \ exporthtml.c exporthtml.h \ exphtmldlg.c exphtmldlg.h \ - filesel.c filesel.h \ foldersel.c foldersel.h \ statusbar.c statusbar.h \ logwindow.c logwindow.h \ diff --git a/src/common/sylpheed.c b/src/common/sylpheed.c index da8b1426c..716e09e9c 100644 --- a/src/common/sylpheed.c +++ b/src/common/sylpheed.c @@ -36,6 +36,7 @@ #include "plugin.h" static gboolean sylpheed_initialized = FALSE; +static gchar *startup_dir; /** * Parse program parameters and remove all parameters @@ -84,6 +85,8 @@ gboolean sylpheed_init(int *argc, char ***argv) if (sylpheed_initialized) return TRUE; + startup_dir = g_get_current_dir(); + parse_parameter(argc, argv); setlocale(LC_ALL, ""); @@ -119,3 +122,8 @@ void sylpheed_done() ssl_done(); #endif } + +const gchar *sylpheed_get_startup_dir() +{ + return startup_dir; +} diff --git a/src/common/sylpheed.h b/src/common/sylpheed.h index ffb927d8c..bf95d5c46 100644 --- a/src/common/sylpheed.h +++ b/src/common/sylpheed.h @@ -17,5 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -gboolean sylpheed_init (int *argc, char ***argv); -void sylpheed_done (); +gboolean sylpheed_init (int *argc, char ***argv); +void sylpheed_done (); +const gchar *sylpheed_get_startup_dir (); diff --git a/src/crash.c b/src/crash.c index e33915dfc..f4928557a 100644 --- a/src/crash.c +++ b/src/crash.c @@ -490,10 +490,9 @@ static void crash_handler(int sig) static volatile unsigned long crashed_ = 0; /* - * let's hope startup_dir and argv0 aren't trashed. + * let's hope argv0 aren't trashed. * both are defined in main.c. */ - extern gchar *startup_dir; extern gchar *argv0; @@ -533,7 +532,7 @@ static void crash_handler(int sig) args[3] = buf; args[4] = NULL; - chdir(startup_dir); + chdir(sylpheed_get_startup_dir()); setgid(getgid()); setuid(getuid()); execvp(argv0, args); diff --git a/src/export.c b/src/export.c index 0f7f8d658..a0886c6a4 100644 --- a/src/export.c +++ b/src/export.c @@ -38,6 +38,7 @@ #include #include "intl.h" +#include "sylpheed.h" #include "main.h" #include "inc.h" #include "mbox.h" @@ -75,7 +76,7 @@ gint export_mbox(FolderItem *default_src) else gtk_widget_show(window); - change_dir(startup_dir); + change_dir(sylpheed_get_startup_dir()); if (default_src && default_src->path) src_id = folder_item_get_identifier(default_src); diff --git a/src/folder.c b/src/folder.c index f1432926f..701156d93 100644 --- a/src/folder.c +++ b/src/folder.c @@ -1271,6 +1271,21 @@ gint folder_item_scan(FolderItem *item) return 0; } +static gboolean folder_scan_all_items_func(GNode *node, gpointer data) +{ + FolderItem *item = node->data; + + folder_item_scan(item); + + return FALSE; +} + +void folder_scan_all_items(Folder * folder) +{ + g_node_traverse(folder->node, G_PRE_ORDER, + G_TRAVERSE_ALL, -1, folder_scan_all_items_func, NULL); +} + static void folder_item_scan_foreach_func(gpointer key, gpointer val, gpointer data) { diff --git a/src/gtk/Makefile.am b/src/gtk/Makefile.am index ba395c506..5e41bfc08 100644 --- a/src/gtk/Makefile.am +++ b/src/gtk/Makefile.am @@ -4,6 +4,7 @@ libsylpheedgtk_la_SOURCES = \ about.c about.h \ colorlabel.c colorlabel.h \ description_window.c description_window.h \ + filesel.c filesel.h \ gtkutils.c gtkutils.h \ gtkshruler.c gtkshruler.h \ gtksctree.c gtksctree.h \ diff --git a/src/filesel.c b/src/gtk/filesel.c similarity index 98% rename from src/filesel.c rename to src/gtk/filesel.c index 13d32c938..e4af38f8e 100644 --- a/src/filesel.c +++ b/src/gtk/filesel.c @@ -26,7 +26,7 @@ #include #include -#include "main.h" +#include "sylpheed.h" #include "filesel.h" #include "manage_window.h" #include "gtkutils.h" @@ -70,7 +70,7 @@ gchar *filesel_select_file(const gchar *title, const gchar *file) } if (!cwd) - cwd = g_strconcat(startup_dir, G_DIR_SEPARATOR_S, NULL); + cwd = g_strconcat(sylpheed_get_startup_dir(), G_DIR_SEPARATOR_S, NULL); gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), cwd); @@ -133,7 +133,7 @@ GList *filesel_select_multiple_files(const gchar *title, const gchar *file) } if (!cwd) - cwd = g_strconcat(startup_dir, G_DIR_SEPARATOR_S, NULL); + cwd = g_strconcat(sylpheed_get_startup_dir(), G_DIR_SEPARATOR_S, NULL); gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), cwd); diff --git a/src/filesel.h b/src/gtk/filesel.h similarity index 100% rename from src/filesel.h rename to src/gtk/filesel.h diff --git a/src/gtk/pluginwindow.c b/src/gtk/pluginwindow.c index a17bc6437..10dcab240 100644 --- a/src/gtk/pluginwindow.c +++ b/src/gtk/pluginwindow.c @@ -28,8 +28,8 @@ #include "intl.h" #include "plugin.h" -#include "../filesel.h" -#include "../alertpanel.h" +#include "filesel.h" +#include "alertpanel.h" typedef struct _PluginWindow { diff --git a/src/gtk/sslcertwindow.c b/src/gtk/sslcertwindow.c index ec6c5823f..ab444e77e 100644 --- a/src/gtk/sslcertwindow.c +++ b/src/gtk/sslcertwindow.c @@ -29,7 +29,7 @@ #include "intl.h" #include "ssl_certificate.h" #include "utils.h" -#include "../alertpanel.h" +#include "alertpanel.h" #include "hooks.h" static void toggle_cert_cb(GtkWidget *widget, diff --git a/src/main.c b/src/main.c index b956aa3b4..4ad6e9359 100644 --- a/src/main.c +++ b/src/main.c @@ -83,7 +83,6 @@ #include "crash.h" gchar *prog_version; -gchar *startup_dir; #ifdef CRASH_DIALOG gchar *argv0; #endif @@ -169,7 +168,6 @@ int main(int argc, char *argv[]) } prog_version = PROG_VERSION; - startup_dir = g_get_current_dir(); #ifdef CRASH_DIALOG argv0 = g_strdup(argv[0]); #endif @@ -403,7 +401,7 @@ static void parse_cmd_opt(int argc, char *argv[]) if (!cmd.attach_files) cmd.attach_files = g_ptr_array_new(); if (*p != G_DIR_SEPARATOR) - file = g_strconcat(startup_dir, + file = g_strconcat(sylpheed_get_startup_dir(), G_DIR_SEPARATOR_S, p, NULL); else diff --git a/src/main.h b/src/main.h index 3e07b17e3..3728c0991 100644 --- a/src/main.h +++ b/src/main.h @@ -24,7 +24,6 @@ #include extern gchar *prog_version; -extern gchar *startup_dir; extern gboolean debug_mode; void app_will_exit (GtkWidget *widget, gpointer data);