diff gui/dialog/dialog.c @ 36024:a9e5f317d6e4

Move gtkFindCList() to tools.c. Additionally, rename it gtkFindInCList().
author ib
date Sun, 31 Mar 2013 18:30:30 +0000
parents bf5690e00dc6
children 49be954ad61a
line wrap: on
line diff
--- a/gui/dialog/dialog.c	Sun Mar 31 18:08:37 2013 +0000
+++ b/gui/dialog/dialog.c	Sun Mar 31 18:30:30 2013 +0000
@@ -66,6 +66,7 @@
 #include "menu.h"
 #include "url.h"
 #include "equalizer.h"
+#include "tools.h"
 
 static const char gui_icon_name[] = "mplayer";
 
@@ -188,21 +189,6 @@
     wsWindowIcon(gdk_display, GDK_WINDOW_XWINDOW(window->window), &guiIcon);
 }
 
-int gtkFindCList(GtkWidget *list, char *item)
-{
-    gint j;
-    gchar *tmpstr;
-
-    for (j = 0; j < GTK_CLIST(list)->rows; j++) {
-        gtk_clist_get_text(GTK_CLIST(list), j, 0, &tmpstr);
-
-        if (!strcmp(tmpstr, item))
-            return j;
-    }
-
-    return -1;
-}
-
 void gtkEventHandling(void)
 {
     int i;
@@ -281,7 +267,7 @@
 {
     gint i;
 
-    if ((i = gtkFindCList(list, item)) > -1)
+    if ((i = gtkFindInCList(list, item)) > -1)
         gtk_clist_select_row(GTK_CLIST(list), i, 0);
 }