[gnome-commander] noop: code cleanup



commit 09b7eb8e72d679eaf2ede7b1dfc722400e97719f
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sat Jun 4 00:27:32 2011 +0200

    noop: code cleanup

 src/gnome-cmd-clist.cc |   13 +++----------
 src/gnome-cmd-clist.h  |    6 +++++-
 2 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/gnome-cmd-clist.cc b/src/gnome-cmd-clist.cc
index 2dab48a..cbe9b51 100644
--- a/src/gnome-cmd-clist.cc
+++ b/src/gnome-cmd-clist.cc
@@ -585,12 +585,6 @@ gint gnome_cmd_clist_get_voffset (GnomeCmdCList *clist)
 }
 
 
-void gnome_cmd_clist_update_style (GnomeCmdCList *clist)
-{
-    gtk_widget_set_style (GTK_WIDGET (clist), list_style);
-}
-
-
 void gnome_cmd_clist_set_voffset (GnomeCmdCList *clist, gint voffset)
 {
     g_return_if_fail (GNOME_CMD_IS_CLIST (clist));
@@ -601,12 +595,11 @@ void gnome_cmd_clist_set_voffset (GnomeCmdCList *clist, gint voffset)
 
 gint gnome_cmd_clist_get_row (GnomeCmdCList *clist, gint x, gint y)
 {
-    gint row;
-
     g_return_val_if_fail (GNOME_CMD_IS_CLIST (clist), -1);
 
-    if (gtk_clist_get_selection_info (GTK_CLIST (clist), x, y, &row, NULL) == 0)
-        row = -1;
+    gint row = -1;
+
+    gtk_clist_get_selection_info (GTK_CLIST (clist), x, y, &row, NULL);
 
     return row;
 }
diff --git a/src/gnome-cmd-clist.h b/src/gnome-cmd-clist.h
index 5c5485b..d927d6f 100644
--- a/src/gnome-cmd-clist.h
+++ b/src/gnome-cmd-clist.h
@@ -52,12 +52,16 @@ inline GtkWidget *gnome_cmd_clist_new (gint columns)
     return gnome_cmd_clist_new_with_titles (columns, NULL);
 }
 
-void gnome_cmd_clist_update_style (GnomeCmdCList *clist);
+inline void gnome_cmd_clist_update_style (GnomeCmdCList *clist)
+{
+    gtk_widget_set_style (GTK_WIDGET (clist), list_style);
+}
 
 gint gnome_cmd_clist_get_voffset (GnomeCmdCList *clist);
 void gnome_cmd_clist_set_voffset (GnomeCmdCList *clist, gint voffset);
 
 gint gnome_cmd_clist_get_row (GnomeCmdCList *clist, gint x, gint y);
+
 void gnome_cmd_clist_set_drag_row (GnomeCmdCList *clist, gint row);
 
 #endif // __GNOME_CMD_CLIST_H__



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]