summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-07-01 14:24:57 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-07-01 14:24:57 +0000
commitd1752fb40038c14e0368ba4b1bf86dffaed62365 (patch)
treec8a3023084d13ff62aea3035c1a14c0ed3842fcd
parenta6b1490e1d663fe72c0315a058451fe5c4f125d0 (diff)
use Angeli-Ka's proto icon (thx!)
save status messages to database git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@233 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r--MySpace/MySpace.icobin0 -> 894 bytes
-rw-r--r--MySpace/MySpace.rc11
-rw-r--r--MySpace/MySpace_8.vcproj4
-rw-r--r--MySpace/icon1.icobin766 -> 0 bytes
-rw-r--r--MySpace/menu.cpp2
-rw-r--r--MySpace/menu.icobin2550 -> 0 bytes
-rw-r--r--MySpace/proto.cpp6
-rw-r--r--MySpace/resource.h7
-rw-r--r--MySpace/server_con.cpp10
9 files changed, 20 insertions, 20 deletions
diff --git a/MySpace/MySpace.ico b/MySpace/MySpace.ico
new file mode 100644
index 0000000..53efd42
--- /dev/null
+++ b/MySpace/MySpace.ico
Binary files differ
diff --git a/MySpace/MySpace.rc b/MySpace/MySpace.rc
index 0652d1a..85b9ea0 100644
--- a/MySpace/MySpace.rc
+++ b/MySpace/MySpace.rc
@@ -38,15 +38,6 @@ BEGIN
END
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_MENU ICON "menu.ico"
-
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
@@ -129,7 +120,7 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_ICON_PROTO ICON "icon1.ico"
+IDI_MYSPACE ICON "MySpace.ico"
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/MySpace/MySpace_8.vcproj b/MySpace/MySpace_8.vcproj
index 5b4cacb..ca79b23 100644
--- a/MySpace/MySpace_8.vcproj
+++ b/MySpace/MySpace_8.vcproj
@@ -453,6 +453,10 @@
>
</File>
<File
+ RelativePath=".\MySpace.ico"
+ >
+ </File>
+ <File
RelativePath=".\MySpace.rc"
>
<FileConfiguration
diff --git a/MySpace/icon1.ico b/MySpace/icon1.ico
deleted file mode 100644
index 881674b..0000000
--- a/MySpace/icon1.ico
+++ /dev/null
Binary files differ
diff --git a/MySpace/menu.cpp b/MySpace/menu.cpp
index 42c8ca9..20ba408 100644
--- a/MySpace/menu.cpp
+++ b/MySpace/menu.cpp
@@ -48,7 +48,7 @@ void InitMenu() {
menu.cbSize=sizeof(menu);
menu.flags = CMIM_ALL | CMIF_TCHAR;
- menu.hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_ICON_PROTO), IMAGE_ICON, 0, 0, 0);
+ menu.hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_MYSPACE), IMAGE_ICON, 0, 0, 0);
// main menu item
hServiceMenuMain = CreateServiceFunction(MODULE "/MainMenu", MainMenuService);
diff --git a/MySpace/menu.ico b/MySpace/menu.ico
deleted file mode 100644
index 94f62a2..0000000
--- a/MySpace/menu.ico
+++ /dev/null
Binary files differ
diff --git a/MySpace/proto.cpp b/MySpace/proto.cpp
index 21fb0af..b20727e 100644
--- a/MySpace/proto.cpp
+++ b/MySpace/proto.cpp
@@ -49,13 +49,13 @@ int LoadIcon(WPARAM wParam,LPARAM lParam) {
switch (wParam & 0xFFFF)
{
case PLI_PROTOCOL:
- id = IDI_ICON_PROTO;
+ id = IDI_MYSPACE;
break;
case PLI_ONLINE:
- id = IDI_ICON_PROTO;
+ id = IDI_MYSPACE;
break;
case PLI_OFFLINE:
- id = IDI_ICON_PROTO;
+ id = IDI_MYSPACE;
break;
default:
return (int) (HICON) NULL;
diff --git a/MySpace/resource.h b/MySpace/resource.h
index 50c44ff..3b8097c 100644
--- a/MySpace/resource.h
+++ b/MySpace/resource.h
@@ -3,14 +3,11 @@
// Used by MySpace.rc
//
#define IDD_OPT1 109
-#define IDI_MENU 110
-#define IDI_ICON1 120
-#define IDI_ICON_PROTO 120
#define IDD_NICK 121
+#define IDI_MYSPACE 122
#define IDC_ED_EMAIL 1001
#define IDC_ED_PW 1002
#define IDC_ED_NICK 1002
-#define IDC_BUTTON1 1003
#define IDC_BTN_CHECK 1003
#define IDC_ST_MSG 1004
@@ -18,7 +15,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 122
+#define _APS_NEXT_RESOURCE_VALUE 123
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1005
#define _APS_NEXT_SYMED_VALUE 101
diff --git a/MySpace/server_con.cpp b/MySpace/server_con.cpp
index 56560d6..dbc7042 100644
--- a/MySpace/server_con.cpp
+++ b/MySpace/server_con.cpp
@@ -227,6 +227,14 @@ void try_login(NetMessage &msg, HANDLE connection) {
}
}
+void ParseStatusMessage(HANDLE hContact, char *smsg) {
+ DBWriteContactSettingWord(hContact, MODULE, "Status", stat_myspace_to_mir(smsg[3] - '0'));
+ smsg += 8;
+ char *end = strstr(smsg, "|");
+ if(end) *end = 0;
+ DBWriteContactSettingStringUtf(hContact, MODULE, "StatusMsg", smsg);
+}
+
void __cdecl ServerThreadFunc(void*) {
NETLIBOPENCONNECTION conn_data = {0};
conn_data.cbSize = sizeof(NETLIBOPENCONNECTION);
@@ -387,7 +395,7 @@ void __cdecl ServerThreadFunc(void*) {
}
char smsg[1024];
if(msg.get_string("msg", smsg, 1024)) {
- DBWriteContactSettingWord(hContact, MODULE, "Status", stat_myspace_to_mir(smsg[3] - '0'));
+ ParseStatusMessage(hContact, smsg);
}
}
} else if(msg.get_int("bm") == 1) { // instant message