Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
thunar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xfce
thunar
Commits
bd02e9a9
Commit
bd02e9a9
authored
1 year ago
by
Alexander Schwinn
Browse files
Options
Downloads
Patches
Plain Diff
Update selected notebook on tab press (#1067)
parent
4f35cfeb
No related branches found
No related tags found
No related merge requests found
Pipeline
#21748
passed
1 year ago
Stage: build
Stage: distcheck
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
thunar/thunar-window.c
+36
-0
36 additions, 0 deletions
thunar/thunar-window.c
with
36 additions
and
0 deletions
thunar/thunar-window.c
+
36
−
0
View file @
bd02e9a9
...
...
@@ -245,6 +245,9 @@ static gboolean thunar_window_action_show_highlight (ThunarWindow
static
gboolean
thunar_window_propagate_key_event
(
GtkWindow
*
window
,
GdkEvent
*
key_event
,
gpointer
user_data
);
static
gboolean
thunar_window_after_propagate_key_event
(
GtkWindow
*
window
,
GdkEvent
*
key_event
,
gpointer
user_data
);
static
gboolean
thunar_window_action_open_file_menu
(
ThunarWindow
*
window
);
static
void
thunar_window_current_directory_changed
(
ThunarFile
*
current_directory
,
ThunarWindow
*
window
);
...
...
@@ -828,6 +831,7 @@ thunar_window_init (ThunarWindow *window)
/* Catch key events before accelerators get processed */
g_signal_connect
(
window
,
"key-press-event"
,
G_CALLBACK
(
thunar_window_propagate_key_event
),
NULL
);
g_signal_connect
(
window
,
"key-release-event"
,
G_CALLBACK
(
thunar_window_propagate_key_event
),
NULL
);
g_signal_connect_after
(
window
,
"key-release-event"
,
G_CALLBACK
(
thunar_window_after_propagate_key_event
),
NULL
);
window
->
action_mgr
=
g_object_new
(
THUNAR_TYPE_ACTION_MANAGER
,
"widget"
,
GTK_WIDGET
(
window
),
NULL
);
...
...
@@ -4652,6 +4656,38 @@ thunar_window_propagate_key_event (GtkWindow* window,
static
gboolean
thunar_window_after_propagate_key_event
(
GtkWindow
*
window
,
GdkEvent
*
key_event
,
gpointer
user_data
)
{
GtkWidget
*
focused_widget
;
ThunarWindow
*
thunar_window
=
THUNAR_WINDOW
(
window
);
_thunar_return_val_if_fail
(
THUNAR_IS_WINDOW
(
window
),
GDK_EVENT_PROPAGATE
);
focused_widget
=
gtk_window_get_focus
(
window
);
/* After 'tab' was preassed, we might need to update the selected notebook */
if
(
thunar_window_split_view_is_active
(
thunar_window
))
{
if
(
thunar_window
->
notebook_left
!=
NULL
&&
gtk_widget_is_ancestor
(
focused_widget
,
thunar_window
->
notebook_left
))
{
thunar_window
->
notebook_selected
=
thunar_window
->
notebook_left
;
thunar_window_notebook_select_current_page
(
thunar_window
);
}
if
(
thunar_window
->
notebook_right
!=
NULL
&&
gtk_widget_is_ancestor
(
focused_widget
,
thunar_window
->
notebook_right
))
{
thunar_window
->
notebook_selected
=
thunar_window
->
notebook_right
;
thunar_window_notebook_select_current_page
(
thunar_window
);
}
}
return
GDK_EVENT_PROPAGATE
;
}
static
void
thunar_window_action_open_bookmark
(
GFile
*
g_file
)
{
...
...
This diff is collapsed.
Click to expand it.
Alexander Schwinn
@alexxcons
mentioned in commit
2b5a6e35
·
1 year ago
mentioned in commit
2b5a6e35
mentioned in commit 2b5a6e35510c88cb7db2d2b04e708ab5327d1c0c
Toggle commit list
Alexander Schwinn
@alexxcons
mentioned in issue
#1103 (closed)
·
1 year ago
mentioned in issue
#1103 (closed)
mentioned in issue #1103
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment