diff options
author | Milan Crha <mcrha@redhat.com> | 2009-02-25 18:52:45 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2009-02-25 18:52:45 +0800 |
commit | 408ed636718294b0c0676bc6bdb690811c4793ac (patch) | |
tree | ca47bd9ef2a1c1c5c34419a165581a3e96836cbd /plugins/google-account-setup/google-contacts-source.c | |
parent | 82d5ac92dacbd76fa446f3115866b56da730f0ec (diff) | |
download | gsoc2013-evolution-408ed636718294b0c0676bc6bdb690811c4793ac.tar.gz gsoc2013-evolution-408ed636718294b0c0676bc6bdb690811c4793ac.tar.zst gsoc2013-evolution-408ed636718294b0c0676bc6bdb690811c4793ac.zip |
** Fix for bug #559719
2009-02-25 Milan Crha <mcrha@redhat.com>
** Fix for bug #559719
* google-contacts-source.c: (struct ui_data), (destroy_ui_data), (plugin_google_contacts):
* plugins/google-account-setup/plugins/webdav-account-setup/webdav-contacts-source.c: (destroy_ui_data), (plugin_webdav_contacts):
Use it's own/unique name for the property on the 'epl' and free the widget only if it wasn't freed yet.
svn path=/trunk/; revision=37325
Diffstat (limited to 'plugins/google-account-setup/google-contacts-source.c')
-rw-r--r-- | plugins/google-account-setup/google-contacts-source.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/plugins/google-account-setup/google-contacts-source.c b/plugins/google-account-setup/google-contacts-source.c index f76b7e56ee..2ae9fba7b0 100644 --- a/plugins/google-account-setup/google-contacts-source.c +++ b/plugins/google-account-setup/google-contacts-source.c @@ -246,10 +246,19 @@ on_interval_combo_changed (GtkComboBox *combo, gpointer user_data) g_free (value_string); } +struct ui_data { + GtkWidget *widget; +}; + static void destroy_ui_data(gpointer data) { - gtk_widget_destroy((GtkWidget *)data); + struct ui_data *ui = data; + + if (ui && ui->widget) + gtk_widget_destroy (ui->widget); + + g_free (ui); } GtkWidget * @@ -282,14 +291,14 @@ plugin_google_contacts (EPlugin *epl, int time; GtkWidget *ssl_cb; + struct ui_data *ui; source = t->source; group = e_source_peek_group (source); base_uri = e_source_group_peek_base_uri (group); - g_object_set_data_full (G_OBJECT (epl), "widget", NULL, - (GDestroyNotify)gtk_widget_destroy); + g_object_set_data (G_OBJECT (epl), "gwidget", NULL); if (strcmp (base_uri, "google://")) { return NULL; @@ -375,8 +384,11 @@ plugin_google_contacts (EPlugin *epl, g_object_set_data (G_OBJECT (interval_sb), "interval-combo", interval_combo); g_object_set_data (G_OBJECT (interval_combo), "interval-sb", interval_sb); - g_object_set_data_full(G_OBJECT(epl), "widget", vbox2, - destroy_ui_data); + ui = g_malloc0 (sizeof (struct ui_data)); + ui->widget = vbox2; + g_object_set_data_full(G_OBJECT(epl), "gwidget", ui, destroy_ui_data); + g_signal_connect (ui->widget, "destroy", G_CALLBACK (gtk_widget_destroyed), &ui->widget); + g_signal_connect (G_OBJECT (username_entry), "changed", G_CALLBACK (on_username_entry_changed), source); |