From 57abc51aad272a656282a52a460a47abe24e07d6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Jun 2012 23:51:53 +0000 Subject: - MS_SKIN2_ADDICON replaced with Skin_AddIcon; - SKINICONDESC_SIZE* constants removed and replaced with sizeof(sid); - added SIDF_PATH_UNICODE for all plugins; - dynamic translation fixed in the icolib options dialog git-svn-id: http://svn.miranda-ng.org/main/trunk@507 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WhenWasIt/icons.cpp | 52 ++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) (limited to 'plugins/WhenWasIt/icons.cpp') diff --git a/plugins/WhenWasIt/icons.cpp b/plugins/WhenWasIt/icons.cpp index facb02b574..805593ade4 100644 --- a/plugins/WhenWasIt/icons.cpp +++ b/plugins/WhenWasIt/icons.cpp @@ -75,46 +75,40 @@ int LoadIcons() return 0; } -int AddIcon(HICON icon, char *name, char *description) +HANDLE AddIcon(HICON icon, char *name, char *description) { SKINICONDESC sid = {0}; - sid.cbSize = sizeof(SKINICONDESC); + sid.cbSize = sizeof(sid); sid.pszSection = "WhenWasIt"; sid.cx = sid.cy = 16; sid.pszDescription = description; sid.pszName = name; sid.hDefaultIcon = icon; - - return CallService(MS_SKIN2_ADDICON, 0, (LPARAM) &sid); + return Skin_AddIcon(&sid); } int AddIcons() { - if (ServiceExists(MS_SKIN2_ADDICON)) //if icolib is installed - { -// AddIcon(hiDlgIcon, "Dlg", "Popup and dialog "); - AddIcon(hiCheckMenu, "MenuCheck", "Check birthdays menu item"); - AddIcon(hiListMenu, "MenuList", "List birthdays menu item"); - AddIcon(hiAddBirthdayContact, "AddBirthday", "Add/change birthday"); - AddIcon(hiRefreshUserDetails, "RefreshUserDetails", "Refresh user details"); - - AddIcon(hiImportBirthdays, "ImportBirthdays", "Import birthdays"); - AddIcon(hiExportBirthdays, "ExportBirthdays", "Export birthdays"); - - int i; - char name[1024]; - char description[1024]; - AddIcon(hiDTB[0], "DTB0", "Birthday today"); - AddIcon(hiDTB[1], "DTB1", "1 day to birthday"); - for (i = 2; i < cDTB; i++) - { - sprintf(name, "DTB%d", i); - sprintf(description, "%d days to birthday", i); - AddIcon(hiDTB[i], name, description); - } - sprintf(description, "More than %d days to birthday", cDTB - 1); - AddIcon(hiDTBMore, "DTBMore", description); - } + AddIcon(hiCheckMenu, "MenuCheck", "Check birthdays menu item"); + AddIcon(hiListMenu, "MenuList", "List birthdays menu item"); + AddIcon(hiAddBirthdayContact, "AddBirthday", "Add/change birthday"); + AddIcon(hiRefreshUserDetails, "RefreshUserDetails", "Refresh user details"); + + AddIcon(hiImportBirthdays, "ImportBirthdays", "Import birthdays"); + AddIcon(hiExportBirthdays, "ExportBirthdays", "Export birthdays"); + + int i; + char name[1024]; + char description[1024]; + AddIcon(hiDTB[0], "DTB0", "Birthday today"); + AddIcon(hiDTB[1], "DTB1", "1 day to birthday"); + for (i = 2; i < cDTB; i++) { + sprintf(name, "DTB%d", i); + sprintf(description, "%d days to birthday", i); + AddIcon(hiDTB[i], name, description); + } + sprintf(description, "More than %d days to birthday", cDTB - 1); + AddIcon(hiDTBMore, "DTBMore", description); return 0; } -- cgit v1.2.3