summaryrefslogtreecommitdiff
path: root/plugins/WhenWasIt
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-20 23:51:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-20 23:51:53 +0000
commit57abc51aad272a656282a52a460a47abe24e07d6 (patch)
treec6f3538e63c9c736cfa7129423d1b498273278b6 /plugins/WhenWasIt
parentb9f120f97699286410fe902f93135235eed0b127 (diff)
- 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
Diffstat (limited to 'plugins/WhenWasIt')
-rw-r--r--plugins/WhenWasIt/icons.cpp52
1 files changed, 23 insertions, 29 deletions
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;
}