2121
2222public class Widgets.ScheduleButton : Gtk .Grid {
2323 public bool is_board { get ; construct; }
24+ public string label { get ; construct; }
2425
2526 private Gtk . Label due_label;
2627
@@ -61,18 +62,20 @@ public class Widgets.ScheduleButton : Gtk.Grid {
6162
6263 public signal void date_changed (GLib .DateTime ? date );
6364
64- public ScheduleButton () {
65+ public ScheduleButton (string label = _ (" Schedule ") ) {
6566 Object (
6667 is_board: false ,
6768 valign: Gtk . Align . CENTER ,
68- tooltip_text: _(" Schedule" )
69+ tooltip_text: label,
70+ label: label
6971 );
7072 }
7173
72- public ScheduleButton.for_board () {
74+ public ScheduleButton.for_board (string label = _ (" Schedule ") ) {
7375 Object (
7476 is_board: true ,
75- tooltip_text: _(" Schedule" )
77+ tooltip_text: label,
78+ label: label
7679 );
7780 }
7881
@@ -90,7 +93,7 @@ public class Widgets.ScheduleButton : Gtk.Grid {
9093 due_image = new Gtk .Image ();
9194 due_image. icon_name = " month-symbolic" ;
9295
93- due_label = new Gtk .Label (_( " Schedule " ) ) {
96+ due_label = new Gtk .Label (label ) {
9497 xalign = 0 ,
9598 use_markup = true ,
9699 ellipsize = Pango . EllipsizeMode . END
@@ -146,7 +149,7 @@ public class Widgets.ScheduleButton : Gtk.Grid {
146149 private void build_card_ui () {
147150 due_image = new Gtk .Image .from_icon_name (" month-symbolic" );
148151
149- var title_label = new Gtk .Label (_( " Schedule " ) ) {
152+ var title_label = new Gtk .Label (label ) {
150153 halign = START ,
151154 css_classes = { " title-4" , " caption" }
152155 };
@@ -198,11 +201,11 @@ public class Widgets.ScheduleButton : Gtk.Grid {
198201 public void update_from_item (Objects .Item item ) {
199202 if (is_board) {
200203 due_label. label = _(" Set a Due Date" );
201- tooltip_text = _( " Schedule " ) ;
204+ tooltip_text = label ;
202205 due_image. icon_name = " month-symbolic" ;
203206 } else {
204- due_label. label = _( " Schedule " ) ;
205- tooltip_text = _( " Schedule " ) ;
207+ due_label. label = label ;
208+ tooltip_text = label ;
206209 due_image. icon_name = " month-symbolic" ;
207210 }
208211
@@ -261,8 +264,8 @@ public class Widgets.ScheduleButton : Gtk.Grid {
261264 }
262265
263266 public void reset () {
264- due_label. label = _( " Schedule " ) ;
265- tooltip_text = _( " Schedule " ) ;
267+ due_label. label = label ;
268+ tooltip_text = label ;
266269 due_image. icon_name = " month-symbolic" ;
267270 datetime = null ;
268271 datetime_picker. reset ();
0 commit comments