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
e1f266d3
Commit
e1f266d3
authored
15 years ago
by
Jannis Pohlmann
Browse files
Options
Downloads
Patches
Plain Diff
Start using the scrollwin with > 4 jobs. Remove viewport frame.
parent
55e0cb2a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
thunar/thunar-progress-dialog.c
+12
-8
12 additions, 8 deletions
thunar/thunar-progress-dialog.c
with
12 additions
and
8 deletions
thunar/thunar-progress-dialog.c
+
12
−
8
View file @
e1f266d3
...
...
@@ -30,6 +30,10 @@
#define SCROLLVIEW_THRESHOLD 5
static
void
thunar_progress_dialog_dispose
(
GObject
*
object
);
static
void
thunar_progress_dialog_finalize
(
GObject
*
object
);
static
gboolean
thunar_progress_dialog_closed
(
ThunarProgressDialog
*
dialog
);
...
...
@@ -202,8 +206,8 @@ thunar_progress_dialog_job_finished (ThunarProgressDialog *dialog,
n_views
=
g_list_length
(
dialog
->
views
);
/* check if we've just removed the 4th view and are now left with
*
3
of them, in which case we drop the scroll window */
if
(
n_views
==
3
)
*
SCROLLVIEW_THRESHOLD-1
of them, in which case we drop the scroll window */
if
(
n_views
==
SCROLLVIEW_THRESHOLD
-
1
)
{
/* reparent the content box */
gtk_widget_reparent
(
dialog
->
content_box
,
dialog
->
vbox
);
...
...
@@ -212,8 +216,9 @@ thunar_progress_dialog_job_finished (ThunarProgressDialog *dialog,
gtk_widget_destroy
(
dialog
->
scrollwin
);
}
/* check if we have less than 4 views and need to shrink the window */
if
(
n_views
<=
3
)
/* check if we have less than SCROLLVIEW_THRESHOLD views
* and need to shrink the window */
if
(
n_views
<
SCROLLVIEW_THRESHOLD
)
{
/* try to shrink the window */
gtk_window_resize
(
GTK_WINDOW
(
dialog
),
400
,
10
);
...
...
@@ -262,13 +267,11 @@ thunar_progress_dialog_add_job (ThunarProgressDialog *dialog,
n_views
=
g_list_length
(
dialog
->
views
);
/* check if we need to wrap the views in a scroll window (starting
* at
4
parallel operations */
if
(
n_views
==
4
)
* at
SCROLLVIEW_THRESHOLD
parallel operations */
if
(
n_views
==
SCROLLVIEW_THRESHOLD
)
{
/* create a scrolled window and add it to the dialog */
dialog
->
scrollwin
=
gtk_scrolled_window_new
(
NULL
,
NULL
);
gtk_scrolled_window_set_shadow_type
(
GTK_SCROLLED_WINDOW
(
dialog
->
scrollwin
),
GTK_SHADOW_NONE
);
gtk_scrolled_window_set_policy
(
GTK_SCROLLED_WINDOW
(
dialog
->
scrollwin
),
GTK_POLICY_NEVER
,
GTK_POLICY_AUTOMATIC
);
gtk_container_add
(
GTK_CONTAINER
(
dialog
->
vbox
),
dialog
->
scrollwin
);
...
...
@@ -277,6 +280,7 @@ thunar_progress_dialog_add_job (ThunarProgressDialog *dialog,
/* create a viewport for the content box */
viewport
=
gtk_viewport_new
(
gtk_scrolled_window_get_hadjustment
(
GTK_SCROLLED_WINDOW
(
dialog
->
scrollwin
)),
gtk_scrolled_window_get_vadjustment
(
GTK_SCROLLED_WINDOW
(
dialog
->
scrollwin
)));
gtk_viewport_set_shadow_type
(
GTK_VIEWPORT
(
viewport
),
GTK_SHADOW_NONE
);
gtk_container_add
(
GTK_CONTAINER
(
dialog
->
scrollwin
),
viewport
);
gtk_widget_show
(
viewport
);
...
...
This diff is collapsed.
Click to expand it.
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