Skip to content

Commit

Permalink
Merge pull request #1422 from golamrabbiazad/master
Browse files Browse the repository at this point in the history
fix: task schedule button issues
  • Loading branch information
alainm23 committed Sep 3, 2024
2 parents 59a426d + 325e86a commit 94dbb44
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions core/Widgets/DateTimePicker/ScheduleButton.vala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public class Widgets.ScheduleButton : Gtk.Grid {
public string label { get; construct; }

private Gtk.Label due_label;

private Gtk.Box schedule_box;
private Gtk.Image due_image;
private Widgets.DateTimePicker.DateTimePicker datetime_picker;
Expand Down Expand Up @@ -121,6 +120,7 @@ public class Widgets.ScheduleButton : Gtk.Grid {
var clear_button = new Gtk.Button.from_icon_name ("window-close") {
css_classes = { "flat" }
};
clear_button.set_tooltip_text ("Clear Schedule");

clear_revealer = new Gtk.Revealer () {
transition_type = Gtk.RevealerTransitionType.CROSSFADE,
Expand Down Expand Up @@ -213,6 +213,7 @@ public class Widgets.ScheduleButton : Gtk.Grid {

due_label.label = Utils.Datetime.get_relative_date_from_date (item.due.datetime);
due_label.tooltip_text = due_label.label;
due_image.tooltip_text = due_label.label;

duedate = item.due;

Expand Down Expand Up @@ -255,10 +256,14 @@ public class Widgets.ScheduleButton : Gtk.Grid {
}

public void reset () {
due_image.icon_name = "month-symbolic";
due_image.tooltip_text = label;
due_label.label = label;
due_label.tooltip_text = label;
tooltip_text = label;
due_image.icon_name = "month-symbolic";
duedate = new Objects.DueDate ();
datetime_picker.reset ();
duedate = new Objects.DueDate ();
duedate.datetime = null;
duedate_changed ();
}
}

0 comments on commit 94dbb44

Please sign in to comment.