FLTK logo

[master] 81d47f7 - Fix VS compiler warning, write "copied" message to tty

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 81d47f7 - Fix VS compiler warning, write "copied" message to tty "Albrecht Schlosser" 11:47 Mar 18  
 
commit 81d47f71d64caaaed7013b3f494dbae33267e70d
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Mon Mar 18 19:34:32 2024 +0100
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Mon Mar 18 19:34:32 2024 +0100

    Fix VS compiler warning, write "copied" message to tty
    
    ... rather than popping up a message window.

 test/handle_keys.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git test/handle_keys.cxx test/handle_keys.cxx
index a081de9..de38ef3 100644
--- test/handle_keys.cxx
+++ test/handle_keys.cxx
@@ -130,7 +130,7 @@ const char *get_keyname(int k, int &lg) {
     lg = snprintf(buffer, sizeof(buffer), "0x%04x", k);
     for (int i = 0; i < int(sizeof(key_table)/sizeof(*key_table)); i++) {
       if (key_table[i].n == k) {
-        lg = strlen(key_table[i].text);
+        lg = (int)strlen(key_table[i].text);
         return key_table[i].text;
       }
     }
@@ -287,7 +287,7 @@ void copy_cb(Fl_Widget *b, void *) {
   }
   tlen = (int)strlen(text);
   Fl::copy(text, tlen, 1, Fl::clipboard_plain_text);
-  fl_message("%s text has been copied to the clipboard, length = %d.", what, tlen);
+  tty->printf("[%s text copied to clipboard, length = %d]\n", what, tlen);
   free((void *)text);
   tty->take_focus();
 }
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.