diff options
author | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-11-06 13:47:50 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-11-06 13:47:50 +0800 |
commit | 29dd4322923d9532f8630bfb98217431fdef7e1c (patch) | |
tree | 4c4aaa2df512a34f4ee99da00cc1a6c58178c615 /filter | |
parent | 30d40d19329b325a6ddd29db2576cf63306f05d9 (diff) | |
download | gsoc2013-evolution-29dd4322923d9532f8630bfb98217431fdef7e1c.tar.gz gsoc2013-evolution-29dd4322923d9532f8630bfb98217431fdef7e1c.tar.zst gsoc2013-evolution-29dd4322923d9532f8630bfb98217431fdef7e1c.zip |
a ton more build fixes
svn path=/trunk/; revision=18582
Diffstat (limited to 'filter')
-rw-r--r-- | filter/filter-option.c | 10 | ||||
-rw-r--r-- | filter/filter-part.c | 7 | ||||
-rw-r--r-- | filter/filter-rule.c | 79 | ||||
-rw-r--r-- | filter/rule-context.c | 58 | ||||
-rw-r--r-- | filter/rule-editor.c | 36 | ||||
-rw-r--r-- | filter/score-editor.c | 5 | ||||
-rw-r--r-- | filter/score-rule.c | 10 |
7 files changed, 91 insertions, 114 deletions
diff --git a/filter/filter-option.c b/filter/filter-option.c index 8b9f008aca..90b909d650 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -27,9 +27,7 @@ #include <string.h> -#include <gtk/gtkmenuitem.h> -#include <gtk/gtkoptionmenu.h> -#include <libgnome/gnome-defs.h> +#include <gtk/gtk.h> #include <libgnome/gnome-i18n.h> #include "filter-option.h" @@ -281,7 +279,7 @@ option_changed (GtkWidget *widget, FilterElement *fe) { FilterOption *fo = (FilterOption *)fe; - fo->current = g_object_get_data (widget, "option"); + fo->current = g_object_get_data ((GObject *) widget, "option"); } static GtkWidget * @@ -300,8 +298,8 @@ get_widget (FilterElement *fe) while (l) { op = l->data; item = gtk_menu_item_new_with_label (_(op->title)); - g_object_set_data (item, "option", op); - g_signal_connect (item, "activate", option_changed, fe); + g_object_set_data ((GObject *) item, "option", op); + g_signal_connect (item, "activate", GTK_SIGNAL_FUNC (option_changed), fe); gtk_menu_append (GTK_MENU (menu), item); gtk_widget_show (item); if (op == fo->current) { diff --git a/filter/filter-part.c b/filter/filter-part.c index 525daf37cb..ce61750161 100644 --- a/filter/filter-part.c +++ b/filter/filter-part.c @@ -30,7 +30,6 @@ #include <gtk/gtkbox.h> #include <gtk/gtkhbox.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include "filter-part.h" @@ -75,7 +74,7 @@ filter_part_class_init (FilterPartClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_ref (G_OBJECT_CLASS); + parent_class = g_type_class_ref (G_TYPE_OBJECT); object_class->finalize = filter_part_finalise; } @@ -83,7 +82,7 @@ filter_part_class_init (FilterPartClass *klass) static void filter_part_init (FilterPart *fp) { - fp->priv = g_malloc0 (sizeof (*fp->priv)); + ; } static void @@ -452,7 +451,7 @@ filter_part_next_list (GList *l, FilterPart *last) if (node == NULL) node = l; else - node = node->next + node = node->next; } if (node) diff --git a/filter/filter-rule.c b/filter/filter-rule.c index fd25d3cedd..82e359c406 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -26,15 +26,9 @@ #endif #include <string.h> -#include <gtk/gtkframe.h> -#include <gtk/gtkhbox.h> -#include <gtk/gtkmenuitem.h> -#include <gtk/gtkoptionmenu.h> -#include <gtk/gtkscrolledwindow.h> -#include <gtk/gtktable.h> -#include <libgnome/gnome-defs.h> + +#include <gtk/gtk.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-stock.h> #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> @@ -99,18 +93,18 @@ filter_rule_class_init (FilterRuleClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_ref (G_OBJECT_CLASS); + parent_class = g_type_class_ref (G_TYPE_OBJECT); object_class->finalize = filter_rule_finalise; /* override methods */ - class->validate = validate; - class->eq = rule_eq; - class->xml_encode = xml_encode; - class->xml_decode = xml_decode; - class->build_code = build_code; - class->copy = rule_copy; - class->get_widget = get_widget; + klass->validate = validate; + klass->eq = rule_eq; + klass->xml_encode = xml_encode; + klass->xml_decode = xml_decode; + klass->build_code = build_code; + klass->copy = rule_copy; + klass->get_widget = get_widget; /* signals */ signals[CHANGED] = @@ -514,7 +508,7 @@ filter_rule_emit_changed(FilterRule *fr) g_assert (IS_FILTER_RULE (fr)); if (fr->priv->frozen == 0) - g_signal_emit (fr, signals[CHANGED]); + g_signal_emit (fr, signals[CHANGED], 0); } static void @@ -557,7 +551,7 @@ struct _part_data { static void option_activate (GtkMenuItem *item, struct _part_data *data) { - FilterPart *part = g_object_get_data (item, "part"); + FilterPart *part = g_object_get_data ((GObject *) item, "part"); FilterPart *newpart; /* dont update if we haven't changed */ @@ -578,7 +572,7 @@ option_activate (GtkMenuItem *item, struct _part_data *data) if (data->partwidget) gtk_box_pack_start (GTK_BOX (data->container), data->partwidget, FALSE, FALSE, 0); - g_object_set_data (data->container, "part", newpart); + g_object_set_data ((GObject *) data->container, "part", newpart); } static GtkWidget * @@ -600,7 +594,7 @@ get_rule_part_widget (RuleContext *f, FilterPart *newpart, FilterRule *fr) hbox = gtk_hbox_new (FALSE, 0); /* only set to automatically clean up the memory */ - g_object_set_data_full (hbox, "data", data, g_free); + g_object_set_data_full ((GObject *) hbox, "data", data, g_free); p = filter_part_get_widget (newpart); @@ -611,8 +605,8 @@ get_rule_part_widget (RuleContext *f, FilterPart *newpart, FilterRule *fr) /* sigh, this is a little ugly */ while ((part = rule_context_next_part (f, part))) { item = gtk_menu_item_new_with_label (_(part->title)); - g_object_set_data (item, "part", part); - g_signal_connect (item, "activate", option_activate, data); + g_object_set_data ((GObject *) item, "part", part); + g_signal_connect (item, "activate", GTK_SIGNAL_FUNC (option_activate), data); gtk_menu_append (GTK_MENU (menu), item); gtk_widget_show (item); if (!strcmp (newpart->title, part->title)) @@ -650,8 +644,8 @@ less_parts (GtkWidget *button, struct _rule_data *data) if (g_list_length (data->fr->parts) < 2) return; - rule = g_object_get_data (button, "rule"); - part = g_object_get_data (rule, "part"); + rule = g_object_get_data ((GObject *) button, "rule"); + part = g_object_get_data ((GObject *) rule, "part"); /* remove the part from the list */ filter_rule_remove_part (data->fr, part); @@ -666,19 +660,18 @@ static void attach_rule (GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row) { GtkWidget *remove; - GtkWidget *pixmap; gtk_table_attach (GTK_TABLE (data->parts), rule, 0, 1, row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0); - pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_REMOVE); - remove = gnome_pixmap_button (pixmap, _("Remove")); - g_object_set_data (remove, "rule", rule); - g_object_set_data (rule, "part", part); + remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE); + g_object_set_data ((GObject *) remove, "rule", rule); + g_object_set_data ((GObject *) rule, "part", part); /*gtk_button_set_relief (GTK_BUTTON (remove), GTK_RELIEF_NONE);*/ - g_signal_connect (remove, "clicked", less_parts, data); + g_signal_connect (remove, "clicked", GTK_SIGNAL_FUNC (less_parts), data); gtk_table_attach (GTK_TABLE (data->parts), remove, 1, 2, row, row + 1, 0, 0, 0, 0); + gtk_widget_show (remove); } @@ -736,14 +729,9 @@ grab_focus (GtkWidget *entry, gpointer data) static GtkWidget * get_widget (FilterRule *fr, struct _RuleContext *f) { - GtkWidget *vbox, *parts, *inframe; - GtkWidget *hbox; - GtkWidget *add, *pixmap; - GtkWidget *w; - GtkWidget *menu, *item, *omenu; - GtkWidget *frame; - GtkWidget *name; - GtkWidget *label; + GtkWidget *hbox, *vbox, *parts, *inframe; + GtkWidget *add, *frame, *label, *name, *w; + GtkWidget *omenu, *menu, *item; GtkWidget *scrolledwindow; GtkObject *hadj, *vadj; GList *l; @@ -768,13 +756,13 @@ get_widget (FilterRule *fr, struct _RuleContext *f) } /* evil kludgy hack because gtk sucks */ - g_signal_connect (name, "realize", grab_focus, name); + g_signal_connect (name, "realize", GTK_SIGNAL_FUNC (grab_focus), name); hbox = gtk_hbox_new (FALSE, 3); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), name, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - g_signal_connect (name, "changed", name_changed, fr); + g_signal_connect (name, "changed", GTK_SIGNAL_FUNC (name_changed), fr); frame = gtk_frame_new (_("If")); inframe = gtk_vbox_new (FALSE, 3); @@ -791,7 +779,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f) data->parts = parts; /* only set to automatically clean up the memory */ - g_object_set_data_full (vbox, "data", data, g_free); + g_object_set_data_full ((GObject *) vbox, "data", data, g_free); hbox = gtk_hbox_new (FALSE, 3); label = gtk_label_new (_("Execute actions")); @@ -799,12 +787,12 @@ get_widget (FilterRule *fr, struct _RuleContext *f) menu = gtk_menu_new (); item = gtk_menu_item_new_with_label (_("if all criteria are met")); - g_signal_connect (item, "activate", match_all, fr); + g_signal_connect (item, "activate", GTK_SIGNAL_FUNC (match_all), fr); gtk_menu_append (GTK_MENU (menu), item); gtk_widget_show (item); item = gtk_menu_item_new_with_label (_("if any criteria are met")); - g_signal_connect (item, "activate", match_any, fr); + g_signal_connect (item, "activate", GTK_SIGNAL_FUNC (match_any), fr); gtk_menu_append (GTK_MENU (menu), item); gtk_widget_show (item); @@ -813,9 +801,8 @@ get_widget (FilterRule *fr, struct _RuleContext *f) gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), fr->grouping == FILTER_GROUP_ALL ? 0 : 1); gtk_widget_show (omenu); - pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_ADD); - add = gnome_pixmap_button (pixmap, _("Add criterion")); - g_signal_connect (add, "clicked", more_parts, data); + add = gtk_button_new_from_stock (GTK_STOCK_ADD); + g_signal_connect (add, "clicked", GTK_SIGNAL_FUNC (more_parts), data); gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 3); gtk_box_pack_end (GTK_BOX (hbox), omenu, FALSE, FALSE, 0); diff --git a/filter/rule-context.c b/filter/rule-context.c index 7125d2f5a1..2518d56e85 100644 --- a/filter/rule-context.c +++ b/filter/rule-context.c @@ -33,7 +33,6 @@ #include <errno.h> #include <libgnomeui/gnome-dialog.h> -#include <libgnomeui/gnome-stock.h> #include <gal/util/e-xml-utils.h> @@ -298,7 +297,7 @@ load (RuleContext *rc, const char *system, const char *user) return -1; } - if (strcmp (rc->system->root->name, "filterdescription")) { + if (strcmp (rc->system->name, "filterdescription")) { rule_context_set_error (rc, g_strdup_printf ("Unable to load system rules '%s': Invalid format", system)); xmlFreeDoc (rc->system); rc->system = NULL; @@ -309,13 +308,13 @@ load (RuleContext *rc, const char *system, const char *user) /* now parse structure */ /* get rule parts */ - set = rc->system->root->childs; + set = rc->system->children; while (set) { d(printf("set name = %s\n", set->name)); part_map = g_hash_table_lookup (rc->part_set_map, set->name); if (part_map) { d(printf("loading parts ...\n")); - rule = set->childs; + rule = set->children; while (rule) { if (!strcmp (rule->name, "part")) { FilterPart *part = FILTER_PART (g_object_new (part_map->type, NULL, NULL)); @@ -335,13 +334,13 @@ load (RuleContext *rc, const char *system, const char *user) /* now load actual rules */ if (rc->user) { - set = rc->user->root->childs; + set = rc->user->children; while (set) { d(printf("set name = %s\n", set->name)); rule_map = g_hash_table_lookup (rc->rule_set_map, set->name); if (rule_map) { d(printf("loading rules ...\n")); - rule = set->childs; + rule = set->children; while (rule) { d(printf("checking node: %s\n", rule->name)); if (!strcmp (rule->name, "rule")) { @@ -350,7 +349,7 @@ load (RuleContext *rc, const char *system, const char *user) if (filter_rule_xml_decode (part, rule, rc) == 0) { rule_map->append (rc, part); } else { - gtk_object_unref (part); + g_object_unref (part); g_warning ("Cannot load filter part"); } } @@ -393,6 +392,7 @@ save (RuleContext *rc, const char *user) int ret; doc = xmlNewDoc ("1.0"); + /* FIXME: set character encoding to UTF-8? */ root = xmlNewDocNode (doc, NULL, "filteroptions", NULL); xmlDocSetRootElement (doc, root); l = rc->rule_set_list; @@ -508,13 +508,13 @@ revert (RuleContext *rc, const char *user) } /* make what we have, match what we load */ - set = userdoc->root->childs; + set = userdoc->children; while (set) { d(printf("set name = %s\n", set->name)); rule_map = g_hash_table_lookup (rc->rule_set_map, set->name); if (rule_map) { d(printf("loading rules ...\n")); - rule = set->childs; + rule = set->children; while (rule) { d(printf("checking node: %s\n", rule->name)); if (!strcmp (rule->name, "rule")) { @@ -530,8 +530,9 @@ revert (RuleContext *rc, const char *user) } frule = g_hash_table_lookup (rest_data->rules, part->name); if (frule) { - if (f->priv->frozen == 0 && !filter_rule_eq (frule, part)) + if (rc->priv->frozen == 0 && !filter_rule_eq (frule, part)) filter_rule_copy (frule, part); + g_object_unref (part); rule_context_rank_rule (rc, frule, rest_data->rank); g_hash_table_remove (rest_data->rules, frule->name); @@ -629,8 +630,8 @@ rule_context_add_rule (RuleContext *rc, FilterRule *new) rc->rules = g_list_append (rc->rules, new); if (rc->priv->frozen == 0) { - g_signal_emit (rc, signals[RULE_ADDED], new); - g_signal_emit (rc, signals[CHANGED]); + g_signal_emit (rc, signals[RULE_ADDED], 0, new); + g_signal_emit (rc, signals[CHANGED], 0); } } @@ -638,8 +639,8 @@ static void new_rule_clicked (GtkWidget *dialog, int button, RuleContext *context) { if (button == 0) { - FilterRule *rule = g_object_get_data (dialog, "rule"); - char *user = g_object_get_data (dialog, "path"); + FilterRule *rule = g_object_get_data ((GObject *) dialog, "rule"); + char *user = g_object_get_data ((GObject *) dialog, "path"); if (!filter_rule_validate (rule)) { /* no need to popup a dialog because the validate code does that. */ @@ -664,8 +665,8 @@ rule_context_add_rule_gui (RuleContext *rc, FilterRule *rule, const char *title, d(printf("add rule gui '%s'\n", rule->name)); - g_assert(rc); - g_assert(rule); + g_assert (rc); + g_assert (rule); w = filter_rule_get_widget (rule, rc); dialog = gnome_dialog_new (title, GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); @@ -674,15 +675,15 @@ rule_context_add_rule_gui (RuleContext *rc, FilterRule *rule, const char *title, gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 400); gtk_widget_show (w); - g_object_set_data_full (dialog, "rule", rule, (GtkDestroyNotify) g_object_unref); + g_object_set_data_full ((GObject *) dialog, "rule", rule, g_object_unref); if (path) - g_object_set_data_full (dialog, "path", g_strdup (path), (GtkDestroyNotify) g_free); + g_object_set_data_full ((GObject *) dialog, "path", g_strdup (path), g_free); - g_signal_connect (dialog, "clicked", new_rule_clicked, rc); + g_signal_connect (dialog, "clicked", GTK_SIGNAL_FUNC (new_rule_clicked), rc); g_object_ref (rc); - g_object_set_data_full (dialog, "context", rc, (GtkDestroyNotify) g_object_unref); + g_object_set_data_full ((GObject *) dialog, "context", rc, g_object_unref); gtk_widget_show (dialog); } @@ -690,16 +691,16 @@ rule_context_add_rule_gui (RuleContext *rc, FilterRule *rule, const char *title, void rule_context_remove_rule (RuleContext *rc, FilterRule *rule) { - g_assert(rc); - g_assert(rule); + g_assert (rc); + g_assert (rule); d(printf("remove rule '%s'\n", rule->name)); rc->rules = g_list_remove (rc->rules, rule); if (rc->priv->frozen == 0) { - g_signal_emit (rc, signals[RULE_REMOVED], rule); - g_signal_emit (rc, signals[CHANGED]); + g_signal_emit (rc, signals[RULE_REMOVED], 0, rule); + g_signal_emit (rc, signals[CHANGED], 0); } } @@ -721,9 +722,10 @@ rule_context_rank_rule (RuleContext *rc, FilterRule *rule, int rank) FilterRule *r = node->data; if (i == rank) { - rc->rules = g_list_insert (f->rules, rule, index); - if (f->priv->frozen == 0) - g_signal_emit (rc, signals[CHANGED]); + rc->rules = g_list_insert (rc->rules, rule, index); + if (rc->priv->frozen == 0) + g_signal_emit (rc, signals[CHANGED], 0); + return; } @@ -736,7 +738,7 @@ rule_context_rank_rule (RuleContext *rc, FilterRule *rule, int rank) rc->rules = g_list_append (rc->rules, rule); if (rc->priv->frozen == 0) - g_signal_emit (rc, signals[CHANGED]); + g_signal_emit (rc, signals[CHANGED], 0); } int diff --git a/filter/rule-editor.c b/filter/rule-editor.c index 46ca26afc3..fb809ea969 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -28,10 +28,8 @@ /* for getenv only, remove when getenv need removed */ #include <stdlib.h> -#include <gtk/gtkframe.h> -#include <libgnome/gnome-defs.h> +#include <gtk/gtk.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-stock.h> #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> @@ -167,7 +165,7 @@ rule_editor_new (RuleContext *rc, const char *source) GladeXML *gui; GtkWidget *w; - gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor"); + gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL); rule_editor_construct (re, rc, gui, source); w = glade_xml_get_widget (gui, "rule_frame"); @@ -240,7 +238,7 @@ add_editor_clicked (GtkWidget *dialog, int button, RuleEditor *re) g_object_ref (re->edit); item = gtk_list_item_new_with_label (re->edit->name); - g_object_set_data (item, "rule", re->edit); + g_object_set_data ((GObject *) item, "rule", re->edit); gtk_widget_show (item); l = g_list_append (l, GTK_LIST_ITEM (item)); @@ -297,8 +295,8 @@ rule_add (GtkWidget *widget, RuleEditor *re) gtk_window_set_policy (GTK_WINDOW (re->dialog), FALSE, TRUE, FALSE); gtk_widget_set_parent_window (GTK_WIDGET (re->dialog), GTK_WIDGET (re)->window); gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (re->dialog)->vbox), rules, TRUE, TRUE, 0); - g_signal_connect (re->dialog, "clicked", add_editor_clicked, re); - g_signal_connect (re->dialog, "destroy", add_editor_destroyed, re); + g_signal_connect (re->dialog, "clicked", GTK_SIGNAL_FUNC (add_editor_clicked), re); + g_signal_connect (re->dialog, "destroy", GTK_SIGNAL_FUNC (add_editor_destroyed), re); gtk_widget_set_sensitive (GTK_WIDGET (re), FALSE); gtk_widget_show (re->dialog); @@ -383,8 +381,8 @@ rule_edit (GtkWidget *widget, RuleEditor *re) gtk_window_set_default_size (GTK_WINDOW (re->dialog), 600, 400); gtk_window_set_policy (GTK_WINDOW (re->dialog), FALSE, TRUE, FALSE); gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (re->dialog)->vbox), rules, TRUE, TRUE, 0); - g_signal_connect (re->dialog, "clicked", edit_editor_clicked, re); - g_signal_connect (re->dialog, "destroy", edit_editor_destroyed, re); + g_signal_connect (re->dialog, "clicked", GTK_SIGNAL_FUNC (edit_editor_clicked), re); + g_signal_connect (re->dialog, "destroy", GTK_SIGNAL_FUNC (edit_editor_destroyed), re); gtk_widget_set_sensitive (GTK_WIDGET (re), FALSE); @@ -474,11 +472,11 @@ static struct { char *name; GtkSignalFunc func; } edit_buttons[] = { - { "rule_add", rule_add }, - { "rule_edit", rule_edit }, - { "rule_delete", rule_delete }, - { "rule_up", rule_up }, - { "rule_down", rule_down }, + { "rule_add", GTK_SIGNAL_FUNC (rule_add) }, + { "rule_edit", GTK_SIGNAL_FUNC (rule_edit) }, + { "rule_delete", GTK_SIGNAL_FUNC (rule_delete) }, + { "rule_up", GTK_SIGNAL_FUNC (rule_up) }, + { "rule_down", GTK_SIGNAL_FUNC (rule_down) }, }; static void @@ -507,7 +505,7 @@ set_sensitive (RuleEditor *re) static void select_rule (GtkWidget *w, GtkWidget *child, RuleEditor *re) { - re->current = g_object_get_data (child, "rule"); + re->current = g_object_get_data ((GObject *) child, "rule"); g_assert (re->current); @@ -537,7 +535,7 @@ set_source (RuleEditor *re, const char *source) d(printf(" hit %s(%s)\n", rule->name, source ? source : "<nil>")); item = gtk_list_item_new_with_label (rule->name); - g_object_set_data (item, "rule", rule); + g_object_set_data ((GObject *) item, "rule", rule); gtk_widget_show (GTK_WIDGET (item)); newitems = g_list_append (newitems, item); } @@ -657,10 +655,10 @@ rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, cons } re->list = (GtkList *) w = glade_xml_get_widget(gui, "rule_list"); - g_signal_connect (w, "select_child", select_rule, re); - g_signal_connect (w, "button_press_event", double_click, re); + g_signal_connect (w, "select_child", GTK_SIGNAL_FUNC (select_rule), re); + g_signal_connect (w, "button_press_event", GTK_SIGNAL_FUNC (double_click), re); - g_signal_connect (re, "clicked", editor_clicked, re); + g_signal_connect (re, "clicked", GTK_SIGNAL_FUNC (editor_clicked), re); rule_editor_set_source (re, source); if (enable_undo) { diff --git a/filter/score-editor.c b/filter/score-editor.c index e5023260ba..107a4434ce 100644 --- a/filter/score-editor.c +++ b/filter/score-editor.c @@ -25,8 +25,7 @@ #include <config.h> #endif -#include <gtk/gtkframe.h> -#include <libgnome/gnome-defs.h> +#include <gtk/gtk.h> #include <libgnome/gnome-i18n.h> #include "score-editor.h" @@ -107,7 +106,7 @@ score_editor_new (ScoreContext *sc) GladeXML *gui; GtkWidget *w; - gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor"); + gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL); rule_editor_construct ((RuleEditor *) se, (RuleContext *) sc, gui, NULL); w = glade_xml_get_widget (gui, "rule_frame"); diff --git a/filter/score-rule.c b/filter/score-rule.c index e003ffd395..55c25d7a24 100644 --- a/filter/score-rule.c +++ b/filter/score-rule.c @@ -27,13 +27,7 @@ #include <string.h> -#include <gtk/gtkbox.h> -#include <gtk/gtkframe.h> -#include <gtk/gtkhbox.h> -#include <gtk/gtklabel.h> -#include <gtk/gtksignal.h> -#include <gtk/gtkspinbutton.h> -#include <libgnome/gnome-defs.h> +#include <gtk/gtk.h> #include <libgnome/gnome-i18n.h> #include "score-rule.h" @@ -193,7 +187,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f) gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 3); adj = (GtkAdjustment *) gtk_adjustment_new ((float) sr->score, -3.0, 3.0, 1.0, 1.0, 1.0); - g_signal_connect (adj, "value_changed", spin_changed, sr); + g_signal_connect (adj, "value_changed", GTK_SIGNAL_FUNC (spin_changed), sr); spin = gtk_spin_button_new (adj, 1.0, 0); gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, FALSE, 3); |