aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-11-13 04:21:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-11-13 04:22:50 +0800
commit29310c0c67025e0ca16f7731055a4c7a427306e5 (patch)
tree16a5e4bee844eba25f9f02c3d4e19969d98090e1 /e-util
parent1ed348fa43615021dfe4b1cd09d0503158d900d3 (diff)
downloadgsoc2013-evolution-29310c0c67025e0ca16f7731055a4c7a427306e5.tar.gz
gsoc2013-evolution-29310c0c67025e0ca16f7731055a4c7a427306e5.tar.zst
gsoc2013-evolution-29310c0c67025e0ca16f7731055a4c7a427306e5.zip
EConfig: Debugability improvements.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-config.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/e-util/e-config.c b/e-util/e-config.c
index f8e459497e..06117c2a9f 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -138,11 +138,11 @@ config_finalize (GObject *object)
while (link != NULL) {
struct _widget_node *node = link->data;
- /* disconnect the gtk_widget_destroyed function from the widget */
+ /* disconnect the ec_widget_destroyed function from the widget */
if (node->widget)
g_signal_handlers_disconnect_matched (
node->widget, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, &node->widget);
+ 0, 0, NULL, NULL, node);
g_free (node);
@@ -560,6 +560,16 @@ ec_assistant_forward (gint current_page,
}
static void
+ec_widget_destroyed (GtkWidget *widget,
+ struct _widget_node *node)
+{
+ /* Use our own function instead of gtk_widget_destroyed()
+ * so it's easier to trap EConfig widgets in a debugger. */
+
+ node->widget = NULL;
+}
+
+static void
ec_rebuild (EConfig *emp)
{
EConfigPrivate *p = emp->priv;
@@ -829,6 +839,7 @@ ec_rebuild (EConfig *emp)
} else {
gtk_assistant_prepend_page (GTK_ASSISTANT (assistant), page);
}
+
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), page, item->type == E_CONFIG_PAGE ? GTK_ASSISTANT_PAGE_CONTENT : GTK_ASSISTANT_PAGE_PROGRESS);
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, translated_label);
gtk_widget_show_all (page);
@@ -860,7 +871,9 @@ ec_rebuild (EConfig *emp)
sectionnode = NULL;
wn->widget = page;
if (page)
- g_signal_connect (page, "destroy", G_CALLBACK(gtk_widget_destroyed), &wn->widget);
+ g_signal_connect (
+ page, "destroy",
+ G_CALLBACK (ec_widget_destroyed), wn);
break;
case E_CONFIG_SECTION:
case E_CONFIG_SECTION_TABLE:
@@ -962,7 +975,9 @@ ec_rebuild (EConfig *emp)
sectionno++;
wn->widget = section;
if (section)
- g_signal_connect (section, "destroy", G_CALLBACK(gtk_widget_destroyed), &wn->widget);
+ g_signal_connect (
+ section, "destroy",
+ G_CALLBACK (ec_widget_destroyed), wn);
sectionnode = wn;
break;
case E_CONFIG_ITEM:
@@ -1001,7 +1016,9 @@ ec_rebuild (EConfig *emp)
wn->widget = w;
if (w) {
- g_signal_connect (w, "destroy", G_CALLBACK(gtk_widget_destroyed), &wn->widget);
+ g_signal_connect (
+ w, "destroy",
+ G_CALLBACK (ec_widget_destroyed), wn);
itemno++;
if (gtk_widget_get_visible (w))