Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Chris Talbot
chatty
Commits
44e6ed47
Commit
44e6ed47
authored
Oct 04, 2021
by
Chris Talbot
Committed by
Mohammed Sadiq
Oct 11, 2021
Browse files
attachments-view: have chatty_attachments_view_get_files return list compatible with chatty_message
parent
cb30aabd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/chatty-attachments-view.c
View file @
44e6ed47
...
...
@@ -15,6 +15,7 @@
# include "config.h"
#endif
#include "chatty-utils.h"
#include "chatty-file-item.h"
#include "chatty-attachments-view.h"
...
...
@@ -116,8 +117,8 @@ chatty_attachments_view_add_file (ChattyAttachmentsView *self,
* @self: A #ChattyAttachmentsView
*
* Get the list of files attached. The list contains
*
file names
and the list should be freed with
* g_list_free_full(list, (GDestroyNotify)
g
_free)
*
ChattyFileInfo
and the list should be freed with
* g_list_free_full(list, (GDestroyNotify)
chatty_file_info
_free)
*
* Returns: (transfer full) (nullable): A List of strings.
*/
...
...
@@ -132,10 +133,12 @@ chatty_attachments_view_get_files (ChattyAttachmentsView *self)
children
=
gtk_container_get_children
(
GTK_CONTAINER
(
self
->
files_box
));
for
(
GList
*
child
=
children
;
child
;
child
=
child
->
next
)
{
ChattyFileInfo
*
attachment
;
const
char
*
name
;
name
=
chatty_file_item_get_file
(
child
->
data
);
files
=
g_list_append
(
files
,
g_strdup
(
name
));
attachment
=
chatty_file_info_new_for_path
(
name
);
files
=
g_list_append
(
files
,
attachment
);
}
return
files
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment