# HG changeset patch # User Sadrul Habib Chowdhury # Date 1151521958 0 # Node ID 9d66969a2e32a4fdafa122b4223f6cc1f9e6a221 # Parent 7d3256b253ec2ea0845caa9d36ecc7d6c551c98b [gaim-migrate @ 16369] Get rid of a whole lot of compile warnings. committer: Tailor Script diff -r 7d3256b253ec -r 9d66969a2e32 console/libgnt/Makefile --- a/console/libgnt/Makefile Wed Jun 28 18:50:33 2006 +0000 +++ b/console/libgnt/Makefile Wed Jun 28 19:12:38 2006 +0000 @@ -55,7 +55,7 @@ gntmain.o: gntmain.c $(HEADERS) libgnt: $(OBJECTS) - $(CC) --shared -o libgnt.so $(OBJECTS) + $(CC) --shared -o libgnt.so $(OBJECTS) $(LDFLAGS) clean: rm -f *.o diff -r 7d3256b253ec -r 9d66969a2e32 console/libgnt/gnt.h --- a/console/libgnt/gnt.h Wed Jun 28 18:50:33 2006 +0000 +++ b/console/libgnt/gnt.h Wed Jun 28 19:12:38 2006 +0000 @@ -11,4 +11,6 @@ void gnt_screen_release(GntWidget *widget); -void gnt_scree_update(GntWidget *widget); +void gnt_screen_update(GntWidget *widget); + +void gnt_screen_take_focus(GntWidget *widget); diff -r 7d3256b253ec -r 9d66969a2e32 console/libgnt/gntbox.c --- a/console/libgnt/gntbox.c Wed Jun 28 18:50:33 2006 +0000 +++ b/console/libgnt/gntbox.c Wed Jun 28 19:12:38 2006 +0000 @@ -1,5 +1,7 @@ #include "gntbox.h" +#include + enum { SIGS = 1, @@ -238,7 +240,6 @@ static void gnt_box_lost_focus(GntWidget *widget) { - GntBox *box = GNT_BOX(widget); GntWidget *p = widget; while (p->parent) @@ -277,8 +278,6 @@ static void gnt_box_class_init(GntBoxClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_box_destroy; parent_class->draw = gnt_box_draw; diff -r 7d3256b253ec -r 9d66969a2e32 console/libgnt/gntbutton.c --- a/console/libgnt/gntbutton.c Wed Jun 28 18:50:33 2006 +0000 +++ b/console/libgnt/gntbutton.c Wed Jun 28 19:12:38 2006 +0000 @@ -1,3 +1,5 @@ +#include + #include "gntbutton.h" enum @@ -54,8 +56,6 @@ static void gnt_button_class_init(GntWidgetClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->draw = gnt_button_draw; parent_class->map = gnt_button_map; diff -r 7d3256b253ec -r 9d66969a2e32 console/libgnt/gntentry.c --- a/console/libgnt/gntentry.c Wed Jun 28 18:50:33 2006 +0000 +++ b/console/libgnt/gntentry.c Wed Jun 28 19:12:38 2006 +0000 @@ -1,4 +1,6 @@ +#include #include + #include "gntentry.h" enum @@ -28,8 +30,6 @@ static void gnt_entry_size_request(GntWidget *widget) { - GntEntry *entry = GNT_ENTRY(widget); - if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_MAPPED)) { widget->priv.height = 1; @@ -150,8 +150,6 @@ static void gnt_entry_class_init(GntEntryClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_entry_destroy; parent_class->draw = gnt_entry_draw; diff -r 7d3256b253ec -r 9d66969a2e32 console/libgnt/gntlabel.c --- a/console/libgnt/gntlabel.c Wed Jun 28 18:50:33 2006 +0000 +++ b/console/libgnt/gntlabel.c Wed Jun 28 19:12:38 2006 +0000 @@ -58,8 +58,6 @@ static void gnt_label_class_init(GntLabelClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_label_destroy; parent_class->draw = gnt_label_draw; diff -r 7d3256b253ec -r 9d66969a2e32 console/libgnt/gntmain.c --- a/console/libgnt/gntmain.c Wed Jun 28 18:50:33 2006 +0000 +++ b/console/libgnt/gntmain.c Wed Jun 28 19:12:38 2006 +0000 @@ -1,9 +1,13 @@ #include "gnt.h" +#include "gntbox.h" #include "gntkeys.h" #include "gntcolors.h" + #include #include #include +#include +#include static GList *focus_list; static int max_x; @@ -248,7 +252,7 @@ widget = widget->parent; } - gnt_box_sync_children(widget); + gnt_box_sync_children(GNT_BOX(widget)); node = g_hash_table_lookup(nodes, widget); win = dupwin(widget->window); diff -r 7d3256b253ec -r 9d66969a2e32 console/libgnt/gnttextview.c --- a/console/libgnt/gnttextview.c Wed Jun 28 18:50:33 2006 +0000 +++ b/console/libgnt/gnttextview.c Wed Jun 28 19:12:38 2006 +0000 @@ -50,8 +50,6 @@ static void gnt_text_view_class_init(GntTextViewClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_text_view_destroy; parent_class->draw = gnt_text_view_draw; diff -r 7d3256b253ec -r 9d66969a2e32 console/libgnt/gnttree.c --- a/console/libgnt/gnttree.c Wed Jun 28 18:50:33 2006 +0000 +++ b/console/libgnt/gnttree.c Wed Jun 28 19:12:38 2006 +0000 @@ -47,7 +47,7 @@ get_next(GntTreeRow *row) { if (row == NULL) - return; + return NULL; return _get_next(row, !row->collapsed); } @@ -229,7 +229,6 @@ gnt_tree_draw(GntWidget *widget) { GntTree *tree = GNT_TREE(widget); - int bottom; scrollok(widget->window, TRUE); wsetscrreg(widget->window, 0, widget->priv.height - 1); @@ -330,8 +329,6 @@ static void gnt_tree_class_init(GntTreeClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_tree_destroy; parent_class->draw = gnt_tree_draw; @@ -432,7 +429,8 @@ GntWidget *widget = GNT_WIDGET(tree); int ret = widget->priv.height; if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_NO_BORDER)) - widget->priv.height -= 2; + ret -= 2; + return ret; } void gnt_tree_scroll(GntTree *tree, int count) diff -r 7d3256b253ec -r 9d66969a2e32 console/libgnt/gntwidget.h --- a/console/libgnt/gntwidget.h Wed Jun 28 18:50:33 2006 +0000 +++ b/console/libgnt/gntwidget.h Wed Jun 28 19:12:38 2006 +0000 @@ -117,6 +117,7 @@ * Applications should just call gnt_widget_draw instead of this. */ void gnt_widget_queue_update(GntWidget *widget); +void gnt_widget_set_take_focus(GntWidget *widget, gboolean set); G_END_DECLS #endif /* GNT_WIDGET_H */