xed-tab-label.c/h: Clean up code styling
This commit is contained in:
parent
422dc034f4
commit
66800ca9a3
|
@ -115,7 +115,8 @@ close_button_clicked_cb (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sync_tip (XedTab *tab, XedTabLabel *tab_label)
|
sync_tip (XedTab *tab,
|
||||||
|
XedTabLabel *tab_label)
|
||||||
{
|
{
|
||||||
gchar *str;
|
gchar *str;
|
||||||
|
|
||||||
|
@ -127,7 +128,9 @@ sync_tip (XedTab *tab, XedTabLabel *tab_label)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sync_name (XedTab *tab, GParamSpec *pspec, XedTabLabel *tab_label)
|
sync_name (XedTab *tab,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
XedTabLabel *tab_label)
|
||||||
{
|
{
|
||||||
gchar *str;
|
gchar *str;
|
||||||
|
|
||||||
|
@ -143,7 +146,9 @@ sync_name (XedTab *tab, GParamSpec *pspec, XedTabLabel *tab_label)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sync_state (XedTab *tab, GParamSpec *pspec, XedTabLabel *tab_label)
|
sync_state (XedTab *tab,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
XedTabLabel *tab_label)
|
||||||
{
|
{
|
||||||
XedTabState state;
|
XedTabState state;
|
||||||
|
|
||||||
|
@ -206,17 +211,11 @@ xed_tab_label_constructed (GObject *object)
|
||||||
sync_name (tab_label->priv->tab, NULL, tab_label);
|
sync_name (tab_label->priv->tab, NULL, tab_label);
|
||||||
sync_state (tab_label->priv->tab, NULL, tab_label);
|
sync_state (tab_label->priv->tab, NULL, tab_label);
|
||||||
|
|
||||||
g_signal_connect_object (tab_label->priv->tab,
|
g_signal_connect_object (tab_label->priv->tab, "notify::name",
|
||||||
"notify::name",
|
G_CALLBACK (sync_name), tab_label, 0);
|
||||||
G_CALLBACK (sync_name),
|
|
||||||
tab_label,
|
|
||||||
0);
|
|
||||||
|
|
||||||
g_signal_connect_object (tab_label->priv->tab,
|
g_signal_connect_object (tab_label->priv->tab, "notify::state",
|
||||||
"notify::state",
|
G_CALLBACK (sync_state), tab_label, 0);
|
||||||
G_CALLBACK (sync_state),
|
|
||||||
tab_label,
|
|
||||||
0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -266,8 +265,7 @@ xed_tab_label_init (XedTabLabel *tab_label)
|
||||||
|
|
||||||
tab_label->priv->close_button_sensitive = TRUE;
|
tab_label->priv->close_button_sensitive = TRUE;
|
||||||
|
|
||||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (tab_label),
|
gtk_orientable_set_orientation (GTK_ORIENTABLE (tab_label), GTK_ORIENTATION_HORIZONTAL);
|
||||||
GTK_ORIENTATION_HORIZONTAL);
|
|
||||||
ebox = gtk_event_box_new ();
|
ebox = gtk_event_box_new ();
|
||||||
gtk_event_box_set_visible_window (GTK_EVENT_BOX (ebox), FALSE);
|
gtk_event_box_set_visible_window (GTK_EVENT_BOX (ebox), FALSE);
|
||||||
gtk_box_pack_start (GTK_BOX (tab_label), ebox, TRUE, TRUE, 0);
|
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);
|
gtk_box_pack_start (GTK_BOX (tab_label), close_button, FALSE, FALSE, 0);
|
||||||
tab_label->priv->close_button = close_button;
|
tab_label->priv->close_button = close_button;
|
||||||
|
|
||||||
g_signal_connect (close_button,
|
g_signal_connect (close_button, "clicked",
|
||||||
"clicked",
|
G_CALLBACK (close_button_clicked_cb), tab_label);
|
||||||
G_CALLBACK (close_button_clicked_cb),
|
|
||||||
tab_label);
|
|
||||||
|
|
||||||
spinner = gtk_spinner_new ();
|
spinner = gtk_spinner_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), spinner, FALSE, FALSE, 0);
|
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);
|
sensitive = (sensitive != FALSE);
|
||||||
|
|
||||||
if (sensitive == tab_label->priv->close_button_sensitive)
|
if (sensitive == tab_label->priv->close_button_sensitive)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
tab_label->priv->close_button_sensitive = sensitive;
|
tab_label->priv->close_button_sensitive = sensitive;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue