From c43d28766897d794bd609d2ce7460da1f29d5be8 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Tue, 30 Aug 2005 16:49:27 +0000 Subject: [PATCH] 2005-08-30 [colin] 1.9.13cvs72 * src/folderview.c Fix flickering * src/mainwindow.c Remove useless callback * src/mimeview.c * src/gtk/filesel.c * src/gtk/filesel.h Add a filesel_select_file_save_folder() - used by Save All --- ChangeLog-gtk2.claws | 11 +++++++++++ PATCHSETS | 1 + configure.ac | 2 +- src/folderview.c | 2 -- src/gtk/filesel.c | 12 +++++++++--- src/gtk/filesel.h | 1 + src/mainwindow.c | 18 +----------------- src/mimeview.c | 2 +- 8 files changed, 25 insertions(+), 24 deletions(-) diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index ef234c75f..9d7f96b3b 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -1,3 +1,14 @@ +2005-08-30 [colin] 1.9.13cvs72 + + * src/folderview.c + Fix flickering + * src/mainwindow.c + Remove useless callback + * src/mimeview.c + * src/gtk/filesel.c + * src/gtk/filesel.h + Add a filesel_select_file_save_folder() - used by Save All + 2005-08-29 [paul] 1.9.13cvs71 * AUTHORS diff --git a/PATCHSETS b/PATCHSETS index 7c84bfc26..6be3d086e 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -757,3 +757,4 @@ ( cvs diff -u -r 1.179.2.63 -r 1.179.2.64 src/imap.c; cvs diff -u -r 1.18.2.10 -r 1.18.2.11 src/stock_pixmap.h; cvs diff -u -r 1.36.2.41 -r 1.36.2.42 src/common/utils.c; cvs diff -u -r 1.20.2.22 -r 1.20.2.23 src/common/utils.h; cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/pixmaps/trash_btn.xpm; ) > 1.9.13cvs69.patchset ( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/plugins/pgpinline/pgpinline.c; ) > 1.9.13cvs70.patchset ( cvs diff -u -r 1.100.2.23 -r 1.100.2.24 AUTHORS; cvs diff -u -r 1.25.2.9 -r 1.25.2.10 src/matcher_parser_parse.y; cvs diff -u -r 1.1.4.18 -r 1.1.4.19 src/etpan/imap-thread.c; ) > 1.9.13cvs71.patchset +( cvs diff -u -r 1.207.2.58 -r 1.207.2.59 src/folderview.c; cvs diff -u -r 1.274.2.56 -r 1.274.2.57 src/mainwindow.c; cvs diff -u -r 1.83.2.37 -r 1.83.2.38 src/mimeview.c; cvs diff -u -r 1.2.2.14 -r 1.2.2.15 src/gtk/filesel.c; cvs diff -u -r 1.1.4.4 -r 1.1.4.5 src/gtk/filesel.h; ) > 1.9.13cvs72.patchset diff --git a/configure.ac b/configure.ac index a7335964c..0b2ea2711 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=13 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=71 +EXTRA_VERSION=72 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/folderview.c b/src/folderview.c index 1ceb2ad67..a7e715be3 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -1857,8 +1857,6 @@ static void folderview_popup_close(GtkMenuShell *menu_shell, { if (!folderview->opened) return; - gtkut_ctree_set_focus_row(GTK_CTREE(folderview->ctree), - folderview->opened); gtk_ctree_select(GTK_CTREE(folderview->ctree), folderview->opened); } diff --git a/src/gtk/filesel.c b/src/gtk/filesel.c index 67b7c7d9e..2914ee822 100644 --- a/src/gtk/filesel.c +++ b/src/gtk/filesel.c @@ -53,12 +53,13 @@ static GList *filesel_create(const gchar *title, const gchar *path, gint action = (open == TRUE) ? (folder_mode == TRUE ? GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER: GTK_FILE_CHOOSER_ACTION_OPEN): - GTK_FILE_CHOOSER_ACTION_SAVE; + (folder_mode == TRUE ? GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER: + GTK_FILE_CHOOSER_ACTION_SAVE); gchar * action_btn = (open == TRUE) ? GTK_STOCK_OPEN:GTK_STOCK_SAVE; GtkWidget *chooser = gtk_file_chooser_dialog_new (title, NULL, action, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - action_btn, GTK_RESPONSE_OK, + action_btn, GTK_RESPONSE_ACCEPT, NULL); if (filter != NULL) { GtkFileFilter *file_filter = gtk_file_filter_new(); @@ -96,7 +97,7 @@ static GList *filesel_create(const gchar *title, const gchar *path, gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), last_selected_dir); } - if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_OK) + if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_ACCEPT) slist = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (chooser)); manage_window_focus_out(chooser, NULL, NULL); @@ -176,3 +177,8 @@ gchar *filesel_select_file_open_folder(const gchar *title, const gchar *path) return filesel_select_file (title, path, TRUE, TRUE, NULL); } +gchar *filesel_select_file_save_folder(const gchar *title, const gchar *path) +{ + return filesel_select_file (title, path, FALSE, TRUE, NULL); +} + diff --git a/src/gtk/filesel.h b/src/gtk/filesel.h index 62ad15852..e4c79c9ac 100644 --- a/src/gtk/filesel.h +++ b/src/gtk/filesel.h @@ -27,6 +27,7 @@ gchar *filesel_select_file_open_with_filter(const gchar *title, const gchar *pat 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); +gchar *filesel_select_file_save_folder(const gchar *title, const gchar *path); GList *filesel_select_multiple_files_open(const gchar *title); diff --git a/src/mainwindow.c b/src/mainwindow.c index a4e263498..aa9b27bee 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -123,8 +123,6 @@ static void toolbar_child_detached (GtkWidget *widget, static gboolean ac_label_button_pressed (GtkWidget *widget, GdkEventButton *event, gpointer data); -static void ac_menu_popup_closed (GtkMenuShell *menu_shell, - gpointer data); static gint main_window_close_cb (GtkWidget *widget, GdkEventAny *event, @@ -1088,8 +1086,6 @@ MainWindow *main_window_create(SeparateType type) /* set account selection menu */ ac_menu = gtk_item_factory_get_widget (ifactory, "/Configuration/Change current account"); - g_signal_connect(G_OBJECT(ac_menu), "selection_done", - G_CALLBACK(ac_menu_popup_closed), mainwin); mainwin->ac_menu = ac_menu; toolbar_main_set_sensitive(mainwin); @@ -2371,18 +2367,6 @@ static gboolean ac_label_button_pressed(GtkWidget *widget, GdkEventButton *event return TRUE; } -static void ac_menu_popup_closed(GtkMenuShell *menu_shell, gpointer data) -{ - MainWindow *mainwin = (MainWindow *)data; - GtkWidget *button; - - button = g_object_get_data(G_OBJECT(menu_shell), "menu_button"); - if (!button) return; - gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); - g_object_set_data(G_OBJECT(mainwin->ac_menu), "menu_button", NULL); - manage_window_focus_in(mainwin->window, NULL, NULL); -} - static gint main_window_close_cb(GtkWidget *widget, GdkEventAny *event, gpointer data) { @@ -3133,7 +3117,7 @@ static void account_selector_menu_cb(GtkMenuItem *menuitem, gpointer data) toolbar_update(TOOLBAR_MAIN, mainwindow_get_mainwindow()); main_window_set_menu_sensitive(mainwindow_get_mainwindow()); toolbar_main_set_sensitive(mainwindow_get_mainwindow()); - + gtk_button_set_relief(GTK_BUTTON(mainwindow_get_mainwindow()->ac_button), GTK_RELIEF_NONE); item = folderview_get_selected_item( mainwindow_get_mainwindow()->folderview); if (item) { diff --git a/src/mimeview.c b/src/mimeview.c index 2dd927c50..9faf8056d 100644 --- a/src/mimeview.c +++ b/src/mimeview.c @@ -1065,7 +1065,7 @@ static void mimeview_save_all(MimeView *mimeview) startdir = g_strconcat(prefs_common.attach_save_dir, G_DIR_SEPARATOR_S, NULL); - dirname = filesel_select_file_open_folder(_("Select destination folder"), startdir); + dirname = filesel_select_file_save_folder(_("Select destination folder"), startdir); if (!dirname) { if (startdir) g_free(startdir); return; -- 2.25.1