2005-07-05 [colin] 1.9.12cvs20
authorColin Leroy <colin@colino.net>
Tue, 5 Jul 2005 16:53:12 +0000 (16:53 +0000)
committerColin Leroy <colin@colino.net>
Tue, 5 Jul 2005 16:53:12 +0000 (16:53 +0000)
* src/prefs_account.c
* src/prefs_account.h
Fix typo
* src/gtk/filesel.c
* src/gtk/filesel.h
Add a way to filter the view
* src/gtk/pluginwindow.c
Filter loadable stuff
* src/plugins/pgpmime/prefs_gpg.c
Fix missing unregistration
* .cvsignore
* src/etpan/.cvsignore
* src/plugins/spamassassin/.cvsignore
Add more stuff to cvs ignored files

12 files changed:
.cvsignore
ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/etpan/.cvsignore [new file with mode: 0644]
src/gtk/filesel.c
src/gtk/filesel.h
src/gtk/pluginwindow.c
src/plugins/pgpmime/prefs_gpg.c
src/plugins/spamassassin/.cvsignore
src/prefs_account.c
src/prefs_account.h

index 8004468..29f9b20 100644 (file)
@@ -5,6 +5,9 @@ config.h
 config.h.in
 config.log
 config.status
+config.guess
+config.sub
+ltmain.sh
 configure
 depcomp
 libtool
@@ -19,3 +22,4 @@ TAGS
 *.swp
 depcomp
 sylpheed-claws.pc
+patches
index 9e435c1..cf9e68a 100644 (file)
@@ -1,3 +1,20 @@
+2005-07-05 [colin]     1.9.12cvs20
+
+       * src/prefs_account.c
+       * src/prefs_account.h
+               Fix typo
+       * src/gtk/filesel.c
+       * src/gtk/filesel.h
+               Add a way to filter the view
+       * src/gtk/pluginwindow.c
+               Filter loadable stuff
+       * src/plugins/pgpmime/prefs_gpg.c
+               Fix missing unregistration
+       * .cvsignore
+       * src/etpan/.cvsignore
+       * src/plugins/spamassassin/.cvsignore
+               Add more stuff to cvs ignored files
+
 2005-07-04 [colin]     1.9.12cvs19
 
        * src/imap.c
index 0c01c74..987a96b 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.36.2.35 -r 1.36.2.36 src/common/utils.c;  cvs diff -u -r 1.20.2.18 -r 1.20.2.19 src/common/utils.h;  ) > 1.9.12cvs17.patchset
 ( cvs diff -u -r 1.395.2.90 -r 1.395.2.91 src/summaryview.c;  ) > 1.9.12cvs18.patchset
 ( cvs diff -u -r 1.179.2.45 -r 1.179.2.46 src/imap.c;  ) > 1.9.12cvs19.patchset
+( cvs diff -u -r 1.8 -r 1.9 .cvsignore;  cvs diff -u -r 1.105.2.26 -r 1.105.2.27 src/prefs_account.c;  cvs diff -u -r 1.49.2.12 -r 1.49.2.13 src/prefs_account.h;  diff -u /dev/null src/etpan/.cvsignore;  cvs diff -u -r 1.2.2.13 -r 1.2.2.14 src/gtk/filesel.c;  cvs diff -u -r 1.1.4.3 -r 1.1.4.4 src/gtk/filesel.h;  cvs diff -u -r 1.5.2.15 -r 1.5.2.16 src/gtk/pluginwindow.c;  cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/plugins/pgpmime/prefs_gpg.c;  cvs diff -u -r 1.1 -r 1.2 src/plugins/spamassassin/.cvsignore;  ) > 1.9.12cvs20.patchset
index 34f135f..a8fa28b 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=19
+EXTRA_VERSION=20
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
diff --git a/src/etpan/.cvsignore b/src/etpan/.cvsignore
new file mode 100644 (file)
index 0000000..5cb43f4
--- /dev/null
@@ -0,0 +1,8 @@
+.deps
+.libs
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+*.loT
index 2a27e13..67b7c7d 100644 (file)
@@ -44,7 +44,8 @@
 static gchar *last_selected_dir = NULL;
 static GList *filesel_create(const gchar *title, const gchar *path, 
                             gboolean multiple_files,
-                            gboolean open, gboolean folder_mode)
+                            gboolean open, gboolean folder_mode,
+                            const gchar *filter)
 {
        GSList *slist = NULL, *slist_orig = NULL;
        GList *list = NULL;
@@ -59,7 +60,13 @@ static GList *filesel_create(const gchar *title, const gchar *path,
                                GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                                action_btn, GTK_RESPONSE_OK, 
                                NULL);
-       
+       if (filter != NULL) {
+               GtkFileFilter *file_filter = gtk_file_filter_new();
+               gtk_file_filter_add_pattern(file_filter, filter);
+               gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(chooser),
+                                           file_filter);
+       }
+
        manage_window_set_transient (GTK_WINDOW(chooser));
        gtk_window_set_modal(GTK_WINDOW(chooser), TRUE);
 
@@ -126,7 +133,7 @@ static GList *filesel_create(const gchar *title, const gchar *path,
  */
 GList *filesel_select_multiple_files_open(const gchar *title)
 {
-       return filesel_create(title, NULL, TRUE, TRUE, FALSE);
+       return filesel_create(title, NULL, TRUE, TRUE, FALSE, NULL);
 }
 
 /**
@@ -137,9 +144,10 @@ GList *filesel_select_multiple_files_open(const gchar *title)
  * @param path the optional path to save to
  */
 static gchar *filesel_select_file(const gchar *title, const gchar *path,
-                                 gboolean open, gboolean folder_mode)
+                                 gboolean open, gboolean folder_mode,
+                                 const gchar *filter)
 {
-       GList * list = filesel_create(title, path, FALSE, open, folder_mode);
+       GList * list = filesel_create(title, path, FALSE, open, folder_mode, filter);
        gchar * result = NULL;
        if (list) {
                result = strdup(list->data);
@@ -149,16 +157,22 @@ static gchar *filesel_select_file(const gchar *title, const gchar *path,
 }
 gchar *filesel_select_file_open(const gchar *title, const gchar *path)
 {
-       return filesel_select_file (title, path, TRUE, FALSE);
+       return filesel_select_file (title, path, TRUE, FALSE, NULL);
+}
+
+gchar *filesel_select_file_open_with_filter(const gchar *title, const gchar *path,
+                                           const gchar *filter)
+{
+       return filesel_select_file (title, path, TRUE, FALSE, filter);
 }
 
 gchar *filesel_select_file_save(const gchar *title, const gchar *path)
 {
-       return filesel_select_file (title, path, FALSE, FALSE);
+       return filesel_select_file (title, path, FALSE, FALSE, NULL);
 }
 
 gchar *filesel_select_file_open_folder(const gchar *title, const gchar *path)
 {
-       return filesel_select_file (title, path, TRUE, TRUE);
+       return filesel_select_file (title, path, TRUE, TRUE, NULL);
 }
 
index b1518a4..62ad158 100644 (file)
@@ -23,6 +23,8 @@
 #include <glib.h>
 
 gchar *filesel_select_file_open(const gchar *title, const gchar *path);
+gchar *filesel_select_file_open_with_filter(const gchar *title, const gchar *path,
+                                           const gchar *filter);
 gchar *filesel_select_file_save(const gchar *title, const gchar *path);
 gchar *filesel_select_file_open_folder(const gchar *title, const gchar *path);
 
index 3950ca2..6f8ffdd 100644 (file)
@@ -151,7 +151,8 @@ static void load_cb(GtkButton *button, PluginWindow *pluginwindow)
 {
        gchar *file, *error = NULL;
 
-       file = filesel_select_file_open(_("Select Plugin to load"), PLUGINDIR);
+       file = filesel_select_file_open_with_filter(_("Select Plugin to load"), 
+                                                   PLUGINDIR, "*.so");
        if (file == NULL)
                return;
 
index df158e2..3854efa 100644 (file)
@@ -524,4 +524,5 @@ void prefs_gpg_init()
 void prefs_gpg_done()
 {
        prefs_gtk_unregister_page((PrefsPage *) &gpg_page);
+       prefs_account_unregister_page((PrefsPage *) &gpg_account_page);
 }
index eb3023e..2ceb791 100644 (file)
@@ -3116,7 +3116,7 @@ void prefs_account_register_page(PrefsPage *page)
        prefs_pages = g_slist_append(prefs_pages, page);
 }
 
-void prefs_acount_unregister_page(PrefsPage *page)
+void prefs_account_unregister_page(PrefsPage *page)
 {
        prefs_pages = g_slist_remove(prefs_pages, page);
 }
index 5e8199a..dea35af 100644 (file)
@@ -197,6 +197,6 @@ const gchar *prefs_account_get_privacy_prefs(PrefsAccount *account, gchar *id);
 void prefs_account_set_privacy_prefs(PrefsAccount *account, gchar *id, gchar *new_value);
 
 void prefs_account_register_page       (PrefsPage      *page);
-void prefs_acount_unregister_page      (PrefsPage      *page);
+void prefs_account_unregister_page     (PrefsPage      *page);
 
 #endif /* PREFS_ACCOUNT_H */