mouse: Make the test button align better
https://bugzilla.gnome.org/show_bug.cgi?id=708000
This commit is contained in:
parent
622a0f5f4a
commit
50488b1ea0
1 changed files with 2 additions and 10 deletions
|
@ -42,7 +42,6 @@ struct _CcMousePanelPrivate
|
|||
GtkWidget *test_dialog;
|
||||
GtkWidget *prefs_widget;
|
||||
GtkWidget *test_widget;
|
||||
GtkWidget *shell_header;
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -55,8 +54,6 @@ cc_mouse_panel_dispose (GObject *object)
|
|||
{
|
||||
CcMousePanelPrivate *priv = CC_MOUSE_PANEL (object)->priv;
|
||||
|
||||
g_clear_object (&priv->shell_header);
|
||||
|
||||
if (priv->test_dialog)
|
||||
{
|
||||
gtk_widget_destroy (priv->test_dialog);
|
||||
|
@ -88,26 +85,21 @@ cc_mouse_panel_constructed (GObject *object)
|
|||
{
|
||||
CcMousePanel *self = CC_MOUSE_PANEL (object);
|
||||
CcMousePanelPrivate *priv = self->priv;
|
||||
GtkWidget *box, *button, *container, *toplevel;
|
||||
GtkWidget *button, *container, *toplevel;
|
||||
CcShell *shell;
|
||||
|
||||
G_OBJECT_CLASS (cc_mouse_panel_parent_class)->constructed (object);
|
||||
|
||||
/* Add test area button to shell header. */
|
||||
shell = cc_panel_get_shell (CC_PANEL (self));
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||
|
||||
button = gtk_button_new_with_mnemonic (_("Test Your _Settings"));
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (button),
|
||||
"text-button");
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
|
||||
gtk_widget_set_visible (button, TRUE);
|
||||
|
||||
cc_shell_embed_widget_in_header (shell, box);
|
||||
gtk_widget_set_visible (box, TRUE);
|
||||
|
||||
priv->shell_header = g_object_ref (box);
|
||||
cc_shell_embed_widget_in_header (shell, button);
|
||||
|
||||
g_signal_connect (GTK_BUTTON (button), "clicked",
|
||||
G_CALLBACK (shell_test_button_clicked),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue