[epiphany] Reenable and placate -Wno-incompatible-pointer-types



commit 1111c8a51dd8db345268f4807226eb229b838d53
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sat Nov 7 16:43:22 2015 -0600

    Reenable and placate -Wno-incompatible-pointer-types

 configure.ac                             |    2 +-
 src/bookmarks/ephy-bookmark-properties.c |    2 +-
 src/cookies-dialog.c                     |   13 ++++---
 src/ephy-history-window.c                |   57 +++++++++++++++++-------------
 src/ephy-toolbar.c                       |    2 +-
 src/passwords-dialog.c                   |   43 ++++++++++++----------
 6 files changed, 67 insertions(+), 52 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cf343b2..caf4ea6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,7 @@ AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS], [$ax_is_release], [-Wdeclaratio
        dnl TODO: Remove all of these! These warnings should be fixed, not
        dnl silenced. At least, for the most part. -Wswitch-enum really does
        dnl seem pretty dumb.
-       [-Wno-incompatible-pointer-types -Wno-empty-body -Wno-unused-function -Wno-unused-variable 
-Wno-old-style-definition -Wno-shadow -Wno-format-nonliteral -Wno-deprecated-declarations -Wno-switch-enum 
-Wno-switch-default -Wno-redundant-decls -Wno-discarded-qualifiers -Wno-sign-compare])
+       [-Wno-empty-body -Wno-unused-function -Wno-unused-variable -Wno-old-style-definition -Wno-shadow 
-Wno-format-nonliteral -Wno-deprecated-declarations -Wno-switch-enum -Wno-switch-default -Wno-redundant-decls 
-Wno-discarded-qualifiers -Wno-sign-compare])
 
 AC_PROG_CC
 
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index db9591a..41fc5bd 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -349,7 +349,7 @@ ephy_bookmark_properties_constructor (GType                  type,
        g_signal_connect (properties->topics_scrolled_window, "map", G_CALLBACK (list_mapped_cb), properties);
        g_signal_connect (properties->topics_scrolled_window, "unmap", G_CALLBACK (list_unmapped_cb), 
properties);
 
-       ephy_initial_state_add_expander (properties->topics_expander, "bookmark_properties_list", FALSE);
+       ephy_initial_state_add_expander (GTK_WIDGET (properties->topics_expander), 
"bookmark_properties_list", FALSE);
 
        if (properties->creating)
        {
diff --git a/src/cookies-dialog.c b/src/cookies-dialog.c
index 7f17c25..b185d6b 100644
--- a/src/cookies-dialog.c
+++ b/src/cookies-dialog.c
@@ -105,8 +105,9 @@ cookie_remove (EphyCookiesDialog *dialog,
 static void
 forget (GSimpleAction     *action,
         GVariant          *parameter,
-        EphyCookiesDialog *dialog)
+        gpointer           user_data)
 {
+       EphyCookiesDialog *dialog = EPHY_COOKIES_DIALOG (user_data);
        GList *llist, *rlist = NULL, *l, *r;
        GtkTreeModel *model;
        GtkTreePath *path;
@@ -200,10 +201,10 @@ static void
 update_selection_actions (GActionMap *action_map,
                           gboolean    has_selection)
 {
-       GSimpleAction *forget_action;
+       GAction *forget_action;
 
        forget_action = g_action_map_lookup_action (action_map, "forget");
-       g_simple_action_set_enabled (forget_action, has_selection);
+       g_simple_action_set_enabled (G_SIMPLE_ACTION (forget_action), has_selection);
 }
 
 static void
@@ -229,8 +230,10 @@ on_search_entry_changed (GtkSearchEntry    *entry,
 static void
 forget_all (GSimpleAction     *action,
             GVariant          *parameter,
-            EphyCookiesDialog *dialog)
+            gpointer           user_data)
 {
+       EphyCookiesDialog *dialog = EPHY_COOKIES_DIALOG (user_data);
+
        webkit_cookie_manager_delete_all_cookies (dialog->cookie_manager);
        reload_model (dialog);
 }
@@ -445,7 +448,7 @@ ephy_cookies_dialog_init (EphyCookiesDialog *dialog)
        setup_page (dialog);
 
        dialog->action_group = create_action_group (dialog);
-       gtk_widget_insert_action_group (dialog, "cookies", dialog->action_group);
+       gtk_widget_insert_action_group (GTK_WIDGET (dialog), "cookies", dialog->action_group);
 
        update_selection_actions (G_ACTION_MAP (dialog->action_group), FALSE);
 }
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index ad5352a..d00893e 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -273,8 +273,10 @@ confirmation_dialog_construct (EphyHistoryWindow *self)
 static void
 forget_all (GSimpleAction     *action,
             GVariant          *parameter,
-            EphyHistoryWindow *self)
+            gpointer           user_data)
 {
+       EphyHistoryWindow *self = EPHY_HISTORY_WINDOW (user_data);
+
        if (self->priv->confirmation_dialog == NULL)
        {
                GtkWidget **confirmation_dialog;
@@ -369,11 +371,12 @@ delete_selected (EphyHistoryWindow *self)
 static void
 open_selection (GSimpleAction     *action,
                 GVariant          *parameter,
-                EphyHistoryWindow *self)
+                gpointer           user_data)
 {
+       EphyHistoryWindow *self = EPHY_HISTORY_WINDOW (user_data);
+       EphyWindow *window;
        GList *selection;
        GList *l;
-       EphyWindow *window;
 
        selection = get_selection (self);
 
@@ -393,8 +396,9 @@ open_selection (GSimpleAction     *action,
 static void
 copy_url (GSimpleAction     *action,
           GVariant          *parameter,
-          EphyHistoryWindow *self)
+          gpointer           user_data)
 {
+       EphyHistoryWindow *self = EPHY_HISTORY_WINDOW (user_data);
        GList *selection;
 
        selection = get_selection (self);
@@ -411,8 +415,9 @@ copy_url (GSimpleAction     *action,
 static void
 bookmark (GSimpleAction     *action,
           GVariant          *parameter,
-          EphyHistoryWindow *self)
+          gpointer           user_data)
 {
+       EphyHistoryWindow *self = EPHY_HISTORY_WINDOW (user_data);
        GList *selection;
 
        selection = get_selection (self);
@@ -432,8 +437,10 @@ bookmark (GSimpleAction     *action,
 static void
 forget (GSimpleAction     *action,
         GVariant          *parameter,
-        EphyHistoryWindow *self)
+        gpointer           user_data)
 {
+       EphyHistoryWindow *self = EPHY_HISTORY_WINDOW (user_data);
+
        delete_selected (self);
 }
 
@@ -456,17 +463,17 @@ static void
 update_popup_menu_actions (GActionGroup *action_group,
                            gboolean      only_one_selected_item)
 {
-       GSimpleAction *copy_url_action;
-       GSimpleAction *bookmark_action;
+       GAction *copy_url_action;
+       GAction *bookmark_action;
        gboolean bookmarks_locked;
 
-       copy_url_action = g_action_map_lookup_action (action_group, "copy-url");
-       bookmark_action = g_action_map_lookup_action (action_group, "bookmark");
+       copy_url_action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "copy-url");
+       bookmark_action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "bookmark");
        bookmarks_locked = g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
                                                   EPHY_PREFS_LOCKDOWN_BOOKMARK_EDITING);
 
-       g_simple_action_set_enabled (copy_url_action, only_one_selected_item);
-       g_simple_action_set_enabled (bookmark_action, (only_one_selected_item && !bookmarks_locked));
+       g_simple_action_set_enabled (G_SIMPLE_ACTION (copy_url_action), only_one_selected_item);
+       g_simple_action_set_enabled (G_SIMPLE_ACTION (bookmark_action), (only_one_selected_item && 
!bookmarks_locked));
 }
 
 static gboolean
@@ -476,17 +483,17 @@ on_treeview_button_press_event (GtkWidget         *widget,
 {
        if (event->button == 3) {
                int n;
-               GtkMenu *menu;
+               GtkWidget *menu;
 
                n = gtk_tree_selection_count_selected_rows (self->priv->tree_selection);
                if (n <= 0)
                        return FALSE;
 
-               update_popup_menu_actions (G_ACTION_MAP (self->priv->action_group), (n == 1));
+               update_popup_menu_actions (self->priv->action_group, (n == 1));
 
                menu = gtk_menu_new_from_model (self->priv->treeview_popup_menu_model);
-               gtk_menu_attach_to_widget (menu, self, NULL);
-               gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event->button, event->time);
+               gtk_menu_attach_to_widget (GTK_MENU (menu), GTK_WIDGET (self), NULL);
+               gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, event->button, event->time);
                return TRUE;
        }
 
@@ -531,21 +538,21 @@ static void
 update_selection_actions (GActionGroup *action_group,
                           gboolean      has_selection)
 {
-       GSimpleAction *forget_action;
-       GSimpleAction *open_selection_action;
+       GAction *forget_action;
+       GAction *open_selection_action;
 
-       forget_action = g_action_map_lookup_action (action_group, "forget");
-       open_selection_action = g_action_map_lookup_action (action_group, "open-selection");
+       forget_action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "forget");
+       open_selection_action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "open-selection");
 
-       g_simple_action_set_enabled (forget_action, has_selection);
-       g_simple_action_set_enabled (open_selection_action, has_selection);
+       g_simple_action_set_enabled (G_SIMPLE_ACTION (forget_action), has_selection);
+       g_simple_action_set_enabled (G_SIMPLE_ACTION (open_selection_action), has_selection);
 }
 
 static void
 on_treeview_selection_changed (GtkTreeSelection *selection,
                               EphyHistoryWindow *self)
 {
-       update_selection_actions (G_ACTION_MAP (self->priv->action_group),
+       update_selection_actions (self->priv->action_group,
                                  gtk_tree_selection_count_selected_rows (selection) > 0);
 }
 
@@ -840,7 +847,7 @@ ephy_history_window_init (EphyHistoryWindow *self)
                                                 NULL);
 
        self->priv->action_group = create_action_group (self);
-       gtk_widget_insert_action_group (self, "history", self->priv->action_group);
+       gtk_widget_insert_action_group (GTK_WIDGET (self), "history", self->priv->action_group);
 
-       update_selection_actions (G_ACTION_MAP (self->priv->action_group), FALSE);
+       update_selection_actions (self->priv->action_group, FALSE);
 }
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index 1e2e4b0..893ec90 100644
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -81,7 +81,7 @@ static void
 downloads_estimated_progress_cb (EphyDownloadsManager *manager,
                                  EphyToolbar *toolbar)
 {
-  gtk_widget_queue_draw (gtk_button_get_image (toolbar->priv->downloads_button));
+  gtk_widget_queue_draw (gtk_button_get_image (GTK_BUTTON (toolbar->priv->downloads_button)));
 }
 
 static void
diff --git a/src/passwords-dialog.c b/src/passwords-dialog.c
index 5a62e25..1a71a84 100644
--- a/src/passwords-dialog.c
+++ b/src/passwords-dialog.c
@@ -115,8 +115,9 @@ secret_remove (EphyPasswordsDialog *dialog,
 static void
 forget (GSimpleAction       *action,
         GVariant            *parameter,
-        EphyPasswordsDialog *dialog)
+        gpointer             user_data)
 {
+       EphyPasswordsDialog *dialog = EPHY_PASSWORDS_DIALOG (user_data);
        GList *llist, *rlist = NULL, *l, *r;
        GtkTreeModel *model;
        GtkTreePath *path;
@@ -210,11 +211,12 @@ forget (GSimpleAction       *action,
 static void
 show_passwords (GSimpleAction       *action,
                 GVariant            *parameter,
-                EphyPasswordsDialog *dialog)
+                gpointer             user_data)
 {
+       EphyPasswordsDialog *dialog = EPHY_PASSWORDS_DIALOG (user_data);
        gboolean active;
 
-       active = gtk_toggle_button_get_active (dialog->show_passwords_button);
+       active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->show_passwords_button));
 
        gtk_tree_view_column_set_attributes (GTK_TREE_VIEW_COLUMN (dialog->password_column),
                                             GTK_CELL_RENDERER (dialog->password_renderer),
@@ -227,10 +229,10 @@ static void
 update_selection_actions (GActionMap *action_map,
                           gboolean    has_selection)
 {
-       GSimpleAction *forget_action;
+       GAction *forget_action;
 
        forget_action = g_action_map_lookup_action (action_map, "forget");
-       g_simple_action_set_enabled (forget_action, has_selection);
+       g_simple_action_set_enabled (G_SIMPLE_ACTION (forget_action), has_selection);
 }
 
 static void
@@ -275,8 +277,9 @@ get_selected_item (EphyPasswordsDialog *dialog,
 static void
 copy_password (GSimpleAction       *action,
                GVariant            *parameter,
-               EphyPasswordsDialog *dialog)
+               gpointer             user_data)
 {
+       EphyPasswordsDialog *dialog = EPHY_PASSWORDS_DIALOG (user_data);
        char *password;
 
        password = get_selected_item (dialog, COL_PASSWORDS_PASSWORD);
@@ -291,8 +294,9 @@ copy_password (GSimpleAction       *action,
 static void
 copy_username (GSimpleAction       *action,
                GVariant            *parameter,
-               EphyPasswordsDialog *dialog)
+               gpointer             user_data)
 {
+       EphyPasswordsDialog *dialog = EPHY_PASSWORDS_DIALOG (user_data);
        char *username;
 
        username = get_selected_item (dialog, COL_PASSWORDS_USER);
@@ -308,14 +312,14 @@ static void
 update_popup_menu_actions (GActionGroup *action_group,
                            gboolean      only_one_selected_item)
 {
-       GSimpleAction *copy_password_action;
-       GSimpleAction *copy_username_action;
+       GAction *copy_password_action;
+       GAction *copy_username_action;
 
-       copy_password_action = g_action_map_lookup_action (action_group, "copy-password");
-       copy_username_action = g_action_map_lookup_action (action_group, "copy-username");
+       copy_password_action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "copy-password");
+       copy_username_action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "copy-username");
 
-       g_simple_action_set_enabled (copy_password_action, only_one_selected_item);
-       g_simple_action_set_enabled (copy_username_action, only_one_selected_item);
+       g_simple_action_set_enabled (G_SIMPLE_ACTION (copy_password_action), only_one_selected_item);
+       g_simple_action_set_enabled (G_SIMPLE_ACTION (copy_username_action), only_one_selected_item);
 }
 
 static gboolean
@@ -325,17 +329,17 @@ on_passwords_treeview_button_press_event (GtkWidget           *widget,
 {
        if (event->button == 3) {
                int n;
-               GtkMenu *menu;
+               GtkWidget *menu;
 
                n = gtk_tree_selection_count_selected_rows (dialog->tree_selection);
                if (n == 0)
                        return FALSE;
 
-               update_popup_menu_actions (G_ACTION_MAP (dialog->action_group), (n == 1));
+               update_popup_menu_actions (dialog->action_group, (n == 1));
 
                menu = gtk_menu_new_from_model (dialog->treeview_popup_menu_model);
-               gtk_menu_attach_to_widget (menu, dialog, NULL);
-               gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event->button, event->time);
+               gtk_menu_attach_to_widget (GTK_MENU (menu), GTK_WIDGET (dialog), NULL);
+               gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, event->button, event->time);
                return TRUE;
        }
 
@@ -380,8 +384,9 @@ delete_all_passwords_ready_cb (GObject             *source_object,
 static void
 forget_all (GSimpleAction       *action,
             GVariant            *parameter,
-            EphyPasswordsDialog *dialog)
+            gpointer             user_data)
 {
+       EphyPasswordsDialog *dialog = EPHY_PASSWORDS_DIALOG (user_data);
        GHashTable *attributes;
 
        attributes = secret_attributes_build (EPHY_FORM_PASSWORD_SCHEMA, NULL);
@@ -529,7 +534,7 @@ ephy_passwords_dialog_init (EphyPasswordsDialog *dialog)
                            dialog);
 
        dialog->action_group = create_action_group (dialog);
-       gtk_widget_insert_action_group (dialog, "passwords", dialog->action_group);
+       gtk_widget_insert_action_group (GTK_WIDGET (dialog), "passwords", dialog->action_group);
 
        update_selection_actions (G_ACTION_MAP (dialog->action_group), FALSE);
 }


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