[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: |
Sun, 22 May 2005 07:20:46 -0400 |
Index: graveman/current/src/callbacks.c
diff -u graveman/current/src/callbacks.c:1.43
graveman/current/src/callbacks.c:1.44
--- graveman/current/src/callbacks.c:1.43 Tue May 17 01:16:34 2005
+++ graveman/current/src/callbacks.c Sun May 22 11:20:41 2005
@@ -234,6 +234,19 @@
expand_list_icons(Llist, TRUE);
}
+gboolean callback_simpledialog_eventkeyrelease(GtkWidget *Aentry, GdkEventKey
*Aevent, gpointer Adata)
+{
+ GtkDialog *Ldialog = GTK_DIALOG(Adata);
+
+ if (!Aevent) return FALSE;
+ if (Aevent->keyval == GDK_Return) {
+ gtk_dialog_response(Ldialog, GTK_RESPONSE_OK);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
/* renommer un element (fichier ou repertoire) */
void callbacks_data_renameitem(GtkWidget *Abtn, gpointer Adata)
{
@@ -260,10 +273,12 @@
Lboite = gtk_dialog_new_with_buttons(Ltitle, NULL, GTK_DIALOG_MODAL,
GTK_STOCK_OK,GTK_RESPONSE_OK, GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,
NULL);
g_free(Ltitle);
+ gtk_dialog_set_default_response(GTK_DIALOG(Lboite), GTK_RESPONSE_OK);
Lentry = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(Lentry), Lname);
g_free(Lname);
+ g_signal_connect(G_OBJECT(Lentry), "key-release-event",
G_CALLBACK(callback_simpledialog_eventkeyrelease), Lboite);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(Lboite)->vbox), Lentry, TRUE, FALSE,
0);
gtk_widget_show_all(GTK_DIALOG(Lboite)->vbox);
@@ -1659,7 +1674,7 @@
gboolean *Labort = (gboolean *)sc_grave_get_data(Lg, "gabort");
gint *Lpid = (gint *)sc_grave_get_data(Lg, "pid");
printf(" on va kill !\n");
- if (*Lpid) {
+ if (Lpid && *Lpid) {
/* on envoi un TERM au process (cdrecord...) pour qu'il s'arrete ! */
_DEB("kill de %d\n", *Lpid);
kill(*Lpid, SIGINT);
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/05/02
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/05/03
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/05/09
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/05/17
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c,
sylvain cresto <=
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/05/27
- [Graveman-cvs] Changes to graveman/current/src/callbacks.c, sylvain cresto, 2005/05/28