2007-01-18 [wwp] 2.7.1cvs27
authorTristan Chabredier <wwp@claws-mail.org>
Thu, 18 Jan 2007 18:49:47 +0000 (18:49 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Thu, 18 Jan 2007 18:49:47 +0000 (18:49 +0000)
* src/addressbook.c
fix conflicting address-copy/paste when focus is set
to the embedded edit-person form.

ChangeLog
PATCHSETS
configure.ac
src/addressbook.c

index bd974fc019ea6ac5d996641729c098727ba01981..6037a180198e86f79cb9c1ae692108fa9bb101a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-01-18 [wwp]       2.7.1cvs27
+
+       * src/addressbook.c
+               fix conflicting address-copy/paste when focus is set
+               to the embedded edit-person form.
+
 2007-01-18 [wwp]       2.7.1cvs26
 
        * src/addressbook.h
 2007-01-18 [wwp]       2.7.1cvs26
 
        * src/addressbook.h
index 6e3152f866f42d73f2f7f11526f347d0818f24b7..8ea8d08e9d9be28799669055ab96e9e951d5c95a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.14.2.20 -r 1.14.2.21 src/editaddress.c;  ) > 2.7.1cvs24.patchset
 ( cvs diff -u -r 1.115.2.125 -r 1.115.2.126 src/main.c;  ) > 2.7.1cvs25.patchset
 ( cvs diff -u -r 1.18.2.6 -r 1.18.2.7 src/addressbook.h;  ) > 2.7.1cvs26.patchset
 ( cvs diff -u -r 1.14.2.20 -r 1.14.2.21 src/editaddress.c;  ) > 2.7.1cvs24.patchset
 ( cvs diff -u -r 1.115.2.125 -r 1.115.2.126 src/main.c;  ) > 2.7.1cvs25.patchset
 ( cvs diff -u -r 1.18.2.6 -r 1.18.2.7 src/addressbook.h;  ) > 2.7.1cvs26.patchset
+( cvs diff -u -r 1.60.2.76 -r 1.60.2.77 src/addressbook.c;  ) > 2.7.1cvs27.patchset
index b1a8576e90e7656b5e5639c43792d36c9d04d37a..fd03ffe57fcdf9d847c366d62bb38747a5ce684c 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=26
+EXTRA_VERSION=27
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 7d3ba971140a3400ee6436a8f7c9fbe981bce168..f165cc6a611af062d2a34ea22c3a76c506f826c4 100644 (file)
@@ -815,6 +815,9 @@ static gboolean addressbook_address_index_focus_evt_out(GtkWidget *widget, GdkEv
                                                                                         gpointer data)
 {
        address_index_has_focus = FALSE;
                                                                                         gpointer data)
 {
        address_index_has_focus = FALSE;
+       if (!prefs_common.addressbook_use_editaddress_dialog
+                       && !address_list_has_focus)
+               addressbook_address_list_disable_some_actions();
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -829,6 +832,9 @@ static gboolean addressbook_address_list_focus_evt_out(GtkWidget *widget, GdkEve
                                                                                         gpointer data)
 {
        address_list_has_focus = FALSE;
                                                                                         gpointer data)
 {
        address_list_has_focus = FALSE;
+       if (!prefs_common.addressbook_use_editaddress_dialog
+                       && !address_index_has_focus)
+               addressbook_address_list_disable_some_actions();
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -2974,10 +2980,22 @@ void addressbook_address_list_set_focus( void )
 {
        if (!prefs_common.addressbook_use_editaddress_dialog) {
                gtk_window_set_focus(GTK_WINDOW(addrbook.window), addrbook.clist);
 {
        if (!prefs_common.addressbook_use_editaddress_dialog) {
                gtk_window_set_focus(GTK_WINDOW(addrbook.window), addrbook.clist);
-fprintf(stderr, "addressbook_address_list_set_focus: %p\n", addrbook.listSelected );
+               addressbook_list_menu_setup();
        }
 }
 
        }
 }
 
+void addressbook_address_list_disable_some_actions(void)
+{
+       /* disable address copy/pasting when editing contact's detail (embedded form) */
+       menu_set_sensitive( addrbook.menu_factory, "/Address/Cut",   FALSE );
+       menu_set_sensitive( addrbook.menu_factory, "/Address/Copy",  FALSE );
+       menu_set_sensitive( addrbook.menu_factory, "/Address/Paste", FALSE );
+
+       /* we're already editing contact's detail here */
+       menu_set_sensitive( addrbook.menu_factory, "/Address/Edit",  FALSE );
+       gtk_widget_set_sensitive( addrbook.edit_btn, FALSE );
+}
+
 static void addressbook_edit_address_cb( gpointer data, guint action, GtkWidget *widget ) {
        addressbook_edit_address(data, action, widget, TRUE);
 }
 static void addressbook_edit_address_cb( gpointer data, guint action, GtkWidget *widget ) {
        addressbook_edit_address(data, action, widget, TRUE);
 }