diff options
author | Anders Carlsson <andersca@src.gnome.org> | 2000-07-09 19:54:25 +0800 |
---|---|---|
committer | Anders Carlsson <andersca@src.gnome.org> | 2000-07-09 19:54:25 +0800 |
commit | af3c0ca93922eccab25da7e4b3ef6bf109c2ce80 (patch) | |
tree | c696f940f93e64382d64d0b77f267f92eaf6c421 /addressbook/gui/widgets | |
parent | abd6ce3b53f239441f5a655a362d057e16622b62 (diff) | |
download | gsoc2013-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/widgets')
-rw-r--r-- | addressbook/gui/widgets/Makefile.am | 1 | ||||
-rw-r--r-- | addressbook/gui/widgets/test-reflow.c | 21 |
2 files changed, 13 insertions, 9 deletions
diff --git a/addressbook/gui/widgets/Makefile.am b/addressbook/gui/widgets/Makefile.am index 0eb7946ac5..a20edc1c08 100644 --- a/addressbook/gui/widgets/Makefile.am +++ b/addressbook/gui/widgets/Makefile.am @@ -5,6 +5,7 @@ INCLUDES = \ -I$(top_builddir)/addressbook/backend \ -I$(top_srcdir)/addressbook/contact-editor \ -I$(top_srcdir)/widgets/e-text \ + -I$(top_srcdir)/widgets/misc \ $(BONOBO_GNOME_CFLAGS) noinst_LIBRARIES = \ diff --git a/addressbook/gui/widgets/test-reflow.c b/addressbook/gui/widgets/test-reflow.c index dacaeb055c..8013c428d5 100644 --- a/addressbook/gui/widgets/test-reflow.c +++ b/addressbook/gui/widgets/test-reflow.c @@ -51,6 +51,7 @@ #include <e-util/e-canvas.h> #include "e-reflow.h" #include "e-minicard.h" +#include "e-scroll-frame.h" /* This is a horrible thing to do, but it is just a test. */ GnomeCanvasItem *reflow; @@ -76,7 +77,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( canvas ), 0, 0, width, allocation->height ); + gnome_canvas_set_scroll_region(GNOME_CANVAS( canvas ), 0, 0, width - 1, allocation->height - 1); gnome_canvas_item_set( rect, "x2", (double) width, "y2", (double) allocation->height, @@ -90,7 +91,7 @@ static void resize(GnomeCanvas *canvas, gpointer data) "width", &width, NULL); width = MAX(width, last_alloc.width); - gnome_canvas_set_scroll_region(canvas , 0, 0, width, last_alloc.height ); + gnome_canvas_set_scroll_region(canvas , 0, 0, width - 1, last_alloc.height - 1); gnome_canvas_item_set( rect, "x2", (double) width, "y2", (double) last_alloc.height, @@ -122,7 +123,7 @@ int main( int argc, char *argv[] ) GtkWidget *app; GtkWidget *canvas; GtkWidget *vbox; - GtkWidget *scrollbar; + GtkWidget *scrollframe; int i; /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); @@ -164,13 +165,15 @@ int main( int argc, char *argv[] ) 0, 0, 100, 100 ); - gtk_box_pack_start(GTK_BOX(vbox), canvas, TRUE, TRUE, 0); - - scrollbar = gtk_hscrollbar_new(gtk_layout_get_hadjustment(GTK_LAYOUT(canvas))); - - gtk_box_pack_start(GTK_BOX(vbox), scrollbar, FALSE, FALSE, 0); + scrollframe = e_scroll_frame_new (gtk_layout_get_hadjustment(GTK_LAYOUT(canvas)), + gtk_layout_get_vadjustment(GTK_LAYOUT(canvas))); + e_scroll_frame_set_policy (E_SCROLL_FRAME (scrollframe), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_NEVER); + + gtk_container_add (GTK_CONTAINER (scrollframe), canvas); - gnome_app_set_contents( GNOME_APP( app ), vbox ); + gnome_app_set_contents( GNOME_APP( app ), scrollframe ); /* Connect the signals */ gtk_signal_connect( GTK_OBJECT( app ), "destroy", |