diff options
Diffstat (limited to 'capplets/default-applications/mate-da-item.c')
-rw-r--r-- | capplets/default-applications/mate-da-item.c | 180 |
1 files changed, 93 insertions, 87 deletions
diff --git a/capplets/default-applications/mate-da-item.c b/capplets/default-applications/mate-da-item.c index 06bda549..7cdfa768 100644 --- a/capplets/default-applications/mate-da-item.c +++ b/capplets/default-applications/mate-da-item.c @@ -21,128 +21,134 @@ #include "mate-da-capplet.h" #include "mate-da-item.h" -MateDAWebItem* -mate_da_web_item_new (void) +MateDAWebItem* mate_da_web_item_new(void) { - MateDAWebItem *item = NULL; + MateDAWebItem* item = g_new0(MateDAWebItem, 1); - item = g_new0 (MateDAWebItem, 1); - - return item; + return item; } -MateDASimpleItem* -mate_da_simple_item_new (void) +MateDASimpleItem* mate_da_simple_item_new(void) { - MateDASimpleItem *item = NULL; - - item = g_new0 (MateDASimpleItem, 1); + MateDASimpleItem* item = g_new0(MateDASimpleItem, 1); - return item; + return item; } -MateDATermItem* -mate_da_term_item_new (void) +MateDATermItem* mate_da_term_item_new(void) { - MateDATermItem *item = NULL; - - item = g_new0 (MateDATermItem, 1); + MateDATermItem* item = g_new0(MateDATermItem, 1); - return item; + return item; } -MateDAVisualItem* -mate_da_visual_item_new (void) +MateDAVisualItem* mate_da_visual_item_new(void) { - MateDAVisualItem *item = NULL; + MateDAVisualItem* item = g_new0(MateDAVisualItem, 1); - item = g_new0 (MateDAVisualItem, 1); - - return item; + return item; } -MateDAMobilityItem* -mate_da_mobility_item_new (void) +MateDAImageItem* mate_da_image_item_new(void) { - MateDAMobilityItem *item = NULL; - - item = g_new0 (MateDAMobilityItem, 1); + MateDAImageItem* item = g_new0(MateDAImageItem, 1); - return item; + return item; } -void -mate_da_web_item_free (MateDAWebItem *item) +MateDAMobilityItem* mate_da_mobility_item_new(void) { - g_return_if_fail (item != NULL); + MateDAMobilityItem* item = g_new0(MateDAMobilityItem, 1); - g_free (item->generic.name); - g_free (item->generic.executable); - g_free (item->generic.command); - g_free (item->generic.icon_name); - g_free (item->generic.icon_path); - - g_free (item->tab_command); - g_free (item->win_command); - - g_free (item); + return item; } -void -mate_da_simple_item_free (MateDASimpleItem *item) +void mate_da_web_item_free(MateDAWebItem* item) { - g_return_if_fail (item != NULL); - - g_free (item->generic.name); - g_free (item->generic.executable); - g_free (item->generic.command); - g_free (item->generic.icon_name); - g_free (item->generic.icon_path); - - g_free (item); + if (item != NULL) + { + g_free(item->generic.name); + g_free(item->generic.executable); + g_free(item->generic.command); + g_free(item->generic.icon_name); + g_free(item->generic.icon_path); + + g_free(item->tab_command); + g_free(item->win_command); + + g_free(item); + } } -void -mate_da_term_item_free (MateDATermItem *item) +void mate_da_simple_item_free(MateDASimpleItem* item) { - g_return_if_fail (item != NULL); - - g_free (item->generic.name); - g_free (item->generic.executable); - g_free (item->generic.command); - g_free (item->generic.icon_name); - g_free (item->generic.icon_path); - - g_free (item->exec_flag); - - g_free (item); + if (item != NULL) + { + g_free(item->generic.name); + g_free(item->generic.executable); + g_free(item->generic.command); + g_free(item->generic.icon_name); + g_free(item->generic.icon_path); + + g_free(item); + } } -void -mate_da_visual_item_free (MateDAVisualItem *item) +void mate_da_image_item_free(MateDAImageItem* item) { - g_return_if_fail (item != NULL); - - g_free (item->generic.name); - g_free (item->generic.executable); - g_free (item->generic.command); - g_free (item->generic.icon_name); - g_free (item->generic.icon_path); - - g_free (item); + if (item != NULL) + { + g_free(item->generic.name); + g_free(item->generic.executable); + g_free(item->generic.command); + g_free(item->generic.icon_name); + g_free(item->generic.icon_path); + + g_free(item); + } } -void -mate_da_mobility_item_free (MateDAMobilityItem *item) +void mate_da_term_item_free(MateDATermItem* item) { - g_return_if_fail (item != NULL); + if (item != NULL) + { + g_free(item->generic.name); + g_free(item->generic.executable); + g_free(item->generic.command); + g_free(item->generic.icon_name); + g_free(item->generic.icon_path); + + g_free(item->exec_flag); + + g_free(item); + } +} - g_free (item->generic.name); - g_free (item->generic.executable); - g_free (item->generic.command); - g_free (item->generic.icon_name); - g_free (item->generic.icon_path); +void mate_da_visual_item_free(MateDAVisualItem* item) +{ + if (item != NULL) + { + g_free(item->generic.name); + g_free(item->generic.executable); + g_free(item->generic.command); + g_free(item->generic.icon_name); + g_free(item->generic.icon_path); + + g_free(item); + } +} - g_free (item); +void mate_da_mobility_item_free (MateDAMobilityItem *item) +{ + if (item != NULL) + { + g_free(item->generic.name); + g_free(item->generic.executable); + g_free(item->generic.command); + g_free(item->generic.icon_name); + g_free(item->generic.icon_path); + + g_free(item); + } } |