Mail: show icons only setting works again.
* It will show the label as tool tip when the labels are hidden.
This commit is contained in:
@@ -46,6 +46,7 @@ of their respective holders. All rights reserved.
|
|||||||
#include <AppFileInfo.h>
|
#include <AppFileInfo.h>
|
||||||
#include <Autolock.h>
|
#include <Autolock.h>
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
|
#include <Button.h>
|
||||||
#include <CharacterSet.h>
|
#include <CharacterSet.h>
|
||||||
#include <CharacterSetRoster.h>
|
#include <CharacterSetRoster.h>
|
||||||
#include <Clipboard.h>
|
#include <Clipboard.h>
|
||||||
@@ -90,6 +91,7 @@ of their respective holders. All rights reserved.
|
|||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
#include "QueryMenu.h"
|
#include "QueryMenu.h"
|
||||||
#include "Signature.h"
|
#include "Signature.h"
|
||||||
|
#include "Settings.h"
|
||||||
#include "Status.h"
|
#include "Status.h"
|
||||||
#include "String.h"
|
#include "String.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
@@ -720,6 +722,22 @@ TMailWindow::UpdateViews()
|
|||||||
if (showToolBar) {
|
if (showToolBar) {
|
||||||
if (fToolBar->IsHidden())
|
if (fToolBar->IsHidden())
|
||||||
fToolBar->Show();
|
fToolBar->Show();
|
||||||
|
|
||||||
|
bool showLabel = showToolBar == kShowToolBar;
|
||||||
|
_UpdateLabel(M_NEW, B_TRANSLATE("New"), showLabel);
|
||||||
|
_UpdateLabel(M_SEND_NOW, B_TRANSLATE("Send"), showLabel);
|
||||||
|
_UpdateLabel(M_SIG_MENU, B_TRANSLATE("Signature"), showLabel);
|
||||||
|
_UpdateLabel(M_SAVE_AS_DRAFT, B_TRANSLATE("Save"), showLabel);
|
||||||
|
_UpdateLabel(M_PRINT, B_TRANSLATE("Print"), showLabel);
|
||||||
|
_UpdateLabel(M_DELETE, B_TRANSLATE("Trash"), showLabel);
|
||||||
|
_UpdateLabel(M_REPLY, B_TRANSLATE("Reply"), showLabel);
|
||||||
|
_UpdateLabel(M_FORWARD, B_TRANSLATE("Forward"), showLabel);
|
||||||
|
_UpdateLabel(M_DELETE_NEXT, B_TRANSLATE("Trash"), showLabel);
|
||||||
|
_UpdateLabel(M_SPAM_BUTTON, B_TRANSLATE("Spam"), showLabel);
|
||||||
|
_UpdateLabel(M_NEXTMSG, B_TRANSLATE("Next"), showLabel);
|
||||||
|
_UpdateLabel(M_UNREAD, B_TRANSLATE("Unread"), showLabel);
|
||||||
|
_UpdateLabel(M_READ, B_TRANSLATE(" Read "), showLabel);
|
||||||
|
_UpdateLabel(M_PREVMSG, B_TRANSLATE("Previous"), showLabel);
|
||||||
} else if (!fToolBar->IsHidden())
|
} else if (!fToolBar->IsHidden())
|
||||||
fToolBar->Hide();
|
fToolBar->Hide();
|
||||||
}
|
}
|
||||||
@@ -3187,6 +3205,17 @@ TMailWindow::_UpdateReadButton()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TMailWindow::_UpdateLabel(uint32 command, const char* label, bool show)
|
||||||
|
{
|
||||||
|
BButton* button = fToolBar->FindButton(command);
|
||||||
|
if (button != NULL) {
|
||||||
|
button->SetLabel(show ? label : NULL);
|
||||||
|
button->SetToolTip(show ? NULL : label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TMailWindow::_SetDownloading(bool downloading)
|
TMailWindow::_SetDownloading(bool downloading)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -130,6 +130,8 @@ private:
|
|||||||
|
|
||||||
void _AddReadButton();
|
void _AddReadButton();
|
||||||
void _UpdateReadButton();
|
void _UpdateReadButton();
|
||||||
|
void _UpdateLabel(uint32 command, const char* label,
|
||||||
|
bool show);
|
||||||
|
|
||||||
void _SetDownloading(bool downloading);
|
void _SetDownloading(bool downloading);
|
||||||
uint32 _CurrentCharacterSet() const;
|
uint32 _CurrentCharacterSet() const;
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ using namespace BPrivate;
|
|||||||
#include "MailSupport.h"
|
#include "MailSupport.h"
|
||||||
#include "MailWindow.h"
|
#include "MailWindow.h"
|
||||||
#include "Messages.h"
|
#include "Messages.h"
|
||||||
|
#include "Settings.h"
|
||||||
#include "Signature.h"
|
#include "Signature.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -902,20 +903,20 @@ TPrefsWindow::_BuildButtonBarMenu(uint8 show)
|
|||||||
BPopUpMenu* menu = new BPopUpMenu("");
|
BPopUpMenu* menu = new BPopUpMenu("");
|
||||||
|
|
||||||
msg = new BMessage(P_BUTTON_BAR);
|
msg = new BMessage(P_BUTTON_BAR);
|
||||||
msg->AddInt8("bar", 1);
|
msg->AddInt8("bar", kShowToolBar);
|
||||||
menu->AddItem(item = new BMenuItem(
|
menu->AddItem(item = new BMenuItem(
|
||||||
B_TRANSLATE("Show icons & labels"), msg));
|
B_TRANSLATE("Show icons & labels"), msg));
|
||||||
if (show & 1)
|
if (show & 1)
|
||||||
item->SetMarked(true);
|
item->SetMarked(true);
|
||||||
|
|
||||||
msg = new BMessage(P_BUTTON_BAR);
|
msg = new BMessage(P_BUTTON_BAR);
|
||||||
msg->AddInt8("bar", 2);
|
msg->AddInt8("bar", kShowToolBarIconsOnly);
|
||||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Show icons only"), msg));
|
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Show icons only"), msg));
|
||||||
if (show & 2)
|
if (show & 2)
|
||||||
item->SetMarked(true);
|
item->SetMarked(true);
|
||||||
|
|
||||||
msg = new BMessage(P_BUTTON_BAR);
|
msg = new BMessage(P_BUTTON_BAR);
|
||||||
msg->AddInt8("bar", 0);
|
msg->AddInt8("bar", kHideToolBar);
|
||||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Hide"), msg));
|
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Hide"), msg));
|
||||||
if (!show)
|
if (!show)
|
||||||
item->SetMarked(true);
|
item->SetMarked(true);
|
||||||
|
|||||||
+12
-24
@@ -70,7 +70,7 @@ Settings::Settings()
|
|||||||
fWrapMode(true),
|
fWrapMode(true),
|
||||||
fAttachAttributes(true),
|
fAttachAttributes(true),
|
||||||
fColoredQuotes(true),
|
fColoredQuotes(true),
|
||||||
fShowButtonBar(true),
|
fShowButtonBar(kShowToolBar),
|
||||||
fWarnAboutUnencodableCharacters(true),
|
fWarnAboutUnencodableCharacters(true),
|
||||||
fStartWithSpellCheckOn(false),
|
fStartWithSpellCheckOn(false),
|
||||||
fShowSpamGUI(true),
|
fShowSpamGUI(true),
|
||||||
@@ -279,17 +279,12 @@ Settings::LoadSettings()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool boolValue;
|
fWrapMode = settings.GetBool("WordWrapMode", fWrapMode);
|
||||||
if (settings.FindBool("WordWrapMode", &boolValue) == B_OK)
|
fAutoMarkRead = settings.GetBool("AutoMarkRead", fAutoMarkRead);
|
||||||
fWrapMode = boolValue;
|
|
||||||
|
|
||||||
if (settings.FindBool("AutoMarkRead", &boolValue) == B_OK)
|
|
||||||
fAutoMarkRead = boolValue;
|
|
||||||
|
|
||||||
BString string;
|
BString string;
|
||||||
if (settings.FindString("SignatureText", &string) == B_OK) {
|
if (settings.FindString("SignatureText", &string) == B_OK)
|
||||||
fSignature = string;
|
fSignature = string;
|
||||||
}
|
|
||||||
|
|
||||||
if (settings.FindInt32("CharacterSet", &int32Value) == B_OK)
|
if (settings.FindInt32("CharacterSet", &int32Value) == B_OK)
|
||||||
fMailCharacterSet = int32Value;
|
fMailCharacterSet = int32Value;
|
||||||
@@ -300,9 +295,7 @@ Settings::LoadSettings()
|
|||||||
fMailCharacterSet = B_MS_WINDOWS_CONVERSION;
|
fMailCharacterSet = B_MS_WINDOWS_CONVERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
int8 int8Value;
|
fShowButtonBar = settings.GetInt8("ShowButtonBar", fShowButtonBar);
|
||||||
if (settings.FindInt8("ShowButtonBar", &int8Value) == B_OK)
|
|
||||||
fShowButtonBar = int8Value;
|
|
||||||
|
|
||||||
if (settings.FindInt32("UseAccountFrom", &int32Value) == B_OK)
|
if (settings.FindInt32("UseAccountFrom", &int32Value) == B_OK)
|
||||||
fUseAccountFrom = int32Value;
|
fUseAccountFrom = int32Value;
|
||||||
@@ -310,21 +303,16 @@ Settings::LoadSettings()
|
|||||||
|| fUseAccountFrom > ACCOUNT_FROM_MAIL)
|
|| fUseAccountFrom > ACCOUNT_FROM_MAIL)
|
||||||
fUseAccountFrom = ACCOUNT_USE_DEFAULT;
|
fUseAccountFrom = ACCOUNT_USE_DEFAULT;
|
||||||
|
|
||||||
if (settings.FindBool("ColoredQuotes", &boolValue) == B_OK)
|
fColoredQuotes = settings.GetBool("ColoredQuotes", fColoredQuotes);
|
||||||
fColoredQuotes = boolValue;
|
|
||||||
|
|
||||||
if (settings.FindString("ReplyPreamble", &string) == B_OK) {
|
if (settings.FindString("ReplyPreamble", &string) == B_OK)
|
||||||
fReplyPreamble = string;
|
fReplyPreamble = string;
|
||||||
}
|
|
||||||
|
|
||||||
if (settings.FindBool("AttachAttributes", &boolValue) == B_OK)
|
fAttachAttributes = settings.GetBool("AttachAttributes", fAttachAttributes);
|
||||||
fAttachAttributes = boolValue;
|
fWarnAboutUnencodableCharacters = settings.GetBool(
|
||||||
|
"WarnAboutUnencodableCharacters", fWarnAboutUnencodableCharacters);
|
||||||
if (settings.FindBool("WarnAboutUnencodableCharacters", &boolValue) == B_OK)
|
fStartWithSpellCheckOn = settings.GetBool("StartWithSpellCheck",
|
||||||
fWarnAboutUnencodableCharacters = boolValue;
|
fStartWithSpellCheckOn);
|
||||||
|
|
||||||
if (settings.FindBool("StartWithSpellCheck", &boolValue) == B_OK)
|
|
||||||
fStartWithSpellCheckOn = boolValue;
|
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ All rights reserved.
|
|||||||
#define ACCOUNT_USE_DEFAULT 0
|
#define ACCOUNT_USE_DEFAULT 0
|
||||||
#define ACCOUNT_FROM_MAIL 1
|
#define ACCOUNT_FROM_MAIL 1
|
||||||
|
|
||||||
|
static const uint8 kHideToolBar = 0;
|
||||||
|
static const uint8 kShowToolBar = 1;
|
||||||
|
static const uint8 kShowToolBarIconsOnly = 2;
|
||||||
|
|
||||||
|
|
||||||
class BMessage;
|
class BMessage;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user