[gtk/matthiasc/for-master: 1/2] Merge branch 'matthiasc/for-master' into 'master'



commit b636df7784aa25890272964bbcc1b307fe7cfc7e
Merge: e75e975a38 ec854fc503
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Apr 4 16:31:43 2020 +0000

    Merge branch 'matthiasc/for-master' into 'master'
    
    shortcuts: documentation fixes
    
    See merge request GNOME/gtk!1628

 demos/gtk-demo/assistant.c           | 17 ++++++----------
 docs/reference/gtk/gtk4-sections.txt | 39 ++++++++++++++++++++++++------------
 gtk/gtkshortcutaction.c              | 19 ++++++++++++++++++
 gtk/gtkshortcuttrigger.c             |  6 +++---
 4 files changed, 54 insertions(+), 27 deletions(-)
---
diff --cc demos/gtk-demo/assistant.c
index 4c878afeb2,4c878afeb2..cf4eee6609
--- a/demos/gtk-demo/assistant.c
+++ b/demos/gtk-demo/assistant.c
@@@ -7,7 -7,7 +7,6 @@@
  
  #include <gtk/gtk.h>
  
--/*static GtkWidget *assistant = NULL;*/
  static GtkWidget *progress_bar = NULL;
  
  static gboolean
@@@ -42,10 -42,10 +41,7 @@@ on_assistant_apply (GtkWidget *widget, 
  static void
  on_assistant_close_cancel (GtkWidget *widget, gpointer data)
  {
--  GtkWidget **assistant = (GtkWidget **) data;
--
--  gtk_widget_destroy (*assistant);
--  *assistant = NULL;
++  gtk_widget_destroy (widget);
  }
  
  static void
@@@ -182,6 -182,6 +178,8 @@@ do_assistant (GtkWidget *do_widget
  
        gtk_window_set_display (GTK_WINDOW (assistant),
                                gtk_widget_get_display (do_widget));
++      g_signal_connect (assistant, "destroy",
++                        G_CALLBACK (gtk_widget_destroyed), &window);
  
        create_page1 (assistant);
        create_page2 (assistant);
@@@ -189,9 -189,9 +187,9 @@@
        create_page4 (assistant);
  
        g_signal_connect (G_OBJECT (assistant), "cancel",
--                        G_CALLBACK (on_assistant_close_cancel), &assistant);
++                        G_CALLBACK (on_assistant_close_cancel), NULL);
        g_signal_connect (G_OBJECT (assistant), "close",
--                        G_CALLBACK (on_assistant_close_cancel), &assistant);
++                        G_CALLBACK (on_assistant_close_cancel), NULL);
        g_signal_connect (G_OBJECT (assistant), "apply",
                          G_CALLBACK (on_assistant_apply), NULL);
        g_signal_connect (G_OBJECT (assistant), "prepare",
@@@ -201,10 -201,10 +199,7 @@@
    if (!gtk_widget_get_visible (assistant))
      gtk_widget_show (assistant);
    else
--    {
--      gtk_widget_destroy (assistant);
--      assistant = NULL;
--    }
++    gtk_widget_destroy (assistant);
  
    return assistant;
  }


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