[gnome-commander] GnomeCmdDir: simplify code for calling dir->done_func()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] GnomeCmdDir: simplify code for calling dir->done_func()
- Date: Sun, 6 Mar 2011 19:11:00 +0000 (UTC)
commit 97678bcb6188d6ee9bbe213fd5012f9cc4734811
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun Mar 6 20:09:32 2011 +0100
GnomeCmdDir: simplify code for calling dir->done_func()
src/dirlist.cc | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/dirlist.cc b/src/dirlist.cc
index 50fe546..2b37d09 100644
--- a/src/dirlist.cc
+++ b/src/dirlist.cc
@@ -117,20 +117,13 @@ inline void blocking_list (GnomeCmdDir *dir)
gchar *uri_str = GNOME_CMD_FILE (dir)->get_uri_str();
DEBUG('l', "blocking_list: %s\n", uri_str);
+ dir->infolist = NULL;
dir->list_result = gnome_vfs_directory_list_load (&dir->infolist, uri_str, infoOpts);
g_free (uri_str);
- if (dir->list_result == GNOME_VFS_OK)
- {
- dir->state = GnomeCmdDir::STATE_LISTED;
- dir->done_func (dir, dir->infolist, dir->list_result);
- }
- else
- {
- dir->state = GnomeCmdDir::STATE_EMPTY;
- dir->done_func (dir, NULL, dir->list_result);
- }
+ dir->state = dir->list_result==GNOME_VFS_OK ? GnomeCmdDir::STATE_LISTED : GnomeCmdDir::STATE_EMPTY;
+ dir->done_func (dir, dir->infolist, dir->list_result);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]