Skip to content

Commit

Permalink
common: time-entry: Fix changing time clicking the buttons
Browse files Browse the repository at this point in the history
The change-value signal was not handled when emitted.  Add a handler
to handle the signal and update time as needed.
  • Loading branch information
pksadiq authored and GeorgesStavracas committed Jan 27, 2022
1 parent 25b71f6 commit 9dfaca3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions panels/common/cc-time-entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,19 @@ change_value_cb (GtkWidget *widget,
return GDK_EVENT_STOP;
}

static void
value_changed_cb (CcTimeEntry *self,
GtkScrollType type)
{
g_autoptr(GVariant) value;

g_assert (CC_IS_TIME_ENTRY (self));

value = g_variant_new_int32 (type);

change_value_cb (GTK_WIDGET (self), value, NULL);
}

static void
on_text_cut_clipboard_cb (GtkText *text,
CcTimeEntry *self)
Expand Down Expand Up @@ -525,6 +538,8 @@ cc_time_entry_init (CcTimeEntry *self)
"signal::paste-clipboard", on_text_paste_clipboard_cb, self,
"signal::toggle-overwrite", on_text_toggle_overwrite_cb, self,
NULL);
g_signal_connect (self, "change-value",
G_CALLBACK (value_changed_cb), self);
}

GtkWidget *
Expand Down

0 comments on commit 9dfaca3

Please sign in to comment.