-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't set tooltip on Gnome. It's not supported and sometimes crashes.…
… (Issue #266)
- Loading branch information
1 parent
b6d9d03
commit cf7c513
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# HG changeset patch | ||
# Parent 126e11fa50b203f38df270c1f708c3596b95ebe5 | ||
Don't set tooltip on Gnome. It's not supported and sometimes crashes. | ||
|
||
diff --git a/mailnews/base/src/nsMessengerUnixIntegration.cpp b/mailnews/base/src/nsMessengerUnixIntegration.cpp | ||
--- a/mailnews/base/src/nsMessengerUnixIntegration.cpp | ||
+++ b/mailnews/base/src/nsMessengerUnixIntegration.cpp | ||
@@ -250,28 +250,33 @@ nsMessengerUnixIntegration::UpdateUnread | ||
sTimeActivated.tv_sec--; | ||
} | ||
|
||
if (unreadCount > 0) { | ||
const nsCString& tooltip = NS_ConvertUTF16toUTF8(unreadTooltip); | ||
// Set both title and tooltip. It appears that some platforms do | ||
// one but not the other. | ||
app_indicator_set_title(ci, tooltip.get()); | ||
- app_indicator_set_tooltip_full(ci, | ||
- NULL /* icon */, tooltip.get() /* title */, NULL /* body */ | ||
- ); | ||
+ if (!desktop.EqualsLiteral("gnome")) { | ||
+ // Gnome has no tooltips and this call crashes under Wayland :-( | ||
+ app_indicator_set_tooltip_full(ci, | ||
+ NULL /* icon */, tooltip.get() /* title */, NULL /* body */ | ||
+ ); | ||
+ } | ||
app_indicator_set_icon_full(ci, icon_pathN, NULL); | ||
app_indicator_set_status(ci, APP_INDICATOR_STATUS_ACTIVE); | ||
} else { | ||
if (mozilla::Preferences::GetBool("mail.biff.show_tray_icon_always", false) || | ||
sHiddenWindows.Length() > 0) { | ||
app_indicator_set_title(ci, "Betterbird"); | ||
- app_indicator_set_tooltip_full(ci, | ||
- NULL /* icon */, "Betterbird" /* title */, NULL /* body */ | ||
- ); | ||
+ if (!desktop.EqualsLiteral("gnome")) { | ||
+ app_indicator_set_tooltip_full(ci, | ||
+ NULL /* icon */, "Betterbird" /* title */, NULL /* body */ | ||
+ ); | ||
+ } | ||
app_indicator_set_icon_full(ci, icon_path0, NULL); | ||
app_indicator_set_status(ci, APP_INDICATOR_STATUS_ACTIVE); | ||
} else { | ||
app_indicator_set_status(ci, APP_INDICATOR_STATUS_PASSIVE); | ||
} | ||
} | ||
|
||
return NS_OK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters