File tree Expand file tree Collapse file tree
files/usr/share/cinnamon/applets/calendar@cinnamon.org Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -266,6 +266,9 @@ class CinnamonCalendarApplet extends Applet.TextApplet {
266266 label_string = this . clock . get_clock_for_format ( this . custom_format ) ;
267267 }
268268
269+ if ( label_string )
270+ this . set_applet_label ( label_string ) ;
271+
269272 this . go_home_button . reactive = ! this . _calendar . todaySelected ( ) ;
270273 if ( this . _calendar . todaySelected ( ) ) {
271274 this . go_home_button . reactive = false ;
@@ -275,12 +278,11 @@ class CinnamonCalendarApplet extends Applet.TextApplet {
275278 this . go_home_button . set_style_class_name ( "calendar-today-home-button-enabled" ) ;
276279 }
277280
278- this . set_applet_label ( label_string ) ;
279-
280281 let dateFormattedTooltip = this . clock . get_clock_for_format ( DATE_FORMAT_FULL ) . capitalize ( ) ;
281282 if ( this . use_custom_format ) {
282- dateFormattedTooltip = this . clock . get_clock_for_format ( this . custom_tooltip_format ) . capitalize ( ) ;
283- if ( ! dateFormattedTooltip ) {
283+ try {
284+ dateFormattedTooltip = this . clock . get_clock_for_format ( this . custom_tooltip_format ) . capitalize ( ) ;
285+ } catch ( e ) {
284286 global . logError ( "Calendar applet: bad tooltip time format string - check your string." ) ;
285287 dateFormattedTooltip = this . clock . get_clock_for_format ( "~CLOCK FORMAT ERROR~ %l:%M %p" ) ;
286288 }
You can’t perform that action at this time.
0 commit comments