aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 5c69b8d..7ee30d7 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -681,6 +681,10 @@ remote_debug_dialog (AnjutaPluginSdk *sp)
GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (chooser), sp->gdb_local_path);
+ /* Don't grab keyboard focus on click */
+ gtk_file_chooser_button_set_focus_on_click (GTK_FILE_CHOOSER_BUTTON (chooser),
+ FALSE);
+
gtk_size_group_add_widget (control_group, chooser);
gtk_box_pack_start (GTK_BOX (hbox), chooser, TRUE, TRUE, 2);
@@ -694,6 +698,10 @@ remote_debug_dialog (AnjutaPluginSdk *sp)
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 2);
entry = gtk_entry_new ();
+
+ /* Make hitting enter in the entry do the window default action */
+ gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
+
gtk_entry_set_text (GTK_ENTRY (entry), sp->gdb_remote_command);
gtk_size_group_add_widget (control_group, entry);
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 2);
@@ -703,6 +711,12 @@ remote_debug_dialog (AnjutaPluginSdk *sp)
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), inner_vbox,
TRUE, TRUE, 2);
+ /*
+ * Grab the focus away explicitly, otherwise it goes onto the file chooser
+ * button and then we don't get a working default behaviour for the dialog
+ */
+ gtk_widget_grab_focus (entry);
+
gtk_widget_show_all (inner_vbox);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
@@ -751,6 +765,10 @@ remote_run_dialog (AnjutaPluginSdk *sp)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 2);
entry = gtk_entry_new ();
+
+ /* Make hitting enter in the entry do the window default action */
+ gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
+
gtk_entry_set_text (GTK_ENTRY (entry), sp->remote_command);
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 2);