summaryrefslogtreecommitdiff
path: root/plugins/BuddyExpectator
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-08-12 18:42:49 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-08-12 18:42:49 +0000
commit74e9b42783af6a0a9d51df6271bca169e3dcc81d (patch)
tree636b9ea671646559fd835766d482fd99b96bbd19 /plugins/BuddyExpectator
parent4330c62d2fa5b2752036b43018044c7c01b10695 (diff)
extraicons registration moved to Load()
git-svn-id: http://svn.miranda-ng.org/main/trunk@10168 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BuddyExpectator')
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp16
-rw-r--r--plugins/BuddyExpectator/src/options.cpp1
-rw-r--r--plugins/BuddyExpectator/src/options.h1
3 files changed, 6 insertions, 12 deletions
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 1f30bcee9a..fa0dcb9876 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -136,8 +136,7 @@ LRESULT CALLBACK MissYouPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
CallServiceSync("BuddyExpectator/actionMissYou", (WPARAM)PUGetContact(hWnd), 0);
if ( !db_get_b(PUGetContact(hWnd), MODULE_NAME, "MissYouNotifyAlways", 0)) {
db_set_b(PUGetContact(hWnd), MODULE_NAME, "MissYou", 0);
- if (options.MissYouIcon)
- ExtraIcon_Clear(hExtraIcon, PUGetContact(hWnd));
+ ExtraIcon_Clear(hExtraIcon, PUGetContact(hWnd));
}
PUDeletePopup(hWnd);
}
@@ -150,8 +149,7 @@ LRESULT CALLBACK MissYouPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
case UM_POPUPACTION:
if (wParam == 1) {
db_set_b(PUGetContact(hWnd), MODULE_NAME, "MissYou", 0);
- if (options.MissYouIcon)
- ExtraIcon_Clear(hExtraIcon, PUGetContact(hWnd));
+ ExtraIcon_Clear(hExtraIcon, PUGetContact(hWnd));
PUDeletePopup(hWnd);
}
break;
@@ -421,13 +419,11 @@ INT_PTR MenuMissYouClick(WPARAM hContact, LPARAM)
{
if (db_get_b(hContact, MODULE_NAME, "MissYou", 0)) {
db_set_b(hContact, MODULE_NAME, "MissYou", 0);
- if (options.MissYouIcon)
- ExtraIcon_Clear(hExtraIcon, hContact);
+ ExtraIcon_Clear(hExtraIcon, hContact);
}
else {
db_set_b(hContact, MODULE_NAME, "MissYou", 1);
- if (options.MissYouIcon)
- ExtraIcon_SetIcon(hExtraIcon, hContact, "enabled_icon");
+ ExtraIcon_SetIcon(hExtraIcon, hContact, "enabled_icon");
}
return 0;
@@ -615,8 +611,6 @@ int ModulesLoaded(WPARAM, LPARAM)
timer_id = SetTimer(0, 0, 1000 * 60 * 60 * 4, TimerProc); // check every 4 hours
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded2);
- if (options.MissYouIcon)
- hExtraIcon = ExtraIcon_Register("buddy_exp", LPGEN("Buddy Expectator"), "enabled_icon");
////////////////////////////////////////////////////////////////////////////
@@ -708,6 +702,8 @@ extern "C" int __declspec(dllexport) Load(void)
db_set_dw(hContact, MODULE_NAME, "CreationTime", current_time);
}
+ hExtraIcon = ExtraIcon_Register("buddy_exp", LPGEN("Buddy Expectator"), "enabled_icon");
+
return 0;
}
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp
index fc4a51d40e..e2915071ca 100644
--- a/plugins/BuddyExpectator/src/options.cpp
+++ b/plugins/BuddyExpectator/src/options.cpp
@@ -54,7 +54,6 @@ void LoadOptions()
options.notifyFirstOnline = db_get_b(NULL, MODULE_NAME, "bShowFirstSight", 0) ? true : false;
options.hideInactive = db_get_b(NULL, MODULE_NAME, "bHideInactive", 0) ? true : false;
options.enableMissYou = db_get_b(NULL, MODULE_NAME, "bMissYouEnabled", 1) ? true : false;
- options.MissYouIcon = db_get_b(NULL, MODULE_NAME, "bMissYouIcon", 0);
}
void SaveOptions()
diff --git a/plugins/BuddyExpectator/src/options.h b/plugins/BuddyExpectator/src/options.h
index 8534badb8e..dfc6a62e35 100644
--- a/plugins/BuddyExpectator/src/options.h
+++ b/plugins/BuddyExpectator/src/options.h
@@ -39,7 +39,6 @@ typedef struct {
bool notifyFirstOnline;
bool enableMissYou;
bool hideInactive;
- byte MissYouIcon;
int iAbsencePeriod2; // notify period for contacts that have remained away
int iShowPopup2;