Loading ...
Sorry, an error occurred while loading the content.

Title bar: Unix vs. Win32 (and version variable)

Expand Messages
  • Thomas Hundt
    I notice the title bar on Unix is of the form MicroEmacs: buffername and the Win32 one is buffername - MicroEmacs 01 . (Dunno about other platforms.) Code
    Message 1 of 3 , Aug 1 12:39 PM
    • 0 Attachment
      I notice the title bar on Unix is of the form "MicroEmacs: buffername" and the Win32 one is "buffername - MicroEmacs '01".  (Dunno about other platforms.)

      Code for this is in function TTtitleText in winterm.c and unixterm.c, respectively.
      I was thinking it might be kind of fun to have this configurable, the way the modeline is.
      (Motivation: name of document is more important than "MicroEmacs" in titlebars, because when they appear as minimized icons in the Windows taskbar, the text may be cut off after some number of characters. Don't really need "MicroEmacs" as the icon tells us that's what it is, so putting this last makes sense.) 

      But for now, here's some code to make the Unix version act like Windows (sans "'01"):

      void
      TTtitleText (uint8 *str)
      {
          if(!(meSystemCfg & meSYSTEM_CONSOLE))
          {
              char buf[MAXBUF], *ss ;

      #if 0
              meStrcpy(buf,meName);
              if (str != NULL)
              {
                  meStrcat(buf,": ") ;
                  meStrcat(buf,str) ;
              }
      #endif
              /* TMH FIX -- titlebar like Windows */
              buf[0] = 0;
              if (str != NULL)
              {
                  meStrcat(buf,str) ;
                  meStrcat(buf," - ") ;
              }
              meStrcat(buf,meName);
              /* end TMH FIX */
             
              ss = buf ;
              XStoreName(mecm.xdisplay,mecm.xwindow,ss);
          }
      }


      Reason I noticed all this: Was upgrading all machines to have '01 version, and found Windows to have the version in the titlebar, but Unix not to.  (Is there not a variable with the version number??  I couldn't find one.  Seems like it should be called "progver" or something.  Internal var/constant is called meVERSION and meVERSION_MINOR.)

      Cheers, and thanks for releasing the new version!  Building it [on Unix/Linux] was very easy and smooth!

      -Th

      __________
      Thomas Hundt <thundt@...> +1-415-643-3595 [http://hundt.com]

    • Martin_Doering@mn.man.de
      ... the modeline is. It would not just be fun. If you have many windows open in MSWin or X11 with some simila window manager, you can just see the first few
      Message 2 of 3 , Aug 2 4:10 AM
      • 0 Attachment
        >I was thinking it might be kind of fun to have this configurable, the way
        the modeline is.

        It would not just be fun. If you have many windows open in MSWin or X11
        with some simila window manager, you can just see the first few characters
        of the Title bar. It would be nice to see the document only, or at first.

        --------------------------------------------------------------------------------------------------------

        Martin Döring

        C: The language that combines the power of assembly language with the
        flexibility of assembly language.
      • Jon Green
        The reason for the order difference was simply in keeping with the other applications typically found on the platform. Before anybody tells me that but this
        Message 3 of 3 , Aug 2 6:05 AM
        • 0 Attachment
          The reason for the order difference was simply in keeping with the
          other applications typically found on the platform. Before anybody
          tells me that "but this application does this ... " there is no
          hard and fast rule here, we followed the general trend of
          typical applications.

          It would be pretty easy to add another $variable to define the
          title bar, probably providing some magic variables for
          buffer name, application name etc.

          I'll add it to the list of desirables !! Even better somebody
          can mail all of the code changes !!

          Regards
          Jon.

          <SNIP - rest of messages>
        Your message has been successfully submitted and would be delivered to recipients shortly.