aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog14
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c2
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c13
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.h3
4 files changed, 27 insertions, 5 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 785b463578..d1058832c6 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,17 @@
+2005-10-16 Devashish Sharma <sdevashish@novell.com>
+
+ * gui/widgets/e-addressbook-view.c (display_view): Changed the
+ parameter passed to gal_view_minicard_attach.
+
+ * gui/widgets/gal-view-minicard.c (column_width_changed): Sets the
+ horizontal scroll amount for the addresss card view to the current
+ page size.
+
+ * gui/widgets/gal-view-minicard.h: Changed function prototype for
+ gal_view_minicard_attach. Passing EABView instead of
+ EMinicardViewWidget.
+ Fixes Bug#218273
+
2006-10-16 Ushveen Kaur <kushveen@novell.com>
** Fixes bug#332908
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 4c36b1897d..6b0788b9d5 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -637,7 +637,7 @@ display_view(GalViewInstance *instance,
}
else if (GAL_IS_VIEW_MINICARD(view)) {
change_view_type (address_view, EAB_VIEW_MINICARD);
- gal_view_minicard_attach (GAL_VIEW_MINICARD (view), E_MINICARD_VIEW_WIDGET (address_view->object));
+ gal_view_minicard_attach (GAL_VIEW_MINICARD (view), address_view);
}
#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
else if (GAL_IS_VIEW_TREEVIEW (view)) {
diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c
index 3031f31d29..7111cc0cb8 100644
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ b/addressbook/gui/widgets/gal-view-minicard.c
@@ -185,20 +185,27 @@ gal_view_minicard_get_type (void)
}
static void
-column_width_changed (EMinicardViewWidget *w, double width, GalViewMinicard *view)
+column_width_changed (EMinicardViewWidget *w, double width, EABView *address_view)
{
+ GalViewMinicard *view = GAL_VIEW_MINICARD (gal_view_instance_get_current_view (address_view->view_instance));
d(g_print("%s: Old width = %f, New width = %f\n", G_GNUC_FUNCTION, view->column_width, width));
if (view->column_width != width) {
view->column_width = width;
gal_view_changed(GAL_VIEW(view));
}
+
+ GtkScrolledWindow * scrolled_window = GTK_SCROLLED_WINDOW(address_view->widget);
+ GtkAdjustment *adj = gtk_scrolled_window_get_hadjustment (scrolled_window);
+ GtkAdjustment *adj_new = gtk_adjustment_new(adj->value, adj->lower, adj->upper, adj->page_size, adj->page_increment,adj->page_size);
+ gtk_scrolled_window_set_hadjustment(scrolled_window, adj_new);
}
void
-gal_view_minicard_attach (GalViewMinicard *view, EMinicardViewWidget *emvw)
+gal_view_minicard_attach (GalViewMinicard *view, EABView *address_view)
{
gal_view_minicard_detach (view);
+ EMinicardViewWidget *emvw = E_MINICARD_VIEW_WIDGET (address_view->object);
view->emvw = emvw;
g_object_ref (view->emvw);
@@ -209,7 +216,7 @@ gal_view_minicard_attach (GalViewMinicard *view, EMinicardViewWidget *emvw)
view->emvw_column_width_changed_id =
g_signal_connect(view->emvw, "column_width_changed",
- G_CALLBACK (column_width_changed), view);
+ G_CALLBACK (column_width_changed), address_view);
}
void
diff --git a/addressbook/gui/widgets/gal-view-minicard.h b/addressbook/gui/widgets/gal-view-minicard.h
index 7cde291e16..e6f8c415b4 100644
--- a/addressbook/gui/widgets/gal-view-minicard.h
+++ b/addressbook/gui/widgets/gal-view-minicard.h
@@ -12,6 +12,7 @@
#include <widgets/menus/gal-view.h>
#include <e-minicard-view-widget.h>
+#include "e-addressbook-view.h"
#define GAL_TYPE_VIEW_MINICARD (gal_view_minicard_get_type ())
#define GAL_VIEW_MINICARD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_TYPE_VIEW_MINICARD, GalViewMinicard))
@@ -39,7 +40,7 @@ GalView *gal_view_minicard_new (const gchar *title);
GalView *gal_view_minicard_construct (GalViewMinicard *view,
const gchar *title);
void gal_view_minicard_attach (GalViewMinicard *view,
- EMinicardViewWidget *emvw);
+ EABView *address_view);
void gal_view_minicard_detach (GalViewMinicard *view);
#endif /* _GAL_VIEW_MINICARD_H_ */