Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES31
-rw-r--r--src/Channel.h2
-rw-r--r--src/Message.h2
-rw-r--r--src/mumble/ConfigDialog.cpp10
-rw-r--r--src/mumble/ConfigDialogDelegate.h44
-rw-r--r--src/mumble/CustomElements.cpp15
-rw-r--r--src/mumble/MainWindow.cpp44
-rw-r--r--src/murmur/Messages.cpp4
-rw-r--r--src/murmur/Server.cpp14
-rw-r--r--src/murmur/Server.h2
10 files changed, 105 insertions, 63 deletions
diff --git a/CHANGES b/CHANGES
index 4b29648e9..c3f0677b5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,32 @@
+2009-10-14
+ Benjamin Jemlich <pcgod@users.sourceforge.net>
+ d0b371c fix text cursor in chatbar
+
+ Thorvald Natvig <slicer@users.sourceforge.net>
+ 5ae7c8c SuperUser can't query permissions
+ 2c92c17 Clientside permission query
+
+2009-10-13
+ Chosi <chosi@choseh.de>
+ f75ae8b L4D plugin update to rev 3986
+
+ Stefan Hacker <dd0t@users.sourceforge.net>
+ 56f5f97 Tab and Ctrl+Space completion for chatbar.
+
+ Thorvald Natvig <slicer@users.sourceforge.net>
+ ff70bc7 Clientside dummy for permission query
+ 7439bc4 Permission query (serverside)
+ 055c13f Force config iconlist size
+ 6076cc0 Restrict comments to message size limit, and only allow admins
+ to clear (not set) other people's comments)
+
+ Timo K <timer@dbclan.de>
+ d0bd7b8 COD5 plugin update to rev 1.6.1252
+
2009-10-12
+ Mikkel Krautz <mikkel@krautz.dk>
+ a974dc8 Fix Mac OS X ConfigDialog.
+
Thorvald Natvig <slicer@users.sourceforge.net>
4ddc686 Add (2), (3) etc to servernames when drag&dropped, and allow
drag from public->favorite
@@ -37,6 +65,9 @@
6261bbc Hierarchical connect dialog
2009-10-07
+ Stefan Hacker <dd0t@users.sourceforge.net>
+ 0043285 Very small style fix ;-)
+
Thorvald Natvig <slicer@users.sourceforge.net>
f065c2b Fetch continent of public servers and grab geoip of user
a9fdf25 Flush denormals on Win32
diff --git a/src/Channel.h b/src/Channel.h
index f06831aa0..157114a63 100644
--- a/src/Channel.h
+++ b/src/Channel.h
@@ -67,7 +67,7 @@ class Channel : public QObject {
#ifdef MUMBLE
unsigned int uiPermissions;
-
+
static QHash<int, Channel *> c_qhChannels;
static QReadWriteLock c_qrwlChannels;
diff --git a/src/Message.h b/src/Message.h
index 1a9572fe9..93d9effb3 100644
--- a/src/Message.h
+++ b/src/Message.h
@@ -55,7 +55,7 @@
MUMBLE_MH_MSG(ContextAction) \
MUMBLE_MH_MSG(UserList) \
MUMBLE_MH_MSG(VoiceTarget) \
- MUMBLE_MH_MSG(PermissionQuery)
+ MUMBLE_MH_MSG(PermissionQuery)
class MessageHandler {
public:
diff --git a/src/mumble/ConfigDialog.cpp b/src/mumble/ConfigDialog.cpp
index deef83dc8..0ca90c399 100644
--- a/src/mumble/ConfigDialog.cpp
+++ b/src/mumble/ConfigDialog.cpp
@@ -166,7 +166,7 @@ void ConfigDialog::on_qcbExpert_clicked(bool b) {
qmIconWidgets.clear();
qlwIcons->clear();
-
+
QFontMetrics qfm(qlwIcons->font());
int width = 0;
@@ -178,20 +178,20 @@ void ConfigDialog::on_qcbExpert_clicked(bool b) {
i->setIcon(cw->icon());
i->setText(cw->title());
i->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
-
+
qmIconWidgets.insert(i, cw);
if (cw == ccw)
sel = i;
}
}
-
+
// Add space for icon and some padding.
width += qlwIcons->iconSize().width() + 25;
-
+
qlwIcons->setMinimumWidth(width);
qlwIcons->setMaximumWidth(width);
-
+
if (sel)
qlwIcons->setCurrentItem(sel);
else
diff --git a/src/mumble/ConfigDialogDelegate.h b/src/mumble/ConfigDialogDelegate.h
index 0d6769aa4..86c465a78 100644
--- a/src/mumble/ConfigDialogDelegate.h
+++ b/src/mumble/ConfigDialogDelegate.h
@@ -47,21 +47,35 @@
NSToolbar *toolbarCache;
}
-- (id) initWithConfigDialog:(ConfigDialog *)dialog andWidgetMap:(QMap<unsigned int, ConfigWidget *> *) map inExpertMode:(BOOL)flag;
-
-- (NSArray *) toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar;
-- (NSArray *) toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar;
-- (NSArray *) toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar;
-
-- (void) toolbarWillAddItem:(NSNotification*)notification;
-- (void) toolbarDidRemoveItem:(NSNotification *)notification;
-
-- (NSToolbarItem *) toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)identifier willBeInsertedIntoToolbar:(BOOL)flag;
-
-- (BOOL) validateToolbarItem:(NSToolbarItem *)toolbarItem;
-
-- (void) selectItem:(ConfigWidget *)cw;
-- (void) itemSelected:(NSToolbarItem *)toolbarItem;
+- (id) initWithConfigDialog:
+(ConfigDialog *)dialog andWidgetMap:
+(QMap<unsigned int, ConfigWidget *> *) map inExpertMode:
+(BOOL)flag;
+
+- (NSArray *) toolbarAllowedItemIdentifiers:
+(NSToolbar *)toolbar;
+- (NSArray *) toolbarDefaultItemIdentifiers:
+(NSToolbar *)toolbar;
+- (NSArray *) toolbarSelectableItemIdentifiers:
+(NSToolbar *)toolbar;
+
+- (void) toolbarWillAddItem:
+(NSNotification*)notification;
+- (void) toolbarDidRemoveItem:
+(NSNotification *)notification;
+
+- (NSToolbarItem *) toolbar:
+(NSToolbar *)toolbar itemForItemIdentifier:
+(NSString *)identifier willBeInsertedIntoToolbar:
+(BOOL)flag;
+
+- (BOOL) validateToolbarItem:
+(NSToolbarItem *)toolbarItem;
+
+- (void) selectItem:
+(ConfigWidget *)cw;
+- (void) itemSelected:
+(NSToolbarItem *)toolbarItem;
@end
diff --git a/src/mumble/CustomElements.cpp b/src/mumble/CustomElements.cpp
index d10ead3ca..97e0a4753 100644
--- a/src/mumble/CustomElements.cpp
+++ b/src/mumble/CustomElements.cpp
@@ -89,8 +89,7 @@ bool ChatbarLineEdit::event(QEvent *event) {
if (kev->key() == Qt::Key_Tab) {
emit tabPressed();
return true;
- }
- else if (kev->key() == Qt::Key_Space && kev->modifiers() == Qt::ControlModifier) {
+ } else if (kev->key() == Qt::Key_Space && kev->modifiers() == Qt::ControlModifier) {
emit ctrlSpacePressed();
return true;
}
@@ -104,7 +103,7 @@ unsigned int ChatbarLineEdit::completeAtCursor() {
QList<QString> qlsUsernames;
if (ClientUser::c_qmUsers.empty()) return id;
- foreach (ClientUser *usr, ClientUser::c_qmUsers) {
+ foreach(ClientUser *usr, ClientUser::c_qmUsers) {
qlsUsernames.append(usr->qsName);
}
qSort(qlsUsernames);
@@ -115,8 +114,7 @@ unsigned int ChatbarLineEdit::completeAtCursor() {
if (newtext.isEmpty()) {
target = qlsUsernames.first();
newtext = target;
- }
- else {
+ } else {
// Get the word before the cursor
bool bBaseIsName = false;
int iend = cursorPosition();
@@ -126,15 +124,14 @@ unsigned int ChatbarLineEdit::completeAtCursor() {
if (qlsUsernames.last() == base) {
bBaseIsName = true;
target = qlsUsernames.first();
- }
- else {
+ } else {
if (qlsUsernames.contains(base)) {
// Prevent to complete to what's already there
while (qlsUsernames.takeFirst() != base) {}
bBaseIsName = true;
}
- foreach (QString name, qlsUsernames) {
+ foreach(QString name, qlsUsernames) {
if (name.startsWith(base, Qt::CaseInsensitive)) {
target = name;
break;
@@ -153,7 +150,7 @@ unsigned int ChatbarLineEdit::completeAtCursor() {
}
if (!target.isEmpty()) {
- foreach (ClientUser *usr, ClientUser::c_qmUsers) {
+ foreach(ClientUser *usr, ClientUser::c_qmUsers) {
if (usr->qsName == target) {
id = usr->uiSession;
break;
diff --git a/src/mumble/MainWindow.cpp b/src/mumble/MainWindow.cpp
index 0f7dfa604..5fb38aff8 100644
--- a/src/mumble/MainWindow.cpp
+++ b/src/mumble/MainWindow.cpp
@@ -1135,7 +1135,7 @@ void MainWindow::on_qaChannelAdd_triggered() {
}
aclEdit = new ACLEditor(c ? c->iId : 0, this);
- if (c && ! (c->uiPermissions & ChanACL::MakeChannel))
+ if (c && !(c->uiPermissions & ChanACL::MakeChannel))
aclEdit->qcbChannelTemporary->setChecked(true);
aclEdit->show();
@@ -1250,40 +1250,40 @@ void MainWindow::updateMenuPermissions() {
ClientUser *user = ClientUser::get(g.uiSession);
Channel *homec = user ? user->cChannel : NULL;
ChanACL::Permissions homep = static_cast<ChanACL::Permissions>(homec ? homec->uiPermissions : ChanACL::Cached);
-
- if (! (p & ChanACL::Cached)) {
- MumbleProto::PermissionQuery mppq;
- mppq.set_channel_id(c->iId);
- g.sh->sendMessage(mppq);
- if (c->iId == 0)
- p = g.pPermissions;
- else
- p = ChanACL::All;
+
+ if (!(p & ChanACL::Cached)) {
+ MumbleProto::PermissionQuery mppq;
+ mppq.set_channel_id(c->iId);
+ g.sh->sendMessage(mppq);
+ if (c->iId == 0)
+ p = g.pPermissions;
+ else
+ p = ChanACL::All;
}
- if (! (homep & ChanACL::Cached)) {
- MumbleProto::PermissionQuery mppq;
- mppq.set_channel_id(homec->iId);
- g.sh->sendMessage(mppq);
- if (homec->iId == 0)
- homep = g.pPermissions;
- else
- homep = ChanACL::All;
+ if (!(homep & ChanACL::Cached)) {
+ MumbleProto::PermissionQuery mppq;
+ mppq.set_channel_id(homec->iId);
+ g.sh->sendMessage(mppq);
+ if (homec->iId == 0)
+ homep = g.pPermissions;
+ else
+ homep = ChanACL::All;
}
-
+
qaUserMute->setEnabled(p & (ChanACL::Write | ChanACL::MuteDeafen));
qaUserDeaf->setEnabled(p & (ChanACL::Write | ChanACL::MuteDeafen));
qaUserTextMessage->setEnabled(p & (ChanACL::Write | ChanACL::TextMessage));
-
+
qaChannelAdd->setEnabled(p & (ChanACL::Write | ChanACL::MakeChannel | ChanACL::MakeTempChannel));
qaChannelRemove->setEnabled(p & ChanACL::Write);
qaChannelACL->setEnabled(p & ChanACL::Write);
-
+
bool canlink = (p & (ChanACL::Write | ChanACL::LinkChannel)) && (homep & (ChanACL::Write | ChanACL::LinkChannel));
qaChannelLink->setEnabled(canlink);
qaChannelUnlink->setEnabled(canlink);
qaChannelUnlinkAll->setEnabled(canlink);
-
+
qaChannelSendMessage->setEnabled(p & (ChanACL::Write | ChanACL::TextMessage));
}
diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp
index 153636844..4f658a339 100644
--- a/src/murmur/Messages.cpp
+++ b/src/murmur/Messages.cpp
@@ -1278,10 +1278,10 @@ void Server::msgVoiceTarget(ServerUser *uSource, MumbleProto::VoiceTarget &msg)
void Server::msgPermissionQuery(ServerUser *uSource, MumbleProto::PermissionQuery &msg) {
MSG_SETUP(ServerUser::Authenticated);
-
+
Channel *c = qhChannels.value(msg.channel_id());
if (!c)
return;
-
+
sendClientPermission(uSource, c, true);
}
diff --git a/src/murmur/Server.cpp b/src/murmur/Server.cpp
index 776cd2670..a37ea8122 100644
--- a/src/murmur/Server.cpp
+++ b/src/murmur/Server.cpp
@@ -1305,7 +1305,7 @@ void Server::userEnterChannel(User *p, Channel *c, bool quiet, bool ignoretemp)
if (old && old->bTemporary && old->qlUsers.isEmpty() && ! ignoretemp) {
QCoreApplication::instance()->postEvent(this, new ExecEvent(boost::bind(&Server::removeChannel, this, old->iId)));
}
-
+
sendClientPermission(static_cast<ServerUser *>(p), c);
}
@@ -1316,7 +1316,7 @@ bool Server::hasPermission(ServerUser *p, Channel *c, QFlags<ChanACL::Perm> perm
void Server::sendClientPermission(ServerUser *u, Channel *c, bool forceupdate) {
unsigned int perm;
-
+
if (u->iId == 0)
return;
@@ -1351,7 +1351,7 @@ void Server::sendClientPermission(ServerUser *u, Channel *c, bool forceupdate) {
void Server::flushClientPermissionCache(ServerUser *u, MumbleProto::PermissionQuery &mppq) {
QMap<int, unsigned int>::const_iterator i;
bool match = (u->qmPermissionSent.count() < 20);
- for(i = u->qmPermissionSent.constBegin(); (match && (i != u->qmPermissionSent.constEnd())); ++i) {
+ for (i = u->qmPermissionSent.constBegin(); (match && (i != u->qmPermissionSent.constEnd())); ++i) {
Channel *c = qhChannels.value(i.key());
if (! c) {
match = false;
@@ -1362,22 +1362,22 @@ void Server::flushClientPermissionCache(ServerUser *u, MumbleProto::PermissionQu
match = false;
}
}
-
+
if (match)
return;
u->qmPermissionSent.clear();
-
+
Channel *c = qhChannels.value(u->iLastPermissionCheck);
if (! c) {
c = u->cChannel;
u->iLastPermissionCheck = c->iId;
}
-
+
ChanACL::hasPermission(u, c, ChanACL::Enter, acCache);
unsigned int perm = acCache.value(u)->value(c);
u->qmPermissionSent.insert(c->iId, perm);
-
+
mppq.Clear();
mppq.set_channel_id(c->iId);
mppq.set_permissions(perm);
diff --git a/src/murmur/Server.h b/src/murmur/Server.h
index 90ea9227d..cfa14325f 100644
--- a/src/murmur/Server.h
+++ b/src/murmur/Server.h
@@ -153,7 +153,7 @@ class ServerUser : public Connection, public User {
typedef QPair<QSet<ServerUser *>, QSet<ServerUser *> > TargetCache;
QMap<int, TargetCache> qmTargetCache;
QMap<QString, QString> qmWhisperRedirect;
-
+
int iLastPermissionCheck;
QMap<int, unsigned int> qmPermissionSent;
#ifdef Q_OS_UNIX