Only enable sender prefix option if the core supports the feature
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 21 Dec 2017 12:44:56 +0000 (13:44 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 21 Dec 2017 12:44:56 +0000 (13:44 +0100)
Closes GH-309.

src/qtui/settingspages/chatviewsettingspage.cpp
src/qtui/settingspages/chatviewsettingspage.ui

index 924474c..766bcd4 100644 (file)
@@ -34,10 +34,14 @@ ChatViewSettingsPage::ChatViewSettingsPage(QWidget *parent)
 #endif
 
     // FIXME remove with protocol v11
-    if (!(Client::coreFeatures() & Quassel::SynchronizedMarkerLine)) {
+    if (!Client::coreFeatures().testFlag(Quassel::SynchronizedMarkerLine)) {
         ui.autoMarkerLine->setEnabled(false);
         ui.autoMarkerLine->setChecked(true);
-        ui.autoMarkerLine->setToolTip(tr("You need at least version 0.6 of quasselcore to use this feature"));
+        ui.autoMarkerLine->setToolTip(tr("You need at least version 0.6 of Quassel Core to use this feature"));
+    }
+    if (!Client::coreFeatures().testFlag(Quassel::Feature::CoreSideHighlights)) {
+        ui.showSenderPrefixes->setEnabled(false);
+        ui.showSenderPrefixes->setToolTip(tr("You need at least version 0.13 of Quassel Core to use this feature"));
     }
 
     initAutoWidgets();
index 55fbc08..349d335 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>486</width>
-    <height>230</height>
+    <width>514</width>
+    <height>294</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -98,7 +98,7 @@
       <string>Shows the modes of senders before their name (e.g. @, +)</string>
      </property>
      <property name="text">
-      <string>Show sendermodes in front of nicknames:</string>
+      <string>Show sendermodes in front of nicknames</string>
      </property>
      <property name="checked">
       <bool>true</bool>