diff options
author | Ted Gould <ted@gould.cx> | 2009-12-15 17:12:32 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2009-12-15 17:12:32 -0600 |
commit | 16812b7ca72e41dfaf76b14d5517739f44e815b7 (patch) | |
tree | 7bbbdc2cb97659f2dff221f2dc91de6e7aa7d89c /libdbusmenu-gtk | |
parent | f54a417fde8f6937ecafd269db51a135af2e7a3e (diff) | |
download | libdbusmenu-16812b7ca72e41dfaf76b14d5517739f44e815b7.tar.gz libdbusmenu-16812b7ca72e41dfaf76b14d5517739f44e815b7.tar.bz2 libdbusmenu-16812b7ca72e41dfaf76b14d5517739f44e815b7.zip |
Building up the case statements.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/genericmenuitem.c | 24 | ||||
-rw-r--r-- | libdbusmenu-gtk/genericmenuitem.h | 2 |
2 files changed, 25 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/genericmenuitem.c b/libdbusmenu-gtk/genericmenuitem.c index 6eee2f7..3f36bbf 100644 --- a/libdbusmenu-gtk/genericmenuitem.c +++ b/libdbusmenu-gtk/genericmenuitem.c @@ -112,6 +112,18 @@ genericmenuitem_set_check_type (Genericmenuitem * item, GenericmenuitemCheckType item->priv->check_type = check_type; + switch (item->priv->check_type) { + case GENERICMENUITEM_CHECK_TYPE_NONE: + break; + case GENERICMENUITEM_CHECK_TYPE_CHECKBOX: + break; + case GENERICMENUITEM_CHECK_TYPE_RADIO: + break; + default: + g_warning("Generic Menuitem invalid check type: %d", check_type); + return; + } + gtk_widget_queue_draw(GTK_WIDGET(item)); return; @@ -135,6 +147,18 @@ genericmenuitem_set_state (Genericmenuitem * item, GenericmenuitemState state) item->priv->state = state; + switch (item->priv->state) { + case GENERICMENUITEM_STATE_UNCHECKED: + break; + case GENERICMENUITEM_STATE_CHECKED: + break; + case GENERICMENUITEM_STATE_INDETERMINATE: + break; + default: + g_warning("Generic Menuitem invalid check state: %d", state); + return; + } + gtk_widget_queue_draw(GTK_WIDGET(item)); return; diff --git a/libdbusmenu-gtk/genericmenuitem.h b/libdbusmenu-gtk/genericmenuitem.h index 8586590..4f54924 100644 --- a/libdbusmenu-gtk/genericmenuitem.h +++ b/libdbusmenu-gtk/genericmenuitem.h @@ -40,7 +40,7 @@ struct _Genericmenuitem { enum _GenericmenuitemCheckType { GENERICMENUITEM_CHECK_TYPE_NONE, GENERICMENUITEM_CHECK_TYPE_CHECKBOX, - GENErICMENUITEM_CHECK_TYPE_RADIO + GENERICMENUITEM_CHECK_TYPE_RADIO }; enum _GenericmenuitemState { |