From: Melvin Hadasht Date: Fri, 19 Jul 2002 08:45:10 +0000 (+0000) Subject: * src/selective_download.[ch] X-Git-Tag: rel_0_8_0~30 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=292529e6204af09bd0bdad38c47e6857a105bf49;hp=f4458b9c9854f0a1a1eb071ffac3e624f8cb2d8c * src/selective_download.[ch] Fixed bug where closing the dialog with the window manager's close button will not unlock the summary Corrected some function declarations that missed a return value Made the source code comply better with coding style. * src/prefs_common.c Added a new browser command line for Mozilla. --- diff --git a/ChangeLog.claws b/ChangeLog.claws index 3f2d48b77..df2a5a313 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,13 @@ +2002-07-19 [melvin] 0.7.8claws77 + + * src/selective_download.[ch] + Fixed bug where closing the dialog with the window manager's + close button will not unlock the summary + Corrected some function declarations that missed a return value + Made the source code comply better with coding style. + * src/prefs_common.c + Added new browser command line for Mozilla. + 2002-07-18 [paul] 0.7.8claws76 * src/mainwindow.c @@ -56,7 +66,7 @@ * src/summaryview.c removed setting folder status from summaryview. folder.c should update all message counts correctly. - + 2002-07-15 [paul] 0.7.8claws68 * po/pt_BR.po @@ -376,7 +386,7 @@ * src/prefs_common.c ...and in the process, tweak the gui a little - + 2002-06-25 [alfons] 0.7.8claws27 * configure.in diff --git a/configure.in b/configure.in index fdc27258d..a59a64d52 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=7 MICRO_VERSION=8 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws76 +EXTRA_VERSION=claws77 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/prefs_common.c b/src/prefs_common.c index 6631820f5..e33197260 100644 --- a/src/prefs_common.c +++ b/src/prefs_common.c @@ -2862,11 +2862,12 @@ static void prefs_other_create(void) gtk_table_attach (GTK_TABLE (ext_table), uri_combo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtkut_combo_set_items (GTK_COMBO (uri_combo), + "mozilla -remote 'openurl(%s,new-window)'", "netscape -remote 'openURL(%s,raise)'", "netscape '%s'", "gnome-moz-remote --raise --newwin '%s'", "kfmclient openURL '%s'", - "opera -newwindow '%s'", + "opera -newwindow '%s'", "kterm -e w3m '%s'", "kterm -e lynx '%s'", NULL); diff --git a/src/selective_download.c b/src/selective_download.c index 57f638d69..f51eac2ad 100644 --- a/src/selective_download.c +++ b/src/selective_download.c @@ -76,16 +76,17 @@ static GdkPixmap *deletedxpm; static GdkBitmap *deletedxpmmask; /* local functions */ -static void sd_clear_msglist(); -static void sd_remove_header_files(); -static void sd_toggle_btn(); -static SD_State sd_header_filter (MsgInfo *msginfo); -static MsgInfo *sd_get_msginfo_from_file (const gchar *filename); - -static void sd_clist_set_pixmap(HeaderItems *items, gint row); -static void sd_clist_get_items(); -static void sd_clist_set_items(); -static void sd_update_msg_num(PrefsAccount *acc); +static void sd_clear_msglist (void); +static void sd_remove_header_files (void); +static void sd_toggle_btn (void); +static SD_State sd_header_filter (MsgInfo *msginfo); +static MsgInfo *sd_get_msginfo_from_file (const gchar *filename); + +static void sd_clist_set_pixmap (HeaderItems *items, + gint row); +static void sd_clist_get_items (void); +static void sd_clist_set_items (void); +static void sd_update_msg_num (PrefsAccount *acc); enum { PREVIEW_NEW, @@ -97,25 +98,37 @@ enum { }; /* callbacks */ -static void sd_action_cb(GtkWidget *widget, guint action); +static void sd_action_cb (GtkWidget *widget, + guint action); + +static void sd_select_row_cb (GtkCList *clist, + gint row, + gint column, + GdkEvent *event, + gpointer user_data); +static gint sd_key_pressed (GtkWidget *widget, + GdkEventKey *event, + gpointer data); +static gint sd_delete_event_cb (GtkWidget *widget, + GdkEvent *event, + gpointer data); -static void sd_select_row_cb(GtkCList *clist, gint row, gint column, - GdkEvent *event, gpointer user_data); -static void sd_key_pressed(GtkWidget *widget, - GdkEventKey *event, - gpointer data); /* account menu */ -static void sd_ac_label_pressed(GtkWidget *widget, - GdkEventButton *event, - gpointer data); +static gint sd_ac_label_pressed (GtkWidget *widget, + GdkEventButton *event, + gpointer data); -static void sd_ac_menu_popup_closed(GtkMenuShell *menu_shell); -static void sd_ac_menu_cb(GtkMenuItem *menuitem, gpointer data); -static void sd_ac_menu_set(); +static void sd_ac_menu_popup_closed (GtkMenuShell *menu_shell); +static void sd_ac_menu_cb (GtkMenuItem *menuitem, + gpointer data); +static void sd_ac_menu_set (void); /* preview popup */ -static void sd_preview_popup_closed(GtkMenuShell *menu_shell); -static void sd_preview_popup_cb(GtkWidget *widget, GdkEventButton *event); +static void sd_preview_popup_closed (GtkMenuShell *menu_shell); +static gint sd_preview_popup_cb (GtkWidget *widget, + GdkEventButton *event, + gpointer data); + static GtkItemFactoryEntry preview_popup_entries[] = { {N_("/Preview _new messages"), NULL, sd_action_cb, PREVIEW_NEW, NULL}, @@ -123,11 +136,12 @@ static GtkItemFactoryEntry preview_popup_entries[] = }; /* create dialog */ -static void sd_window_create(MainWindow *mainwin); -static void sd_create_toolbar(MainWindow *mainwin, GtkWidget *container); +static void sd_window_create (MainWindow *mainwin); +static void sd_create_toolbar (MainWindow *mainwin, + GtkWidget *container); /* pixmaps */ -void sd_init_pixmaps(MainWindow *mainwin); +void sd_init_pixmaps (MainWindow *mainwin); void selective_download(MainWindow *mainwin) { @@ -422,16 +436,6 @@ static void sd_clist_get_items(void) g_free(path); } -static gint sd_deleted_cb(GtkWidget *widget, GdkEventAny *event, gpointer data) -{ - sd_remove_header_files(); - sd_clear_msglist(); - gtk_widget_destroy(selective.window); - selective.window = NULL; - inc_unlock(); - return TRUE; -} - /* --- Callbacks -- */ static void sd_action_cb(GtkWidget *widget, guint action) { @@ -508,19 +512,30 @@ static void sd_select_row_cb(GtkCList *clist, gint row, gint column, } } -static void sd_key_pressed(GtkWidget *widget, +static gint sd_key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data) { - if (event && event->keyval == GDK_Escape) + if (event && event->keyval == GDK_Escape) { sd_action_cb(widget, DONE); + return TRUE; + } + return FALSE; +} + +static gint sd_delete_event_cb(GtkWidget *widget, + GdkEvent *event, + gpointer data) +{ + sd_action_cb(widget, DONE); + return TRUE; } /* account menu */ -static void sd_ac_label_pressed(GtkWidget *widget, GdkEventButton *event, +static gint sd_ac_label_pressed(GtkWidget *widget, GdkEventButton *event, gpointer data) { - if (!event) return; + if (!event) return FALSE; gtk_button_set_relief(GTK_BUTTON(widget), GTK_RELIEF_NORMAL); gtk_object_set_data(GTK_OBJECT(selective.ac_menu), "menu_button", @@ -529,6 +544,7 @@ static void sd_ac_label_pressed(GtkWidget *widget, GdkEventButton *event, gtk_menu_popup(GTK_MENU(selective.ac_menu), NULL, NULL, menu_button_position, widget, event->button, event->time); + return TRUE; } static void sd_ac_menu_popup_closed(GtkMenuShell *menu_shell) @@ -590,16 +606,19 @@ static void sd_preview_popup_closed(GtkMenuShell *menu_shell) manage_window_focus_in(selective.window, NULL, NULL); } -static void sd_preview_popup_cb(GtkWidget *widget, GdkEventButton *event) +static gint sd_preview_popup_cb(GtkWidget *widget, GdkEventButton *event, + gpointer data) { - if (!event) return; + if (!event) return FALSE; if (event->button == 1) { gtk_button_set_relief(GTK_BUTTON(widget), GTK_RELIEF_NORMAL); gtk_menu_popup(GTK_MENU(selective.preview_popup), NULL, NULL, menu_button_position, widget, event->button, event->time); + return TRUE; } + return FALSE; } static void sd_create_toolbar(MainWindow *mainwin, GtkWidget *container) @@ -806,7 +825,7 @@ static void sd_window_create(MainWindow *mainwin) gtk_signal_connect (GTK_OBJECT (window), "delete_event", - GTK_SIGNAL_FUNC (gtk_widget_hide_on_delete), + GTK_SIGNAL_FUNC (sd_delete_event_cb), NULL); gtk_signal_connect (GTK_OBJECT(window), "key_press_event", GTK_SIGNAL_FUNC(sd_key_pressed), diff --git a/src/selective_download.h b/src/selective_download.h index 37097f95f..9a1f19a24 100644 --- a/src/selective_download.h +++ b/src/selective_download.h @@ -44,7 +44,7 @@ struct _HeaderItems { guint del_by_old_session : 1; }; -void selective_download(MainWindow *mainwin); -void sd_reflect_prefs_pixmap_theme(); +void selective_download (MainWindow *mainwin); +void sd_reflect_prefs_pixmap_theme (void); #endif /* __SELECTIVE_DOWNLOAD_H__ */