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

Re: PATCH vim-6.0-l10n.patch

Expand Messages
  • Bram Moolenaar
    ... It looks like this removes some support for Motif 1.2. Didn t you intend to only remove support for Motif 1.1 and earlier? ... Does this fix an existing
    Message 1 of 6 , Jan 3, 2002
    • 0 Attachment
      Martin Dalecki wrote:

      > This is fixing some usage of obsolete localization idioms in the Motif
      > GUI code.

      > -#if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU) && (XmVersion <= 1002)

      It looks like this removes some support for Motif 1.2. Didn't you
      intend to only remove support for Motif 1.1 and earlier?

      > - str = XmStringCreateSimple(_("Down"));
      > + str = XmStringCreateLocalized(_("Down"));

      Does this fix an existing problem?

      --
      [clop clop]
      ARTHUR: Old woman!
      DENNIS: Man!
      ARTHUR: Man, sorry. What knight lives in that castle over there?
      DENNIS: I'm thirty seven.
      ARTHUR: What?
      DENNIS: I'm thirty seven -- I'm not old!
      The Quest for the Holy Grail (Monty Python)

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    • Martin Dalecki
      ... The previous support was incorrect. This stuff was already obsoleted in 1.2 ... Consistency and adherence to documentation. This will make it easier to
      Message 2 of 6 , Jan 4, 2002
      • 0 Attachment
        Bram Moolenaar wrote:

        >Martin Dalecki wrote:
        >
        >>This is fixing some usage of obsolete localization idioms in the Motif
        >>GUI code.
        >>
        >
        >>-#if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU) && (XmVersion <= 1002)
        >>
        >
        >It looks like this removes some support for Motif 1.2. Didn't you
        >intend to only remove support for Motif 1.1 and earlier?
        >
        The previous "support" was incorrect. This stuff was already obsoleted
        in 1.2

        >>- str = XmStringCreateSimple(_("Down"));
        >>+ str = XmStringCreateLocalized(_("Down"));
        >>
        >
        >Does this fix an existing problem?
        >
        Consistency and adherence to documentation. This will make it easier to
        fix lesstif at some point
        in time to handle localized non iso8859-1 strings on label widgets
        properly. THe XmString CreateLocalized
        is aware about the default character set encoding for the current
        locale. XmStringCreateSimple just doesn't
        care.

        >
      • David Harrison Jr.
        ... Some of these actually force GVim not to work under any version of Motif
        Message 3 of 6 , Jan 4, 2002
        • 0 Attachment
          Martin Dalecki wrote:

          > This is fixing some usage of obsolete localization idioms in the Motif
          > GUI code.
          >


          Some of these actually force GVim not to work under any version of Motif
          < 2.0. This is not a good thing... especially since my IRIX 5.3 users
          are *unknowingly* using Motif 1.2.4.

          >
          >-#if (XmVersion <= 1002) || defined(PROTO)
          >-/*
          >- * This function will destroy/create the popup menus dynamically,
          >- * according to the value of 'mousemodel'.
          >- * This will fix the "right mouse button freeze" that occurs when
          >- * there exists a popup menu but it isn't managed.
          >- */
          >- void
          >-gui_motif_update_mousemodel(menu)
          >- vimmenu_T *menu;
          >-{
          >- int idx = 0;
          >-
          >- /* When GUI hasn't started the menus have not been created. */
          >- if (!gui.in_use)
          >- return;
          >-
          >- while (menu)
          >- {
          >- if (menu->children != NULL)
          >- {
          >- if (menu_is_popup(menu->name))
          >- {
          >- if (mouse_model_popup())
          >- {
          >- /* Popup menu will be used. Create the popup menus. */
          >- gui_mch_add_menu(menu, idx);
          >- gui_motif_update_mousemodel(menu->children);
          >- }
          >- else
          >- {
          >- /* Popup menu will not be used. Destroy the popup menus. */
          >- gui_motif_update_mousemodel(menu->children);
          >- gui_mch_destroy_menu(menu);
          >- }
          >- }
          >- }
          >- else if (menu_is_child_of_popup(menu))
          >- {
          >- if (mouse_model_popup())
          >- gui_mch_add_menu_item(menu, idx);
          >- else
          >- gui_mch_destroy_menu(menu);
          >- }
          >- menu = menu->next;
          >- ++idx;
          >- }
          >-}
          >-#endif
          >-
          >

          Don't remove this, please. See my note below

          >- str = XmStringCreate(new_label, STRING_TAG);
          >+ str = XmStringCreateLocalized(new_label);
          >
          >

          Hmm. Interesting addition. XmStringCreateLocalized is only in Motif
          versions > 1.2.

          > {
          > if (check_opt_strings(p_mousem, p_mousem_values, FALSE) != OK)
          > errmsg = e_invarg;
          >-#if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU) && (XmVersion <= 1002)
          >- else if (*p_mousem != *oldval)
          >- /* Changed from "extend" to "popup" or "popup_setpos" or vv: need
          >- * to create or delete the popup menus. */
          >- gui_motif_update_mousemodel(root_menu);
          >-#endif
          > }
          >

          Please don't remove this. My IRIX 5.3 users need this to be there so
          that (under Motif versions prior to 2.0 -- this version of IRIX only has
          Motif 1.2.4) when you press the right mouse button, the user interface
          won't halt while waiting for the popup menu that will never popup. The
          halt is noticeable at around 3 or 4 seconds, during which time you can
          do NOTHING. This applies to most versions of Motif < 2.0.

          --David
        • Bram Moolenaar
          ... I believe this code was added for specific systems that have a problem in the menu handling code (was it HP-UX?). It should be tested on that system
          Message 4 of 6 , Jan 4, 2002
          • 0 Attachment
            Martin Dalecki wrote:

            > >>This is fixing some usage of obsolete localization idioms in the Motif
            > >>GUI code.
            > >>
            > >
            > >>-#if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU) && (XmVersion <= 1002)
            > >>
            > >
            > >It looks like this removes some support for Motif 1.2. Didn't you
            > >intend to only remove support for Motif 1.1 and earlier?
            > >
            > The previous "support" was incorrect. This stuff was already obsoleted
            > in 1.2

            I believe this code was added for specific systems that have a problem
            in the menu handling code (was it HP-UX?). It should be tested on that
            system before we can be sure the problem doesn't come back. Do you know
            which system had this problem? Can you test it there?

            > >>- str = XmStringCreateSimple(_("Down"));
            > >>+ str = XmStringCreateLocalized(_("Down"));
            > >>
            > >
            > >Does this fix an existing problem?
            >
            > Consistency and adherence to documentation. This will make it easier to
            > fix lesstif at some point in time to handle localized non iso8859-1
            > strings on label widgets properly. THe XmString CreateLocalized is
            > aware about the default character set encoding for the current locale.
            > XmStringCreateSimple just doesn't care.

            We have had a lot of problems with strings and fonts in the past. I
            don't want to change anything in this area now unless it solves a problem.

            --
            ARTHUR: Shut up! Will you shut up!
            DENNIS: Ah, now we see the violence inherent in the system.
            ARTHUR: Shut up!
            DENNIS: Oh! Come and see the violence inherent in the system!
            HELP! HELP! I'm being repressed!
            The Quest for the Holy Grail (Monty Python)

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
            \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
          • David Harrison Jr.
            ... If anything, this should be a conditional compilation, using XmStringCreateLocalized for Motif 2.0 and higher, and using XmStringCreateSimple for lower
            Message 5 of 6 , Jan 4, 2002
            • 0 Attachment
              > Bram Moolenaar wrote:
              >
              >> Martin Dalecki wrote:
              >
              >>> - str = XmStringCreateSimple(_("Down"));
              >>> + str = XmStringCreateLocalized(_("Down"));
              >>>
              >>
              >> Does this fix an existing problem?
              >

              If anything, this should be a conditional compilation, using
              XmStringCreateLocalized for Motif 2.0 and higher, and using
              XmStringCreateSimple for lower versions.

              >>
              > Consistency and adherence to documentation. This will make it easier
              > to fix lesstif at some point
              > in time to handle localized non iso8859-1 strings on label widgets
              > properly. THe XmString CreateLocalized
              > is aware about the default character set encoding for the current
              > locale. XmStringCreateSimple just doesn't
              > care.


              Legacy support is more important than you may realize. Especially if
              you only have a legacy system to work with.

              A better solution would be to have different implementations based on
              the different versions of Motif you are compiling with.

              --David
            Your message has been successfully submitted and would be delivered to recipients shortly.