Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29128/src

Modified Files:
        prefs.c prefs.h prefs_window.c 
Log Message:
         * src/prefs.h
           src/prefs.c
           src/prefs_windows: Made PathType enum redundant outside
           prefs.c (needed only for key conversion).



Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -d -r1.242 -r1.243
--- prefs.c     13 Jun 2006 06:25:21 -0000      1.242
+++ prefs.c     13 Jun 2006 14:59:21 -0000      1.243
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-06-10 20:19:32 jcs>
+/* Time-stamp: <2006-06-13 23:52:53 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -126,6 +126,23 @@
  * Functions used by this module only
  */
 
+/* Different paths that can be set in the prefs window */
+typedef enum
+{
+    PATH_PLAY_NOW = 0,
+    PATH_PLAY_ENQUEUE,
+    PATH_MP3GAIN,
+    PATH_SYNC_CONTACTS,
+    PATH_SYNC_CALENDAR,
+    PATH_MSERV_MUSIC_ROOT,
+    PATH_MSERV_TRACKINFO_ROOT,
+    PATH_SYNC_NOTES,
+    PATH_AACGAIN,
+    PATH_NUM
+} PathType;
+
+
+
 /* Set default prefrences */
 static void set_default_preferences()
 {

Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -d -r1.169 -r1.170
--- prefs.h     13 Jun 2006 06:25:22 -0000      1.169
+++ prefs.h     13 Jun 2006 14:59:22 -0000      1.170
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-06-11 12:16:33 jcs>
+/* Time-stamp: <2006-06-13 23:52:53 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -43,22 +43,6 @@
 /* End-of-list marker for variable-length lists */
 #define LIST_END_MARKER "----++++----"
 
-/* Different paths that can be set in the prefs window */
-typedef enum
-{
-    PATH_PLAY_NOW = 0,
-    PATH_PLAY_ENQUEUE,
-    PATH_MP3GAIN,
-    PATH_SYNC_CONTACTS,
-    PATH_SYNC_CALENDAR,
-    PATH_MSERV_MUSIC_ROOT,
-    PATH_MSERV_TRACKINFO_ROOT,
-    PATH_SYNC_NOTES,
-    PATH_AACGAIN,
-    PATH_NUM
-} PathType;
-
-
 /* Not sure where to put these (maybe prefkeys.h?): prefs keys used */
 /* repository.c */
 extern const gchar *KEY_CONCAL_AUTOSYNC;

Index: prefs_window.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs_window.c,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- prefs_window.c      13 Jun 2006 06:25:22 -0000      1.163
+++ prefs_window.c      13 Jun 2006 14:59:22 -0000      1.164
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-06-12 00:53:58 jcs>
+/* Time-stamp: <2006-06-13 23:56:46 jcs>
 |
 |  Copyright (C) 2002 Corey Donohoe <atmos at atmos.org>
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
@@ -140,6 +140,7 @@
     GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, /* select folder */
     GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
     GTK_FILE_CHOOSER_ACTION_OPEN,
+    GTK_FILE_CHOOSER_ACTION_OPEN,
     -1
 };
 
@@ -174,11 +175,10 @@
    dialog and let the user select a file or directory */
 static void on_path_button_pressed (GtkButton *button, gpointer user_data)
 {
-    PathType i = (PathType)user_data;
+    gint i = GPOINTER_TO_INT (user_data);
     gchar *oldpath, *newpath;
 
     g_return_if_fail (temp_prefs);
-    g_return_if_fail (i>=0 && i<PATH_NUM);
 
     oldpath = temp_prefs_get_string (temp_prefs, path_key_names[i]);
 
@@ -222,7 +222,7 @@
 static void on_path_entry_changed (GtkEditable     *editable,
                                   gpointer         user_data)
 {
-    PathType i = (PathType)user_data;
+    gint i = GPOINTER_TO_INT (user_data);
     gchar *buf = gtk_editable_get_chars(editable, 0, -1);
 
     temp_prefs_set_string (temp_prefs, path_key_names[i], buf);
@@ -505,7 +505,7 @@
        g_free (buf);
     }
     /* connect signals for path entrys and selectors */
-    for (i=0; i<PATH_NUM; ++i)
+    for (i=0; path_button_names[i]; ++i)
     {
        gchar *path;
        /* "" is not a valid button name -> skip */



_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to