Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27182/src
Modified Files:
context_menus.c prefs.h repository.c syncdir.c syncdir.h
Log Message:
* src/prefs.h
src/syncdir.h
src/syndir.c
src/repositories.c: moved PLAYLIST_AUTOSYNC enum to
syncdir.h and renamed.
* src/context_menu.c: very first phase of rearrangement.
Index: context_menus.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/context_menus.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- context_menus.c 13 Jun 2006 05:48:55 -0000 1.60
+++ context_menus.c 14 Jun 2006 16:12:10 -0000 1.61
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-05-21 23:59:58 jcs>
+/* Time-stamp: <2006-06-15 00:53:19 jcs>
|
| Copyright (C) 2003 Corey Donohoe <atmos at atmos dot org>
| Copyright (C) 2003-2005 Jorg Schuler <jcsjcs at users sourceforge net>
@@ -414,22 +414,6 @@
mi_spl[type] = hookup_mi (menu[type], _("Edit Smart Playlist"),
GTK_STOCK_PROPERTIES,
G_CALLBACK (edit_spl), NULL);
- if (type == CM_PL)
- {
- mi_prop_pl = hookup_mi (menu[type],
- _("Edit Playlist Properties"),
- GTK_STOCK_PREFERENCES,
- G_CALLBACK (edit_properties), NULL);
- mi_prop_rep = hookup_mi (menu[type],
- _("Edit Repository Properties"),
- GTK_STOCK_PREFERENCES,
- G_CALLBACK (edit_properties), NULL);
- mi_prop_ipod = hookup_mi (menu[type],
- _("Edit iPod Properties"),
- GTK_STOCK_PREFERENCES,
- G_CALLBACK (edit_properties), NULL);
- }
-
if (type == CM_ST)
{
@@ -538,6 +522,19 @@
mi_io_sep = add_separator (menu[type]);
+ mi_prop_pl = hookup_mi (menu[type],
+ _("Edit Playlist Properties"),
+ GTK_STOCK_PREFERENCES,
+ G_CALLBACK (edit_properties), NULL);
+ mi_prop_rep = hookup_mi (menu[type],
+ _("Edit Repository Properties"),
+ GTK_STOCK_PREFERENCES,
+ G_CALLBACK (edit_properties), NULL);
+ mi_prop_ipod = hookup_mi (menu[type],
+ _("Edit iPod Properties"),
+ GTK_STOCK_PREFERENCES,
+ G_CALLBACK (edit_properties), NULL);
+
mi_ipodio_load =
hookup_mi (menu[type],
_("Load iPod"),
Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -d -r1.171 -r1.172
--- prefs.h 14 Jun 2006 02:52:55 -0000 1.171
+++ prefs.h 14 Jun 2006 16:12:10 -0000 1.172
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-06-13 23:52:53 jcs>
+/* Time-stamp: <2006-06-15 00:55:28 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -60,19 +60,6 @@
extern const gchar *KEY_MANUAL_SYNCDIR;
-/* Not sure where to put these (maybe prefkeys.h?: Playlist-Autosync
- * options */
-enum
-{
- /* no auto-sync */
- PLAYLIST_AUTOSYNC_MODE_NONE = 0,
- /* use dirs from filenames in playlist */
- PLAYLIST_AUTOSYNC_MODE_AUTOMATIC = 1,
- /* use specified dir */
- PLAYLIST_AUTOSYNC_MODE_MANUAL = 2
-};
-
-
struct cfg
{
gchar *charset; /* CHARSET to use with file operations */
Index: repository.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/repository.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- repository.c 10 Jun 2006 10:38:59 -0000 1.13
+++ repository.c 14 Jun 2006 16:12:10 -0000 1.14
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-06-10 15:39:52 jcs>
+/* Time-stamp: <2006-06-15 00:58:25 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -90,9 +90,9 @@
static const gchar *STANDARD_PLAYLIST_VBOX="standard_playlist_vbox";
static const gchar *SPL_VBOX="spl_vbox";
static const gchar *SPL_LIVE_UPDATE_TOGGLE="spl_live_update_toggle";
-static const gchar
*PLAYLIST_AUTOSYNC_MODE_NONE_RADIO="playlist_autosync_mode_none_radio";
-static const gchar
*PLAYLIST_AUTOSYNC_MODE_AUTOMATIC_RADIO="playlist_autosync_mode_automatic_radio";
-static const gchar
*PLAYLIST_AUTOSYNC_MODE_MANUAL_RADIO="playlist_autosync_mode_manual_radio";
+static const gchar
*SYNC_PLAYLIST_MODE_NONE_RADIO="sync_playlist_mode_none_radio";
+static const gchar
*SYNC_PLAYLIST_MODE_AUTOMATIC_RADIO="sync_playlist_mode_automatic_radio";
+static const gchar
*SYNC_PLAYLIST_MODE_MANUAL_RADIO="sync_playlist_mode_manual_radio";
static const gchar *MANUAL_SYNCDIR_ENTRY="manual_syncdir_entry";
static const gchar *MANUAL_SYNCDIR_BUTTON="manual_syncdir_button";
static const gchar
*DELETE_REPOSITORY_CHECKBUTTON="delete_repository_checkbutton";
@@ -374,14 +374,14 @@
if (changed)
{
gtk_toggle_button_set_active (
- GTK_TOGGLE_BUTTON (GET_WIDGET
(PLAYLIST_AUTOSYNC_MODE_MANUAL_RADIO)),
+ GTK_TOGGLE_BUTTON (GET_WIDGET (SYNC_PLAYLIST_MODE_MANUAL_RADIO)),
TRUE);
}
}
-/* playlist_autosync_mode_none was toggled */
-static void playlist_autosync_mode_none_toggled (GtkToggleButton *togglebutton,
+/* sync_playlist_mode_none was toggled */
+static void sync_playlist_mode_none_toggled (GtkToggleButton *togglebutton,
RepWin *repwin)
{
gchar *key;
@@ -394,14 +394,14 @@
if (gtk_toggle_button_get_active (togglebutton))
{
finish_int_storage (repwin, key,
- PLAYLIST_AUTOSYNC_MODE_NONE);
+ SYNC_PLAYLIST_MODE_NONE);
update_buttons (repwin);
}
}
-/* playlist_autosync_mode_none was toggled */
-static void playlist_autosync_mode_manual_toggled (GtkToggleButton
*togglebutton,
+/* sync_playlist_mode_none was toggled */
+static void sync_playlist_mode_manual_toggled (GtkToggleButton *togglebutton,
RepWin *repwin)
{
gchar *key;
@@ -414,14 +414,14 @@
if (gtk_toggle_button_get_active (togglebutton))
{
finish_int_storage (repwin, key,
- PLAYLIST_AUTOSYNC_MODE_MANUAL);
+ SYNC_PLAYLIST_MODE_MANUAL);
update_buttons (repwin);
}
}
-/* playlist_autosync_mode_none was toggled */
-static void playlist_autosync_mode_automatic_toggled (GtkToggleButton
*togglebutton,
+/* sync_playlist_mode_none was toggled */
+static void sync_playlist_mode_automatic_toggled (GtkToggleButton
*togglebutton,
RepWin *repwin)
{
gchar *key;
@@ -434,7 +434,7 @@
if (gtk_toggle_button_get_active (togglebutton))
{
finish_int_storage (repwin, key,
- PLAYLIST_AUTOSYNC_MODE_AUTOMATIC);
+ SYNC_PLAYLIST_MODE_AUTOMATIC);
update_buttons (repwin);
}
}
@@ -771,13 +771,13 @@
/* sync directory or directories */
switch (get_current_prefs_int (repwin, key_syncmode))
{
- case PLAYLIST_AUTOSYNC_MODE_NONE:
+ case SYNC_PLAYLIST_MODE_NONE:
break; /* should never happen */
- case PLAYLIST_AUTOSYNC_MODE_MANUAL:
+ case SYNC_PLAYLIST_MODE_MANUAL:
manual_sync_dir =
get_current_prefs_string (repwin, key_manual_sync_dir);
/* no break;! we continue calling sync_playlist() */
- case PLAYLIST_AUTOSYNC_MODE_AUTOMATIC:
+ case SYNC_PLAYLIST_MODE_AUTOMATIC:
sync_playlist (playlist,
manual_sync_dir,
NULL, FALSE,
@@ -1398,32 +1398,32 @@
switch (syncmode)
{
- case PLAYLIST_AUTOSYNC_MODE_NONE:
+ case SYNC_PLAYLIST_MODE_NONE:
gtk_toggle_button_set_active (
- GTK_TOGGLE_BUTTON (GET_WIDGET
(PLAYLIST_AUTOSYNC_MODE_NONE_RADIO)),
+ GTK_TOGGLE_BUTTON (GET_WIDGET (SYNC_PLAYLIST_MODE_NONE_RADIO)),
TRUE);
break;
- case PLAYLIST_AUTOSYNC_MODE_MANUAL:
+ case SYNC_PLAYLIST_MODE_MANUAL:
gtk_toggle_button_set_active (
- GTK_TOGGLE_BUTTON (GET_WIDGET
(PLAYLIST_AUTOSYNC_MODE_MANUAL_RADIO)),
+ GTK_TOGGLE_BUTTON (GET_WIDGET
(SYNC_PLAYLIST_MODE_MANUAL_RADIO)),
TRUE);
break;
- case PLAYLIST_AUTOSYNC_MODE_AUTOMATIC:
+ case SYNC_PLAYLIST_MODE_AUTOMATIC:
gtk_toggle_button_set_active (
- GTK_TOGGLE_BUTTON (GET_WIDGET
(PLAYLIST_AUTOSYNC_MODE_AUTOMATIC_RADIO)),
+ GTK_TOGGLE_BUTTON (GET_WIDGET
(SYNC_PLAYLIST_MODE_AUTOMATIC_RADIO)),
TRUE);
break;
default:
/* repair broken prefs */
- prefs_set_int (key, PLAYLIST_AUTOSYNC_MODE_NONE);
+ prefs_set_int (key, SYNC_PLAYLIST_MODE_NONE);
gtk_toggle_button_set_active (
- GTK_TOGGLE_BUTTON (GET_WIDGET
(PLAYLIST_AUTOSYNC_MODE_NONE_RADIO)),
+ GTK_TOGGLE_BUTTON (GET_WIDGET (SYNC_PLAYLIST_MODE_NONE_RADIO)),
TRUE);
break;
}
/* make options available where appropriate */
gtk_widget_set_sensitive (GET_WIDGET (SYNC_OPTIONS_HBOX),
- syncmode != PLAYLIST_AUTOSYNC_MODE_NONE);
+ syncmode != SYNC_PLAYLIST_MODE_NONE);
/* set standard toggle buttons */
for (i=0; widget_names[i]; ++i)
{
@@ -1747,7 +1747,7 @@
KEY_SYNCMODE);
val = get_current_prefs_int (repwin, key);
g_free (key);
- if (val != PLAYLIST_AUTOSYNC_MODE_NONE)
+ if (val != SYNC_PLAYLIST_MODE_NONE)
{
sens = TRUE;
}
@@ -1961,19 +1961,19 @@
}
/* Togglebutton callbacks */
- g_signal_connect (GET_WIDGET (PLAYLIST_AUTOSYNC_MODE_NONE_RADIO),
+ g_signal_connect (GET_WIDGET (SYNC_PLAYLIST_MODE_NONE_RADIO),
"toggled",
- G_CALLBACK (playlist_autosync_mode_none_toggled),
+ G_CALLBACK (sync_playlist_mode_none_toggled),
repwin);
- g_signal_connect (GET_WIDGET (PLAYLIST_AUTOSYNC_MODE_MANUAL_RADIO),
+ g_signal_connect (GET_WIDGET (SYNC_PLAYLIST_MODE_MANUAL_RADIO),
"toggled",
- G_CALLBACK (playlist_autosync_mode_manual_toggled),
+ G_CALLBACK (sync_playlist_mode_manual_toggled),
repwin);
- g_signal_connect (GET_WIDGET (PLAYLIST_AUTOSYNC_MODE_AUTOMATIC_RADIO),
+ g_signal_connect (GET_WIDGET (SYNC_PLAYLIST_MODE_AUTOMATIC_RADIO),
"toggled",
- G_CALLBACK (playlist_autosync_mode_automatic_toggled),
+ G_CALLBACK (sync_playlist_mode_automatic_toggled),
repwin);
g_signal_connect (GET_WIDGET (DELETE_REPOSITORY_CHECKBUTTON),
Index: syncdir.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/syncdir.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- syncdir.c 15 May 2006 15:43:06 -0000 1.3
+++ syncdir.c 14 Jun 2006 16:12:10 -0000 1.4
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-05-16 00:20:46 jcs>
+/* Time-stamp: <2006-06-15 00:59:12 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -716,7 +716,7 @@
g_return_if_fail (pl);
syncmode = get_playlist_prefs_int (pl, KEY_SYNCMODE);
- if (syncmode != PLAYLIST_AUTOSYNC_MODE_NONE)
+ if (syncmode != SYNC_PLAYLIST_MODE_NONE)
{
gchar *key_sync_confirm_dirs =
get_playlist_prefs_key (index, pl, KEY_SYNC_CONFIRM_DIRS);
@@ -728,7 +728,7 @@
get_playlist_prefs_key (index, pl, KEY_SYNC_SHOW_SUMMARY);
gchar *syncdir = NULL;
- if (syncmode == PLAYLIST_AUTOSYNC_MODE_MANUAL)
+ if (syncmode == SYNC_PLAYLIST_MODE_MANUAL)
{
syncdir = get_playlist_prefs_string (pl,
KEY_MANUAL_SYNCDIR);
Index: syncdir.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/syncdir.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- syncdir.h 15 May 2006 15:43:06 -0000 1.3
+++ syncdir.h 14 Jun 2006 16:12:10 -0000 1.4
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-05-15 21:56:47 jcs>
+/* Time-stamp: <2006-06-15 00:55:28 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -38,6 +38,17 @@
#include "itdb.h"
+enum
+{
+ /* no auto-sync */
+ SYNC_PLAYLIST_MODE_NONE = 0,
+ /* use dirs from filenames in playlist */
+ SYNC_PLAYLIST_MODE_AUTOMATIC = 1,
+ /* use specified dir */
+ SYNC_PLAYLIST_MODE_MANUAL = 2
+};
+
+
void sync_playlist (Playlist *playlist,
const gchar *syncdir,
const gchar *key_sync_confirm_dirs,
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2