Re: [GnomeMeeting-devel-list] [PATCH] vfakeio modification



On lun, 2004-02-09 at 11:01, PUYDT Julien wrote:

> Yes, as I said, the ui doesn't seem to react sanely...

The following patch, that I made from files Damien sent me, improves
things considerably. I was quite long to deliver the patch because I
tested a little before sending ;-)

Snark
diff -ur gnomemeeting-cvs-20040209.CVS/lib/gconf_widgets_extensions.c gnomemeeting-cvs-20040209.CVS.patched/lib/gconf_widgets_extensions.c
--- gnomemeeting-cvs-20040209.CVS/lib/gconf_widgets_extensions.c	2004-02-08 02:02:18.000000000 +0100
+++ gnomemeeting-cvs-20040209.CVS.patched/lib/gconf_widgets_extensions.c	2004-02-09 13:56:00.000000000 +0100
@@ -47,11 +47,18 @@
  *
  */
 
+void
+entry_activate_changed (GtkWidget *w,
+                        gpointer data)
+{
+  entry_focus_changed (w, NULL, data);
+}
+
 
 gboolean
-entry_changed (GtkWidget  *w,
-	       GdkEventFocus *ev,
-	       gpointer data)
+entry_focus_changed (GtkWidget  *w,
+                     GdkEventFocus *ev,
+                     gpointer data)
 {
   GConfClient *client = NULL; 
   gchar *key = NULL;
@@ -98,13 +105,23 @@
       g_signal_handlers_block_matched (G_OBJECT (e),
 				       G_SIGNAL_MATCH_FUNC,
 				       0, 0, NULL,
-				       (gpointer) entry_changed,
+				       (gpointer) entry_focus_changed,
+				       NULL);
+      g_signal_handlers_block_matched (G_OBJECT (e),
+				       G_SIGNAL_MATCH_FUNC,
+				       0, 0, NULL,
+				       (gpointer) entry_activate_changed,
 				       NULL);
       gtk_entry_set_text (GTK_ENTRY (e), current_value);
       g_signal_handlers_unblock_matched (G_OBJECT (e),
 					 G_SIGNAL_MATCH_FUNC,
 					 0, 0, NULL,
-					 (gpointer) entry_changed,
+					 (gpointer) entry_activate_changed,
+					 NULL);
+      g_signal_handlers_unblock_matched (G_OBJECT (e),
+					 G_SIGNAL_MATCH_FUNC,
+					 0, 0, NULL,
+					 (gpointer) entry_focus_changed,
 					 NULL);
     }
 
diff -ur gnomemeeting-cvs-20040209.CVS/lib/gconf_widgets_extensions.h gnomemeeting-cvs-20040209.CVS.patched/lib/gconf_widgets_extensions.h
--- gnomemeeting-cvs-20040209.CVS/lib/gconf_widgets_extensions.h	2004-02-08 02:02:18.000000000 +0100
+++ gnomemeeting-cvs-20040209.CVS.patched/lib/gconf_widgets_extensions.h	2004-02-09 13:55:54.000000000 +0100
@@ -58,15 +58,24 @@
  */
 
 
+/* DESCRIPTION  :  This function is called when an entry is activated.
+ * BEHAVIOR     :  Updates the key given as parameter to the new value of the
+ *                 entry.  
+ * PRE          :  Non-Null data corresponding to the string gconf key
+ *                 to modify.
+ */
+void entry_activate_changed (GtkWidget *,
+                             gpointer);
+
 /* DESCRIPTION  :  This function is called when the focus of an entry changes.
  * BEHAVIOR     :  Updates the key given as parameter to the new value of the
  *                 entry.  
  * PRE          :  Non-Null data corresponding to the string gconf key
  *                 to modify.
  */
-gboolean entry_changed (GtkWidget *,
-			GdkEventFocus *,
-			gpointer);
+gboolean entry_focus_changed (GtkWidget *,
+                              GdkEventFocus *,
+                              gpointer);
 
 
 /* DESCRIPTION  :  Generic notifiers for entries.
diff -ur gnomemeeting-cvs-20040209.CVS/lib/gnome_prefs_window.c gnomemeeting-cvs-20040209.CVS.patched/lib/gnome_prefs_window.c
--- gnomemeeting-cvs-20040209.CVS/lib/gnome_prefs_window.c	2004-02-01 23:19:59.000000000 +0100
+++ gnomemeeting-cvs-20040209.CVS.patched/lib/gnome_prefs_window.c	2004-02-09 13:54:25.000000000 +0100
@@ -166,8 +166,11 @@
   g_free (gconf_string);
 
   g_signal_connect_after (G_OBJECT (entry), "focus-out-event",
-			  G_CALLBACK (entry_changed), gconf_key);
-  
+			  G_CALLBACK (entry_focus_changed), gconf_key);
+
+  g_signal_connect_after (G_OBJECT (entry), "activate",
+			  G_CALLBACK (entry_activate_changed), gconf_key);
+
   gconf_client_notify_add (client, gconf_key, entry_changed_nt,
 			   (gpointer) entry, 0, 0);
 
diff -ur gnomemeeting-cvs-20040209.CVS/src/pref_window.cpp gnomemeeting-cvs-20040209.CVS.patched/src/pref_window.cpp
--- gnomemeeting-cvs-20040209.CVS/src/pref_window.cpp	2004-02-09 02:02:48.000000000 +0100
+++ gnomemeeting-cvs-20040209.CVS.patched/src/pref_window.cpp	2004-02-09 13:51:05.000000000 +0100
@@ -374,20 +374,22 @@
 /* DESCRIPTION  :  This callback is called when the user clicks
  *                 on a button of the file selector.
  * BEHAVIOR     :  It sets the selected filename in the good entry (given
- *                 as data of the object because of the bad API).
+ *                 as data of the object because of the bad API). Emits the
+ *                 focus-out-event to simulate it.
  * PRE          :  data = the file selector.
  */
 static void  
 file_selector_clicked (GtkFileSelection *b, gpointer data) 
 {
   gchar *filename = NULL;
-
   
   filename =
     (gchar *) gtk_file_selection_get_filename (GTK_FILE_SELECTION (data));
 
   gtk_entry_set_text (GTK_ENTRY (g_object_get_data (G_OBJECT (data), "entry")),
 		      filename);
+
+  g_signal_emit_by_name (G_OBJECT (g_object_get_data (G_OBJECT (data), "entry")), "activate");
 }
 
 
@@ -1027,7 +1029,7 @@
   gnome_prefs_toggle_new (subsection, _("Automatically _clear calls after 30 seconds of inactivity"), CALL_OPTIONS_KEY "clear_inactive_calls", _("If enabled, calls for which no audio and video has been received in the last 30 seconds are automatically cleared"), 0);  
 
   /* Translators: the full sentence is Reject or forward
-     unanswered incoming calls after X seconds */
+     unanswered incoming calls after X s (seconds) */
   gnome_prefs_spin_new (subsection, _("Reject or forward unanswered incoming calls after "), CALL_OPTIONS_KEY "no_answer_timeout", _("Automatically reject or forward incoming calls if no answer is given after the specified amount of time (in seconds)"), 10.0, 299.0, 1.0, 1, _("seconds"), true);
 }
 
@@ -1650,8 +1652,8 @@
   subsection = gnome_prefs_subsection_new (window, container,
 					   _("Bandwidth Control"), 1, 1);
 
-  /* Translators: the full sentence is Maximum video bandwidth of X KB/s */
-  gnome_prefs_spin_new (subsection, _("Maximum video _bandwidth of"), VIDEO_CODECS_KEY "maximum_video_bandwidth", _("The maximum video bandwidth in kbytes/s. The video quality and the number of transmitted frames per second will be dynamically adjusted above their minimum during calls to try to minimize the bandwidth to the given value."), 2.0, 100.0, 1.0, 0, _("KB/s"), true);
+  /* Translators: the full sentence is Maximum video bandwidth of X kB/s */
+  gnome_prefs_spin_new (subsection, _("Maximum video _bandwidth of"), VIDEO_CODECS_KEY "maximum_video_bandwidth", _("The maximum video bandwidth in kbytes/s. The video quality and the number of transmitted frames per second will be dynamically adjusted above their minimum during calls to try to minimize the bandwidth to the given value."), 2.0, 100.0, 1.0, 0, _("kB/s"), true);
   
 
   /* Advanced quality settings */


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