Skip to content

Commit

Permalink
application icon fix
Browse files Browse the repository at this point in the history
  • Loading branch information
briandunnington committed Nov 24, 2009
1 parent f0b4e39 commit 025b37a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
7 changes: 6 additions & 1 deletion Growl Extras/Winamp Plugin/gen_growl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ CLSID bitmap_guid;
char *INI_FILE;
const int buffer_length = 256;

char CurrentPath[_MAX_PATH];

static api_memmgr* memory_manager;
static api_service* service_manager;
static api_albumart* album_art_manager;
Expand Down Expand Up @@ -113,6 +115,9 @@ int init() {

GetEncoderClsid(L"image/bmp", &bitmap_guid);

_getcwd(CurrentPath, _MAX_PATH);
strcat (CurrentPath, "\\..\\Plugins\\winamp.png");

return 0;
}

Expand Down Expand Up @@ -203,7 +208,7 @@ char* convertToChar(wchar_t* utf16)

void growl(char* type, wchar_t* icon, wchar_t* title, wchar_t* notice)
{
gntp_register(NULL);
gntp_register(CurrentPath, NULL);
gntp_notify(type, convertToChar(icon), convertToChar(title), convertToChar(notice), NULL);
}

Expand Down
Binary file modified Growl Extras/Winamp Plugin/gen_growl.ncb
Binary file not shown.
11 changes: 3 additions & 8 deletions Growl Extras/Winamp Plugin/gntp-send.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

#define SERVER_IP "127.0.0.1:23053"

char CurrentPath[_MAX_PATH];

char* notifications[] = {
"Playback Started"
};
Expand Down Expand Up @@ -70,7 +68,7 @@ static void md5_finish(md5_context *ctx, uint8 digest[16]);


void gntp_notify(char* notify, char* icon, char* title, char* message, char* password);
void gntp_register(char* password);
void gntp_register(char* icon);
void gntp_parse_response(int sock);
int create_socket(const char* server);

Expand Down Expand Up @@ -451,7 +449,7 @@ gntp_parse_response(int sock)
}

void
gntp_register(char* password)
gntp_register(char* icon, char* password)
{
int sock = -1;
char* salt;
Expand Down Expand Up @@ -490,12 +488,9 @@ gntp_register(char* password)
return;
}

_getcwd(CurrentPath, _MAX_PATH);
strcat (CurrentPath, "\\..\\Plugins\\winamp.png");

sendline(sock, "GNTP/1.0 REGISTER NONE", authheader);
sendline(sock, "Application-Name: ", "Winamp");
sendline(sock, "Application-Icon: ", CurrentPath);
sendline(sock, "Application-Icon: ", icon);

sendline(sock, "Notifications-Count: 1", NULL);

Expand Down

0 comments on commit 025b37a

Please sign in to comment.