event-editor/time-selector: Port to GTK4

This commit is contained in:
Georges Basile Stavracas Neto
2022-02-11 09:18:38 -03:00
parent b5dc363a3b
commit e390706e44
2 changed files with 2 additions and 8 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ on_output (GtkWidget *widget,
adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget)); adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
value = (gint) gtk_adjustment_get_value (adjustment); value = (gint) gtk_adjustment_get_value (adjustment);
text = g_strdup_printf ("%02d", value); text = g_strdup_printf ("%02d", value);
gtk_entry_set_text (GTK_ENTRY (widget), text); gtk_editable_set_text (GTK_EDITABLE (widget), text);
g_free (text); g_free (text);
+1 -7
View File
@@ -6,10 +6,7 @@
<!-- Hour --> <!-- Hour -->
<child> <child>
<object class="GtkSpinButton" id="hour_spin"> <object class="GtkSpinButton" id="hour_spin">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="xalign">0.5</property> <property name="xalign">0.5</property>
<property name="input_purpose">number</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="adjustment">hour_adjustment</property> <property name="adjustment">hour_adjustment</property>
<signal name="output" handler="on_output" object="GcalTimeSelector" swapped="no"/> <signal name="output" handler="on_output" object="GcalTimeSelector" swapped="no"/>
@@ -18,7 +15,6 @@
<child> <child>
<object class="GtkLabel" id="label1"> <object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="label" translatable="yes">:</property> <property name="label" translatable="yes">:</property>
</object> </object>
</child> </child>
@@ -26,10 +22,7 @@
<!-- Minute --> <!-- Minute -->
<child> <child>
<object class="GtkSpinButton" id="minute_spin"> <object class="GtkSpinButton" id="minute_spin">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="xalign">0.5</property> <property name="xalign">0.5</property>
<property name="input_purpose">number</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="adjustment">minute_adjustment</property> <property name="adjustment">minute_adjustment</property>
<signal name="output" handler="on_output" object="GcalTimeSelector" swapped="no"/> <signal name="output" handler="on_output" object="GcalTimeSelector" swapped="no"/>
@@ -40,6 +33,7 @@
<!-- AM/PM --> <!-- AM/PM -->
<child> <child>
<object class="GtkComboBoxText" id="period_combo"> <object class="GtkComboBoxText" id="period_combo">
<property name="visible">False</property>
<property name="valign">center</property> <property name="valign">center</property>
<property name="active">0</property> <property name="active">0</property>
<signal name="changed" handler="update_time" object="GcalTimeSelector" swapped="yes"/> <signal name="changed" handler="update_time" object="GcalTimeSelector" swapped="yes"/>