[gspell] TextView: fix populate-popup param type: GtkMenu -> GtkWidget



commit 3392664c0bf26b54eab1f784eb72e4575646088a
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Nov 26 12:43:50 2016 +0100

    TextView: fix populate-popup param type: GtkMenu -> GtkWidget
    
    In the past, the parameter was a GtkMenu but during GTK+ 3, the
    parameter has changed to a GtkWidget, for touch support.

 gspell/gspell-text-view.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gspell/gspell-text-view.c b/gspell/gspell-text-view.c
index 2eb05d7..be43af2 100644
--- a/gspell/gspell-text-view.c
+++ b/gspell/gspell-text-view.c
@@ -240,14 +240,22 @@ get_language_menu (GspellTextView *gspell_view)
 
 static void
 populate_popup_cb (GtkTextView    *gtk_view,
-                  GtkMenu        *menu,
+                  GtkWidget      *popup,
                   GspellTextView *gspell_view)
 {
        GspellTextViewPrivate *priv;
+       GtkMenu *menu;
        GtkWidget *menu_item;
 
        priv = gspell_text_view_get_instance_private (gspell_view);
 
+       if (!GTK_IS_MENU (popup))
+       {
+               return;
+       }
+
+       menu = GTK_MENU (popup);
+
        if (!priv->enable_language_menu &&
            priv->inline_checker == NULL)
        {


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