0.9.0claws20
authorChristoph Hohmann <reboot@gmx.ch>
Sat, 7 Jun 2003 20:18:22 +0000 (20:18 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sat, 7 Jun 2003 20:18:22 +0000 (20:18 +0000)
* 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

16 files changed:
ChangeLog.claws
configure.ac
doc/src/ui_seperation.txt
src/Makefile.am
src/common/sylpheed.c
src/common/sylpheed.h
src/crash.c
src/export.c
src/folder.c
src/gtk/Makefile.am
src/gtk/filesel.c [moved from src/filesel.c with 98% similarity]
src/gtk/filesel.h [moved from src/filesel.h with 100% similarity]
src/gtk/pluginwindow.c
src/gtk/sslcertwindow.c
src/main.c
src/main.h

index cb4cffc..77143f6 100644 (file)
@@ -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
index 42585dc..e2911f3 100644 (file)
@@ -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
index 4f3b9cc..d00a02a 100644 (file)
@@ -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
index 9b15e03..4501133 100644 (file)
@@ -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 \
index da8b142..716e09e 100644 (file)
@@ -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;
+}
index ffb927d..bf95d5c 100644 (file)
@@ -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  ();
index e33915d..f492855 100644 (file)
@@ -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);
index 0f7f8d6..a0886c6 100644 (file)
@@ -38,6 +38,7 @@
 #include <gtk/gtksignal.h>
 
 #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);
index f143292..701156d 100644 (file)
@@ -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)
 {
index ba395c5..5e41bfc 100644 (file)
@@ -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 \
similarity index 98%
rename from src/filesel.c
rename to src/gtk/filesel.c
index 13d32c9..e4af38f 100644 (file)
@@ -26,7 +26,7 @@
 #include <gtk/gtksignal.h>
 #include <gtk/gtkeditable.h>
 
-#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);
 
similarity index 100%
rename from src/filesel.h
rename to src/gtk/filesel.h
index a17bc64..10dcab2 100644 (file)
@@ -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
 {
index ec6c582..ab444e7 100644 (file)
@@ -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,
index b956aa3..4ad6e93 100644 (file)
@@ -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
index 3e07b17..3728c09 100644 (file)
@@ -24,7 +24,6 @@
 #include <gtk/gtkwidget.h>
 
 extern gchar *prog_version;
-extern gchar *startup_dir;
 extern gboolean debug_mode;
 
 void app_will_exit     (GtkWidget *widget, gpointer data);