summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGydo Kosten <[email protected]>2023-07-28 14:21:25 +0200
committerGitHub <[email protected]>2023-07-28 14:21:25 +0200
commitb9e68e715f95aac477a1fe7e189a5121091a1c68 (patch)
treed172090c5e2ec61fb143883a10f84ab9c8612696 /src
parent79c6912d76612479a90f754983c00d3724722e28 (diff)
downloadmate-terminal-b9e68e715f95aac477a1fe7e189a5121091a1c68.tar.bz2
mate-terminal-b9e68e715f95aac477a1fe7e189a5121091a1c68.tar.xz
Double-click tab to set title
terminal-window: pop up the Set Title dialog when doubleclicking a tab and set focus to terminal screen after changing title
Diffstat (limited to 'src')
-rw-r--r--src/terminal-window.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/terminal-window.c b/src/terminal-window.c
index e9c23e0..4608267 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2991,6 +2991,15 @@ notebook_button_press_cb (GtkWidget *widget,
}
}
+ /* If the event is a double click, display the set title dialog */
+ if (event->type == GDK_DOUBLE_BUTTON_PRESS)
+ {
+ terminal_set_title_callback (NULL, window);
+
+ /* handle ONLY the double-click event */
+ return TRUE;
+ }
+
if (event->type != GDK_BUTTON_PRESS ||
event->button != 3 ||
(event->state & gtk_accelerator_get_default_mod_mask ()) != 0)
@@ -4230,6 +4239,7 @@ terminal_set_title_dialog_response_cb (GtkWidget *dialog,
}
gtk_widget_destroy (dialog);
+ gtk_widget_grab_focus (GTK_WIDGET (screen));
}
static void