Made 'Ctrl-Enter' on send ignore some modifiers
authorMelvin Hadasht <melvin.hadasht@free.fr>
Tue, 9 Apr 2002 21:54:31 +0000 (21:54 +0000)
committerMelvin Hadasht <melvin.hadasht@free.fr>
Tue, 9 Apr 2002 21:54:31 +0000 (21:54 +0000)
ChangeLog.claws
configure.in
src/compose.c

index 0111a97..4e46d91 100644 (file)
@@ -1,3 +1,10 @@
+2002-04-09 [melvin]    0.7.4claws75
+
+       * src/compose.c
+               Made 'Ctrl-Enter' on send ignore some modifiers 
+               (LOCK_MASK, MOD2, MOD3, MOD4, MOD5). Make it possible
+               to bind other *-Enter (but not Alt-Enter).
+
 2002-04-09 [paul]      0.7.4claws74
 
        * sync with 0.7.4cvs35
index 9c46aca..44cd472 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws74
+EXTRA_VERSION=claws75
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 8a28aaa..f426b00 100644 (file)
@@ -6639,20 +6639,21 @@ static gboolean compose_send_control_enter(Compose *compose)
        GtkAccelEntry *accel;
        GtkWidget *send_menu;
        GSList *list;
+       gint ignored_mods = (GDK_LOCK_MASK | GDK_MOD2_MASK | GDK_MOD3_MASK 
+                          | GDK_MOD4_MASK | GDK_MOD5_MASK);
 
        ev = gtk_get_current_event();
        if (ev->type != GDK_KEY_PRESS) return FALSE;
 
        kev = (GdkEventKey *)ev;
-       if (!(kev->keyval == GDK_Return && (kev->state & GDK_CONTROL_MASK)))
-               return FALSE;
 
        ifactory = gtk_item_factory_from_widget(compose->menubar);
        send_menu = gtk_item_factory_get_widget(ifactory, "/Message/Send");
        list = gtk_accel_group_entries_from_object(GTK_OBJECT(send_menu));
        accel = (GtkAccelEntry *)list->data;
        if (accel->accelerator_key == kev->keyval &&
-           accel->accelerator_mods == kev->state) {
+           (accel->accelerator_mods & ~ignored_mods) == 
+           (kev->state & ~ignored_mods)) {
                compose_send_cb(compose, 0, NULL);
                return TRUE;
        }