Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
phosh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sebastian Krzyszkowiak
phosh
Commits
4cd1847e
Verified
Commit
4cd1847e
authored
Jun 26, 2020
by
Sebastian Krzyszkowiak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PhoshOverview: Check types in find_activity_by_toplevel
parent
6c665986
Pipeline
#56773
passed with stages
in 35 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
src/overview.c
src/overview.c
+9
-8
No files found.
src/overview.c
View file @
4cd1847e
...
...
@@ -71,24 +71,25 @@ get_toplevel_from_activity (PhoshActivity *activity)
return
toplevel
;
}
static
GtkWidget
*
static
PhoshActivity
*
find_activity_by_toplevel
(
PhoshOverview
*
self
,
PhoshToplevel
*
needle
)
{
g_autoptr
(
GList
)
children
;
GtkWidget
*
activity
=
NULL
;
PhoshActivity
*
activity
=
NULL
;
PhoshOverviewPrivate
*
priv
=
phosh_overview_get_instance_private
(
self
);
children
=
gtk_container_get_children
(
GTK_CONTAINER
(
priv
->
paginator_running_activities
));
for
(
GList
*
l
=
children
;
l
;
l
=
l
->
next
)
{
PhoshToplevel
*
toplevel
;
activity
=
l
->
data
;
activity
=
PHOSH_ACTIVITY
(
l
->
data
)
;
toplevel
=
get_toplevel_from_activity
(
activity
);
if
(
toplevel
==
needle
)
break
;
}
g_return_val_if_fail
(
activity
,
NULL
);
return
activity
;
}
...
...
@@ -148,7 +149,7 @@ on_toplevel_activated_changed (PhoshToplevel *toplevel, GParamSpec *pspec, Phosh
g_return_if_fail
(
PHOSH_IS_TOPLEVEL
(
toplevel
));
priv
=
phosh_overview_get_instance_private
(
overview
);
activity
=
PHOSH_ACTIVITY
(
find_activity_by_toplevel
(
overview
,
toplevel
)
);
activity
=
find_activity_by_toplevel
(
overview
,
toplevel
);
if
(
phosh_toplevel_is_activated
(
toplevel
))
hdy_paginator_scroll_to
(
HDY_PAGINATOR
(
priv
->
paginator_running_activities
),
GTK_WIDGET
(
activity
));
}
...
...
@@ -168,7 +169,7 @@ request_thumbnail (PhoshOverview *self, PhoshToplevel *toplevel)
{
PhoshToplevelThumbnail
*
thumbnail
;
gint
width
,
height
;
PhoshActivity
*
activity
=
PHOSH_ACTIVITY
(
find_activity_by_toplevel
(
self
,
toplevel
)
);
PhoshActivity
*
activity
=
find_activity_by_toplevel
(
self
,
toplevel
);
gint
scale
=
gtk_widget_get_scale_factor
(
GTK_WIDGET
(
activity
));
g_object_get
(
activity
,
"win-width"
,
&
width
,
"win-height"
,
&
height
,
NULL
);
thumbnail
=
phosh_toplevel_thumbnail_new_from_toplevel
(
toplevel
,
width
*
scale
,
height
*
scale
);
...
...
@@ -249,17 +250,17 @@ toplevel_changed_cb (PhoshOverview *self,
PhoshToplevel
*
toplevel
,
PhoshToplevelManager
*
manager
)
{
GtkWidget
*
activity
;
PhoshActivity
*
activity
;
g_return_if_fail
(
PHOSH_IS_OVERVIEW
(
self
));
g_return_if_fail
(
PHOSH_IS_TOPLEVEL
(
toplevel
));
g_return_if_fail
(
PHOSH_IS_TOPLEVEL_MANAGER
(
manager
));
activity
=
find_activity_by_toplevel
(
self
,
toplevel
);
g_return_if_fail
(
GTK_IS_WIDGET
(
activity
)
);
g_return_if_fail
(
activity
);
/* TODO: update other properties */
phosh_activity_set_title
(
PHOSH_ACTIVITY
(
activity
)
,
phosh_activity_set_title
(
activity
,
phosh_toplevel_get_title
(
toplevel
));
request_thumbnail
(
self
,
toplevel
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment