[gnome-commander] Revert "noop: code cleanup"
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Revert "noop: code cleanup"
- Date: Sat, 4 Jun 2011 22:00:37 +0000 (UTC)
commit f40f4b098d0679528c60e4843691986cbfe3a84d
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sat Jun 4 23:59:31 2011 +0200
Revert "noop: code cleanup"
This reverts commit 09b7eb8e72d679eaf2ede7b1dfc722400e97719f.
src/gnome-cmd-clist.cc | 13 ++++++++++---
src/gnome-cmd-clist.h | 6 +-----
2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/src/gnome-cmd-clist.cc b/src/gnome-cmd-clist.cc
index cbe9b51..2dab48a 100644
--- a/src/gnome-cmd-clist.cc
+++ b/src/gnome-cmd-clist.cc
@@ -585,6 +585,12 @@ 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));
@@ -595,11 +601,12 @@ void gnome_cmd_clist_set_voffset (GnomeCmdCList *clist, gint voffset)
gint gnome_cmd_clist_get_row (GnomeCmdCList *clist, gint x, gint y)
{
- g_return_val_if_fail (GNOME_CMD_IS_CLIST (clist), -1);
+ gint row;
- gint row = -1;
+ g_return_val_if_fail (GNOME_CMD_IS_CLIST (clist), -1);
- gtk_clist_get_selection_info (GTK_CLIST (clist), x, y, &row, NULL);
+ if (gtk_clist_get_selection_info (GTK_CLIST (clist), x, y, &row, NULL) == 0)
+ row = -1;
return row;
}
diff --git a/src/gnome-cmd-clist.h b/src/gnome-cmd-clist.h
index d927d6f..5c5485b 100644
--- a/src/gnome-cmd-clist.h
+++ b/src/gnome-cmd-clist.h
@@ -52,16 +52,12 @@ inline GtkWidget *gnome_cmd_clist_new (gint columns)
return gnome_cmd_clist_new_with_titles (columns, NULL);
}
-inline void gnome_cmd_clist_update_style (GnomeCmdCList *clist)
-{
- gtk_widget_set_style (GTK_WIDGET (clist), list_style);
-}
+void gnome_cmd_clist_update_style (GnomeCmdCList *clist);
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]