[Xfce4-commits] [apps/xfce4-terminal] 01/01: Resolve two "cast between incompatible function types" warnings

noreply at xfce.org noreply at xfce.org
Thu May 3 21:36:30 CEST 2018


This is an automated email from the git hooks/post-receive script.

f   2   4   0   4       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-terminal.

commit e03a004c15870635a71ad2a987765d59760ecb2d
Author: Igor <f2404 at yandex.ru>
Date:   Thu May 3 15:36:16 2018 -0400

    Resolve two "cast between incompatible function types" warnings
---
 terminal/terminal-app.c                |  2 +-
 terminal/terminal-preferences-dialog.c | 13 ++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 945deda..4eef4f0 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -354,7 +354,7 @@ terminal_app_take_window (TerminalApp *app,
 
   group = gtk_window_group_new ();
   gtk_window_group_add_window (group, window);
-  g_object_weak_ref (G_OBJECT (window), (GWeakNotify) g_object_unref, group);
+  g_object_unref (group);
 
   g_signal_connect (G_OBJECT (window), "destroy",
                     G_CALLBACK (terminal_app_window_destroyed), app);
diff --git a/terminal/terminal-preferences-dialog.c b/terminal/terminal-preferences-dialog.c
index 7807563..4ced329 100644
--- a/terminal/terminal-preferences-dialog.c
+++ b/terminal/terminal-preferences-dialog.c
@@ -39,6 +39,8 @@
 static void     terminal_preferences_dialog_finalize          (GObject                   *object);
 static void     terminal_preferences_dialog_disc_bindings     (GtkWidget                 *widget,
                                                                TerminalPreferencesDialog *dialog);
+static void     terminal_preferences_dialog_died              (gpointer                   user_data,
+                                                               GObject                   *where_the_object_was);
 static void     terminal_preferences_dialog_response          (GtkWidget                 *widget,
                                                                gint                       response,
                                                                TerminalPreferencesDialog *dialog);
@@ -224,7 +226,7 @@ error:
   /* connect response to dialog */
   object = gtk_builder_get_object (GTK_BUILDER (dialog), "dialog");
   terminal_return_if_fail (G_IS_OBJECT (object));
-  g_object_weak_ref (object, (GWeakNotify) g_object_unref, dialog);
+  g_object_weak_ref (object, (GWeakNotify) terminal_preferences_dialog_died, dialog);
   g_signal_connect (object, "destroy",
       G_CALLBACK (terminal_preferences_dialog_disc_bindings), dialog);
   g_signal_connect (object, "response",
@@ -522,6 +524,15 @@ terminal_preferences_dialog_disc_bindings (GtkWidget                 *widget,
 
 
 
+static void
+terminal_preferences_dialog_died (gpointer  user_data,
+                                  GObject  *where_the_object_was)
+{
+  g_object_unref (G_OBJECT (user_data));
+}
+
+
+
 static gboolean
 terminal_preferences_dialog_color_press_event (GtkWidget      *widget,
                                                GdkEventButton *event)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list