Mercurial > pidgin.yaz
comparison finch/gntblist.c @ 26732:951102c642c5
Use safe function.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 23 Apr 2009 20:05:26 +0000 |
parents | 8df78c06d10e |
children | 83e6e710cbf3 |
comparison
equal
deleted
inserted
replaced
26731:96f82c75f1c0 | 26732:951102c642c5 |
---|---|
933 strncpy(status, "~", sizeof(status) - 1); | 933 strncpy(status, "~", sizeof(status) - 1); |
934 } | 934 } |
935 else if (PURPLE_BLIST_NODE_IS_GROUP(node)) | 935 else if (PURPLE_BLIST_NODE_IS_GROUP(node)) |
936 return purple_group_get_name((PurpleGroup*)node); | 936 return purple_group_get_name((PurpleGroup*)node); |
937 | 937 |
938 snprintf(text, sizeof(text) - 1, "%s %s", status, name); | 938 g_snprintf(text, sizeof(text) - 1, "%s %s", status, name); |
939 | 939 |
940 return text; | 940 return text; |
941 } | 941 } |
942 | 942 |
943 static void | 943 static void |
2640 | 2640 |
2641 for (iter = managers; iter; iter = iter->next) { | 2641 for (iter = managers; iter; iter = iter->next) { |
2642 char menuid[128]; | 2642 char menuid[128]; |
2643 FinchBlistManager *manager = iter->data; | 2643 FinchBlistManager *manager = iter->data; |
2644 GntMenuItem *item = gnt_menuitem_new(_(manager->name)); | 2644 GntMenuItem *item = gnt_menuitem_new(_(manager->name)); |
2645 snprintf(menuid, sizeof(menuid), "grouping-%s", manager->id); | 2645 g_snprintf(menuid, sizeof(menuid), "grouping-%s", manager->id); |
2646 gnt_menuitem_set_id(GNT_MENU_ITEM(item), menuid); | 2646 gnt_menuitem_set_id(GNT_MENU_ITEM(item), menuid); |
2647 gnt_menu_add_item(GNT_MENU(subsub), item); | 2647 gnt_menu_add_item(GNT_MENU(subsub), item); |
2648 g_object_set_data_full(G_OBJECT(item), "grouping-id", g_strdup(manager->id), g_free); | 2648 g_object_set_data_full(G_OBJECT(item), "grouping-id", g_strdup(manager->id), g_free); |
2649 gnt_menuitem_set_callback(item, menu_group_set_cb, NULL); | 2649 gnt_menuitem_set_callback(item, menu_group_set_cb, NULL); |
2650 } | 2650 } |