diff options
author | JP Rosevear <jpr@novell.com> | 2004-11-26 22:57:49 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-11-26 22:57:49 +0800 |
commit | 43cbcd8b63c9f876d78daf14883134080b4cc937 (patch) | |
tree | 5f51230c0c8519f09ddd8622b38ef6434fe1268d /e-util/e-config.c | |
parent | e77cfd7e4008635870949d708133a848294dd6fd (diff) | |
download | gsoc2013-evolution-43cbcd8b63c9f876d78daf14883134080b4cc937.tar.gz gsoc2013-evolution-43cbcd8b63c9f876d78daf14883134080b4cc937.tar.zst gsoc2013-evolution-43cbcd8b63c9f876d78daf14883134080b4cc937.zip |
get the image directly from the icon factory
2004-11-26 JP Rosevear <jpr@novell.com>
* e-gui-utils.c (e_create_image_widget): get the image directly
from the icon factory
* e-config.c: insert debug defines so we can
turn spew on and off
* e-event.c: insert debug defines so we can turn spew on and off
* e-menu.c: insert debug defines so we can turn spew on and off
* e-plugin.c: insert debug defines and set to off for now
* e-popup.c: insert debug defines so we can turn spew on and off
(e_popup_create_menu): get the image directly from the icon
factory
svn path=/trunk/; revision=27997
Diffstat (limited to 'e-util/e-config.c')
-rw-r--r-- | e-util/e-config.c | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/e-util/e-config.c b/e-util/e-config.c index 03f853cd13..99cb18382c 100644 --- a/e-util/e-config.c +++ b/e-util/e-config.c @@ -47,6 +47,8 @@ #include <libgnome/gnome-i18n.h> +#define d(x) + struct _EConfigFactory { struct _EConfigFactory *next, *prev; @@ -118,7 +120,7 @@ ep_finalise(GObject *o) struct _widget_node *wn; struct _check_node *cn; - printf("finalising EConfig %p\n", o); + d(printf("finalising EConfig %p\n", o)); g_free(emp->id); @@ -162,7 +164,7 @@ ec_set_target(EConfig *emp, EConfigTarget *target) static void ep_class_init(GObjectClass *klass) { - printf("EConfig class init %p '%s'\n", klass, g_type_name(((GObjectClass *)klass)->g_type_class.g_type)); + d(printf("EConfig class init %p '%s'\n", klass, g_type_name(((GObjectClass *)klass)->g_type_class.g_type))); klass->finalize = ep_finalise; ((EConfigClass *)klass)->set_target = ec_set_target; @@ -327,7 +329,7 @@ ec_druid_check_current(EConfig *ec) static void ec_druid_cancel(GnomeDruid *druid, struct _widget_node *wn) { - printf("finishing druid, calling abort\n"); + d(printf("finishing druid, calling abort\n")); e_config_abort(wn->config); if (wn->config->window) @@ -337,7 +339,7 @@ ec_druid_cancel(GnomeDruid *druid, struct _widget_node *wn) static void ec_druid_finish(GnomeDruidPage *page, GnomeDruid *druid, struct _widget_node *wn) { - printf("finishing druid, calling commit\n"); + d(printf("finishing druid, calling commit\n")); e_config_commit(wn->config); /* TODO: allow the commit to fail? Do we care? */ @@ -348,7 +350,7 @@ ec_druid_finish(GnomeDruidPage *page, GnomeDruid *druid, struct _widget_node *wn static void ec_druid_prepare(GnomeDruidPage *page, GnomeDruid *druid, struct _widget_node *wn) { - printf("prepare page '%s'\n", wn->item->path); + d(printf("prepare page '%s'\n", wn->item->path)); wn->config->priv->druid_page = wn; ec_druid_check_current(wn->config); } @@ -358,7 +360,7 @@ ec_druid_prev(GnomeDruidPage *page, GnomeDruid *druid, struct _widget_node *wn) { EConfig *ec = wn->config; - printf("prev page from '%s'\n", wn->item->path); + d(printf("prev page from '%s'\n", wn->item->path)); if (wn->prev) { for (wn = wn->prev;wn->prev;wn=wn->prev) { if (!wn->empty @@ -370,7 +372,7 @@ ec_druid_prev(GnomeDruidPage *page, GnomeDruid *druid, struct _widget_node *wn) } if (wn->prev) { - printf(" is %s\n",wn->item->path); + d(printf(" is %s\n",wn->item->path)); gnome_druid_set_page((GnomeDruid *)ec->widget, (GnomeDruidPage *)wn->frame); ec->priv->druid_page = wn; } else { @@ -386,7 +388,7 @@ ec_druid_next(GnomeDruidPage *page, GnomeDruid *druid, struct _widget_node *wn) { EConfig *ec = wn->config; - printf("next page from '%s'\n", wn->item->path); + d(printf("next page from '%s'\n", wn->item->path)); if (wn->next) { for (wn = wn->next;wn->next;wn=wn->next) { if (!wn->empty @@ -398,7 +400,7 @@ ec_druid_next(GnomeDruidPage *page, GnomeDruid *druid, struct _widget_node *wn) } if (wn->next) { - printf(" is %s\n",wn->item->path); + d(printf(" is %s\n",wn->item->path)); gnome_druid_set_page((GnomeDruid *)ec->widget, (GnomeDruidPage *)wn->frame); ec->priv->druid_page = wn; } else { @@ -417,7 +419,7 @@ ec_rebuild(EConfig *emp) GtkWidget *book = NULL, *page = NULL, *section = NULL, *root = NULL, *druid = NULL; int pageno = 0, sectionno = 0, itemno = 0; - printf("target changed, rebuilding:\n"); + d(printf("target changed, rebuilding:\n")); /* TODO: This code is pretty complex, and will probably just * become more complex with time. It could possibly be split @@ -428,7 +430,7 @@ ec_rebuild(EConfig *emp) struct _EConfigItem *item = wn->item; GtkWidget *w; - printf(" '%s'\n", item->path); + d(printf(" '%s'\n", item->path)); /* If the last section doesn't contain anything, hide it */ if (sectionnode != NULL @@ -442,7 +444,7 @@ ec_rebuild(EConfig *emp) sectionno--; } else gtk_widget_show(sectionnode->frame); - printf("%s section '%s' [sections=%d]\n", sectionnode->empty?"hiding":"showing", sectionnode->item->path, sectionno); + d(printf("%s section '%s' [sections=%d]\n", sectionnode->empty?"hiding":"showing", sectionnode->item->path, sectionno)); } /* If the last page doesn't contain anything, hide it */ @@ -455,7 +457,7 @@ ec_rebuild(EConfig *emp) pageno--; } else gtk_widget_show(pagenode->frame); - printf("%s page '%s' [section=%d]\n", pagenode->empty?"hiding":"showing", pagenode->item->path, pageno); + d(printf("%s page '%s' [section=%d]\n", pagenode->empty?"hiding":"showing", pagenode->item->path, pageno)); } /* Now process the item */ @@ -595,10 +597,10 @@ ec_rebuild(EConfig *emp) } else page = wn->widget; - printf("page %d:%s widget %p\n", pageno, item->path, w); + d(printf("page %d:%s widget %p\n", pageno, item->path, w)); if (wn->widget && wn->widget != page) { - printf("destroy old widget for page '%s'\n", item->path); + d(printf("destroy old widget for page '%s'\n", item->path)); gtk_widget_destroy(wn->widget); } @@ -674,7 +676,7 @@ ec_rebuild(EConfig *emp) } nopage: if (wn->widget && wn->widget != section) { - printf("destroy old widget for section '%s'\n", item->path); + d(printf("destroy old widget for section '%s'\n", item->path)); gtk_widget_destroy(wn->widget); } @@ -696,10 +698,10 @@ ec_rebuild(EConfig *emp) else if (item->factory) w = item->factory(emp, item, section, wn->widget, wn->context->data); - printf("item %d:%s widget %p\n", itemno, item->path, w); + d(printf("item %d:%s widget %p\n", itemno, item->path, w)); if (wn->widget && wn->widget != w) { - printf("destroy old widget for item '%s'\n", item->path); + d(printf("destroy old widget for item '%s'\n", item->path)); gtk_widget_destroy(wn->widget); } @@ -717,7 +719,7 @@ ec_rebuild(EConfig *emp) sectionno--; } else gtk_widget_show(sectionnode->frame); - printf("%s section '%s' [sections=%d]\n", sectionnode->empty?"hiding":"showing", sectionnode->item->path, sectionno); + d(printf("%s section '%s' [sections=%d]\n", sectionnode->empty?"hiding":"showing", sectionnode->item->path, sectionno)); } /* If the last page doesn't contain anything, hide it */ @@ -727,7 +729,7 @@ ec_rebuild(EConfig *emp) pageno--; } else gtk_widget_show(pagenode->frame); - printf("%s page '%s' [section=%d]\n", pagenode->empty?"hiding":"showing", pagenode->item->path, pageno); + d(printf("%s page '%s' [section=%d]\n", pagenode->empty?"hiding":"showing", pagenode->item->path, pageno)); } if (book) { @@ -1237,7 +1239,7 @@ ech_config_factory(EConfig *emp, void *data) { struct _EConfigHookGroup *group = data; - printf("config factory called %s\n", group->id?group->id:"all menus"); + d(printf("config factory called %s\n", group->id?group->id:"all menus")); if (emp->target->type != group->target_type) return; @@ -1288,7 +1290,7 @@ emph_construct_item(EPluginHook *eph, EConfigHookGroup *menu, xmlNodePtr root, E { struct _EConfigItem *item; - printf(" loading config item\n"); + d(printf(" loading config item\n")); item = g_malloc0(sizeof(*item)); if ((item->type = e_plugin_hook_id(root, ech_item_types, "type")) == -1) goto error; @@ -1303,11 +1305,11 @@ emph_construct_item(EPluginHook *eph, EConfigHookGroup *menu, xmlNodePtr root, E if (item->user_data) item->factory = ech_config_widget_factory; - printf(" path=%s label=%s factory=%s\n", item->path, item->label, (char *)item->user_data); + d(printf(" path=%s label=%s factory=%s\n", item->path, item->label, (char *)item->user_data)); return item; error: - printf("error!\n"); + d(printf("error!\n")); emph_free_item(item); return NULL; } @@ -1321,7 +1323,7 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root) EConfigHookClass *klass = (EConfigHookClass *)G_OBJECT_GET_CLASS(eph); char *tmp; - printf(" loading menu\n"); + d(printf(" loading menu\n")); menu = g_malloc0(sizeof(*menu)); tmp = xmlGetProp(root, "target"); @@ -1362,7 +1364,7 @@ emph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) xmlNodePtr node; EConfigClass *klass; - printf("loading config hook\n"); + d(printf("loading config hook\n")); if (((EPluginHookClass *)emph_parent_class)->construct(eph, ep, root) == -1) return -1; @@ -1408,7 +1410,7 @@ emph_class_init(EPluginHookClass *klass) /* this is actually an abstract implementation but list it anyway */ klass->id = "org.gnome.evolution.config:1.0"; - printf("EConfigHook: init class %p '%s'\n", klass, g_type_name(((GObjectClass *)klass)->g_type_class.g_type)); + d(printf("EConfigHook: init class %p '%s'\n", klass, g_type_name(((GObjectClass *)klass)->g_type_class.g_type))); ((EConfigHookClass *)klass)->target_map = g_hash_table_new(g_str_hash, g_str_equal); ((EConfigHookClass *)klass)->config_class = g_type_class_ref(e_config_get_type()); |