[gnome-commander/gcmd-1-3] noop: code cleanup
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-commander/gcmd-1-3] noop: code cleanup
- Date: Tue, 30 Jun 2009 20:53:34 +0000 (UTC)
commit e7ee7ea2c6e77566cc0d324130ec6e1aaf7c460d
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Tue Jun 30 21:46:40 2009 +0200
noop: code cleanup
src/gnome-cmd-file-props-dialog.cc | 5 ++---
src/gnome-cmd-file-selector.cc | 9 ++++-----
src/gnome-cmd-remote-dialog.cc | 2 +-
src/gnome-cmd-search-dialog.cc | 5 +++--
src/owner.h | 2 +-
5 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/src/gnome-cmd-file-props-dialog.cc b/src/gnome-cmd-file-props-dialog.cc
index 5f08e16..4d95b28 100644
--- a/src/gnome-cmd-file-props-dialog.cc
+++ b/src/gnome-cmd-file-props-dialog.cc
@@ -155,9 +155,8 @@ static gboolean join_thread_func (GnomeCmdFilePropsDialogPrivate *data)
static void on_dialog_destroy (GtkDialog *dialog, GnomeCmdFilePropsDialogPrivate *data)
{
- data->stop = TRUE;
-
- g_timeout_add (1, (GSourceFunc) join_thread_func, data);
+ data->stop = TRUE;
+ g_timeout_add (1, (GSourceFunc) join_thread_func, data);
}
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 946cfaa..7192b97 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -465,7 +465,7 @@ static gboolean do_scroll (GnomeCmdFileSelector *fs)
gint row_count;
guint offset;
gint row_height;
- GtkCList *clist = GTK_CLIST (fs->file_list());
+ GtkCList *clist = *fs->file_list();
gdk_window_get_size (GTK_WIDGET (clist)->window, &w, &h);
@@ -499,7 +499,7 @@ static void autoscroll_if_appropriate (GnomeCmdFileSelector *fs, gint x, gint y)
{
if (y < 0) return;
- GtkCList *clist = GTK_CLIST (fs->file_list());
+ GtkCList *clist = *fs->file_list();
// guint offset = (0-clist->voffset);
gint w, h;
@@ -520,8 +520,7 @@ static void autoscroll_if_appropriate (GnomeCmdFileSelector *fs, gint x, gint y)
if (fs->priv->autoscroll_timeout) return;
fs->priv->autoscroll_dir = TRUE;
fs->priv->autoscroll_y = y;
- fs->priv->autoscroll_timeout =
- g_timeout_add (gnome_cmd_data.gui_update_rate, (GSourceFunc) do_scroll, fs);
+ fs->priv->autoscroll_timeout = g_timeout_add (gnome_cmd_data.gui_update_rate, (GSourceFunc) do_scroll, fs);
}
else
{
@@ -538,7 +537,7 @@ static gboolean drag_motion (GtkWidget *widget, GdkDragContext *context, gint x,
{
gdk_drag_status (context, context->suggested_action, time);
- GtkCList *clist = GTK_CLIST (fs->file_list());
+ GtkCList *clist = *fs->file_list();
y -= (clist->column_title_area.height - GTK_CONTAINER (clist)->border_width);
diff --git a/src/gnome-cmd-remote-dialog.cc b/src/gnome-cmd-remote-dialog.cc
index 2fc3d95..3f92f08 100644
--- a/src/gnome-cmd-remote-dialog.cc
+++ b/src/gnome-cmd-remote-dialog.cc
@@ -58,7 +58,7 @@ enum
COL_AUTH,
COL_NAME,
COL_CON,
- COL_FTP_CON, // later: to be removed
+ COL_FTP_CON, // FIXME: to be removed
NUM_COLS
} ;
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index 360cdcc..57223da 100644
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -59,6 +59,7 @@ struct ProtectedData
GMutex *mutex;
};
+
struct SearchData
{
const gchar *name_pattern; // the pattern that file names should match to end up in the file list
@@ -86,6 +87,7 @@ struct SearchData
gchar *search_mem; // memory to search in the content of a file
};
+
struct SearchFileData
{
gchar *uri_str;
@@ -424,8 +426,7 @@ static gboolean update_search_status_widgets (SearchData *data)
gtk_widget_hide (data->dialog->priv->pbar);
}
- // Returning FALSE here stops the timeout callbacks
- return FALSE;
+ return FALSE; // Returning FALSE here stops the timeout callbacks
}
return TRUE;
diff --git a/src/owner.h b/src/owner.h
index 76db238..19a6c5a 100644
--- a/src/owner.h
+++ b/src/owner.h
@@ -50,7 +50,7 @@ class GnomeCmdOwner
{
ID id;
char *name;
- T data;
+ T data;
};
Entry *lookup(ID id) { return (Entry *) g_hash_table_lookup (id_table, &id); }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]