void MainWindow::create_actions() { langAct = new QAction(tr("&to Russian"), this); langAct->setShortcut(tr("Ctrl+L")); connect(langAct, SIGNAL(triggered()), this, SLOT(lang_slot())); /////////////////////////////////////////////// clearAct = new QAction(tr("&Clear all"), this); clearAct->setShortcut(tr("Ctrl+N")); connect(clearAct, SIGNAL(triggered()), this, SLOT(clear_slot())); /////////////////////////////////////////////// senderAct = new QAction(tr("&Sender options"), this); senderAct->setShortcut(tr("Ctrl+S")); connect(senderAct, SIGNAL(triggered()), this, SLOT(sender_slot())); /////////////////////////////////////////////// receiverAct = new QAction(tr("&Receiver options"), this); receiverAct->setShortcut(tr("Ctrl+R")); connect(receiverAct, SIGNAL(triggered()), this, SLOT(receiver_slot())); /////////////////////////////////////////////// atachAct = new QAction(tr("&Atachment options"), this); atachAct->setShortcut(tr("Ctrl+E")); connect(atachAct, SIGNAL(triggered()), this, SLOT(atach_slot())); /////////////////////////////////////////////// messageAct = new QAction(tr("Send &message"), this); connect(messageAct, SIGNAL(triggered()), this, SLOT(message_slot())); /////////////////////////////////////////////// aboutAct = new QAction(tr("&About"), this); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about_slot())); /////////////////////////////////////////////// exitAct = new QAction(tr("&Exit"), this); exitAct->setShortcut(tr("Ctrl+Q")); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); }
// returns the number of slot to be used or -1 if there are no free slots int tres_mem_arch_pf_store_start(void) { int id; DBG_PRINTF("tres_mem_arch_pf_store_start()\n"); id = find_free_slot(); if(id >= 0) { clear_slot(id); cur[id] = SLOT_START_ADDR(id); used[id] = 1; } return id; }
// unbind the HUD void hud_unbind(char *reply, MCPacketQueue *cq) { int sid; for(sid=0; sid<=45; sid++) { if (hud_bogus_map(&gs.inv.slots[sid])) { NEWPACKET(SP_SetSlot, ss); tss->wid = 0; tss->sid = sid; clear_slot(&tss->slot); queue_packet(ss,cq); clear_slot(&gs.inv.slots[sid]); } } if (hud_bogus_map(&gs.inv.drag)) { NEWPACKET(SP_SetSlot, ss); tss->wid = 255; tss->sid = -1; clear_slot(&tss->slot); queue_packet(ss,cq); clear_slot(&gs.inv.drag); } hud_id = -1; }