Mercurial > pidgin
view console/libgnt/gntmenuitemcheck.c @ 14939:06ae7ffc47e3
[gaim-migrate @ 17711]
This should prevent D-BUS from having to deal with any non-UTF-8
strings emitted by Gaim signals, which should therefore prevent its
early exit. Strings will be salvaged via gaim_utf8_salvage before
emission, and an error will be logged. IRC (and any other protocols
spitting out invalid UTF-8 to signals) should yet be fixed to emit
some sort of binary blob, rather than a UTF-8 string, but this will
make D-BUS robust to any future transgressions.
This is completely untested.
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Thu, 09 Nov 2006 16:35:06 +0000 |
parents | 97977138cf29 |
children | 1c8f1dc50685 |
line wrap: on
line source
#include "gntmenuitemcheck.h" static GntMenuItemClass *parent_class = NULL; static void gnt_menuitem_check_class_init(GntMenuItemCheckClass *klass) { parent_class = GNT_MENUITEM_CLASS(klass); GNTDEBUG; } static void gnt_menuitem_check_init(GTypeInstance *instance, gpointer class) { GNTDEBUG; } /****************************************************************************** * GntMenuItemCheck API *****************************************************************************/ GType gnt_menuitem_check_get_gtype(void) { static GType type = 0; if(type == 0) { static const GTypeInfo info = { sizeof(GntMenuItemCheckClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc)gnt_menuitem_check_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(GntMenuItemCheck), 0, /* n_preallocs */ gnt_menuitem_check_init, /* instance_init */ }; type = g_type_register_static(GNT_TYPE_MENUITEM, "GntMenuItemCheck", &info, 0); } return type; } GntMenuItem *gnt_menuitem_check_new(const char *text) { GntMenuItem *item = g_object_new(GNT_TYPE_MENUITEM_CHECK, NULL); GntMenuItem *menuitem = GNT_MENUITEM(item); menuitem->text = g_strdup(text); return item; } gboolean gnt_menuitem_check_get_checked(GntMenuItemCheck *item) { return item->checked; } void gnt_menuitem_check_set_checked(GntMenuItemCheck *item, gboolean set) { item->checked = set; }