graveman-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Graveman-cvs] Changes to graveman/current/src/callbacks.c


From: sylvain cresto
Subject: [Graveman-cvs] Changes to graveman/current/src/callbacks.c
Date: Thu, 10 Feb 2005 19:53:37 -0500

Index: graveman/current/src/callbacks.c
diff -u graveman/current/src/callbacks.c:1.15 
graveman/current/src/callbacks.c:1.16
--- graveman/current/src/callbacks.c:1.15       Thu Feb 10 23:12:31 2005
+++ graveman/current/src/callbacks.c    Fri Feb 11 00:53:37 2005
@@ -461,6 +461,7 @@
 void gtk_audio_addtrack(GtkWidget *Abtn, gpointer Adata)
 {
   GHashTable *Lhash = (GHashTable *)Adata;
+  GtkWidget *Lwindow1 = GTK_WIDGET(g_hash_table_lookup(Lhash, "topwindow"));
   GtkTreeView *Lliste = GTK_TREE_VIEW(g_hash_table_lookup(Lhash, 
"LISTEAUDIO"));
   guint32 *Laudiolen = (guint32 *)g_hash_table_lookup(Lhash, "audiolen");
   guint32 *Laudiomaxlen = (guint32 *)g_hash_table_lookup(Lhash, "audiomaxlen");
@@ -475,9 +476,11 @@
 
     Lfiles = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(Lpistesel));
 
+    set_cursor(Lwindow1, GDK_WATCH);
     for (Lcur = Lfiles; Lcur && Lcur->data; Lcur = Lcur->next) {
       _add_a_piste((gchar *) Lcur->data, GTK_LIST_STORE(Ltreemodel), Lhash);
     }
+    unset_cursor(Lwindow1);
 
     g_slist_free(Lfiles);
   }
@@ -491,6 +494,7 @@
 void gtk_data_adddirectory(GtkWidget *btn, gpointer Adata)
 {
   GHashTable *Lhash = (GHashTable *)Adata;
+  GtkWidget *Lwindow1 = GTK_WIDGET(g_hash_table_lookup(Lhash, "topwindow"));
   GtkTreeView *Lliste = GTK_TREE_VIEW(g_hash_table_lookup(Lhash, 
"_current_list"));
   GtkTreeSelection *Lselection = 
gtk_tree_view_get_selection(GTK_TREE_VIEW(Lliste));
   GtkTreeModel *Ltreemodel = gtk_tree_view_get_model(GTK_TREE_VIEW(Lliste));
@@ -522,6 +526,7 @@
 
   use_last_dir(GTK_FILE_CHOOSER(Lfilesel));
   if (gtk_dialog_run(GTK_DIALOG(Lfilesel))==GTK_RESPONSE_ACCEPT) {
+    set_cursor(Lwindow1, GDK_WATCH);
     save_last_dir(GTK_FILE_CHOOSER(Lfilesel));
 
     Lfiles = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(Lfilesel));
@@ -536,6 +541,7 @@
       gtk_tree_view_expand_row(Lliste, Lpath, TRUE);
       gtk_tree_path_free(Lpath);
     }
+    unset_cursor(Lwindow1);
   }
   gtk_widget_destroy(Lfilesel);
 
@@ -1559,7 +1565,8 @@
     gchar *Lfilename = NULL;
 
     for (i=0; ((Lallname[i])); i++) {
-      Lunfic = g_strchomp(Lallname[i]);
+      if ((!(Lunfic = g_strchomp(Lallname[i]))) || !*Lunfic) continue;
+
       /* on ne gere que les fichiers locaux pour le moment, et c'est deja ça 
!! */
       if (g_ascii_strncasecmp(Lunfic, "file://", 7) || (
             ! (
@@ -1571,7 +1578,7 @@
 #endif
              sc_str_has_casesuffix(Lunfic, WAV)))) continue;
 
-      Lfilename = g_filename_from_uri(Lunfic, NULL, NULL);
+      if (!(Lfilename = g_filename_from_uri(Lunfic, NULL, NULL))) continue;
       _add_a_piste(Lfilename, GTK_LIST_STORE(Ltreemodel), Lhash);
       g_free(Lfilename);
     }
@@ -1607,11 +1614,10 @@
 void data_dnd_data_received (GtkWidget *Aliste, GdkDragContext *Acontext, gint 
Ax, gint Ay, GtkSelectionData *Aseldata, guint Ainfo, guint Atime, gpointer 
Adata)
 {
   GHashTable *Lhash = (GHashTable *)Adata;
-  guint64 *Ldatasize; // = (guint64 *)g_hash_table_lookup(Lhash, "datasize");
-  guint64 *Ldatamaxsize; // = (guint64 *)g_hash_table_lookup(Lhash, 
"datamaxsize");
-  GtkProgressBar *Lcontenance; // = 
GTK_PROGRESS_BAR(g_hash_table_lookup(Lhash, "datasizebar"));
+  guint64 *Ldatasize;
+  guint64 *Ldatamaxsize;
+  GtkProgressBar *Lcontenance;
   GtkTreeModel *Ltreemodel = gtk_tree_view_get_model(GTK_TREE_VIEW(Aliste));
-  printf("ICI DNDN\n");
 
   _REMPLISSAGE_VALUE(Lhash, Aliste, Ldatasize, Ldatamaxsize, Lcontenance);
 
@@ -1634,17 +1640,11 @@
       gtk_tree_model_get_iter(Ltreemodel, &Liter, Lpath);
       gtk_tree_path_free(Lpath);
     }
-printf("ok encore la\n");
+
     for (i=0; ((Lallname[i])); i++) {
-printf("ok encore la 0\n");
-      Lunfic = g_strchomp(Lallname[i]);
-printf("ok encore la 1\n");
-      if (!*Lunfic) continue;
-printf("ok encore la 2 [%s]\n", Lunfic);
-
-//      Lfilename = g_filename_from_uri(Lunfic, NULL, NULL);
-Lfilename = g_strdup(Lunfic);
-printf("ok encore la 3 [%s]\n", Lfilename);
+      if ((!(Lunfic = g_strchomp(Lallname[i]))) || !*Lunfic) continue;
+      if (g_ascii_strncasecmp(Lunfic, "file://", 7)) continue;
+      if (!(Lfilename = g_filename_from_uri(Lunfic, NULL, NULL))) continue;
 
       _add_a_file(Lfilename, GTK_TREE_STORE(Ltreemodel), &Liter, Lhash, 
Ldatasize);
       




reply via email to

[Prev in Thread] Current Thread [Next in Thread]