[gtk/wip/otte/listview: 131/152] constraint-editor: Don't poke around in widget internals
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/listview: 131/152] constraint-editor: Don't poke around in widget internals
- Date: Sun, 24 May 2020 18:53:06 +0000 (UTC)
commit e8dbac4d3061156a988ad4c312ac811a5ff202b0
Author: Benjamin Otte <otte redhat com>
Date: Thu Nov 7 18:56:52 2019 +0100
constraint-editor: Don't poke around in widget internals
demos/constraint-editor/guide-editor.c | 56 ----------------------------------
1 file changed, 56 deletions(-)
---
diff --git a/demos/constraint-editor/guide-editor.c b/demos/constraint-editor/guide-editor.c
index 228b9db739..74dfe22f09 100644
--- a/demos/constraint-editor/guide-editor.c
+++ b/demos/constraint-editor/guide-editor.c
@@ -184,58 +184,6 @@ max_input (GtkSpinButton *spin_button,
return FALSE;
}
-static gboolean
-min_output (GtkSpinButton *spin_button)
-{
- GtkAdjustment *adjustment;
- double value;
- GtkWidget *box, *text;
-
- adjustment = gtk_spin_button_get_adjustment (spin_button);
- value = gtk_adjustment_get_value (adjustment);
-
- box = gtk_widget_get_first_child (GTK_WIDGET (spin_button));
- text = gtk_widget_get_first_child (box);
-
- if (value == 0.0)
- {
- gtk_editable_set_text (GTK_EDITABLE (spin_button), "");
- gtk_text_set_placeholder_text (GTK_TEXT (text), "unset");
- return TRUE;
- }
- else
- {
- gtk_text_set_placeholder_text (GTK_TEXT (text), "");
- return FALSE;
- }
-}
-
-static gboolean
-max_output (GtkSpinButton *spin_button)
-{
- GtkAdjustment *adjustment;
- double value;
- GtkWidget *box, *text;
-
- adjustment = gtk_spin_button_get_adjustment (spin_button);
- value = gtk_adjustment_get_value (adjustment);
-
- box = gtk_widget_get_first_child (GTK_WIDGET (spin_button));
- text = gtk_widget_get_first_child (box);
-
- if (value == (double)G_MAXINT)
- {
- gtk_editable_set_text (GTK_EDITABLE (spin_button), "");
- gtk_text_set_placeholder_text (GTK_TEXT (text), "unset");
- return TRUE;
- }
- else
- {
- gtk_text_set_placeholder_text (GTK_TEXT (text), "");
- return FALSE;
- }
-}
-
static void
guide_editor_constructed (GObject *object)
{
@@ -244,16 +192,12 @@ guide_editor_constructed (GObject *object)
guide_strength_combo (editor->strength);
g_signal_connect (editor->min_width, "input", G_CALLBACK (min_input), NULL);
- g_signal_connect (editor->min_width, "output", G_CALLBACK (min_output), NULL);
g_signal_connect (editor->min_height, "input", G_CALLBACK (min_input), NULL);
- g_signal_connect (editor->min_height, "output", G_CALLBACK (min_output), NULL);
g_signal_connect (editor->max_width, "input", G_CALLBACK (max_input), NULL);
- g_signal_connect (editor->max_width, "output", G_CALLBACK (max_output), NULL);
g_signal_connect (editor->max_height, "input", G_CALLBACK (max_input), NULL);
- g_signal_connect (editor->max_height, "output", G_CALLBACK (max_output), NULL);
if (editor->guide)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]