aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-filter.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2002-11-06 11:36:12 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-11-06 11:36:12 +0800
commit4a3104726b5dcdef9ee3f8c16390fa46260027cc (patch)
tree901cbac0960892ac50c1c2af9869e3866dd9a1c0 /filter/filter-filter.c
parent7d71285ce226a2eb684260c903d8f1760eb61497 (diff)
downloadgsoc2013-evolution-4a3104726b5dcdef9ee3f8c16390fa46260027cc.tar.gz
gsoc2013-evolution-4a3104726b5dcdef9ee3f8c16390fa46260027cc.tar.zst
gsoc2013-evolution-4a3104726b5dcdef9ee3f8c16390fa46260027cc.zip
fixed gnome-stock stuff
svn path=/trunk/; revision=18578
Diffstat (limited to 'filter/filter-filter.c')
-rw-r--r--filter/filter-filter.c47
1 files changed, 17 insertions, 30 deletions
diff --git a/filter/filter-filter.c b/filter/filter-filter.c
index 6ef66fc650..84ba7875d5 100644
--- a/filter/filter-filter.c
+++ b/filter/filter-filter.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 "filter-filter.h"
#include "filter-context.h"
@@ -84,7 +78,7 @@ filter_filter_get_type (void)
static void
filter_filter_class_init (FilterFilterClass *klass)
{
- GObjectClass *object_class = G_OBJCT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
FilterRuleClass *fr_class = (FilterRuleClass *) klass;
parent_class = g_type_class_ref (FILTER_TYPE_RULE);
@@ -334,7 +328,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 */
@@ -355,7 +349,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 *
@@ -385,8 +379,8 @@ get_rule_part_widget (FilterContext *f, FilterPart *newpart, FilterRule *fr)
while ((part = filter_context_next_action (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);
@@ -427,8 +421,8 @@ less_parts (GtkWidget *button, struct _rule_data *data)
if (g_list_length (l) < 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_filter_remove_action ((FilterFilter *) data->fr, part);
@@ -443,17 +437,15 @@ 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);
@@ -483,12 +475,8 @@ more_parts (GtkWidget *button, struct _rule_data *data)
static GtkWidget *
get_widget (FilterRule *fr, RuleContext *rc)
{
- GtkWidget *widget;
- GtkWidget *parts, *inframe;
- GtkWidget *hbox;
- GtkWidget *add, *pixmap;
- GtkWidget *w;
- GtkWidget *frame;
+ GtkWidget *widget, *hbox, *add, *frame;
+ GtkWidget *parts, *inframe, *w;
GtkWidget *scrolledwindow;
GtkObject *hadj, *vadj;
GList *l;
@@ -513,10 +501,9 @@ get_widget (FilterRule *fr, RuleContext *rc)
hbox = gtk_hbox_new (FALSE, 3);
- pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_ADD);
- add = gnome_pixmap_button (pixmap, _("Add action"));
+ add = gtk_button_new_from_stock (GTK_STOCK_ADD);
/* gtk_button_set_relief (GTK_BUTTON (add), GTK_RELIEF_NONE); */
- g_signal_connect (add, "clicked", more_parts, data);
+ 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_start (GTK_BOX (inframe), hbox, FALSE, FALSE, 3);