Skip to content

Commit

Permalink
Option to show channel topic in channel list
Browse files Browse the repository at this point in the history
  • Loading branch information
CoBC committed Feb 29, 2024
1 parent d3ddffb commit 99ad8b5
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Version 5.16, unreleased
Default Qt Client
- Option to show server's message of the day in a welcome dialog box
- Option to show channel topic in channel list
- Fixed "Gender" property not being saved in .tt files
Android Client
-
Expand Down
2 changes: 2 additions & 0 deletions Client/qtTeamTalk/channelstree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,8 @@ void ChannelsTree::updateChannelItem(QTreeWidgetItem* item)
channame += " - 👻";
if (emoji && chan.bPassword)
channame += " - 🔒";
if (ttSettings->value(SETTINGS_DISPLAY_CHANNEL_TOPIC, SETTINGS_DISPLAY_CHANNEL_TOPIC_DEFAULT).toBool() == true && _Q(chan.szTopic).size())
channame += ": " + _Q(chan.szTopic);
item->setData(COLUMN_ITEM, Qt::DisplayRole, channame);
if (anim)
item->setData(COLUMN_ITEM, Qt::DecorationRole, getChannelIcon(chan, item));
Expand Down
14 changes: 14 additions & 0 deletions Client/qtTeamTalk/preferences.ui
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chanTopicChkBox">
<property name="text">
<string>Show channel topic in channel list</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="startServerListChkBox">
<property name="text">
Expand Down Expand Up @@ -2380,6 +2387,13 @@
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QCheckBox" name="ttsLogServernameChkBox">
<property name="text">
<string>Announce server name for user logs in/out events</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
Expand Down
2 changes: 2 additions & 0 deletions Client/qtTeamTalk/preferencesdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ void PreferencesDlg::slotTabChange(int index)
ui.closeFileDlgChkBox->setChecked(ttSettings->value(SETTINGS_DISPLAY_CLOSE_FILEDIALOG, SETTINGS_DISPLAY_CLOSE_FILEDIALOG_DEFAULT).toBool());
ui.dlgExcludeChkBox->setChecked(ttSettings->value(SETTINGS_DISPLAY_CHANEXCLUDE_DLG, SETTINGS_DISPLAY_CHANEXCLUDE_DLG_DEFAULT).toBool());
ui.dlgMOTDChkBox->setChecked(ttSettings->value(SETTINGS_DISPLAY_MOTD_DLG, SETTINGS_DISPLAY_MOTD_DLG_DEFAULT).toBool());
ui.chanTopicChkBox->setChecked(ttSettings->value(SETTINGS_DISPLAY_CHANNEL_TOPIC, SETTINGS_DISPLAY_CHANNEL_TOPIC_DEFAULT).toBool());
ui.startServerListChkBox->setVisible(!ttSettings->value(SETTINGS_CONNECTION_AUTOCONNECT, SETTINGS_CONNECTION_AUTOCONNECT_DEFAULT).toBool());
ui.startServerListChkBox->setChecked(ttSettings->value(SETTINGS_DISPLAY_START_SERVERLIST, SETTINGS_DISPLAY_START_SERVERLIST_DEFAULT).toBool());
}
Expand Down Expand Up @@ -878,6 +879,7 @@ void PreferencesDlg::slotSaveChanges()
ttSettings->setValue(SETTINGS_DISPLAY_CLOSE_FILEDIALOG, ui.closeFileDlgChkBox->isChecked());
ttSettings->setValue(SETTINGS_DISPLAY_CHANEXCLUDE_DLG, ui.dlgExcludeChkBox->isChecked());
ttSettings->setValue(SETTINGS_DISPLAY_MOTD_DLG, ui.dlgMOTDChkBox->isChecked());
ttSettings->setValue(SETTINGS_DISPLAY_CHANNEL_TOPIC, ui.chanTopicChkBox->isChecked());
ttSettings->setValue(SETTINGS_DISPLAY_START_SERVERLIST, ui.startServerListChkBox->isChecked());
}
if(m_modtab.find(CONNECTION_TAB) != m_modtab.end())
Expand Down
2 changes: 2 additions & 0 deletions Client/qtTeamTalk/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
#define SETTINGS_DISPLAY_CHANEXCLUDE_DLG_DEFAULT false
#define SETTINGS_DISPLAY_MOTD_DLG "display/MOTD-dlg"
#define SETTINGS_DISPLAY_MOTD_DLG_DEFAULT false
#define SETTINGS_DISPLAY_CHANNEL_TOPIC "display/channel-topic"
#define SETTINGS_DISPLAY_CHANNEL_TOPIC_DEFAULT false
#define SETTINGS_DISPLAY_START_SERVERLIST "display/serverlist-on-start"
#define SETTINGS_DISPLAY_START_SERVERLIST_DEFAULT false
#define SETTINGS_DISPLAY_CHANNELSORT "display/sort-channels"
Expand Down

0 comments on commit 99ad8b5

Please sign in to comment.