[totem] main: Use gtk_tree_model_iter_previous()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Use gtk_tree_model_iter_previous()
- Date: Sun, 12 Jun 2011 00:29:33 +0000 (UTC)
commit d2d3ee120b1ce6af5289c1c12d544fd08eb8ba72
Author: Bastien Nocera <hadess hadess net>
Date: Sun Jun 12 01:28:53 2011 +0100
main: Use gtk_tree_model_iter_previous()
Now that it's in GTK+ itself.
src/totem-playlist.c | 22 ++--------------------
1 files changed, 2 insertions(+), 20 deletions(-)
---
diff --git a/src/totem-playlist.c b/src/totem-playlist.c
index 6f44487..539ea57 100644
--- a/src/totem-playlist.c
+++ b/src/totem-playlist.c
@@ -180,22 +180,6 @@ G_DEFINE_TYPE (TotemPlaylist, totem_playlist, GTK_TYPE_VBOX)
/* Helper functions */
static gboolean
-totem_playlist_gtk_tree_model_iter_previous (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- GtkTreePath *path;
- gboolean ret;
-
- path = gtk_tree_model_get_path (tree_model, iter);
- ret = gtk_tree_path_prev (path);
- if (ret != FALSE)
- gtk_tree_model_get_iter (tree_model, iter, path);
-
- gtk_tree_path_free (path);
- return ret;
-}
-
-static gboolean
totem_playlist_gtk_tree_path_equals (GtkTreePath *path1, GtkTreePath *path2)
{
char *str1, *str2;
@@ -2550,8 +2534,7 @@ totem_playlist_has_previous_mrl (TotemPlaylist *playlist)
&iter,
playlist->priv->current);
- return totem_playlist_gtk_tree_model_iter_previous
- (playlist->priv->model, &iter);
+ return gtk_tree_model_iter_previous (playlist->priv->model, &iter);
} else {
if (playlist->priv->current_shuffled == 0)
return FALSE;
@@ -2700,8 +2683,7 @@ totem_playlist_set_previous (TotemPlaylist *playlist)
&iter,
playlist->priv->current);
- totem_playlist_gtk_tree_model_iter_previous
- (playlist->priv->model, &iter);
+ gtk_tree_model_iter_previous (playlist->priv->model, &iter);
gtk_tree_path_free (playlist->priv->current);
playlist->priv->current = gtk_tree_model_get_path
(playlist->priv->model, &iter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]