[PATCH 1/3] Add a help button to every Anaconda screen
Chris Lumens
clumens at redhat.com
Fri Aug 15 17:02:15 UTC 2014
> @@ -325,11 +351,28 @@ G_GNUC_END_IGNORE_DEPRECATIONS
> gtk_widget_set_margin_top(win->priv->layout_indicator, 6);
> gtk_widget_set_margin_bottom(win->priv->layout_indicator, 6);
>
> + /* Create the help button. */
> + win->priv->help_button = gtk_button_new_with_mnemonic(HELP_BUTTON_LABEL);
> + gtk_widget_set_halign(win->priv->help_button, GTK_ALIGN_START);
> + gtk_widget_set_vexpand(win->priv->help_button, FALSE);
> + gtk_widget_set_valign(win->priv->help_button, GTK_ALIGN_END);
> + gtk_widget_set_margin_bottom(win->priv->help_button, 6);
> +
> + atk = gtk_widget_get_accessible(win->priv->help_button);
> + atk_object_set_name(atk, HELP_BUTTON_LABEL);
> +
> + /* Hook up some signals for that button. The signal handlers here will
> + * just raise our own custom signals for the whole window.
> + */
> + g_signal_connect(win->priv->help_button, "clicked",
> + G_CALLBACK(anaconda_base_window_help_button_clicked), win);
> +
> /* Add everything to the nav area. */
> gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->name_label, 0, 0, 1, 1);
> gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->distro_label, 1, 0, 1, 1);
> gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->beta_label, 1, 1, 1, 1);
> gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->layout_indicator, 1, 2, 1, 1);
> + gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->help_button, 2, 1, 1, 2);
> }
Has a designed weighed in on adding another widget to the top right
corner of the screen?
- Chris
More information about the anaconda-patches
mailing list