Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv12696/src
Modified Files:
info.c prefs.c prefs.h
Log Message:
Move size_info to new prefs. Also did some minor cleanup
Index: info.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/info.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- info.c 7 Jun 2006 05:03:43 -0000 1.41
+++ info.c 9 Jun 2006 02:19:46 -0000 1.42
@@ -168,7 +168,8 @@
if (info_window)
{
gint defx, defy;
- prefs_get_size_info (&defx, &defy);
+ defx = prefs_get_int("size_info.x");
+ defy = prefs_get_int("size_info.y");
gtk_window_set_default_size (GTK_WINDOW (info_window), defx, defy);
prefs_set_info_window (TRUE); /* notify prefs */
info_update ();
@@ -201,7 +202,8 @@
{
gint defx, defy;
gtk_window_get_size (GTK_WINDOW (info_window), &defx, &defy);
- prefs_set_size_info (defx, defy);
+ prefs_set_int("size_info.x", defx);
+ prefs_set_int("size_info.y", defy);
}
}
Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -d -r1.211 -r1.212
--- prefs.c 9 Jun 2006 01:45:01 -0000 1.211
+++ prefs.c 9 Jun 2006 02:19:46 -0000 1.212
@@ -211,6 +211,8 @@
prefs_set_int("size_dirbr.y", 400);
prefs_set_int("size_prefs.x", -1);
prefs_set_int("size_prefs.y", 480);
+ prefs_set_int("size_info.x", 510);
+ prefs_set_int("size_info.y", 300);
}
/* Initialize default variable-length list entries */
@@ -884,6 +886,13 @@
if (x>0)
prefs_set_int_index("paned_pos_", PANED_STATUS2,
(x-p)/2 );
}
+
+ /* Changed layout of info window between 0.72 and 0.73 */
+ if (version < 0.73)
+ {
+ prefs_set_string("size_info.x", NULL);
+ prefs_set_string("size_info.y", NULL);
+ }
prefs_set_string ("version", VERSION);
}
@@ -1757,8 +1766,6 @@
mycfg->autoimport = FALSE;
mycfg->offline = FALSE;
mycfg->write_extended_info = TRUE;
- mycfg->size_info.x = 510;
- mycfg->size_info.y = 300;
mycfg->readtags = TRUE;
mycfg->parsetags = FALSE;
mycfg->parsetags_overwrite = FALSE;
@@ -2099,18 +2106,6 @@
{
/* ignore option -- has been deleted with 0.53 */
}
- else if(g_ascii_strcasecmp (line, "size_info.x") == 0)
- {
- /* changed layout of info window between 0.72 and 0.73 */
- if (cfg->version >= 0.73)
- prefs_set_size_info (atoi (arg), -2);
- }
- else if(g_ascii_strcasecmp (line, "size_info.y") == 0)
- {
- /* changed layout of info window between 0.72 and 0.73 */
- if (cfg->version >= 0.73)
- prefs_set_size_info (-2, atoi (arg));
- }
else if(g_ascii_strcasecmp (line, "export_check_existing") == 0)
{
prefs_set_int (EXPORT_FILES_CHECK_EXISTING,
@@ -2345,9 +2340,6 @@
fprintf(fp, "write_charset=%d\n",prefs_get_write_charset());
fprintf(fp, "add_recursively=%d\n",prefs_get_add_recursively());
fprintf(fp, "case_sensitive=%d\n",prefs_get_case_sensitive());
- fprintf(fp, _("# window sizes: main window, confirmation scrolled,\n#
confirmation non-scrolled, dirbrowser, prefs\n"));
- fprintf (fp, "size_info.x=%d\n", cfg->size_info.x);
- fprintf (fp, "size_info.y=%d\n", cfg->size_info.y);
fprintf (fp, "automount=%d\n", cfg->automount);
fprintf (fp, "info_window=%d\n", cfg->info_window);
fprintf (fp, "tmp_disable_sort=%d\n", cfg->tmp_disable_sort);
@@ -2575,22 +2567,6 @@
return cfgdir;
}
-/* Sets the default size for the info window. -2 means:
- * don't change the current size */
-void prefs_set_size_info (gint x, gint y)
-{
- if (x != -2) cfg->size_info.x = x;
- if (y != -2) cfg->size_info.y = y;
-}
-
-/* Writes the current default size for the info window in
- "x" and "y" */
-void prefs_get_size_info (gint *x, gint *y)
-{
- *x = cfg->size_info.x;
- *y = cfg->size_info.y;
-}
-
void prefs_set_readtags(gboolean active)
{
cfg->readtags = active;
Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- prefs.h 9 Jun 2006 01:45:01 -0000 1.138
+++ prefs.h 9 Jun 2006 02:19:46 -0000 1.139
@@ -88,11 +88,6 @@
};
-struct win_size {
- gint x;
- gint y;
-};
-
struct cfg
{
gchar *charset; /* CHARSET to use with file operations */
@@ -120,11 +115,7 @@
gboolean offline; /* are we working offline, i.e. without iPod? */
gboolean write_extended_info; /* write additional file with PC
filenames etc? */
- struct
- {
- gboolean track, ipod_file, local_file, database;
- } deletion;
- struct win_size size_info; /* last size of info window */
+
gboolean readtags; /* Read tags from file contents? */
gboolean parsetags; /* Get tags by parsing filename? */
gchar *parsetags_template; /* template for parsing tags */
@@ -323,7 +314,6 @@
const gchar *prefs_get_coverart_template (void);
void prefs_set_charset (gchar *charset);
void prefs_cfg_set_charset (struct cfg *cfg, gchar *charset);
-void prefs_set_size_info (gint x, gint y);
void prefs_set_statusbar_timeout (guint32 val);
void prefs_set_automount(gboolean val);
void prefs_set_info_window(gboolean val);
@@ -338,7 +328,6 @@
gboolean prefs_get_write_extended_info(void);
gboolean prefs_get_autoimport(void);
gchar * prefs_get_charset (void);
-void prefs_get_size_info (gint *x, gint *y);
gboolean prefs_get_md5tracks(void);
gboolean prefs_get_block_display(void);
guint32 prefs_get_statusbar_timeout (void);
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2