From 8c10647951dfdfaecf3965e602fb59160e403dc3 Mon Sep 17 00:00:00 2001 From: Sivaiah Nallagatla Date: Tue, 7 Sep 2004 04:59:54 +0000 Subject: add new widget variable contact_dsiplay_window to _EABView strcut to 2004-09-04 Sivaiah Nallagatla * gui/widgets/e-addressbook-view.h : add new widget variable contact_dsiplay_window to _EABView strcut to store. Remove unused scrolled varible * gui/widgets/e-addressbook-view.c (eab_view_init) (eab_view_dispose) : initialize and unref the new widget added (eab_view_new) : remove the loca variable scrlled_window instead use eav->contact_display_window (eab_view_show_contact_preview) : show/hide contact_display_window instead of contact_display Fixes #64024 svn path=/trunk/; revision=27168 --- addressbook/gui/widgets/e-addressbook-view.c | 24 ++++++++++++++---------- addressbook/gui/widgets/e-addressbook-view.h | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'addressbook/gui/widgets') diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index fc74e340cb..236b53f16f 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -297,7 +297,7 @@ eab_view_init (EABView *eav) eav->model = NULL; eav->object = NULL; eav->widget = NULL; - eav->scrolled = NULL; + eav->contact_display_window = NULL; eav->contact_display = NULL; eav->displayed_contact = -1; @@ -360,6 +360,11 @@ eab_view_dispose (GObject *object) g_list_free (eav->clipboard_contacts); eav->clipboard_contacts = NULL; } + + if (eav->contact_display_window) { + g_object_unref (eav->contact_display_window); + eav->contact_display_window = NULL; + } if (eav->invisible) { gtk_widget_destroy (eav->invisible); @@ -414,7 +419,6 @@ GtkWidget* eab_view_new (void) { GtkWidget *widget = GTK_WIDGET (g_object_new (E_TYPE_AB_VIEW, NULL)); - GtkWidget *scrolled_window; EABView *eav = EAB_VIEW (widget); FilterPart *part; @@ -481,13 +485,13 @@ eab_view_new (void) gtk_widget_show (eav->widget); eav->contact_display = eab_contact_display_new (); - scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN); - gtk_container_add (GTK_CONTAINER (scrolled_window), eav->contact_display); - gtk_container_add (GTK_CONTAINER (eav->paned), scrolled_window); + eav->contact_display_window = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (eav->contact_display_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (eav->contact_display_window), GTK_SHADOW_IN); + gtk_container_add (GTK_CONTAINER (eav->contact_display_window), eav->contact_display); + gtk_container_add (GTK_CONTAINER (eav->paned), eav->contact_display_window); gtk_widget_show (eav->contact_display); - gtk_widget_show (scrolled_window); + gtk_widget_show (eav->contact_display_window); gtk_widget_show (eav->paned); /* gtk selection crap */ @@ -1815,9 +1819,9 @@ eab_view_show_contact_preview (EABView *view, gboolean show) g_return_if_fail (view && E_IS_ADDRESSBOOK_VIEW (view)); if (show) - gtk_widget_show (view->contact_display); + gtk_widget_show (view->contact_display_window); else - gtk_widget_hide (view->contact_display); + gtk_widget_hide (view->contact_display_window); } void diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h index 6f937f4587..810252ea6b 100644 --- a/addressbook/gui/widgets/e-addressbook-view.h +++ b/addressbook/gui/widgets/e-addressbook-view.h @@ -81,7 +81,7 @@ struct _EABView GObject *object; GtkWidget *widget; - GtkWidget *scrolled; + GtkWidget *contact_display_window; GtkWidget *contact_display; GtkWidget *paned; -- cgit