summaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2011-12-13 14:41:06 -0500
committerChris Lumens <clumens@redhat.com>2011-12-13 14:41:06 -0500
commitf07725cfc2990c22027b5bf346c4450260cfb458 (patch)
tree6e61520fefa80c0cad3b96de127c683285c2bd89 /widgets
parent4ba098de2cf159e488e408f17d67226e95c7b2cd (diff)
downloadanaconda-f07725cfc2990c22027b5bf346c4450260cfb458.tar.gz
anaconda-f07725cfc2990c22027b5bf346c4450260cfb458.tar.xz
anaconda-f07725cfc2990c22027b5bf346c4450260cfb458.zip
Add a warning icon if a spoke is incomplete.
This is not the fancy icon overlay as shown in the mockups, since that takes a litle more work than I have time to do right now. Feel free to work on this yourself.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/TODO3
-rw-r--r--widgets/src/SpokeSelector.c11
2 files changed, 9 insertions, 5 deletions
diff --git a/widgets/TODO b/widgets/TODO
index e555245a3..cb7a65f10 100644
--- a/widgets/TODO
+++ b/widgets/TODO
@@ -5,14 +5,13 @@ DiskOverview -
- need to specify big vs. small
SpokeSelector -
- - need to show incompleteness
+ - make incompleteness notification a little less lame
SpokeWindow -
StandaloneWindow -
New Widgets -
- - light box dialog
- PersonalizationWindow
- physical member display
- capacity slider+drop down
diff --git a/widgets/src/SpokeSelector.c b/widgets/src/SpokeSelector.c
index 7f0279405..48dc93e0c 100644
--- a/widgets/src/SpokeSelector.c
+++ b/widgets/src/SpokeSelector.c
@@ -53,7 +53,7 @@ enum {
struct _AnacondaSpokeSelectorPrivate {
gboolean is_incomplete;
GtkWidget *grid;
- GtkWidget *icon;
+ GtkWidget *icon, *incomplete_icon;
GtkWidget *title_label;
GtkWidget *status_label;
};
@@ -151,8 +151,11 @@ static void anaconda_spoke_selector_init(AnacondaSpokeSelector *spoke) {
spoke->priv->grid = gtk_grid_new();
gtk_grid_set_column_spacing(GTK_GRID(spoke->priv->grid), 6);
- /* Create the icon. */
+ /* Create the icons. */
spoke->priv->icon = gtk_image_new_from_stock(DEFAULT_ICON, GTK_ICON_SIZE_DIALOG);
+ spoke->priv->incomplete_icon = gtk_image_new_from_icon_name("dialog-warning-symbolic", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_no_show_all(GTK_WIDGET(spoke->priv->incomplete_icon), TRUE);
+ gtk_widget_set_visible(GTK_WIDGET(spoke->priv->incomplete_icon), FALSE);
/* Create the title label. */
spoke->priv->title_label = gtk_label_new(NULL);
@@ -171,7 +174,8 @@ static void anaconda_spoke_selector_init(AnacondaSpokeSelector *spoke) {
/* Add everything to the grid, add the grid to the widget. */
gtk_grid_attach(GTK_GRID(spoke->priv->grid), spoke->priv->icon, 0, 0, 1, 2);
gtk_grid_attach(GTK_GRID(spoke->priv->grid), spoke->priv->title_label, 1, 0, 1, 1);
- gtk_grid_attach(GTK_GRID(spoke->priv->grid), spoke->priv->status_label, 1, 1, 1, 1);
+ gtk_grid_attach(GTK_GRID(spoke->priv->grid), spoke->priv->incomplete_icon, 2, 0, 1, 1);
+ gtk_grid_attach(GTK_GRID(spoke->priv->grid), spoke->priv->status_label, 1, 1, 2, 1);
gtk_container_add(GTK_CONTAINER(spoke), spoke->priv->grid);
}
@@ -248,4 +252,5 @@ gboolean anaconda_spoke_selector_get_incomplete(AnacondaSpokeSelector *spoke) {
*/
void anaconda_spoke_selector_set_incomplete(AnacondaSpokeSelector *spoke, gboolean is_incomplete) {
spoke->priv->is_incomplete = is_incomplete;
+ gtk_widget_set_visible(GTK_WIDGET(spoke->priv->incomplete_icon), is_incomplete);
}