[Top][All Lists]
[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: |
Sat, 12 Feb 2005 11:23:08 -0500 |
Index: graveman/current/src/callbacks.c
diff -u graveman/current/src/callbacks.c:1.16
graveman/current/src/callbacks.c:1.17
--- graveman/current/src/callbacks.c:1.16 Fri Feb 11 00:53:37 2005
+++ graveman/current/src/callbacks.c Sat Feb 12 16:22:47 2005
@@ -50,12 +50,12 @@
/* on reconnai le type fichier grace a son extension */
#ifdef ENABLE_MP3
- if (sc_str_has_casesuffix(Anom, MP3)) {
+ if (GsupportMp3 && sc_str_has_casesuffix(Anom, MP3)) {
Lstatus = getMp3Info(Anom, <itle, &LAlbum, &LArtist, &Llennbr, NULL);
} else
#endif
#ifdef ENABLE_OGG
- if (sc_str_has_casesuffix(Anom, OGG)) {
+ if (GsupportOgg && sc_str_has_casesuffix(Anom, OGG)) {
Lstatus = getOggInfo(Anom, <itle, &LAlbum, &LArtist, &Llennbr, NULL);
} else
#endif
@@ -375,7 +375,7 @@
conf_store_value("iconsize", ++Lsize);
- manage_top_menu(Lhash, MENU_UPDATE);
+ manage_interface(Lhash, MENU_UPDATE);
}
/* clique sur le popup pour l'affichage ou non de la status bar */
@@ -501,10 +501,11 @@
GtkWidget *Lfilesel = create_adddirselection(NULL);
GtkTreeIter Liter;
GSList *Lfiles, *Lcur;
- GtkProgressBar *Lcontenance; // =
GTK_PROGRESS_BAR(g_hash_table_lookup(Lhash, "datasizebar"));
- guint64 *Ldatasize; // = (guint32 *)g_hash_table_lookup(Lhash, "datasize");
- guint64 *Ldatamaxsize; // = (guint32 *)g_hash_table_lookup(Lhash,
"datamaxsize");
+ GtkProgressBar *Lcontenance;
+ guint64 *Ldatasize;
+ guint64 *Ldatamaxsize;
gint Lnumsel = gtk_tree_selection_count_selected_rows(Lselection);
+ gint Ltype;
GtkTreePath *Lpath = NULL;
_REMPLISSAGE_VALUE(Lhash, Lliste, Ldatasize, Ldatamaxsize, Lcontenance);
@@ -521,6 +522,11 @@
gtk_tree_view_get_cursor(GTK_TREE_VIEW(Lliste), &Lpath, NULL);
if (!Lpath) return;
gtk_tree_model_get_iter(Ltreemodel, &Liter, Lpath);
+ gtk_tree_model_get(Ltreemodel, &Liter, 0, &Ltype, -1);
+ if (Ltype == TYPE_FILE) {
+ gtk_tree_path_up(Lpath);
+ gtk_tree_model_get_iter(Ltreemodel, &Liter, Lpath);
+ }
gtk_tree_path_free(Lpath);
}
@@ -555,23 +561,19 @@
GHashTable *Lhash = (GHashTable *)Adata;
GtkTreeView *Lliste = GTK_TREE_VIEW(g_hash_table_lookup(Lhash,
"_current_list"));
GtkTreeSelection *Lselection =
gtk_tree_view_get_selection(GTK_TREE_VIEW(Lliste));
- guint64 *Ldatasize; // = (guint32 *)g_hash_table_lookup(Lhash, "datasize");
- guint64 *Ldatamaxsize; // = (guint32 *)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(Lliste));
GtkWidget *Lfilesel = create_addfileselection(NULL);
GtkTreeIter Liter;
GSList *Lfiles, *Lcur;
+ gint Ltype;
gint Lnumsel = gtk_tree_selection_count_selected_rows(Lselection);
GtkTreePath *Lpath = NULL;
_REMPLISSAGE_VALUE(Lhash, Lliste, Ldatasize, Ldatamaxsize, Lcontenance);
- printf("2= ca le fais ? UINT [%d]\n", (guint32) *Ldatasize);
- if (GTK_IS_WIDGET(Lcontenance)) {
- printf("2= ici ca le fais\n");
- }
-
/* focus sur le premier element si pas de focus */
if (!Lnumsel) {
if (!gtk_tree_model_get_iter_first(Ltreemodel, &Liter)) return;
@@ -584,6 +586,11 @@
gtk_tree_view_get_cursor(GTK_TREE_VIEW(Lliste), &Lpath, NULL);
if (!Lpath) return;
gtk_tree_model_get_iter(Ltreemodel, &Liter, Lpath);
+ gtk_tree_model_get(Ltreemodel, &Liter, 0, &Ltype, -1);
+ if (Ltype == TYPE_FILE) {
+ gtk_tree_path_up(Lpath);
+ gtk_tree_model_get_iter(Ltreemodel, &Liter, Lpath);
+ }
gtk_tree_path_free(Lpath);
}
@@ -592,12 +599,10 @@
save_last_dir(GTK_FILE_CHOOSER(Lfilesel));
Lfiles = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(Lfilesel));
-printf("ici tout va bien !!!!\n");
for (Lcur = Lfiles; Lcur && Lcur->data; Lcur = Lcur->next) {
_add_a_file((gchar *) Lcur->data, GTK_TREE_STORE(Ltreemodel), &Liter,
Lhash, Ldatasize);
}
-printf("ici fin de tout va bien !!!!\n");
g_slist_free(Lfiles);
if ((Lpath = gtk_tree_model_get_path(Ltreemodel, &Liter))) {
@@ -607,10 +612,6 @@
}
gtk_widget_destroy(Lfilesel);
-printf("switch !!!!\n");
-if (GTK_IS_WIDGET(Lcontenance)) {
- printf("pre switch ok\n");
-}
switch_pbar_status(Lcontenance, *Ldatamaxsize, *Ldatasize, PB_UPDATE_DATA);
}
@@ -970,7 +971,7 @@
GHashTable *Lhash = (GHashTable *)Adata;
GtkWidget *Lwindow1 = GTK_WIDGET(g_hash_table_lookup(Lhash, "topwindow"));
GHashTable *Ldialoghash = create_dialog_confirm_operation(Lwindow1, _("Do
you really want to erase the CD-RW ?"),
- ("_Fast blank disk when erasing CD-RW"),
conf_get_boolean("fastblank"));
+ _("_Fast blank disk when erasing CD-RW"),
conf_get_boolean("fastblank"));
GtkWidget *Lconfirm = g_hash_table_lookup(Ldialoghash, "window");
/* confirmation debut de l'operation */
@@ -1090,7 +1091,6 @@
}
g_hash_table_insert(Lhash, "useautoblank", &Luseautoblank);
} else {
-printf("ici ???\n");
GtkRadioButton *Labradio =
GTK_RADIO_BUTTON(g_hash_table_lookup(Ldialoghash, "burninitial"));
Ltypeburn =
g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Labradio)) ? "-Z" :
"-M");
g_hash_table_insert(Lhash, "typeburn", Ltypeburn);
@@ -1358,7 +1358,7 @@
/* mise a jour des listes contenant les lecteurs */
update_combo_graveur(Lhash);
update_status_bar_display(Lhash);
- manage_top_menu(Lhash, MENU_UPDATE);
+ manage_interface(Lhash, MENU_UPDATE + COMBO_UPDATE );
gtk_widget_destroy(Lwinproprietes);
@@ -1571,10 +1571,10 @@
if (g_ascii_strncasecmp(Lunfic, "file://", 7) || (
! (
#ifdef ENABLE_MP3
- sc_str_has_casesuffix(Lunfic, MP3) ||
+ (GsupportMp3 && sc_str_has_casesuffix(Lunfic, MP3)) ||
#endif
#ifdef ENABLE_OGG
- sc_str_has_casesuffix(Lunfic, OGG) ||
+ (GsupportOgg && sc_str_has_casesuffix(Lunfic, OGG)) ||
#endif
sc_str_has_casesuffix(Lunfic, WAV)))) continue;
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/02
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/02
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/05
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/05
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/07
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/08
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/10
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/10
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c,
sylvain cresto <=
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/12
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/19
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/20
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/20
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/21
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/26
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/26
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/26
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/27
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/02/27