Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Librem5
pureos-store
Commits
486b6987
Commit
486b6987
authored
Sep 21, 2013
by
Matthias Clasen
Browse files
Give tiles a meaningful empty state
This will be used to prepopulate grids with empty tiles.
parent
f188946b
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/gs-app-tile.c
View file @
486b6987
...
...
@@ -100,11 +100,16 @@ gs_app_tile_set_app (GsAppTile *tile, GsApp *app)
const
gchar
*
summary
;
g_return_if_fail
(
GS_IS_APP_TILE
(
tile
));
g_return_if_fail
(
GS_IS_APP
(
app
));
g_return_if_fail
(
GS_IS_APP
(
app
)
||
app
==
NULL
);
priv
=
gs_app_tile_get_instance_private
(
tile
);
gtk_image_clear
(
GTK_IMAGE
(
priv
->
image
));
gtk_image_set_pixel_size
(
GTK_IMAGE
(
priv
->
image
),
64
);
g_clear_object
(
&
priv
->
app
);
if
(
!
app
)
return
;
priv
->
app
=
g_object_ref
(
app
);
g_signal_connect
(
priv
->
app
,
"notify::state"
,
...
...
@@ -134,7 +139,11 @@ gs_app_tile_destroy (GtkWidget *widget)
static
void
button_clicked
(
GsAppTile
*
tile
)
{
g_signal_emit
(
tile
,
signals
[
SIGNAL_CLICKED
],
0
);
GsAppTilePrivate
*
priv
;
priv
=
gs_app_tile_get_instance_private
(
tile
);
if
(
priv
->
app
)
g_signal_emit
(
tile
,
signals
[
SIGNAL_CLICKED
],
0
);
}
static
void
...
...
src/gs-feature-tile.c
View file @
486b6987
...
...
@@ -95,11 +95,14 @@ gs_feature_tile_set_app (GsFeatureTile *tile, GsApp *app)
gchar
*
data
;
g_return_if_fail
(
GS_IS_FEATURE_TILE
(
tile
));
g_return_if_fail
(
GS_IS_APP
(
app
));
g_return_if_fail
(
GS_IS_APP
(
app
)
||
app
==
NULL
);
priv
=
gs_feature_tile_get_instance_private
(
tile
);
g_clear_object
(
&
priv
->
app
);
if
(
!
app
)
return
;
priv
->
app
=
g_object_ref
(
app
);
g_signal_connect
(
priv
->
app
,
"notify::state"
,
...
...
@@ -148,7 +151,11 @@ gs_feature_tile_destroy (GtkWidget *widget)
static
void
button_clicked
(
GsFeatureTile
*
tile
)
{
g_signal_emit
(
tile
,
signals
[
SIGNAL_CLICKED
],
0
);
GsFeatureTilePrivate
*
priv
;
priv
=
gs_feature_tile_get_instance_private
(
tile
);
if
(
priv
->
app
)
g_signal_emit
(
tile
,
signals
[
SIGNAL_CLICKED
],
0
);
}
static
void
...
...
src/gs-popular-tile.c
View file @
486b6987
...
...
@@ -98,11 +98,13 @@ gs_popular_tile_set_app (GsPopularTile *tile, GsApp *app)
GsPopularTilePrivate
*
priv
;
g_return_if_fail
(
GS_IS_POPULAR_TILE
(
tile
));
g_return_if_fail
(
GS_IS_APP
(
app
));
g_return_if_fail
(
GS_IS_APP
(
app
)
||
app
==
NULL
);
priv
=
gs_popular_tile_get_instance_private
(
tile
);
g_clear_object
(
&
priv
->
app
);
if
(
!
app
)
return
;
priv
->
app
=
g_object_ref
(
app
);
g_signal_connect
(
priv
->
app
,
"notify::state"
,
...
...
@@ -130,7 +132,10 @@ gs_popular_tile_destroy (GtkWidget *widget)
static
void
button_clicked
(
GsPopularTile
*
tile
)
{
g_signal_emit
(
tile
,
signals
[
SIGNAL_CLICKED
],
0
);
GsPopularTilePrivate
*
priv
;
priv
=
gs_popular_tile_get_instance_private
(
tile
);
if
(
priv
->
app
)
g_signal_emit
(
tile
,
signals
[
SIGNAL_CLICKED
],
0
);
}
static
void
...
...
Write
Preview
Supports
Markdown
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