# HG changeset patch # User Sadrul Habib Chowdhury # Date 1162065150 0 # Node ID bfcdd361357e28e5f9837b45bdda02fcdb94e4ad # Parent 061157db80170fc7ea99c15986c50876df6f46a4 [gaim-migrate @ 17605] Do things right and fix the compile warnings. committer: Tailor Script diff -r 061157db8017 -r bfcdd361357e console/libgnt/gntbox.c --- a/console/libgnt/gntbox.c Sat Oct 28 19:37:48 2006 +0000 +++ b/console/libgnt/gntbox.c Sat Oct 28 19:52:30 2006 +0000 @@ -9,7 +9,6 @@ }; static GntWidgetClass *parent_class = NULL; -static guint signals[SIGS] = { 0 }; static GntWidget * find_focusable_widget(GntBox *box); diff -r 061157db8017 -r bfcdd361357e console/libgnt/gntbutton.c --- a/console/libgnt/gntbutton.c Sat Oct 28 19:37:48 2006 +0000 +++ b/console/libgnt/gntbutton.c Sat Oct 28 19:52:30 2006 +0000 @@ -9,7 +9,6 @@ }; static GntWidgetClass *parent_class = NULL; -static guint signals[SIGS] = { 0 }; static void gnt_button_draw(GntWidget *widget) diff -r 061157db8017 -r bfcdd361357e console/libgnt/gntcheckbox.c --- a/console/libgnt/gntcheckbox.c Sat Oct 28 19:37:48 2006 +0000 +++ b/console/libgnt/gntcheckbox.c Sat Oct 28 19:52:30 2006 +0000 @@ -34,19 +34,6 @@ } static void -gnt_check_box_size_request(GntWidget *widget) -{ -} - -static void -gnt_check_box_map(GntWidget *widget) -{ - if (widget->priv.width == 0 || widget->priv.height == 0) - gnt_widget_size_request(widget); - GNTDEBUG; -} - -static void toggle_selection(GntWidget *widget) { GNT_CHECK_BOX(widget)->checked = !GNT_CHECK_BOX(widget)->checked; @@ -77,11 +64,6 @@ } static void -gnt_check_box_destroy(GntWidget *widget) -{ -} - -static void gnt_check_box_class_init(GntCheckBoxClass *klass) { GntWidgetClass *wclass = GNT_WIDGET_CLASS(klass); diff -r 061157db8017 -r bfcdd361357e console/libgnt/gntentry.c --- a/console/libgnt/gntentry.c Sat Oct 28 19:37:48 2006 +0000 +++ b/console/libgnt/gntentry.c Sat Oct 28 19:52:30 2006 +0000 @@ -3,6 +3,7 @@ #include "gntbox.h" #include "gntentry.h" +#include "gntstyle.h" #include "gnttree.h" #include "gntutils.h" @@ -339,7 +340,7 @@ { char ch; ch = *text; -#define SAME(a,b) ((isalpha(a) && isalpha(b)) || (isdigit(a) && isdigit(b)) || (isblank(a) && isblank(b))) +#define SAME(a,b) ((isalpha(a) && isalpha(b)) || (isdigit(a) && isdigit(b)) || (isspace(a) && isspace(b))) while (--text >= begin) { if (!SAME(ch, *text)) break; @@ -354,7 +355,6 @@ { GntEntry *entry = GNT_ENTRY(widget); const char *iter = entry->cursor - 1; - int count; if (iter < entry->start) return TRUE; @@ -586,7 +586,7 @@ gnt_widget_class_register_action(parent_class, "history-next", history_next, "\033" GNT_KEY_CTRL_UP, NULL); - gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), klass); + gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), parent_class); GNTDEBUG; } diff -r 061157db8017 -r bfcdd361357e console/libgnt/gntlabel.c --- a/console/libgnt/gntlabel.c Sat Oct 28 19:37:48 2006 +0000 +++ b/console/libgnt/gntlabel.c Sat Oct 28 19:52:30 2006 +0000 @@ -9,7 +9,6 @@ }; static GntWidgetClass *parent_class = NULL; -static guint signals[SIGS] = { 0 }; static void gnt_label_destroy(GntWidget *widget) diff -r 061157db8017 -r bfcdd361357e console/libgnt/gntline.c --- a/console/libgnt/gntline.c Sat Oct 28 19:37:48 2006 +0000 +++ b/console/libgnt/gntline.c Sat Oct 28 19:52:30 2006 +0000 @@ -6,7 +6,6 @@ }; static GntWidgetClass *parent_class = NULL; -static guint signals[SIGS] = { 0 }; static void gnt_line_draw(GntWidget *widget) diff -r 061157db8017 -r bfcdd361357e console/libgnt/gntstyle.c --- a/console/libgnt/gntstyle.c Sat Oct 28 19:37:48 2006 +0000 +++ b/console/libgnt/gntstyle.c Sat Oct 28 19:52:30 2006 +0000 @@ -1,6 +1,7 @@ #include "gntstyle.h" #include "gntcolors.h" +#include #include #if GLIB_CHECK_VERSION(2,6,0) diff -r 061157db8017 -r bfcdd361357e console/libgnt/gnttree.c --- a/console/libgnt/gnttree.c Sat Oct 28 19:37:48 2006 +0000 +++ b/console/libgnt/gnttree.c Sat Oct 28 19:52:30 2006 +0000 @@ -1,5 +1,6 @@ +#include "gntmarshal.h" +#include "gntstyle.h" #include "gnttree.h" -#include "gntmarshal.h" #include "gntutils.h" #include @@ -474,13 +475,6 @@ g_signal_emit(tree, signals[SIG_SELECTION_CHANGED], 0, old->key, current->key); } -static GntTreeRow * -get_nth_row(GntTree *tree, int n) -{ - gpointer key = g_list_nth_data(tree->list, n); - return g_hash_table_lookup(tree->hash, key); -} - static gboolean action_down(GntWidget *widget, GList *null) { @@ -577,8 +571,6 @@ { GntTree *tree = GNT_TREE(widget); GntTreeRow *old = tree->current; - GntTreeRow *row; - int dist; if (text[0] == '\r') { @@ -720,7 +712,7 @@ gnt_widget_class_register_action(parent_class, "page-down", action_page_down, "\033" GNT_KEY_PGDOWN, NULL); - gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), klass); + gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), parent_class); GNTDEBUG; } diff -r 061157db8017 -r bfcdd361357e console/libgnt/gntwidget.c --- a/console/libgnt/gntwidget.c Sat Oct 28 19:37:48 2006 +0000 +++ b/console/libgnt/gntwidget.c Sat Oct 28 19:52:30 2006 +0000 @@ -415,7 +415,6 @@ gboolean gnt_widget_perform_action_named(GntWidget *widget, const char *name, ...) { - GType type = G_OBJECT_TYPE(widget); GntWidgetClass *klass = GNT_WIDGET_CLASS(G_OBJECT_GET_CLASS(widget)); GList *list = NULL; va_list args; @@ -440,7 +439,6 @@ static gboolean gnt_widget_perform_action(GntWidget *widget, const char *keys) { - GType type = G_OBJECT_TYPE(widget); GntWidgetClass *klass = GNT_WIDGET_CLASS(G_OBJECT_GET_CLASS(widget)); GntWidgetActionParam *param = g_hash_table_lookup(klass->bindings, keys); diff -r 061157db8017 -r bfcdd361357e console/libgnt/gntwidget.h --- a/console/libgnt/gntwidget.h Sat Oct 28 19:37:48 2006 +0000 +++ b/console/libgnt/gntwidget.h Sat Oct 28 19:52:30 2006 +0000 @@ -181,10 +181,14 @@ void gnt_widget_action_free(GntWidgetAction *action); void gnt_widget_action_param_free(GntWidgetActionParam *param); +void gnt_widget_register_binding(GntWidgetClass *klass, const char *name, + const char *trigger, ...); void gnt_widget_class_register_action(GntWidgetClass *klass, const char *name, GntWidgetActionCallback callback, const char *trigger, ...); +gboolean gnt_widget_perform_action_named(GntWidget *widget, const char *name, ...); + G_END_DECLS #endif /* GNT_WIDGET_H */