Enlightenment CVS committal

Author  : mej
Project : eterm
Module  : Eterm

Dir     : eterm/Eterm/src


Modified Files:
        options.c options.h screen.c 


Log Message:
Wed Feb 23 15:37:40 2005                        Michael Jennings (mej)

Merged in previous autoFUCK changes from libast.

Added a feature to specify a command to be run in place of the normal
PC speaker beep.
----------------------------------------------------------------------

===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/options.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -3 -r1.134 -r1.135
--- options.c   14 Dec 2004 23:24:28 -0000      1.134
+++ options.c   23 Feb 2005 20:38:19 -0000      1.135
@@ -21,7 +21,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-static const char cvs_ident[] = "$Id: options.c,v 1.134 2004/12/14 23:24:28 
mej Exp $";
+static const char cvs_ident[] = "$Id: options.c,v 1.135 2005/02/23 20:38:19 
mej Exp $";
 
 #include "config.h"
 #include "feature.h"
@@ -150,6 +150,7 @@
 unsigned char rs_es_dock = BBAR_DOCKED_BOTTOM;
 char *rs_es_font = NULL;
 #endif
+spif_charptr_t rs_beep_command = NULL;
 spif_uint32_t rs_opacity = 0xffffffff;
 unsigned int rs_line_space = 0;
 unsigned int rs_meta_mod = 0, rs_alt_mod = 0, rs_numlock_mod = 0;
@@ -342,6 +343,7 @@
     SPIFOPT_STR_LONG("finished-text", "post-termination terminal text", 
rs_finished_text),
     SPIFOPT_STR_LONG("term-name", "value to use for setting $TERM", 
rs_term_name),
     SPIFOPT_STR_LONG("pipe-name", "filename of console pipe to emulate -C", 
rs_pipe_name),
+    SPIFOPT_STR_LONG("beep-command", "command to run instead of normal beep", 
rs_beep_command),
 #ifdef ESCREEN
     SPIFOPT_STR('U', "url", "a URL pointing to a screen session to pick up", 
rs_url),
     SPIFOPT_STR('Z', "firewall", "connect session via forwarded port", rs_hop),
@@ -405,7 +407,11 @@
            "    " SCREEN_IDENT "\n"
            "    " SCROLLBAR_IDENT "\n"
            "    " STARTUP_IDENT "\n"
-           "    " SYSTEM_IDENT "\n" "    " TERM_IDENT "\n" "    " TIMER_IDENT 
"\n" "    " UTMP_IDENT "\n" "    " WINDOWS_IDENT "\n" "\n");
+           "    " SYSTEM_IDENT "\n"
+           "    " TERM_IDENT "\n"
+           "    " TIMER_IDENT "\n"
+           "    " UTMP_IDENT "\n"
+           "    " WINDOWS_IDENT "\n" "\n");
 
     printf("Debugging configuration:  ");
 #ifdef DEBUG
@@ -1473,6 +1479,9 @@
     } else if (!BEG_STRCASECMP(buff, "term_name ")) {
         RESET_AND_ASSIGN(rs_term_name, get_word(2, buff));
 
+    } else if (!BEG_STRCASECMP(buff, "beep_command ")) {
+        RESET_AND_ASSIGN(rs_beep_command, get_word(2, buff));
+
     } else if (!BEG_STRCASECMP(buff, "debug ")) {
         DEBUG_LEVEL = (unsigned int) strtoul(get_pword(2, buff), (char **) 
NULL, 0);
 
@@ -3830,6 +3839,7 @@
     fprintf(fp, "    min_anchor_size %d\n", rs_min_anchor_size);
     fprintf(fp, "    border_width %d\n", TermWin.internalBorder);
     fprintf(fp, "    term_name %s\n", getenv("TERM"));
+    fprintf(fp, "    beep_command \"%s\"\n", rs_beep_command);
     fprintf(fp, "    debug %d\n", DEBUG_LEVEL);
     if (save_theme && rs_exec_args && rs_theme && strcmp(rs_theme, PACKAGE)) {
         fprintf(fp, "    exec ");
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/options.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- options.h   14 Dec 2004 23:24:30 -0000      1.51
+++ options.h   23 Feb 2005 20:38:23 -0000      1.52
@@ -127,6 +127,7 @@
 #endif
 extern spif_uint32_t rs_opacity;
 extern unsigned int rs_line_space;
+extern spif_charptr_t rs_beep_command;
 extern unsigned int rs_meta_mod, rs_alt_mod, rs_numlock_mod;
 #ifndef NO_BOLDFONT
 extern char *rs_boldFont;
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/screen.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -3 -r1.80 -r1.81
--- screen.c    20 Dec 2004 19:37:00 -0000      1.80
+++ screen.c    23 Feb 2005 20:38:24 -0000      1.81
@@ -3,7 +3,7 @@
  *
  */
 
-static const char cvs_ident[] = "$Id: screen.c,v 1.80 2004/12/20 19:37:00 mej 
Exp $";
+static const char cvs_ident[] = "$Id: screen.c,v 1.81 2005/02/23 20:38:24 mej 
Exp $";
 
 #include "config.h"
 #include "feature.h"
@@ -1546,8 +1546,11 @@
     if (BITFIELD_IS_SET(vt_options, VT_OPTIONS_VISUAL_BELL)) {
         scr_rvideo_mode(!rvideo);
         scr_rvideo_mode(!rvideo);
-    } else
+    } else if (!SPIF_PTR_ISNULL(rs_beep_command)) {
+        system_no_wait(SPIF_CAST_C(char *) rs_beep_command);
+    } else {
         XBell(Xdisplay, 0);
+    }
 }
 
 void




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to