Commit a761b22c authored by Rohit Kaushik's avatar Rohit Kaushik Committed by Georges Basile Stavracas Neto
Browse files

todoist-preferences-panel: fix signal connect for add_button

Since, add_account_button_clicked only need the data,
that is GtdTodoistPreferencesPanel rather than instance
add_button, it should be g_signal_connect_swapped.
Currently with just g_signal_connect the callback
function will not work properly since data won't be
correctly passed.
parent d5827fd0
......@@ -106,6 +106,8 @@ spawn_goa_with_args (const gchar *action,
static void
add_account_button_clicked (GtdTodoistPreferencesPanel *self)
g_return_if_fail (GOA_IS_CLIENT (self->client));
spawn_goa_with_args (NULL, NULL);
......@@ -267,5 +269,5 @@ gtd_todoist_preferences_panel_init (GtdTodoistPreferencesPanel *self)
gtk_widget_show (label);
gtk_list_box_set_placeholder (GTK_LIST_BOX (self->accounts_listbox), GTK_WIDGET (label));
g_signal_connect (self->add_button, "clicked", G_CALLBACK (add_account_button_clicked), self);
g_signal_connect_swapped (self->add_button, "clicked", G_CALLBACK (add_account_button_clicked), self);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment