[gtk+/wip/matthiasc/kill-event-signals: 19/58] Drop gtk_true and gtk_false



commit 26cbfde07c9b0d97ba2bcd9bddd2b8a75212a0bd
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Dec 31 12:49:53 2017 -0500

    Drop gtk_true and gtk_false
    
    These functions are entirely trivial, their documentation
    is much longer than their implementation, and it contains
    an example that is annotated as "don't do this"...

 docs/reference/gtk/gtk4-sections.txt |    4 --
 gtk/gtkmain.c                        |   67 ----------------------------------
 gtk/gtkmain.h                        |    5 ---
 3 files changed, 0 insertions(+), 76 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 6550e54..b258bdd 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4852,10 +4852,6 @@ GtkModuleInitFunc
 GtkModuleDisplayInitFunc
 
 <SUBSECTION>
-gtk_true
-gtk_false
-
-<SUBSECTION>
 gtk_grab_add
 gtk_grab_get_current
 gtk_grab_remove
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 146499d..52c923c 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1907,73 +1907,6 @@ gtk_main_do_event (GdkEvent *event)
     g_object_unref (rewritten_event);
 }
 
-/**
- * gtk_true:
- *
- * All this function does it to return %TRUE.
- *
- * This can be useful for example if you want to inhibit the deletion
- * of a window. Of course you should not do this as the user expects
- * a reaction from clicking the close icon of the window...
- *
- * ## A persistent window
- *
- * |[<!-- language="C" -->
- * #include <gtk/gtk.h>
- *
- * int
- * main (int argc, char **argv)
- * {
- *   GtkWidget *win, *but;
- *   const char *text = "Close yourself. I mean it!";
- *
- *   gtk_init (&argc, &argv);
- *
- *   win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- *   g_signal_connect (win,
- *                     "delete-event",
- *                     G_CALLBACK (gtk_true),
- *                     NULL);
- *   g_signal_connect (win, "destroy",
- *                     G_CALLBACK (gtk_main_quit),
- *                     NULL);
- *
- *   but = gtk_button_new_with_label (text);
- *   g_signal_connect_swapped (but, "clicked",
- *                             G_CALLBACK (gtk_object_destroy),
- *                             win);
- *   gtk_container_add (GTK_CONTAINER (win), but);
- *
- *   gtk_widget_show (win);
- *
- *   gtk_main ();
- *
- *   return 0;
- * }
- * ]|
- *
- * Returns: %TRUE
- */
-gboolean
-gtk_true (void)
-{
-  return TRUE;
-}
-
-/**
- * gtk_false:
- *
- * Analogical to gtk_true(), this function does nothing
- * but always returns %FALSE.
- *
- * Returns: %FALSE
- */
-gboolean
-gtk_false (void)
-{
-  return FALSE;
-}
-
 static GtkWindowGroup *
 gtk_main_get_window_group (GtkWidget *widget)
 {
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index 726b146..2a16119 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -120,11 +120,6 @@ GDK_AVAILABLE_IN_ALL
 gboolean   gtk_main_iteration_do   (gboolean            blocking);
 
 GDK_AVAILABLE_IN_ALL
-gboolean   gtk_true                (void) G_GNUC_CONST;
-GDK_AVAILABLE_IN_ALL
-gboolean   gtk_false               (void) G_GNUC_CONST;
-
-GDK_AVAILABLE_IN_ALL
 void       gtk_grab_add            (GtkWidget          *widget);
 GDK_AVAILABLE_IN_ALL
 GtkWidget* gtk_grab_get_current    (void);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]