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

Modified Files:
        display_songs.c prefs.c prefs.h prefs_window.c 
Log Message:

Moved multi_edit to new prefs.


Index: display_songs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/display_songs.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- display_songs.c     12 Jun 2006 04:32:35 -0000      1.105
+++ display_songs.c     12 Jun 2006 04:48:41 -0000      1.106
@@ -791,7 +791,7 @@
 
 
   column = (TM_item) g_object_get_data(G_OBJECT(renderer), "column");
-  multi_edit = prefs_get_multi_edit ();
+  multi_edit = prefs_get_int("multi_edit");
   if (column == TM_COLUMN_TITLE)
       multi_edit &= prefs_get_int("multi_edit_title");
   selection = gtk_tree_view_get_selection(track_treeview);
@@ -1039,7 +1039,7 @@
   gboolean active;
 
   column = (TM_item) g_object_get_data(G_OBJECT(renderer), "column");
-  multi_edit = prefs_get_multi_edit ();
+  multi_edit = prefs_get_int("multi_edit");
   selection = gtk_tree_view_get_selection(track_treeview);
   row_list = gtk_tree_selection_get_selected_rows(selection, &model);
 
@@ -1393,13 +1393,13 @@
        /* Before removing the widget we set multi_edit to FALSE. That
           way at most one entry will be changed (this also doesn't
           seem to work the way intended) */
-       gboolean me = prefs_get_multi_edit ();
-       prefs_set_multi_edit (FALSE);
+       gboolean me = prefs_get_int("multi_edit");
+       prefs_set_int("multi_edit", FALSE);
        if (!cancel && col->editable_widget)
            gtk_cell_editable_editing_done (col->editable_widget);
        if (col->editable_widget)
            gtk_cell_editable_remove_widget (col->editable_widget);
-       prefs_set_multi_edit (me);
+       prefs_set_int("multi_edit", me);
     }
 }
 

Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -d -r1.233 -r1.234
--- prefs.c     12 Jun 2006 04:32:35 -0000      1.233
+++ prefs.c     12 Jun 2006 04:48:41 -0000      1.234
@@ -231,6 +231,7 @@
     prefs_set_int("last_prefs_page", 0);
     prefs_set_int("tmp_disable_sort", TRUE);
     prefs_set_int("multi_edit_title", TRUE);
+    prefs_set_int("multi_edit", FALSE);
 }
 
 /* Initialize default variable-length list entries */
@@ -1796,7 +1797,6 @@
     mycfg->update_charset = FALSE;
     mycfg->write_charset = FALSE;
 
-    mycfg->multi_edit = FALSE;
     mycfg->not_played_track = TRUE;
     mycfg->misc_track_nr = 25;
     mycfg->sortcfg.pm_sort = SORT_NONE;
@@ -2036,10 +2036,6 @@
          {
              prefs_set_display_tooltips_prefs((gboolean)atoi(arg));
          }
-         else if(g_ascii_strcasecmp (line, "multi_edit") == 0)
-         {
-             prefs_set_multi_edit((gboolean)atoi(arg));
-         }
          else if((g_ascii_strcasecmp (line, "not_played_track") == 0) ||
                  (g_ascii_strcasecmp (line, "not_played_song") == 0))
          {
@@ -2250,7 +2246,6 @@
            prefs_get_display_tooltips_main());
     fprintf(fp, "display_tooltips_prefs=%d\n",
            prefs_get_display_tooltips_prefs());
-    fprintf(fp, "multi_edit=%d\n", prefs_get_multi_edit());
     fprintf(fp, "misc_track_nr=%d\n", prefs_get_misc_track_nr());
     fprintf(fp, "not_played_track=%d\n", prefs_get_not_played_track());
     fprintf(fp, "update_charset=%d\n",prefs_get_update_charset());
@@ -2638,16 +2633,6 @@
     return cfg->display_tooltips_prefs;
 }
 
-void prefs_set_multi_edit (gboolean state)
-{
-    cfg->multi_edit = state;
-}
-
-gboolean prefs_get_multi_edit (void)
-{
-    return cfg->multi_edit;
-}
-
 void prefs_set_not_played_track (gboolean state)
 {
     cfg->not_played_track = state;

Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -d -r1.159 -r1.160
--- prefs.h     12 Jun 2006 04:32:35 -0000      1.159
+++ prefs.h     12 Jun 2006 04:48:41 -0000      1.160
@@ -115,7 +115,6 @@
   gboolean write_charset;       /* Use selected charset when writing track? */
   gboolean group_compilations;  /* group compilations when browsing */
   guint32 statusbar_timeout;    /* timeout for statusbar messages */
-  gboolean multi_edit;          /* multi edit enabled? */
   gboolean not_played_track;    /* not played track in Highest rated 
playlist?*/
   gint misc_track_nr;            /* track's nr in the Highest rated, most 
played and most recently played pl*/
   float version;                /* version of gtkpod writing the cfg file */
@@ -305,8 +304,6 @@
 gboolean prefs_get_display_tooltips_main (void);
 void prefs_set_display_tooltips_prefs (gboolean state);
 gboolean prefs_get_display_tooltips_prefs (void);
-void prefs_set_multi_edit (gboolean state);
-gboolean prefs_get_multi_edit (void);
 void prefs_set_misc_track_nr (gint state);
 gint prefs_get_misc_track_nr (void);
 void prefs_set_not_played_track (gboolean state);

Index: prefs_window.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs_window.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -d -r1.153 -r1.154
--- prefs_window.c      12 Jun 2006 04:32:35 -0000      1.153
+++ prefs_window.c      12 Jun 2006 04:48:41 -0000      1.154
@@ -421,7 +421,7 @@
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_multi_edit");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
-                                tmpcfg->multi_edit);
+                                prefs_get_int("multi_edit"));
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_not_played_track");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
@@ -436,7 +436,7 @@
     w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_multi_edit_title");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
                                 prefs_get_int("multi_edit_title"));
-    gtk_widget_set_sensitive (w, tmpcfg->multi_edit);
+    gtk_widget_set_sensitive (w, prefs_get_int("multi_edit"));
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_update_charset");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
@@ -700,7 +700,6 @@
        prefs_set_display_toolbar(tmpcfg->display_toolbar);
        prefs_set_display_tooltips_main (tmpcfg->display_tooltips_main);
        prefs_set_display_tooltips_prefs (tmpcfg->display_tooltips_prefs);
-       prefs_set_multi_edit (tmpcfg->multi_edit);
        prefs_set_misc_track_nr (tmpcfg->misc_track_nr);
        prefs_set_not_played_track (tmpcfg->not_played_track);
        prefs_set_update_charset(tmpcfg->update_charset);
@@ -1235,7 +1234,7 @@
     gboolean val = gtk_toggle_button_get_active (togglebutton);
     GtkWidget *w = gtkpod_xml_get_widget  (prefs_window_xml, 
"cfg_multi_edit_title");
 
-    tmpcfg->multi_edit = val;
+    temp_prefs_set_int(temp_prefs, "multi_edit", val);
     gtk_widget_set_sensitive (w, val);
 }
 



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

Reply via email to