connect(ui.displayTopicInTooltip, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged()));
connect(ui.mouseWheelChangesBuffers, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged()));
+ connect(ui.completionSuffix, SIGNAL(textEdited(const QString&)), this, SLOT(widgetHasChanged()));
}
bool GeneralSettingsPage::hasDefaults() const {
ui.displayTopicInTooltip->setChecked(false);
ui.mouseWheelChangesBuffers->setChecked(true);
+ ui.completionSuffix->setText(": ");
+
widgetHasChanged();
}
settings["DisplayTopicInTooltip"] = bufferSettings.value("DisplayTopicInTooltip", QVariant(false));
ui.displayTopicInTooltip->setChecked(settings["DisplayTopicInTooltip"].toBool());
+ // inputline settings
+ settings["CompletionSuffix"] = uiSettings.value("CompletionSuffix", QString(": "));
+ ui.completionSuffix->setText(settings["CompletionSuffix"].toString());
+
setChangedState(false);
}
uiSettings.setValue("AnimateTrayIcon", ui.animateTrayIcon->isChecked());
uiSettings.setValue("DisplayPopupMessages", ui.displayPopupMessages->isChecked());
-
+ uiSettings.setValue("CompletionSuffix", ui.completionSuffix->text());
+
BufferSettings bufferSettings;
bufferSettings.setValue("UserMessagesInStatusBuffer", ui.userMessagesInStatusBuffer->isChecked());
bufferSettings.setValue("UserMessagesInQueryBuffer", ui.userMessagesInQueryBuffer->isChecked());
if(settings["DisplayTopicInTooltip"].toBool() != ui.displayTopicInTooltip->isChecked()) return true;
if(settings["MouseWheelChangesBuffers"].toBool() != ui.mouseWheelChangesBuffers->isChecked()) return true;
+ if(settings["CompletionSuffix"].toString() != ui.completionSuffix->text()) return true;
+
return false;
}
<property name="windowTitle" >
<string>Form</string>
</property>
- <layout class="QVBoxLayout" >
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<widget class="QGroupBox" name="useSystemTrayIcon" >
<property name="title" >
</layout>
</widget>
</item>
+ <item>
+ <widget class="QGroupBox" name="inputLineGroup" >
+ <property name="toolTip" >
+ <string>The suffix appended to a nick on completion via TAB. Default is ": "</string>
+ </property>
+ <property name="title" >
+ <string>Input Line:</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <widget class="QLabel" name="completionSuffixDesc" >
+ <property name="text" >
+ <string>Completion suffix:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="completionSuffix" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>157</width>
+ <height>27</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
#include "network.h"
#include "ircchannel.h"
#include "ircuser.h"
+#include "uisettings.h"
TabCompleter::TabCompleter(InputLine *inputLine_)
: QObject(inputLine_),
}
void TabCompleter::complete() {
+ UiSettings uiSettings;
+ nickSuffix = uiSettings.value("CompletionSuffix", QString(": ")).toString();
+
if(!enabled) {
buildCompletionList();
enabled = true;