Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15331/src
Modified Files:
fileselection.c prefs.c prefs.h
Log Message:
Move size_dirbr to new prefs
Index: fileselection.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/fileselection.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- fileselection.c 22 May 2006 15:12:45 -0000 1.8
+++ fileselection.c 9 Jun 2006 01:22:29 -0000 1.9
@@ -716,7 +716,8 @@
gtk_window_get_size (GTK_WINDOW (dirbrowser), &x, &y);
/* store size for next time */
- prefs_set_size_dirbr (x, y);
+ prefs_set_int("size_dirbr.x", x);
+ prefs_set_int("size_dirbr.y", y);
gtk_widget_destroy(dirbrowser);
/* dirbrowser = NULL; -- will be done by the dirbrowser_destroy()
as part of the callback */
@@ -896,7 +897,8 @@
gint x,y;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- prefs_get_size_dirbr (&x, &y);
+ x = prefs_get_int("size_dirbr.x");
+ y = prefs_get_int("size_dirbr.y");
gtk_window_set_default_size(GTK_WINDOW(window), x, y);
gtk_window_set_title(GTK_WINDOW(window), title);
gtk_container_border_width(GTK_CONTAINER(window), 10);
Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -d -r1.209 -r1.210
--- prefs.c 9 Jun 2006 00:58:41 -0000 1.209
+++ prefs.c 9 Jun 2006 01:22:29 -0000 1.210
@@ -207,6 +207,8 @@
prefs_set_int("size_conf_sw.y", 300);
prefs_set_int("size_conf.x", 300);
prefs_set_int("size_conf.y", -1);
+ prefs_set_int("size_dirbr.x", 300);
+ prefs_set_int("size_dirbr.y", 400);
}
/* Initialize default variable-length list entries */
@@ -1753,8 +1755,6 @@
mycfg->autoimport = FALSE;
mycfg->offline = FALSE;
mycfg->write_extended_info = TRUE;
- mycfg->size_dirbr.x = 300;
- mycfg->size_dirbr.y = 400;
mycfg->size_prefs.x = -1;
mycfg->size_prefs.y = 480;
mycfg->size_info.x = 510;
@@ -2099,14 +2099,6 @@
{
/* ignore option -- has been deleted with 0.53 */
}
- else if(g_ascii_strcasecmp (line, "size_dirbr.x") == 0)
- {
- prefs_set_size_dirbr (atoi (arg), -2);
- }
- else if(g_ascii_strcasecmp (line, "size_dirbr.y") == 0)
- {
- prefs_set_size_dirbr (-2, atoi (arg));
- }
else if(g_ascii_strcasecmp (line, "size_prefs.x") == 0)
{
prefs_set_size_prefs (atoi (arg), -2);
@@ -2362,8 +2354,6 @@
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_dirbr.x=%d\n", cfg->size_dirbr.x);
- fprintf (fp, "size_dirbr.y=%d\n", cfg->size_dirbr.y);
fprintf (fp, "size_prefs.x=%d\n", cfg->size_prefs.x);
fprintf (fp, "size_prefs.y=%d\n", cfg->size_prefs.y);
fprintf (fp, "size_info.x=%d\n", cfg->size_info.x);
@@ -2595,14 +2585,6 @@
return cfgdir;
}
-/* Sets the default size for the dirbrowser window. -2 means:
- * don't change the current size */
-void prefs_set_size_dirbr (gint x, gint y)
-{
- if (x != -2) cfg->size_dirbr.x = x;
- if (y != -2) cfg->size_dirbr.y = y;
-}
-
/* Sets the default size for the prefs window. -2 means:
* don't change the current size */
void prefs_set_size_prefs (gint x, gint y)
@@ -2619,15 +2601,6 @@
if (y != -2) cfg->size_info.y = y;
}
-/* Writes the current default size for the dirbrowser window in
- "x" and "y" */
-void prefs_get_size_dirbr (gint *x, gint *y)
-{
- *x = cfg->size_dirbr.x;
- *y = cfg->size_dirbr.y;
-}
-
-
/* Writes the current default size for the info window in
"x" and "y" */
void prefs_get_size_prefs (gint *x, gint *y)
Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- prefs.h 9 Jun 2006 00:58:41 -0000 1.136
+++ prefs.h 9 Jun 2006 01:22:29 -0000 1.137
@@ -124,7 +124,6 @@
{
gboolean track, ipod_file, local_file, database;
} deletion;
- struct win_size size_dirbr; /* last size of dirbrowser window */
struct win_size size_prefs; /* last size of prefs window */
struct win_size size_info; /* last size of info window */
gboolean readtags; /* Read tags from file contents? */
@@ -325,7 +324,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_dirbr (gint x, gint y);
void prefs_set_size_prefs (gint x, gint y);
void prefs_set_size_info (gint x, gint y);
void prefs_set_statusbar_timeout (guint32 val);
@@ -342,7 +340,6 @@
gboolean prefs_get_write_extended_info(void);
gboolean prefs_get_autoimport(void);
gchar * prefs_get_charset (void);
-void prefs_get_size_dirbr (gint *x, gint *y);
void prefs_get_size_prefs (gint *x, gint *y);
void prefs_get_size_info (gint *x, gint *y);
gboolean prefs_get_md5tracks(void);
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2