]> git.tdb.fi Git - pmount-gui.git/commitdiff
Don't close the window with escape in manager mode
authorMikko Rasa <tdb@tdb.fi>
Thu, 25 Feb 2016 20:10:36 +0000 (22:10 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 25 Feb 2016 20:10:36 +0000 (22:10 +0200)
main.c

diff --git a/main.c b/main.c
index fe41c4a560d858271642232a53ac58fd8685c70a..aae10bce7ceecbf397326b973b9bec4641338001 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1064,7 +1064,6 @@ int main(int argc, char **argv)
        context.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        gtk_container_set_border_width(GTK_CONTAINER(context.window), 5);
        g_signal_connect(context.window, "destroy", G_CALLBACK(&gtk_main_quit), NULL);
-       g_signal_connect(context.window, "key-press-event", G_CALLBACK(&key_press), NULL);
 
        box = gtk_vbox_new(FALSE, 5);
        gtk_container_add(GTK_CONTAINER(context.window), box);
@@ -1113,6 +1112,8 @@ int main(int argc, char **argv)
 
                umount = -1;
        }
+       else
+               g_signal_connect(context.window, "key-press-event", G_CALLBACK(&key_press), NULL);
 
        selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(context.list));
        g_signal_connect(selection, "changed", G_CALLBACK(&selection_changed), &context);