Changed variable name to create some consistency
This commit is contained in:
parent
a3f479ab8d
commit
23d3d2203e
@ -42,25 +42,25 @@ close_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
|||||||
static void
|
static void
|
||||||
set_tab_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
set_tab_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
||||||
{
|
{
|
||||||
AgWindow *self = AG_WINDOW(user_data);
|
AgWindow *window = AG_WINDOW(user_data);
|
||||||
const gchar *target = g_variant_get_string(parameter, NULL);
|
const gchar *target = g_variant_get_string(parameter, NULL);
|
||||||
gint target_tab = 0;
|
gint target_tab = 0;
|
||||||
|
|
||||||
g_action_change_state(G_ACTION(action), parameter);
|
g_action_change_state(G_ACTION(action), parameter);
|
||||||
|
|
||||||
if (strcmp(target, "chart") == 0) {
|
if (strcmp(target, "chart") == 0) {
|
||||||
target_tab = self->priv->tab_chart;
|
target_tab = window->priv->tab_chart;
|
||||||
} else if (strcmp(target, "aspects") == 0) {
|
} else if (strcmp(target, "aspects") == 0) {
|
||||||
target_tab = self->priv->tab_aspects;
|
target_tab = window->priv->tab_aspects;
|
||||||
} else if (strcmp(target, "points") == 0) {
|
} else if (strcmp(target, "points") == 0) {
|
||||||
target_tab = self->priv->tab_points;
|
target_tab = window->priv->tab_points;
|
||||||
} else {
|
} else {
|
||||||
g_warning("Unknown tab!");
|
g_warning("Unknown tab!");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_notebook_set_current_page(GTK_NOTEBOOK(self->priv->notebook), target_tab);
|
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->priv->notebook), target_tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user