fix for vertical scrolling in case of GTK_CLIST_ADD_MOD changed pixmap

* gtk/gtkclist.c (scroll_vertical): fix for vertical scrolling in case
  of GTK_CLIST_ADD_MOD
* gtk/testgtk.c (add1000_clist): changed pixmap
This commit is contained in:
Lars Hamann 1998-07-19 22:42:21 +00:00
parent c1c8caa28c
commit bfa2ec274b
10 changed files with 198 additions and 156 deletions

View File

@ -1,3 +1,9 @@
Sun Jul 19 23:51:05 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (scroll_vertical): fix for vertical scrolling in case
of GTK_CLIST_ADD_MOD
* gtk/testgtk.c (add1000_clist): changed pixmap
Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org> Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.h: * gtk/gtkmain.h:

View File

@ -1,3 +1,9 @@
Sun Jul 19 23:51:05 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (scroll_vertical): fix for vertical scrolling in case
of GTK_CLIST_ADD_MOD
* gtk/testgtk.c (add1000_clist): changed pixmap
Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org> Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.h: * gtk/gtkmain.h:

View File

@ -1,3 +1,9 @@
Sun Jul 19 23:51:05 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (scroll_vertical): fix for vertical scrolling in case
of GTK_CLIST_ADD_MOD
* gtk/testgtk.c (add1000_clist): changed pixmap
Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org> Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.h: * gtk/gtkmain.h:

View File

@ -1,3 +1,9 @@
Sun Jul 19 23:51:05 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (scroll_vertical): fix for vertical scrolling in case
of GTK_CLIST_ADD_MOD
* gtk/testgtk.c (add1000_clist): changed pixmap
Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org> Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.h: * gtk/gtkmain.h:

View File

@ -1,3 +1,9 @@
Sun Jul 19 23:51:05 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (scroll_vertical): fix for vertical scrolling in case
of GTK_CLIST_ADD_MOD
* gtk/testgtk.c (add1000_clist): changed pixmap
Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org> Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.h: * gtk/gtkmain.h:

View File

@ -1,3 +1,9 @@
Sun Jul 19 23:51:05 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (scroll_vertical): fix for vertical scrolling in case
of GTK_CLIST_ADD_MOD
* gtk/testgtk.c (add1000_clist): changed pixmap
Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org> Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.h: * gtk/gtkmain.h:

View File

@ -1,3 +1,9 @@
Sun Jul 19 23:51:05 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (scroll_vertical): fix for vertical scrolling in case
of GTK_CLIST_ADD_MOD
* gtk/testgtk.c (add1000_clist): changed pixmap
Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org> Sat Jul 18 22:59:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.h: * gtk/gtkmain.h:

View File

@ -5250,14 +5250,12 @@ scroll_vertical (GtkCList *clist,
} }
} }
if (clist->selection_mode == GTK_SELECTION_EXTENDED &&
GTK_CLIST_ADD_MODE (clist))
return;
switch (gtk_clist_row_is_visible (clist, clist->focus_row)) switch (gtk_clist_row_is_visible (clist, clist->focus_row))
{ {
case GTK_VISIBILITY_NONE: case GTK_VISIBILITY_NONE:
if (old_focus_row != clist->focus_row) if (old_focus_row != clist->focus_row &&
!(clist->selection_mode == GTK_SELECTION_EXTENDED &&
GTK_CLIST_ADD_MODE (clist)))
select_row (clist, clist->focus_row, -1, NULL); select_row (clist, clist->focus_row, -1, NULL);
switch (scroll_type) switch (scroll_type)
{ {
@ -5296,7 +5294,9 @@ scroll_vertical (GtkCList *clist,
} }
default: default:
if (old_focus_row != clist->focus_row) if (old_focus_row != clist->focus_row &&
!(clist->selection_mode == GTK_SELECTION_EXTENDED &&
GTK_CLIST_ADD_MODE (clist)))
select_row (clist, clist->focus_row, -1, NULL); select_row (clist, clist->focus_row, -1, NULL);
break; break;
} }

View File

@ -3039,6 +3039,77 @@ create_list (void)
* GtkCList * GtkCList
*/ */
static char * book_open_xpm[] = {
"16 16 4 1",
" c None s None",
". c black",
"X c #808080",
"o c white",
" ",
" .. ",
" .Xo. ... ",
" .Xoo. ..oo. ",
" .Xooo.Xooo... ",
" .Xooo.oooo.X. ",
" .Xooo.Xooo.X. ",
" .Xooo.oooo.X. ",
" .Xooo.Xooo.X. ",
" .Xooo.oooo.X. ",
" .Xoo.Xoo..X. ",
" .Xo.o..ooX. ",
" .X..XXXXX. ",
" ..X....... ",
" .. ",
" "};
static char * book_closed_xpm[] = {
"16 16 6 1",
" c None s None",
". c black",
"X c red",
"o c yellow",
"O c #808080",
"# c white",
" ",
" .. ",
" ..XX. ",
" ..XXXXX. ",
" ..XXXXXXXX. ",
".ooXXXXXXXXX. ",
"..ooXXXXXXXXX. ",
".X.ooXXXXXXXXX. ",
".XX.ooXXXXXX.. ",
" .XX.ooXXX..#O ",
" .XX.oo..##OO. ",
" .XX..##OO.. ",
" .X.#OO.. ",
" ..O.. ",
" .. ",
" "};
static char * mini_page_xpm[] = {
"16 16 4 1",
" c None s None",
". c black",
"X c white",
"o c #808080",
" ",
" ....... ",
" .XXXXX.. ",
" .XoooX.X. ",
" .XXXXX.... ",
" .XooooXoo.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" ..........o ",
" oooooooooo ",
" "};
#define TESTGTK_CLIST_COLUMNS 20 #define TESTGTK_CLIST_COLUMNS 20
static gint clist_rows = 0; static gint clist_rows = 0;
static GtkWidget *clist_omenu; static GtkWidget *clist_omenu;
@ -3052,10 +3123,10 @@ add1000_clist (GtkWidget *widget, gpointer data)
GdkBitmap *mask; GdkBitmap *mask;
GdkPixmap *pixmap; GdkPixmap *pixmap;
pixmap = gdk_pixmap_create_from_xpm (GTK_CLIST (data)->clist_window, pixmap = gdk_pixmap_create_from_xpm_d (GTK_CLIST (data)->clist_window,
&mask, &mask,
&GTK_WIDGET (data)->style->white, &GTK_WIDGET (data)->style->white,
"3DRings.xpm"); mini_page_xpm);
for (i = 0; i < TESTGTK_CLIST_COLUMNS; i++) for (i = 0; i < TESTGTK_CLIST_COLUMNS; i++)
{ {
@ -3601,77 +3672,6 @@ create_clist (void)
* GtkCTree * GtkCTree
*/ */
static char * book_open_xpm[] = {
"16 16 4 1",
" c None s None",
". c black",
"X c #808080",
"o c white",
" ",
" .. ",
" .Xo. ... ",
" .Xoo. ..oo. ",
" .Xooo.Xooo... ",
" .Xooo.oooo.X. ",
" .Xooo.Xooo.X. ",
" .Xooo.oooo.X. ",
" .Xooo.Xooo.X. ",
" .Xooo.oooo.X. ",
" .Xoo.Xoo..X. ",
" .Xo.o..ooX. ",
" .X..XXXXX. ",
" ..X....... ",
" .. ",
" "};
static char * book_closed_xpm[] = {
"16 16 6 1",
" c None s None",
". c black",
"X c red",
"o c yellow",
"O c #808080",
"# c white",
" ",
" .. ",
" ..XX. ",
" ..XXXXX. ",
" ..XXXXXXXX. ",
".ooXXXXXXXXX. ",
"..ooXXXXXXXXX. ",
".X.ooXXXXXXXXX. ",
".XX.ooXXXXXX.. ",
" .XX.ooXXX..#O ",
" .XX.oo..##OO. ",
" .XX..##OO.. ",
" .X.#OO.. ",
" ..O.. ",
" .. ",
" "};
static char * mini_page_xpm[] = {
"16 16 4 1",
" c None s None",
". c black",
"X c white",
"o c #808080",
" ",
" ....... ",
" .XXXXX.. ",
" .XoooX.X. ",
" .XXXXX.... ",
" .XooooXoo.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" ..........o ",
" oooooooooo ",
" "};
GdkPixmap *pixmap1; GdkPixmap *pixmap1;
GdkPixmap *pixmap2; GdkPixmap *pixmap2;
GdkPixmap *pixmap3; GdkPixmap *pixmap3;

View File

@ -3039,6 +3039,77 @@ create_list (void)
* GtkCList * GtkCList
*/ */
static char * book_open_xpm[] = {
"16 16 4 1",
" c None s None",
". c black",
"X c #808080",
"o c white",
" ",
" .. ",
" .Xo. ... ",
" .Xoo. ..oo. ",
" .Xooo.Xooo... ",
" .Xooo.oooo.X. ",
" .Xooo.Xooo.X. ",
" .Xooo.oooo.X. ",
" .Xooo.Xooo.X. ",
" .Xooo.oooo.X. ",
" .Xoo.Xoo..X. ",
" .Xo.o..ooX. ",
" .X..XXXXX. ",
" ..X....... ",
" .. ",
" "};
static char * book_closed_xpm[] = {
"16 16 6 1",
" c None s None",
". c black",
"X c red",
"o c yellow",
"O c #808080",
"# c white",
" ",
" .. ",
" ..XX. ",
" ..XXXXX. ",
" ..XXXXXXXX. ",
".ooXXXXXXXXX. ",
"..ooXXXXXXXXX. ",
".X.ooXXXXXXXXX. ",
".XX.ooXXXXXX.. ",
" .XX.ooXXX..#O ",
" .XX.oo..##OO. ",
" .XX..##OO.. ",
" .X.#OO.. ",
" ..O.. ",
" .. ",
" "};
static char * mini_page_xpm[] = {
"16 16 4 1",
" c None s None",
". c black",
"X c white",
"o c #808080",
" ",
" ....... ",
" .XXXXX.. ",
" .XoooX.X. ",
" .XXXXX.... ",
" .XooooXoo.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" ..........o ",
" oooooooooo ",
" "};
#define TESTGTK_CLIST_COLUMNS 20 #define TESTGTK_CLIST_COLUMNS 20
static gint clist_rows = 0; static gint clist_rows = 0;
static GtkWidget *clist_omenu; static GtkWidget *clist_omenu;
@ -3052,10 +3123,10 @@ add1000_clist (GtkWidget *widget, gpointer data)
GdkBitmap *mask; GdkBitmap *mask;
GdkPixmap *pixmap; GdkPixmap *pixmap;
pixmap = gdk_pixmap_create_from_xpm (GTK_CLIST (data)->clist_window, pixmap = gdk_pixmap_create_from_xpm_d (GTK_CLIST (data)->clist_window,
&mask, &mask,
&GTK_WIDGET (data)->style->white, &GTK_WIDGET (data)->style->white,
"3DRings.xpm"); mini_page_xpm);
for (i = 0; i < TESTGTK_CLIST_COLUMNS; i++) for (i = 0; i < TESTGTK_CLIST_COLUMNS; i++)
{ {
@ -3601,77 +3672,6 @@ create_clist (void)
* GtkCTree * GtkCTree
*/ */
static char * book_open_xpm[] = {
"16 16 4 1",
" c None s None",
". c black",
"X c #808080",
"o c white",
" ",
" .. ",
" .Xo. ... ",
" .Xoo. ..oo. ",
" .Xooo.Xooo... ",
" .Xooo.oooo.X. ",
" .Xooo.Xooo.X. ",
" .Xooo.oooo.X. ",
" .Xooo.Xooo.X. ",
" .Xooo.oooo.X. ",
" .Xoo.Xoo..X. ",
" .Xo.o..ooX. ",
" .X..XXXXX. ",
" ..X....... ",
" .. ",
" "};
static char * book_closed_xpm[] = {
"16 16 6 1",
" c None s None",
". c black",
"X c red",
"o c yellow",
"O c #808080",
"# c white",
" ",
" .. ",
" ..XX. ",
" ..XXXXX. ",
" ..XXXXXXXX. ",
".ooXXXXXXXXX. ",
"..ooXXXXXXXXX. ",
".X.ooXXXXXXXXX. ",
".XX.ooXXXXXX.. ",
" .XX.ooXXX..#O ",
" .XX.oo..##OO. ",
" .XX..##OO.. ",
" .X.#OO.. ",
" ..O.. ",
" .. ",
" "};
static char * mini_page_xpm[] = {
"16 16 4 1",
" c None s None",
". c black",
"X c white",
"o c #808080",
" ",
" ....... ",
" .XXXXX.. ",
" .XoooX.X. ",
" .XXXXX.... ",
" .XooooXoo.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" ..........o ",
" oooooooooo ",
" "};
GdkPixmap *pixmap1; GdkPixmap *pixmap1;
GdkPixmap *pixmap2; GdkPixmap *pixmap2;
GdkPixmap *pixmap3; GdkPixmap *pixmap3;