[Gtranslator-devel] [Fwd: [gtranslator] prefs.c patch]
- From: Fatih Demir <kabalak kabalak net>
- To: gtranslator-devel lists sourceforge net
- Subject: [Gtranslator-devel] [Fwd: [gtranslator] prefs.c patch]
- Date: Thu Jul 29 11:45:02 2004
Hmm?!?!
What do you say about it?!?
-------- Original Message --------
Subject: [gtranslator] prefs.c patch
Date: Thu, 29 Jul 2004 17:42:41 +0200
From: Emmanuel Saracco <esaracco noos fr>
To: Fatih Demir <kabalak kabalak net>
CC: kabalak users sourceforge net
hi,
here is a tiny patch to prevent preferences dialog for displaying
anoying validation popups when one change something but do not want to
save it, or when one just checked/unchecked a toogle button (with no
modification) and just want to cancel the dialog.
do whatever you want with it :-)
thanks for your work,
bye
--
Emmanuel Saracco
http://emmanuel.saracco.free.fr/
--- ../gtranslator_orig/ChangeLog 2004-07-26 14:34:12.000000000 +0200
+++ ChangeLog 2004-07-29 17:24:24.000000000 +0200
@@ -1,3 +1,9 @@
+2004-07-29 Emmanuel Saracco <esaracco users labs libre-entreprise org>
+
+ * src/prefs.c: Fixed a problem with validation popups on closing
+ preferences dialog. "Close" button was removes and "Cancel", "Ok"
+ buttons were added.
+
2004-07-26 Ross Golder <ross golder org>
* ChangeLog: Converted to UTF-8
--- prefs.c.orig 2004-07-29 17:11:36.000000000 +0200
+++ prefs.c 2004-07-29 17:13:35.000000000 +0200
@@ -43,7 +43,7 @@
* The callbacks:
*/
static void gtranslator_preferences_dialog_changed(GtkWidget * widget, gpointer useless);
-static void gtranslator_preferences_dialog_close(GtkWidget * widget, gint page_num,
+static void gtranslator_preferences_dialog_close(GtkWidget * widget, gint response_id,
gpointer useless);
static void toggle_sensitive(GtkWidget *widget, gpointer data);
@@ -332,7 +332,8 @@
_("gtranslator -- options"),
GTK_WINDOW(gtranslator_application),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response(GTK_DIALOG(prefs), GTK_RESPONSE_CLOSE);
@@ -621,7 +622,7 @@
/*
* The actions to take when the user presses "Apply".
*/
-static void gtranslator_preferences_dialog_close(GtkWidget * widget, gint page_num, gpointer useless)
+static void gtranslator_preferences_dialog_close(GtkWidget * widget, gint response_id, gpointer useless)
{
gchar *selected_scheme_file=NULL;
gchar *translator_str=NULL;
@@ -635,7 +636,7 @@
/*
* If nothing changed, just return
*/
- if(!prefs_changed) {
+ if(response_id != GTK_RESPONSE_OK || !prefs_changed) {
gtk_widget_destroy(GTK_WIDGET(prefs));
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]