From 2c5ceb0b82010436e0a8497be151e2bafc62d709 Mon Sep 17 00:00:00 2001 From: Christoph Hohmann Date: Fri, 6 Dec 2002 22:56:04 +0000 Subject: [PATCH 1/1] 0.8.6claws68 * src/editgroup.c This patch changes the 'Edit Group Details' dialog to allow extended selections in either pane, so that addresses can be added or removed from a group more quickly and easily. (it actually is a net decrease in file size, as some unnecessary functions have been removed). (patch submitted by Luke Plant ) --- ChangeLog.claws | 22 ++++++++++++++++++++++ configure.in | 2 +- src/editgroup.c | 39 ++++++++++++++++++--------------------- src/main.c | 2 ++ 4 files changed, 43 insertions(+), 22 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 735d78496..03548284d 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,25 @@ +2002-12-06 [christoph] 0.8.6claws68 + + * src/editgroup.c + This patch changes the 'Edit Group Details' dialog to + allow extended selections in either pane, so that + addresses can be added or removed from a group more + quickly and easily. (it actually is a net decrease in + file size, as some unnecessary functions have been + removed). + (patch submitted by Luke Plant ) + +2002-12-06 [christoph] 0.8.6claws67 + + * src/Makefile.am + * src/template.[ch] ** REMOVE ** + * src/common/Makefile.am + * src/common/template.[ch] ** NEW ** + move template files to common directory + + * src/nntp.c + add missing log.h include + 2002-12-06 [melvin] 0.8.6claws66 * src/prefs_actions.c diff --git a/configure.in b/configure.in index 7b88665a9..d71eff7ed 100644 --- a/configure.in +++ b/configure.in @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=6 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws66 +EXTRA_VERSION=claws68 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/editgroup.c b/src/editgroup.c index 712fe5177..48877b5a2 100644 --- a/src/editgroup.c +++ b/src/editgroup.c @@ -70,8 +70,6 @@ static struct _GroupEdit_dlg { GtkCList *clist_avail; GHashTable *hashEMail; - gint rowIndGroup; - gint rowIndAvail; } groupeditdlg; @@ -165,13 +163,6 @@ static void edit_group_load_clist( GtkCList *clist, GList *listEMail ) { } } -static void edit_group_group_selected( GtkCList *clist, gint row, gint column, GdkEvent *event, gpointer data ) { - groupeditdlg.rowIndGroup = row; -} - -static void edit_group_avail_selected( GtkCList *clist, gint row, gint column, GdkEvent *event, gpointer data ) { - groupeditdlg.rowIndAvail = row; -} static gint edit_group_move_email( GtkCList *clist_from, GtkCList *clist_to, gint row ) { ItemEMail *email = gtk_clist_get_row_data( clist_from, row ); @@ -185,13 +176,25 @@ static gint edit_group_move_email( GtkCList *clist_from, GtkCList *clist_to, gin } static void edit_group_to_group( GtkWidget *widget, gpointer data ) { - groupeditdlg.rowIndGroup = edit_group_move_email( groupeditdlg.clist_avail, - groupeditdlg.clist_group, groupeditdlg.rowIndAvail ); + GList *selected = GTK_CLIST(groupeditdlg.clist_avail)->selection; + /* Clear the selected rows on destination clist */ + gtk_clist_unselect_all(groupeditdlg.clist_group); + while (selected) { + edit_group_move_email( groupeditdlg.clist_avail, + groupeditdlg.clist_group, GPOINTER_TO_UINT(selected->data) ); + /* cannot use g_list_next as the selection list will have changed */ + selected = GTK_CLIST(groupeditdlg.clist_avail)->selection; + } } static void edit_group_to_avail( GtkWidget *widget, gpointer data ) { - groupeditdlg.rowIndAvail = edit_group_move_email( groupeditdlg.clist_group, - groupeditdlg.clist_avail, groupeditdlg.rowIndGroup ); + GList *selected = GTK_CLIST(groupeditdlg.clist_group)->selection; + gtk_clist_unselect_all(groupeditdlg.clist_avail); + while (selected) { + edit_group_move_email( groupeditdlg.clist_group, + groupeditdlg.clist_avail, GPOINTER_TO_UINT(selected->data) ); + selected = GTK_CLIST(groupeditdlg.clist_group)->selection; + } } static void edit_group_list_group_button( GtkCList *clist, GdkEventButton *event, gpointer data ) { @@ -318,7 +321,7 @@ static void addressbook_edit_group_create( gboolean *cancelled ) { clist_group = gtk_clist_new_with_titles( GROUP_N_COLS, titles ); gtk_container_add( GTK_CONTAINER(clist_swin), clist_group ); - gtk_clist_set_selection_mode( GTK_CLIST(clist_group), GTK_SELECTION_BROWSE ); + gtk_clist_set_selection_mode( GTK_CLIST(clist_group), GTK_SELECTION_EXTENDED ); gtk_clist_set_column_width( GTK_CLIST(clist_group), GROUP_COL_NAME, GROUP_COL_WIDTH_NAME ); gtk_clist_set_column_width( GTK_CLIST(clist_group), GROUP_COL_EMAIL, GROUP_COL_WIDTH_EMAIL ); gtk_clist_set_compare_func( GTK_CLIST(clist_group), edit_group_list_compare_func ); @@ -347,7 +350,7 @@ static void addressbook_edit_group_create( gboolean *cancelled ) { clist_avail = gtk_clist_new_with_titles( GROUP_N_COLS, titles ); gtk_container_add( GTK_CONTAINER(clist_swin), clist_avail ); - gtk_clist_set_selection_mode( GTK_CLIST(clist_avail), GTK_SELECTION_BROWSE ); + gtk_clist_set_selection_mode( GTK_CLIST(clist_avail), GTK_SELECTION_EXTENDED ); gtk_clist_set_column_width( GTK_CLIST(clist_avail), GROUP_COL_NAME, GROUP_COL_WIDTH_NAME ); gtk_clist_set_column_width( GTK_CLIST(clist_avail), GROUP_COL_EMAIL, GROUP_COL_WIDTH_EMAIL ); gtk_clist_set_compare_func( GTK_CLIST(clist_avail), edit_group_list_compare_func ); @@ -376,10 +379,6 @@ static void addressbook_edit_group_create( gboolean *cancelled ) { gtk_widget_show_all(vbox); /* Event handlers */ - gtk_signal_connect( GTK_OBJECT(clist_group), "select_row", - GTK_SIGNAL_FUNC( edit_group_group_selected), NULL ); - gtk_signal_connect( GTK_OBJECT(clist_avail), "select_row", - GTK_SIGNAL_FUNC( edit_group_avail_selected), NULL ); gtk_signal_connect( GTK_OBJECT(buttonGroup), "clicked", GTK_SIGNAL_FUNC( edit_group_to_group ), NULL ); gtk_signal_connect( GTK_OBJECT(buttonAvail), "clicked", @@ -440,8 +439,6 @@ ItemGroup *addressbook_edit_group( AddressBookFile *abf, ItemFolder *parent, Ite manage_window_set_transient(GTK_WINDOW(groupeditdlg.window)); /* Clear all fields */ - groupeditdlg.rowIndGroup = -1; - groupeditdlg.rowIndAvail = -1; edit_group_status_show( "" ); gtk_clist_clear( GTK_CLIST(groupeditdlg.clist_group) ); gtk_clist_clear( GTK_CLIST(groupeditdlg.clist_avail) ); diff --git a/src/main.c b/src/main.c index 7a7776d67..a5c63a287 100644 --- a/src/main.c +++ b/src/main.c @@ -366,7 +366,9 @@ int main(int argc, char *argv[]) main_window_toggle_work_offline(mainwin, FALSE); static_mainwindow = mainwin; + statusbar_puts_all("Ready"); gtk_main(); + statusbar_pop_all(); addressbook_destroy(); -- 2.25.1