From 6d1de6e7ddd73d33d52e1f1f907254683fc15cf5 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 22 Oct 2025 16:05:47 +0600 Subject: [PATCH] Fixed quota manual input limits --- source/ubl-settings-resourcequota.c | 6 ++++++ source/ubl-settings-resourcequota.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/ubl-settings-resourcequota.c b/source/ubl-settings-resourcequota.c index 3e883f1..34efe8d 100644 --- a/source/ubl-settings-resourcequota.c +++ b/source/ubl-settings-resourcequota.c @@ -53,6 +53,11 @@ void on_device_limits_update(GtkWidget *, quota_window *window){ } } +gboolean yon_manual_string_finish(GtkWidget *, GdkEvent *,quota_window *window){ + on_quota_configuration_update(NULL,window); + return 0; +} + void on_quota_configuration_update(GtkWidget *, quota_window *window){ char *output_line = NULL; long sft = (long)gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->SoftRestrictionSpin)); @@ -962,6 +967,7 @@ quota_window *yon_quota_window_new(){ g_signal_connect(G_OBJECT(window->DeviceLimitWriteCheck),"toggled",G_CALLBACK(on_quota_configuration_update),window); g_signal_connect(G_OBJECT(window->TargetTypeCombo),"changed",G_CALLBACK(on_quota_target_type_changed),window); g_signal_connect(G_OBJECT(window->ManualInputEntry),"changed",G_CALLBACK(on_manual_edit),window); + g_signal_connect(G_OBJECT(window->ManualInputEntry),"focus-out-event",G_CALLBACK(yon_manual_string_finish),window); yon_get_devices(window); window->devices=window->devices->first; diff --git a/source/ubl-settings-resourcequota.h b/source/ubl-settings-resourcequota.h index 9b6f8ad..a476cb8 100644 --- a/source/ubl-settings-resourcequota.h +++ b/source/ubl-settings-resourcequota.h @@ -227,4 +227,5 @@ void yon_widget_set_sensitive(GtkComboBox *toggle, GtkWidget *target); void on_device_set(GtkWidget *self, quota_window *window); quota_window *yon_quota_window_new(); void yon_quota_update(quota_window *window); -void on_manual_edit(GtkWidget *, quota_window *window); \ No newline at end of file +void on_manual_edit(GtkWidget *, quota_window *window); +gboolean yon_manual_string_finish(GtkWidget *, GdkEvent *,quota_window *window); \ No newline at end of file -- 2.35.1