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

Modified Files:
        confirmation.c display_sorttabs.c prefs.c prefs.h 
Log Message:

Move size_cal and size_conf_sw to new prefs


Index: confirmation.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/confirmation.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- confirmation.c      14 May 2006 15:58:54 -0000      1.26
+++ confirmation.c      9 Jun 2006 00:42:19 -0000       1.27
@@ -68,7 +68,10 @@
        gint defx, defy;
        gtk_window_get_size (GTK_WINDOW (cd->window), &defx, &defy);
        if (cd->scrolled)
-           prefs_set_size_conf_sw (defx, defy);
+       {
+               prefs_set_int("size_conf_sw.x", defx);
+               prefs_set_int("size_conf_sw.y", defy);
+       }
        else
            prefs_set_size_conf (defx, defy);
        gtk_widget_destroy (cd->window);
@@ -394,7 +397,8 @@
            gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(w), FALSE);
        }
        cd->scrolled = TRUE;
-       prefs_get_size_conf_sw (&defx, &defy);
+       defx = prefs_get_int("size_conf_sw.x");
+       defy = prefs_get_int("size_conf_sw.y");
     }
     else
     { /* no text -> hide widget */

Index: display_sorttabs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/display_sorttabs.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- display_sorttabs.c  8 Jun 2006 04:31:44 -0000       1.76
+++ display_sorttabs.c  9 Jun 2006 00:42:22 -0000       1.77
@@ -3527,7 +3527,9 @@
     gint x,y;
 
     gtk_window_get_size (cal, &x, &y);
-    prefs_set_size_cal (x, y);
+    prefs_set_int("size_cal.x", x);
+       prefs_set_int("size_cal.y", y);
+       
 }
 
 /* Callback for 'delete' event */
@@ -3587,7 +3589,8 @@
     cal = gtkpod_xml_get_widget (cal_xml, "calendar_window");
 
     /* Set to saved size */
-    prefs_get_size_cal (&defx, &defy);
+    defx = prefs_get_int("size_cal.x");
+               defy = prefs_get_int("size_cal.y");
     gtk_window_set_default_size (GTK_WINDOW (cal), defx, defy);
 
     /* Set sorttab number */

Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -d -r1.207 -r1.208
--- prefs.c     8 Jun 2006 23:15:46 -0000       1.207
+++ prefs.c     9 Jun 2006 00:42:22 -0000       1.208
@@ -201,6 +201,10 @@
        /* Set window sizes */
        prefs_set_int("size_gtkpod.x", 600);
        prefs_set_int("size_gtkpod.y", 500);
+       prefs_set_int("size_cal.x", 500);
+       prefs_set_int("size_cal.y", 300);
+       prefs_set_int("size_conf_sw.x", 300);
+       prefs_set_int("size_conf_sw.y", 300);
 }
 
 /* Initialize default variable-length list entries */
@@ -1747,10 +1751,6 @@
     mycfg->autoimport = FALSE;
     mycfg->offline = FALSE;
     mycfg->write_extended_info = TRUE;
-    mycfg->size_cal.x = 500;
-    mycfg->size_cal.y = 350;
-    mycfg->size_conf_sw.x = 300;
-    mycfg->size_conf_sw.y = 300;
     mycfg->size_conf.x = 300;
     mycfg->size_conf.y = -1;
     mycfg->size_dirbr.x = 300;
@@ -2099,22 +2099,6 @@
          {
              /* ignore option -- has been deleted with 0.53 */
          }
-         else if(g_ascii_strcasecmp (line, "size_cal.x") == 0)
-         {
-             prefs_set_size_cal (atoi (arg), -2);
-         }
-         else if(g_ascii_strcasecmp (line, "size_cal.y") == 0)
-         {
-             prefs_set_size_cal (-2, atoi (arg));
-         }
-         else if(g_ascii_strcasecmp (line, "size_conf_sw.x") == 0)
-         {
-             prefs_set_size_conf_sw (atoi (arg), -2);
-         }
-         else if(g_ascii_strcasecmp (line, "size_conf.y") == 0)
-         {
-             prefs_set_size_conf (-2, atoi (arg));
-         }
          else if(g_ascii_strcasecmp (line, "size_dirbr.x") == 0)
          {
              prefs_set_size_dirbr (atoi (arg), -2);
@@ -2378,10 +2362,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_cal.x=%d\n", cfg->size_cal.x);
-    fprintf (fp, "size_cal.y=%d\n", cfg->size_cal.y);
-    fprintf (fp, "size_conf_sw.x=%d\n", cfg->size_conf_sw.x);
-    fprintf (fp, "size_conf_sw.y=%d\n", cfg->size_conf_sw.y);
     fprintf (fp, "size_conf.x=%d\n", cfg->size_conf.x);
     fprintf (fp, "size_conf.y=%d\n", cfg->size_conf.y);
     fprintf (fp, "size_dirbr.x=%d\n", cfg->size_dirbr.x);
@@ -2617,22 +2597,6 @@
   return cfgdir;
 }
 
-/* Sets the default size for the calendar window. -2 means: don't change
- * the current size */
-void prefs_set_size_cal (gint x, gint y)
-{
-    if (x != -2) cfg->size_cal.x = x;
-    if (y != -2) cfg->size_cal.y = y;
-}
-
-/* Sets the default size for the scrolled conf window. -2 means: don't
- * change the current size */
-void prefs_set_size_conf_sw (gint x, gint y)
-{
-    if (x != -2) cfg->size_conf_sw.x = x;
-    if (y != -2) cfg->size_conf_sw.y = y;
-}
-
 /* Sets the default size for the non-scrolled conf window. -2 means:
  * don't change the current size */
 void prefs_set_size_conf (gint x, gint y)
@@ -2665,22 +2629,6 @@
     if (y != -2) cfg->size_info.y = y;
 }
 
-/* Writes the current default size for the gtkpod window in "x" and
-   "y" */
-void prefs_get_size_cal (gint *x, gint *y)
-{
-    *x = cfg->size_cal.x;
-    *y = cfg->size_cal.y;
-}
-
-/* Writes the current default size for the scrolled conf window in "x"
-   and "y" */
-void prefs_get_size_conf_sw (gint *x, gint *y)
-{
-    *x = cfg->size_conf_sw.x;
-    *y = cfg->size_conf_sw.y;
-}
-
 /* Writes the current default size for the non-scrolled conf window in
    "x" and "y" */
 void prefs_get_size_conf (gint *x, gint *y)

Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- prefs.h     8 Jun 2006 23:15:47 -0000       1.134
+++ prefs.h     9 Jun 2006 00:42:23 -0000       1.135
@@ -124,8 +124,6 @@
   {
       gboolean track, ipod_file, local_file, database;
   } deletion;
-  struct win_size size_cal;     /* last size of calendar window */
-  struct win_size size_conf_sw; /* last size of conf window (scrolled) */
   struct win_size size_conf;    /* last size of conf window */
   struct win_size size_dirbr;   /* last size of dirbrowser window */
   struct win_size size_prefs;   /* last size of prefs window */
@@ -328,8 +326,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_cal (gint x, gint y);
-void prefs_set_size_conf_sw (gint x, gint y);
 void prefs_set_size_conf (gint x, gint y);
 void prefs_set_size_dirbr (gint x, gint y);
 void prefs_set_size_prefs (gint x, gint y);
@@ -348,8 +344,6 @@
 gboolean prefs_get_write_extended_info(void);
 gboolean prefs_get_autoimport(void);
 gchar * prefs_get_charset (void);
-void prefs_get_size_cal (gint *x, gint *y);
-void prefs_get_size_conf_sw (gint *x, gint *y);
 void prefs_get_size_conf (gint *x, gint *y);
 void prefs_get_size_dirbr (gint *x, gint *y);
 void prefs_get_size_prefs (gint *x, gint *y);



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

Reply via email to