xed-tab-label.c/h: Clean up code styling

This commit is contained in:
JosephMcc 2017-01-13 02:53:46 -08:00
parent 422dc034f4
commit 66800ca9a3
2 changed files with 213 additions and 215 deletions

View File

@ -115,7 +115,8 @@ close_button_clicked_cb (GtkWidget *widget,
}
static void
sync_tip (XedTab *tab, XedTabLabel *tab_label)
sync_tip (XedTab *tab,
XedTabLabel *tab_label)
{
gchar *str;
@ -127,7 +128,9 @@ sync_tip (XedTab *tab, XedTabLabel *tab_label)
}
static void
sync_name (XedTab *tab, GParamSpec *pspec, XedTabLabel *tab_label)
sync_name (XedTab *tab,
GParamSpec *pspec,
XedTabLabel *tab_label)
{
gchar *str;
@ -143,7 +146,9 @@ sync_name (XedTab *tab, GParamSpec *pspec, XedTabLabel *tab_label)
}
static void
sync_state (XedTab *tab, GParamSpec *pspec, XedTabLabel *tab_label)
sync_state (XedTab *tab,
GParamSpec *pspec,
XedTabLabel *tab_label)
{
XedTabState state;
@ -206,17 +211,11 @@ xed_tab_label_constructed (GObject *object)
sync_name (tab_label->priv->tab, NULL, tab_label);
sync_state (tab_label->priv->tab, NULL, tab_label);
g_signal_connect_object (tab_label->priv->tab,
"notify::name",
G_CALLBACK (sync_name),
tab_label,
0);
g_signal_connect_object (tab_label->priv->tab, "notify::name",
G_CALLBACK (sync_name), tab_label, 0);
g_signal_connect_object (tab_label->priv->tab,
"notify::state",
G_CALLBACK (sync_state),
tab_label,
0);
g_signal_connect_object (tab_label->priv->tab, "notify::state",
G_CALLBACK (sync_state), tab_label, 0);
}
static void
@ -266,8 +265,7 @@ xed_tab_label_init (XedTabLabel *tab_label)
tab_label->priv->close_button_sensitive = TRUE;
gtk_orientable_set_orientation (GTK_ORIENTABLE (tab_label),
GTK_ORIENTATION_HORIZONTAL);
gtk_orientable_set_orientation (GTK_ORIENTABLE (tab_label), GTK_ORIENTATION_HORIZONTAL);
ebox = gtk_event_box_new ();
gtk_event_box_set_visible_window (GTK_EVENT_BOX (ebox), FALSE);
gtk_box_pack_start (GTK_BOX (tab_label), ebox, TRUE, TRUE, 0);
@ -281,10 +279,8 @@ xed_tab_label_init (XedTabLabel *tab_label)
gtk_box_pack_start (GTK_BOX (tab_label), close_button, FALSE, FALSE, 0);
tab_label->priv->close_button = close_button;
g_signal_connect (close_button,
"clicked",
G_CALLBACK (close_button_clicked_cb),
tab_label);
g_signal_connect (close_button, "clicked",
G_CALLBACK (close_button_clicked_cb), tab_label);
spinner = gtk_spinner_new ();
gtk_box_pack_start (GTK_BOX (hbox), spinner, FALSE, FALSE, 0);
@ -328,7 +324,9 @@ xed_tab_label_set_close_button_sensitive (XedTabLabel *tab_label,
sensitive = (sensitive != FALSE);
if (sensitive == tab_label->priv->close_button_sensitive)
{
return;
}
tab_label->priv->close_button_sensitive = sensitive;