void MainView::MouseDown(BPoint point) { int32 mask; if(!track_mouse) return; BMessage *msg = Window()->CurrentMessage(); msg->FindInt32("buttons", &mask); if(mask == B_SECONDARY_MOUSE_BUTTON) { showPopUp(ConvertToScreen(point)); drag_start = point; return; } Invalidate(); Field *child = getFieldByPoint(point); if(child && child->IsSelected()) { drag_move = true; drag_start = point; //this->BeginRectTracking(sel_bounds.OffsetByCopy(-2,-2)); h_ruler->SetSelRect(sel_bounds); v_ruler->SetSelRect(sel_bounds); h_ruler->UpdateSlider(point); v_ruler->UpdateSlider(point); } else { this->BeginRectTracking(BRect(point.x, point.y,point.x,point.y), B_TRACK_RECT_CORNER); drag_select = true; sel_rect.SetLeftTop(point); } }
// calculate secret key BOOL CalculateKeyX(pUinKey ptr,HANDLE hContact) { int agr = cpp_calc_keyx(ptr->cntx); if( agr ) { // do this only if key exchanged is ok // we use a 192bit key int keysize = cpp_size_keyx(); PBYTE buffer = (PBYTE) alloca(keysize); // buffer for hash // store key cpp_get_keyx(ptr->cntx,buffer); DBCONTACTWRITESETTING cws; cws.szModule = szModuleName; // store key in database cws.szSetting = "offlineKey"; cws.value.type = DBVT_BLOB; cws.value.cpbVal = keysize; cws.value.pbVal = buffer; CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)hContact, (LPARAM)&cws); // store timeout of key in database (2 days) cws.szSetting = "offlineKeyTimeout"; cws.value.type = DBVT_DWORD; cws.value.dVal = gettime()+(60*60*24*DBGetContactSettingWord(0,szModuleName,"okt",2)); CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)hContact, (LPARAM)&cws); // key exchange is finished showPopUpEC(ptr->hContact); } else { // agree value problem showPopUp(sim002,hContact,g_hPOP[POP_PU_DIS],0); } return agr!=0; }
void showPopUpKR(HANDLE hContact) { int indic=DBGetContactSettingByte(0, szModuleName, "kr",1); if (indic==1) showPopUp(sim008,hContact,g_hPOP[POP_PU_PRC],0); }
void showPopUpKRmsg(HANDLE hContact,LPCSTR msg) { int indic=DBGetContactSettingByte(0, szModuleName, "kr",1); if (indic==1) showPopUp(msg,hContact,g_hPOP[POP_PU_PRC],0); }
void showPopUpEC(HANDLE hContact) { int indic=DBGetContactSettingByte(0, szModuleName, "ec",1); if (indic==1) showPopUp(sim001,hContact,g_hPOP[POP_PU_EST],1); }
void showPopUpDC(HANDLE hContact) { int indic=DBGetContactSettingByte(0, szModuleName, "dc",1); if (indic==1) showPopUp(sim006,hContact,g_hPOP[POP_PU_DIS],1); }
void showPopUpDCmsg(HANDLE hContact,LPCSTR msg) { int indic=DBGetContactSettingByte(0, szModuleName, "dc",1); if (indic==1) showPopUp(msg,hContact,g_hPOP[POP_PU_DIS],1); }
void showPopUpRM(HANDLE hContact) { int indic=DBGetContactSettingByte(0, szModuleName, "sr",0); if (indic==1) showPopUp(sim010,hContact,g_hPOP[POP_PU_MSR],2); SkinPlaySound("IncomingSecureMessage"); }
void showPopUpSM(HANDLE hContact) { int indic=DBGetContactSettingByte(0, szModuleName, "ss",0); if (indic==1) showPopUp(sim009,hContact,g_hPOP[POP_PU_MSS],2); SkinPlaySound("OutgoingSecureMessage"); }
void MainMenu::btnImportClicked(){ emit showPopUp(Types::PopUpType::IMPORT_DATA_POPUP); }
void MainMenu::btnSendDatabaseClicked(){ emit showPopUp(Types::PopUpType::DB_SEND_POPUP); }