Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /src/select_frame_handler.c [3b51fe] .. [dfc7fd] Maximize Restore

  Switch to side-by-side view

--- a/src/select_frame_handler.c
+++ b/src/select_frame_handler.c
@@ -266,9 +266,22 @@
             gtk_widget_set_usize(year_entry, 60, -2);
 
             if(strlen(main_data->disc_year) < 2)
-            {
-                sprintf(main_data->disc_year, "2007");
-            }
+	    {
+	      //not sure why a default is used, or where 2007 came from
+#if 0
+	      time_t t = time(0);
+	      struct tm *tmp = localtime(&t);
+	      
+	      if (
+		  (tmp == NULL) 
+		  ||
+		  (strftime(main_data->disc_year, 5, "%Y", tmp) <= 0)
+		  )
+		sprintf(main_data->disc_year, "2007");
+#else
+	      main_data->disc_year[0] = 0;
+#endif	      
+	    }
 
             gtk_entry_set_text(GTK_ENTRY(year_entry), main_data->disc_year);
             g_signal_connect(G_OBJECT(year_entry), "changed",