diff options
author | Steve Zesch <[email protected]> | 2012-01-09 22:14:20 -0500 |
---|---|---|
committer | Steve Zesch <[email protected]> | 2012-01-09 22:14:20 -0500 |
commit | e554754f5681592f0f7b1d41e0943a89470f3796 (patch) | |
tree | 223db9350604b352a18d6b6f6ed330600afafeef /capplets/default-applications/mate-da-item.c | |
parent | 035a4e3cfa5782aaa4967cf923a1364eba3b056b (diff) | |
parent | b9c28ef703e934e8dc137686984f04c7b0d2d010 (diff) | |
download | mate-control-center-e554754f5681592f0f7b1d41e0943a89470f3796.tar.bz2 mate-control-center-e554754f5681592f0f7b1d41e0943a89470f3796.tar.xz |
Merge branch 'master' of https://github.com/mate-desktop/mate-control-center
Diffstat (limited to 'capplets/default-applications/mate-da-item.c')
-rw-r--r-- | capplets/default-applications/mate-da-item.c | 210 |
1 files changed, 129 insertions, 81 deletions
diff --git a/capplets/default-applications/mate-da-item.c b/capplets/default-applications/mate-da-item.c index 06bda549..ab3803de 100644 --- a/capplets/default-applications/mate-da-item.c +++ b/capplets/default-applications/mate-da-item.c @@ -21,128 +21,176 @@ #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) +MateDATextItem* mate_da_text_item_new(void) { - g_return_if_fail (item != NULL); + MateDATextItem* item = g_new0(MateDATextItem, 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) +MateDAFileItem* mate_da_file_item_new(void) { - 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); + MateDAFileItem* item = g_new0(MateDAFileItem, 1); - g_free (item); + return item; } -void -mate_da_term_item_free (MateDATermItem *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); + return item; +} - g_free (item->exec_flag); +void mate_da_web_item_free(MateDAWebItem* 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); + } +} - g_free (item); +void mate_da_simple_item_free(MateDASimpleItem* 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); + 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->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_text_item_free(MateDATextItem* 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_file_item_free(MateDAFileItem* 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); + } } |