Mercurial > pidgin
comparison console/libgnt/gnttree.c @ 13888:9d66969a2e32
[gaim-migrate @ 16369]
Get rid of a whole lot of compile warnings.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 28 Jun 2006 19:12:38 +0000 |
parents | 5c750626eaa5 |
children | a621329e8c85 |
comparison
equal
deleted
inserted
replaced
13887:7d3256b253ec | 13888:9d66969a2e32 |
---|---|
45 | 45 |
46 static GntTreeRow * | 46 static GntTreeRow * |
47 get_next(GntTreeRow *row) | 47 get_next(GntTreeRow *row) |
48 { | 48 { |
49 if (row == NULL) | 49 if (row == NULL) |
50 return; | 50 return NULL; |
51 return _get_next(row, !row->collapsed); | 51 return _get_next(row, !row->collapsed); |
52 } | 52 } |
53 | 53 |
54 /* Returns the n-th next row. If it doesn't exist, returns NULL */ | 54 /* Returns the n-th next row. If it doesn't exist, returns NULL */ |
55 static GntTreeRow * | 55 static GntTreeRow * |
227 | 227 |
228 static void | 228 static void |
229 gnt_tree_draw(GntWidget *widget) | 229 gnt_tree_draw(GntWidget *widget) |
230 { | 230 { |
231 GntTree *tree = GNT_TREE(widget); | 231 GntTree *tree = GNT_TREE(widget); |
232 int bottom; | |
233 | 232 |
234 scrollok(widget->window, TRUE); | 233 scrollok(widget->window, TRUE); |
235 wsetscrreg(widget->window, 0, widget->priv.height - 1); | 234 wsetscrreg(widget->window, 0, widget->priv.height - 1); |
236 | 235 |
237 redraw_tree(tree); | 236 redraw_tree(tree); |
328 } | 327 } |
329 | 328 |
330 static void | 329 static void |
331 gnt_tree_class_init(GntTreeClass *klass) | 330 gnt_tree_class_init(GntTreeClass *klass) |
332 { | 331 { |
333 GObjectClass *obj_class = G_OBJECT_CLASS(klass); | |
334 | |
335 parent_class = GNT_WIDGET_CLASS(klass); | 332 parent_class = GNT_WIDGET_CLASS(klass); |
336 parent_class->destroy = gnt_tree_destroy; | 333 parent_class->destroy = gnt_tree_destroy; |
337 parent_class->draw = gnt_tree_draw; | 334 parent_class->draw = gnt_tree_draw; |
338 parent_class->map = gnt_tree_map; | 335 parent_class->map = gnt_tree_map; |
339 parent_class->size_request = gnt_tree_size_request; | 336 parent_class->size_request = gnt_tree_size_request; |
430 int gnt_tree_get_visible_rows(GntTree *tree) | 427 int gnt_tree_get_visible_rows(GntTree *tree) |
431 { | 428 { |
432 GntWidget *widget = GNT_WIDGET(tree); | 429 GntWidget *widget = GNT_WIDGET(tree); |
433 int ret = widget->priv.height; | 430 int ret = widget->priv.height; |
434 if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_NO_BORDER)) | 431 if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_NO_BORDER)) |
435 widget->priv.height -= 2; | 432 ret -= 2; |
433 return ret; | |
436 } | 434 } |
437 | 435 |
438 void gnt_tree_scroll(GntTree *tree, int count) | 436 void gnt_tree_scroll(GntTree *tree, int count) |
439 { | 437 { |
440 GntTreeRow *row; | 438 GntTreeRow *row; |