[balsa/gtk4: 62/248] Minor cleanup
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 62/248] Minor cleanup
- Date: Sun, 15 Nov 2020 20:13:57 +0000 (UTC)
commit 2a83bc2bac62bd8e5b072b0951a277b477d6a14e
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jun 28 17:11:54 2020 -0400
Minor cleanup
libbalsa-vfs: Add guards
balsa-mblist.c: Correct description
libbalsa/libbalsa-vfs.c | 6 ++++++
src/balsa-mblist.c | 7 +++----
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/libbalsa/libbalsa-vfs.c b/libbalsa/libbalsa-vfs.c
index eae652d20..090090fed 100644
--- a/libbalsa/libbalsa-vfs.c
+++ b/libbalsa/libbalsa-vfs.c
@@ -534,6 +534,7 @@ libbalsa_vfs_launch_app(LibbalsaVfs * file, GAppInfo *app, GError **err)
gboolean result;
g_return_val_if_fail(LIBBALSA_IS_VFS(file), FALSE);
+ g_return_val_if_fail(app == NULL || G_IS_APP_INFO(app), FALSE);
if (app == NULL) {
g_set_error(err, LIBBALSA_VFS_ERROR_QUARK, -1,
@@ -559,6 +560,7 @@ libbalsa_vfs_launch_app_for_body(LibBalsaMessageBody *mime_body,
gboolean result;
g_return_val_if_fail(mime_body != NULL, FALSE);
+ g_return_val_if_fail(app == NULL || G_IS_APP_INFO(app), FALSE);
if (!libbalsa_message_body_save_temporary(mime_body, err))
return FALSE;
@@ -662,6 +664,10 @@ libbalsa_vfs_fill_menu_by_content_type(GMenu *menu,
GAppInfo *def_app;
GList *app_list;
+ g_return_if_fail(G_IS_MENU(menu));
+ g_return_if_fail(G_IS_ACTION_MAP(action_map));
+ g_return_if_fail(G_IS_OBJECT(object));
+
def_app = g_app_info_get_default_for_type(content_type, FALSE);
if (def_app != NULL)
gio_add_vfs_menu_item(menu, def_app, action_map, action_namespace, callback, object);
diff --git a/src/balsa-mblist.c b/src/balsa-mblist.c
index 3f90dccae..7035abede 100644
--- a/src/balsa-mblist.c
+++ b/src/balsa-mblist.c
@@ -2414,16 +2414,15 @@ bmbl_choose_mailbox(GtkWidget *widget)
/*
* balsa_mblist_mru_get_url,
- * balsa_mblist_mru_get_mailbox_from_url:
+ * balsa_mblist_mru_get_mailbox:
*
* Helpers for "_change_state" actions of mru_menus
*
- * Get the url from the GVariant parameter. If it is "-",
+ * Get the url as GObject data from the object parameter. If it is NULL,
* the user selected "Other...", so we must pop up the mailbox list dialog
* and let the user choose the mailbox. That dialog can be canceled,
* returning a NULL mailbox, so we must be careful; the caller must be
- * prepared for the return of a NULL url or mailbox,
- * respectively.
+ * prepared for the return of a NULL url or mailbox, respectively.
*/
const gchar *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]