[gnome-commander] Moved DirState enum -> GnomeCmdDir::State
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Moved DirState enum -> GnomeCmdDir::State
- Date: Wed, 17 Nov 2010 18:22:46 +0000 (UTC)
commit a4aeb5db294cd8d83971df3e940e1a0f928c99b2
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Wed Nov 17 19:22:25 2010 +0100
Moved DirState enum -> GnomeCmdDir::State
src/dirlist.cc | 14 +++++++-------
src/gnome-cmd-dir.cc | 10 +++++-----
src/gnome-cmd-dir.h | 18 +++++++++---------
src/gnome-cmd-file-list.cc | 10 +++++-----
4 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/src/dirlist.cc b/src/dirlist.cc
index 0362ba3..76c13e8 100644
--- a/src/dirlist.cc
+++ b/src/dirlist.cc
@@ -44,7 +44,7 @@ on_files_listed (GnomeVFSAsyncHandle *handle,
if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF)
{
DEBUG ('l', "Directory listing failed, %s\n", gnome_vfs_result_to_string (result));
- dir->state = DIR_STATE_EMPTY;
+ dir->state = GnomeCmdDir::STATE_EMPTY;
dir->list_result = result;
}
@@ -58,7 +58,7 @@ on_files_listed (GnomeVFSAsyncHandle *handle,
if (result == GNOME_VFS_ERROR_EOF)
{
- dir->state = DIR_STATE_LISTED;
+ dir->state = GnomeCmdDir::STATE_LISTED;
dir->list_result = GNOME_VFS_OK;
DEBUG('l', "All files listed\n");
}
@@ -69,7 +69,7 @@ static gboolean update_list_progress (GnomeCmdDir *dir)
{
DEBUG ('l', "Checking list progress...\n");
- if (dir->state == DIR_STATE_LISTING)
+ if (dir->state == GnomeCmdDir::STATE_LISTING)
{
gchar *msg = g_strdup_printf (ngettext ("%d file listed", "%d files listed", dir->list_counter), dir->list_counter);
gtk_label_set_text (GTK_LABEL (dir->label), msg);
@@ -125,12 +125,12 @@ inline void blocking_list (GnomeCmdDir *dir)
if (dir->list_result == GNOME_VFS_OK)
{
- dir->state = DIR_STATE_LISTED;
+ dir->state = GnomeCmdDir::STATE_LISTED;
dir->done_func (dir, dir->infolist, dir->list_result);
}
else
{
- dir->state = DIR_STATE_EMPTY;
+ dir->state = GnomeCmdDir::STATE_EMPTY;
dir->done_func (dir, NULL, dir->list_result);
}
}
@@ -144,7 +144,7 @@ void dirlist_list (GnomeCmdDir *dir, gboolean visprog)
dir->list_handle = NULL;
dir->list_counter = 0;
dir->list_result = GNOME_VFS_OK;
- dir->state = DIR_STATE_LISTING;
+ dir->state = GnomeCmdDir::STATE_LISTING;
if (!visprog)
{
@@ -158,7 +158,7 @@ void dirlist_list (GnomeCmdDir *dir, gboolean visprog)
void dirlist_cancel (GnomeCmdDir *dir)
{
- dir->state = DIR_STATE_EMPTY;
+ dir->state = GnomeCmdDir::STATE_EMPTY;
dir->list_result = GNOME_VFS_OK;
DEBUG('l', "Calling async_cancel\n");
diff --git a/src/gnome-cmd-dir.cc b/src/gnome-cmd-dir.cc
index 6cb9781..52281de 100644
--- a/src/gnome-cmd-dir.cc
+++ b/src/gnome-cmd-dir.cc
@@ -217,7 +217,7 @@ static void init (GnomeCmdDir *dir)
{
// dir->voffset = 0;
// dir->dialog = NULL;
- dir->state = DIR_STATE_EMPTY;
+ dir->state = GnomeCmdDir::STATE_EMPTY;
dir->priv = g_new0 (GnomeCmdDirPrivate, 1);
@@ -477,7 +477,7 @@ static GList *create_file_list (GnomeCmdDir *dir, GList *info_list)
static void on_list_done (GnomeCmdDir *dir, GList *infolist, GnomeVFSResult result)
{
- if (dir->state == DIR_STATE_LISTED)
+ if (dir->state == GnomeCmdDir::STATE_LISTED)
{
DEBUG('l', "File listing succeded\n");
@@ -486,7 +486,7 @@ static void on_list_done (GnomeCmdDir *dir, GList *infolist, GnomeVFSResult resu
dir->priv->files = create_file_list (dir, infolist);
dir->priv->file_collection->add(dir->priv->files);
- dir->state = DIR_STATE_LISTED;
+ dir->state = GnomeCmdDir::STATE_LISTED;
g_list_free (infolist);
if (dir->dialog)
@@ -500,7 +500,7 @@ static void on_list_done (GnomeCmdDir *dir, GList *infolist, GnomeVFSResult resu
DEBUG('l', "Emitting 'list-ok' signal\n");
g_signal_emit (dir, signals[LIST_OK], 0, dir->priv->files);
}
- else if (dir->state == DIR_STATE_EMPTY)
+ else if (dir->state == GnomeCmdDir::STATE_EMPTY)
{
DEBUG('l', "File listing failed: %s\n", gnome_vfs_result_to_string (result));
@@ -521,7 +521,7 @@ static void on_list_done (GnomeCmdDir *dir, GList *infolist, GnomeVFSResult resu
static void on_dir_list_cancel (GtkButton *btn, GnomeCmdDir *dir)
{
- if (dir->state == DIR_STATE_LISTING)
+ if (dir->state == GnomeCmdDir::STATE_LISTING)
{
DEBUG('l', "on_dir_list_cancel\n");
dirlist_cancel (dir);
diff --git a/src/gnome-cmd-dir.h b/src/gnome-cmd-dir.h
index af5ff66..d3db636 100644
--- a/src/gnome-cmd-dir.h
+++ b/src/gnome-cmd-dir.h
@@ -40,26 +40,26 @@ typedef void (* DirListDoneFunc) (GnomeCmdDir *dir, GList *files, GnomeVFSResult
#include "gnome-cmd-path.h"
#include "handle.h"
-enum DirState
-{
- DIR_STATE_EMPTY,
- DIR_STATE_LISTED,
- DIR_STATE_LISTING,
- DIR_STATE_CANCELING
-};
-
struct GnomeCmdDir
{
GnomeCmdFile parent; // this MUST be the first member
GnomeCmdDirPrivate *priv;
+ enum State
+ {
+ STATE_EMPTY,
+ STATE_LISTED,
+ STATE_LISTING,
+ STATE_CANCELING
+ };
+
gint voffset;
GList *infolist;
GnomeVFSAsyncHandle *list_handle;
GnomeVFSResult list_result;
gint list_counter;
- DirState state;
+ State state;
DirListDoneFunc done_func;
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index aeb3302..d966d13 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -2533,7 +2533,7 @@ void GnomeCmdFileList::set_directory(GnomeCmdDir *dir)
if (cwd==dir)
return;
- if (realized && dir->state!=DIR_STATE_LISTED)
+ if (realized && dir->state!=GnomeCmdDir::STATE_LISTED)
{
gtk_widget_set_sensitive (*this, FALSE);
set_cursor_busy_for_widget (*this);
@@ -2558,19 +2558,19 @@ void GnomeCmdFileList::set_directory(GnomeCmdDir *dir)
switch (dir->state)
{
- case DIR_STATE_EMPTY:
+ case GnomeCmdDir::STATE_EMPTY:
g_signal_connect (dir, "list-ok", G_CALLBACK (on_dir_list_ok), this);
g_signal_connect (dir, "list-failed", G_CALLBACK (on_dir_list_failed), this);
gnome_cmd_dir_list_files (dir, gnome_cmd_con_needs_list_visprog (con));
break;
- case DIR_STATE_LISTING:
- case DIR_STATE_CANCELING:
+ case GnomeCmdDir::STATE_LISTING:
+ case GnomeCmdDir::STATE_CANCELING:
g_signal_connect (dir, "list-ok", G_CALLBACK (on_dir_list_ok), this);
g_signal_connect (dir, "list-failed", G_CALLBACK (on_dir_list_failed), this);
break;
- case DIR_STATE_LISTED:
+ case GnomeCmdDir::STATE_LISTED:
g_signal_connect (dir, "list-ok", G_CALLBACK (on_dir_list_ok), this);
g_signal_connect (dir, "list-failed", G_CALLBACK (on_dir_list_failed), this);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]