[Xfce-bugs] [Bug 15873] Unification of "close multi tab" dialog

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Sat Oct 5 23:00:48 CEST 2019


https://bugzilla.xfce.org/show_bug.cgi?id=15873

--- Comment #4 from Igor <f2404 at yandex.ru> ---
Thanks for including me!
A few comments on the patch.

The function description is saying:
+ * xfce_dialog_confirm_close_tabs:
+ * @parent     : (allow-none): transient parent of the dialog, or %NULL.
However, the very first check suggests that the function will return
immediately if parent==NULL:
+  g_return_val_if_fail (parent == NULL || GTK_IS_WINDOW (parent), 0);

+gint
+xfce_dialog_confirm_close_tabs (GtkWindow       *parent,
+                                const gint       num_tabs,
+                                gboolean* const  do_confirm)
The "const gint num_tabs" declaration is redundant since num_tabs is passed as
value anyway (i.e. you cannot modify the variable value from within the
function).

Both primary_text and warning_icon can be declared as "const gchar *" since you
don't have to dynamically allocate memory for them.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list