aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@src.gnome.org>2000-07-09 19:54:25 +0800
committerAnders Carlsson <andersca@src.gnome.org>2000-07-09 19:54:25 +0800
commitaf3c0ca93922eccab25da7e4b3ef6bf109c2ce80 (patch)
treec696f940f93e64382d64d0b77f267f92eaf6c421 /addressbook/gui/component
parentabd6ce3b53f239441f5a655a362d057e16622b62 (diff)
downloadgsoc2013-evolution-af3c0ca93922eccab25da7e4b3ef6bf109c2ce80.tar
gsoc2013-evolution-af3c0ca93922eccab25da7e4b3ef6bf109c2ce80.tar.gz
gsoc2013-evolution-af3c0ca93922eccab25da7e4b3ef6bf109c2ce80.tar.bz2
gsoc2013-evolution-af3c0ca93922eccab25da7e4b3ef6bf109c2ce80.tar.lz
gsoc2013-evolution-af3c0ca93922eccab25da7e4b3ef6bf109c2ce80.tar.xz
gsoc2013-evolution-af3c0ca93922eccab25da7e4b3ef6bf109c2ce80.tar.zst
gsoc2013-evolution-af3c0ca93922eccab25da7e4b3ef6bf109c2ce80.zip
Several contacts list bugfixes.
svn path=/trunk/; revision=4008
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/Makefile.am1
-rw-r--r--addressbook/gui/component/addressbook.c28
2 files changed, 15 insertions, 14 deletions
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am
index 389f51f9ba..fd569fa9bb 100644
--- a/addressbook/gui/component/Makefile.am
+++ b/addressbook/gui/component/Makefile.am
@@ -13,6 +13,7 @@ INCLUDES = \
-I$(top_builddir)/shell \
-I$(top_srcdir)/widgets/e-text \
-I$(top_srcdir)/widgets/e-table \
+ -I$(top_srcdir)/widgets/misc \
-I$(top_srcdir)/addressbook/gui/minicard \
-I$(top_srcdir)/addressbook/contact-editor \
-I$(top_srcdir)/addressbook/backend \
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 4929963689..b50f808230 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -25,6 +25,8 @@
#include <e-table.h>
#include <e-cell-text.h>
+#include <e-scroll-frame.h>
+
#include <e-addressbook-model.h>
#include <select-names/e-select-names.h>
#include <select-names/e-select-names-manager.h>
@@ -674,7 +676,7 @@ static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpoi
"width", &width,
NULL);
width = MAX(width, allocation->width);
- gnome_canvas_set_scroll_region(GNOME_CANVAS( view->canvas ), 0, 0, width, allocation->height );
+ gnome_canvas_set_scroll_region(GNOME_CANVAS( view->canvas ), 0, 0, width - 1, allocation->height - 1);
gnome_canvas_item_set( view->rect,
"x2", (double) width,
"y2", (double) allocation->height,
@@ -689,7 +691,7 @@ static void resize(GnomeCanvas *canvas, gpointer data)
"width", &width,
NULL);
width = MAX(width, view->last_alloc.width);
- gnome_canvas_set_scroll_region(GNOME_CANVAS(view->canvas), 0, 0, width, view->last_alloc.height );
+ gnome_canvas_set_scroll_region(GNOME_CANVAS(view->canvas), 0, 0, width - 1, view->last_alloc.height - 1);
gnome_canvas_item_set( view->rect,
"x2", (double) width,
"y2", (double) view->last_alloc.height,
@@ -857,8 +859,7 @@ create_alphabet (AddressbookView *view)
static void
create_minicard_view (AddressbookView *view, char *initial_query)
{
- GtkWidget *scrollbar;
- GtkWidget *vbox;
+ GtkWidget *scrollframe;
GtkWidget *alphabet;
gtk_widget_push_visual (gdk_rgb_get_visual ());
@@ -866,8 +867,6 @@ create_minicard_view (AddressbookView *view, char *initial_query)
view->minicard_hbox = gtk_hbox_new(FALSE, 0);
- vbox = gtk_vbox_new(FALSE, 0);
-
view->canvas = e_canvas_new();
view->rect = gnome_canvas_item_new(
gnome_canvas_root( GNOME_CANVAS( view->canvas ) ),
@@ -894,14 +893,15 @@ create_minicard_view (AddressbookView *view, char *initial_query)
0, 0,
100, 100 );
- gtk_box_pack_start(GTK_BOX(vbox), view->canvas, TRUE, TRUE, 0);
-
- scrollbar = gtk_hscrollbar_new(
- gtk_layout_get_hadjustment(GTK_LAYOUT(view->canvas)));
-
- gtk_box_pack_start(GTK_BOX(vbox), scrollbar, FALSE, FALSE, 0);
-
- gtk_box_pack_start(GTK_BOX(view->minicard_hbox), vbox, TRUE, TRUE, 0);
+ scrollframe = e_scroll_frame_new (gtk_layout_get_hadjustment (GTK_LAYOUT (view->canvas)),
+ gtk_layout_get_vadjustment (GTK_LAYOUT (view->canvas)));
+ e_scroll_frame_set_policy (E_SCROLL_FRAME (scrollframe),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_NEVER);
+
+ gtk_container_add (GTK_CONTAINER (scrollframe), view->canvas);
+
+ gtk_box_pack_start(GTK_BOX(view->minicard_hbox), scrollframe, TRUE, TRUE, 0);
alphabet = create_alphabet(view);
if (alphabet) {