Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
git-svn-id: http://www.konnekt.info/svn/konnfer/trunk@46 edcb5eaf-7ff…
Browse files Browse the repository at this point in the history
…4-0310-845d-8a429259bb87
  • Loading branch information
panrafal committed Sep 16, 2005
1 parent dfd8f3e commit bd7c7a9
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 74 deletions.
30 changes: 15 additions & 15 deletions group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ void group_base::receiveMessage(cMessage * m , string from,string senderUID, int
//end skolima ADD

//skolima ADD - obs³uga ignorowania
//najpierw ignorowanie "indywidulalne"
int cnt0_stat = GETCNTI(cnt0, CNT_STATUS);
if (cnt0_stat&ST_IGNORED)
//najpierw ignorowanie "indywidualne"
if (ICMessage(IMC_IGN_FIND, basicNet, (int)senderUID.c_str()))
{
//wypada³oby dodaæ j¹ do histori w odpowiednim miejscu
sHISTORYADD olany;
Expand All @@ -138,12 +137,11 @@ void group_base::receiveMessage(cMessage * m , string from,string senderUID, int
//koñczymy, bo ignorujemy ten kontakt
}
}
//teraz ignorowanie konferncji
//teraz ignorowanie konferencji
int cnt = ICMessage(IMC_FINDCONTACT , konnfer::net , (int)this->getUID().c_str());
ICMessage(IMI_CNT_ACTIVITY, cnt);
ICMessage(IMI_REFRESH_CNT, cnt);
int cnt_stat = GETCNTI(cnt, CNT_STATUS);
if (cnt_stat&ST_IGNORED)
if (ICMessage(IMC_IGN_FIND, konnfer::net , (int)this->getUID().c_str()))
{
//wypada³oby dodaæ j¹ do histori w odpowiednim miejscu
sHISTORYADD olany;
Expand Down Expand Up @@ -213,7 +211,7 @@ void group_base::createContact(string display , bool onList) {
if (!display.empty()) display+=", ";
int cnt = ICMessage(IMC_FINDCONTACT , net , (int)it->c_str());
//skolima OLD was if (cnt != -1)
if (cnt != -1&&strlen(GETCNTC(cnt , CNT_DISPLAY))!=0)
if (cnt != -1 && strlen(GETCNTC(cnt , CNT_DISPLAY))!=0)
{
display += GETCNTC(cnt , CNT_DISPLAY);
//skolima ADD line
Expand All @@ -223,8 +221,8 @@ void group_base::createContact(string display , bool onList) {
{
display+=*it;
//skolima ADD
if(cnt==-1)isUnknown = true;
if(cnt>-1)allUnknown = false;
if (cnt ==- 1) isUnknown = true;
if (cnt >- 1) allUnknown = false;
//end skolima ADD
}
}
Expand All @@ -239,12 +237,14 @@ void group_base::createContact(string display , bool onList) {
SETCNTI(this->cnt , kID_OPT_CNT_NOSILENTON , 2);
SETCNTI(this->cnt , kID_OPT_CNT_NOSILENTOFF , 2);
//jeœli user tak ustawi³, domyslnie wrzucamy nowe kontakty jako ignorowane...
if(!onList&&GETINT (Cfg::ingore_by_default)==1 &&
(GETINT (Cfg::ignore_if)==1||(GETINT (Cfg::ignore_if)==0&&isUnknown)
||(GETINT (Cfg::ignore_if)==2&&allUnknown)))
{
//ignorujemy....
ICMessage(IMC_IGN_ADD, konnfer::net, (int)this->getUID().c_str());
if(!onList && GETINT(Cfg::ignore_by_default) == 1) {
if (GETINT(Cfg::ignore_if) == ignoreAlways
|| (GETINT(Cfg::ignore_if) == ignoreIfSome && isUnknown)
|| (GETINT(Cfg::ignore_if) == ignoreIfAll && allUnknown))
{
//ignorujemy....
ICMessage(IMC_IGN_ADD, konnfer::net, (int)this->getUID().c_str());
}
}
//end skolima ADD
ICMessage(IMC_CNT_CHANGED , this->cnt);
Expand Down
3 changes: 0 additions & 3 deletions group_gg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
#include "skolimaUtilz.h"
//end skolima ADD

//Winthux ADD
#pragma comment(lib,"../libgadu/libgadu.lib")
//end Winthux ADD

// groupContents_gg --------------------------------------------------
void groupContents_gg::set(int count , const uin_t* uins) {
Expand Down
28 changes: 13 additions & 15 deletions konnferencja.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ int ISetCols() {
SetColumn (DTCFG, Cfg::ignore_text, DT_CT_STR, "Konferencja {Display} nie zosta³a autoryzowana.Jeœli chcesz rozmawiaæ, daj mi najpierw znaæ prywatnie.", "Konnferencja/IgnoreText");
SetColumn (DTCFG, Cfg::respond_to_whom, DT_CT_INT, 0, "Konnferencja/RespondToWhom");
SetColumn (DTCFG, Cfg::respond, DT_CT_INT, 0, "Konnferencja/Respond");
SetColumn (DTCFG, Cfg::ingore_by_default, DT_CT_INT, 1, "Konnferencja/IgrnoreByDefault");
SetColumn (DTCFG, Cfg::ignore_by_default, DT_CT_INT, 0, "Konnferencja/IgnoreByDefault");
SetColumn (DTCNT, Cfg::kontakt_timestamp, DT_CT_INT, 0, "Konnferencja/LastMsgTimestamp" ); //niewidoczne dla usera
SetColumn (DTCFG, Cfg::ignore_if, DT_CT_INT, 0, "Konnferencja/IgnoreIfUnknown");
SetColumn (DTCFG, Cfg::ignore_if, DT_CT_INT, ignoreIfAll, "Konnferencja/IgnoreIfUnknown");
SetColumn (DTCFG, Cfg::show_template, DT_CT_STR, "{Display} [{UID}] {Status} {Info}", "Konnferencja/ShowUsersTemplate");
// <code author="Winthux">
SetColumn (DTCFG, Cfg::shift_tab, DT_CT_INT, 0, "Konnerencja/ShiftTab" );
Expand Down Expand Up @@ -110,9 +110,9 @@ int IPrepare() {
//nowa grupa
UIActionAdd(Cfg::id_grupa , 0 , ACTT_GROUP , "Opcje ignorowania");
//checkbox
UIActionCfgAdd (Cfg::id_grupa, Cfg::ingore_by_default, ACTT_CHECK|ACTR_SHOW,
UIActionCfgAdd (Cfg::id_grupa, Cfg::ignore_by_default, ACTT_CHECK|ACTR_SHOW|ACTR_INIT,
"Domyœlnie ignoruj nieznane konferencje :"
, Cfg::ingore_by_default);
, Cfg::ignore_by_default);
//
char res[250];
//dropdown box
Expand All @@ -135,7 +135,7 @@ int IPrepare() {
UIActionAdd (Cfg::id_grupa, 0, ACTT_COMMENT,
"Na ignorowane wiadomoϾi odpowiedz tekstem : "
, 0, 0);
UIActionCfgAdd ( Cfg::id_grupa, Cfg::ignore_text, ACTT_TEXT,
UIActionCfgAdd ( Cfg::id_grupa, Cfg::ignore_text, ACTT_TEXT | ACTR_INIT,
"" CFGTIP "Rozpoznawane zmienne : \n{Display}", Cfg::ignore_text );
//grupê trzeba zamkn¹æ
UIActionAdd(Cfg::id_grupa , 0 , ACTT_GROUPEND);
Expand Down Expand Up @@ -553,12 +553,9 @@ ActionProc(sUIActionNotify_base * anBase) {
& ACTS_DISABLED ) ? 0 : -1, ACTS_DISABLED );
}
break;
case Cfg::ingore_by_default :
case Cfg::ignore_text: // jest tworzony jako ostatni - najlepsze miejsce na ukrywanie
if(anBase->code == ACTN_CREATE)
{
if(anBase->code == ACTN_SHOW)//UI 'Ustawienia' bêdzie zaraz pokazywane
{
//dirty bugfix

//ustawiam status zgodny z wpisem konfiguracji
UIActionSetStatus ( Cfg::id_grupa, Cfg::respond_to_whom,
(GETINT(Cfg::respond)) ? 0 : -1, ACTS_DISABLED );
Expand All @@ -575,7 +572,7 @@ ActionProc(sUIActionNotify_base * anBase) {
(GETINT(Cfg::respond)) ? 0 : -1, ACTS_DISABLED );
//ustawiam status zgodny z wpisem konfiguracji
UIActionSetStatus ( Cfg::id_grupa, Cfg::ignore_if,
(GETINT(Cfg::ingore_by_default)) ? 0 : -1, ACTS_DISABLED );
(GETINT(Cfg::ignore_by_default)) ? 0 : -1, ACTS_DISABLED );
//ustawiam status odwrotny
UIActionSetStatus ( Cfg::id_grupa, Cfg::ignore_if,
(UIActionGetStatus( sUIAction( Cfg::id_grupa, Cfg::ignore_if ) )
Expand All @@ -584,10 +581,11 @@ ActionProc(sUIActionNotify_base * anBase) {
UIActionSetStatus ( Cfg::id_grupa, Cfg::ignore_if,
(UIActionGetStatus( sUIAction( Cfg::id_grupa, Cfg::ignore_if ) )
& ACTS_DISABLED ) ? 0 : -1, ACTS_DISABLED );
}
else//pacniêta kontrolka
{
ACTIONONLY( an );
}
break;
case Cfg::ignore_by_default :
{
if (anBase->code == ACTN_ACTION) {
UIActionSetStatus ( Cfg::id_grupa, Cfg::ignore_if,
(UIActionGetStatus( sUIAction( Cfg::id_grupa, Cfg::ignore_if ) )
& ACTS_DISABLED ) ? 0 : -1, ACTS_DISABLED );
Expand Down
7 changes: 6 additions & 1 deletion konnferencja.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,19 @@ namespace konnfer {
int handleGGEvent(sIMessage_GGEvent * e);
int getGroupUIDs(string uid , groupItems & items);

enum enIgnore {
ignoreAlways = 1,
ignoreIfSome = 0,
ignoreIfAll = 2,
};

//<code author="Skolima" modifyBy="Winthux">
namespace Cfg
{
const int ignore_text = net*1000+10;
const int respond_to_whom = net*1000+11;
const int respond = net*1000+12;
const int ingore_by_default = net*1000+13;
const int ignore_by_default = net*1000+13;
const int id_grupa = net*1000+14;
const int kontakt_timestamp = net*1000+15;
const int ignore_if = net*1000+16;
Expand Down
6 changes: 3 additions & 3 deletions konnferencja.rc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ IDI_GSHOW ICON "res/show.ico"
IDI_LARGE ICON "res/online_32.ico"

1 VERSIONINFO
FILEVERSION 0,1,1,0
FILEVERSION 0,1,2,0
PRODUCTVERSION 0,6,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
Expand All @@ -25,9 +25,9 @@ BEGIN
BEGIN
VALUE "CompanyName", "Stamina"
VALUE "FileDescription", "Konferencje w GaduGadu"
VALUE "FileVersion", "0.1.1.0"
VALUE "FileVersion", "0.1.2"
VALUE "InternalName", "KONNferencja"
VALUE "LegalCopyright", "Copyright (C) Stamina 2003-2005"
VALUE "LegalCopyright", "Copyright (C)2003,2004,2005 Stamina"
VALUE "OriginalFilename", "konnferencja.dll"
VALUE "ProductName", "KONNferencja"
VALUE "ProductVersion", "0.6"
Expand Down
63 changes: 26 additions & 37 deletions konnferencja_svn.vcproj → konnferencja.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="debug"
IntermediateDirectory="debug"
OutputDirectory="../../__output"
IntermediateDirectory="../../_temp/konnferencja/debug/"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../; ../libgadu"
AdditionalIncludeDirectories="../; ../libgadu;\c++\__source\w32compat"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;KONNFERENCJA_EXPORTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
UsePrecompiledHeader="3"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/konnferencja.dll"
AdditionalDependencies="libgadu_d.lib plug_defs_d.lib stamina_d.lib"
OutputFile="$(OutDir)/plugins/konnferencja.dll"
LinkIncremental="2"
IgnoreAllDefaultLibraries="FALSE"
IgnoreDefaultLibraryNames="libcmt"
AdditionalLibraryDirectories="../../__libs;..\libgadu\lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/konnferencja.pdb"
SubSystem="2"
Expand Down Expand Up @@ -64,31 +64,32 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="release"
IntermediateDirectory="release"
OutputDirectory="../../_publish/"
IntermediateDirectory="../../_temp/konnferencja/release/"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OmitFramePointers="TRUE"
AdditionalIncludeDirectories="../; ../libgadu"
AdditionalIncludeDirectories="../; ../libgadu;\c++\__source\w32compat"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;KONNFERENCJA_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
UsePrecompiledHeader="3"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/konnferencja.dll"
AdditionalDependencies="libgadu.lib plug_defs.lib stamina.lib"
OutputFile="$(OutDir)/_konnferencja/plugins/konnferencja.dll"
LinkIncremental="1"
IgnoreDefaultLibraryNames="libcmt"
AdditionalLibraryDirectories="../../__libs;..\libgadu\lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/debug/$(ProjectName).pdb"
GenerateMapFile="TRUE"
Expand Down Expand Up @@ -134,17 +135,23 @@
<File
RelativePath="group_gg.cpp">
</File>
<File
RelativePath="..\Konnekt\konnekt_defs.cpp">
</File>
<File
RelativePath="konnferencja.cpp">
</File>
<File
RelativePath="..\StaminaLib\trunk\Stamina\RegEx.cpp">
</File>
<File
RelativePath=".\skolimaUtilz.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"/>
</FileConfiguration>
</File>
<File
RelativePath="stdafx.cpp">
Expand Down Expand Up @@ -174,9 +181,6 @@
<File
RelativePath="resource.h">
</File>
<File
RelativePath=".\skolimaUtilz.h">
</File>
<File
RelativePath="stdafx.h">
</File>
Expand All @@ -187,30 +191,15 @@
<File
RelativePath="konnferencja.rc">
</File>
<File
RelativePath=".\res\msg.ico">
</File>
<File
RelativePath="msg.ico">
</File>
<File
RelativePath=".\res\offline.ico">
</File>
<File
RelativePath="offline.ico">
</File>
<File
RelativePath=".\res\online.ico">
</File>
<File
RelativePath="online.ico">
</File>
<File
RelativePath=".\res\online_32.ico">
</File>
<File
RelativePath=".\res\show.ico">
</File>
<File
RelativePath="show.ico">
</File>
Expand Down

0 comments on commit bd7c7a9

Please sign in to comment.