<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    This function would be very helpful, as we have lots of menu items
    and IMHO dropping icons is not desired in the porting process.<br>
    Just a couple questions/requests:<br>
    * An option to create the icon from a string:<br>
      xfce_image_menu_item_new_with_icon ("About", TRUE, "gtk-about",
    GTK_ICON_SIZE_MENU);<br>
    * What about accelerators? I can use gtk_widget_add_accelerator with
    the returned GtkMenuItem, but the label is required to use
    gtk_accel_label_set_accel_widget. Creating a label and adding it to
    menu_item defeats the purpose of this function.<br>
    * Is it possible to remove the ugly left pad of menu? (See
    attachment).<br>
    <br>
    Cheers,<br>
    André miranda<br>
    <br>
    <div class="moz-cite-prefix">On 02/04/2017 08:32 PM, Simon
      Steinbeiss wrote:<br>
    </div>
    <blockquote
cite="mid:CAApLaz1Tb1N4PCMaNuXcMrFz_KKU=6PdRFao_R3jbpJEo8t9XA@mail.gmail.com"
      type="cite">Hi Florian,
      <div><br>
      </div>
      <div>without having reviewed the patch (although if it's based on
        upstream anyway, it should be fine) I agree we may want/need
        something like this.</div>
      <div><br>
      </div>
      <div>So far the approach we've taken in other components was to
        wrap all gtk_image_menu_items in ignore deprecation statements
        (e.g. xfpm). I wouldn't mind using libxfce4ui instead, as it
        would result in cleaner code.</div>
      <div><br>
      </div>
      <div>I don't think you have to worry much about Gtk2, it's not our
        goal to have a cross-compatible desktop anyway, we don't even
        seem to have enough manpower for one toolkit version alone...</div>
      <div><br>
      </div>
      <div>Thanks for your efforts</div>
      <div>Simon</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
        <div dir="auto"><br>
          <div class="gmail_quote">
            <div dir="ltr">Igor Zakharov <<a moz-do-not-send="true"
                href="mailto:f2404@yandex.ru">f2404@yandex.ru</a>>
              schrieb am Sa., 4. Feb. 2017, 09:01:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div class="gmail_msg">Hi,</div>
              <div class="gmail_msg"> </div>
              <div class="gmail_msg">The patch looks good to me, and I'd
                like to have it merged.</div>
              <div class="gmail_msg">Ristretto is also using
                GtkImageMenuItem, and this proposed functionality could
                be used in the gtk3 port.</div>
              <div class="gmail_msg"> </div>
              <div class="gmail_msg">Igor</div>
              <div class="gmail_msg"> </div>
              <div class="gmail_msg">04.02.2017, 04:59, "Florian
                Weigelt" <<a moz-do-not-send="true"
                  href="mailto:weigelt.florian@gmx.net"
                  class="gmail_msg" target="_blank">weigelt.florian@gmx.net</a>>:</div>
              <blockquote type="cite" class="gmail_msg">
                <p class="gmail_msg">Please find attached a patch which
                  adds some functionality to libxfce4ui<br
                    class="gmail_msg">
                  to use a GtkMenuItem with an icon without using the
                  (in gtk3) deprecated<br class="gmail_msg">
                  GtkImageMenuItem.<br class="gmail_msg">
                  The code is based on the example given here:<br
                    class="gmail_msg">
                  <a moz-do-not-send="true"
                    href="https://developer.gnome.org/gtk3/stable/GtkImageMenuItem.html"
                    class="gmail_msg" target="_blank">https://developer.gnome.org/gtk3/stable/GtkImageMenuItem.html</a><br
                    class="gmail_msg">
                  <br class="gmail_msg">
                  This function is not intended to be used for creating
                  menu bars. Using<br class="gmail_msg">
                  GtkBuilder with GMenu (which actually has an icon
                  property) is by far<br class="gmail_msg">
                  better suited for this purpose.<br class="gmail_msg">
                  However, applications like xfdesktop and xfce4-panel
                  also use<br class="gmail_msg">
                  GtkImageMenuItem's and it would be nice to offer the
                  same functionality<br class="gmail_msg">
                  in a gtk3 port of these applications.<br
                    class="gmail_msg">
                  <br class="gmail_msg">
                  I decided on those three parameters because those were
                  the three<br class="gmail_msg">
                  information usually available when I looked at
                  xfdesktop's sources. It<br class="gmail_msg">
                  is also possible to let the user create a GtkLabel
                  first and pass this<br class="gmail_msg">
                  widget to the function.<br class="gmail_msg">
                  It would also be possible to exclude this function
                  entirely from the<br class="gmail_msg">
                  gtk2 build of libxfce4ui where GtkImageMenuItems
                  weren't deprecated.<br class="gmail_msg">
                  Please share your thoughts on this.<br
                    class="gmail_msg">
                  <br class="gmail_msg">
                  Kind regards</p>
              </blockquote>
              <blockquote type="cite" class="gmail_msg">,</blockquote>
              <blockquote type="cite" class="gmail_msg">
                <p class="gmail_msg">_______________________________________________<br
                    class="gmail_msg">
                  Xfce4-dev mailing list<br class="gmail_msg">
                  <a moz-do-not-send="true"
                    href="mailto:Xfce4-dev@xfce.org" class="gmail_msg"
                    target="_blank">Xfce4-dev@xfce.org</a><br
                    class="gmail_msg">
                  <a moz-do-not-send="true"
                    href="https://mail.xfce.org/mailman/listinfo/xfce4-dev"
                    class="gmail_msg" target="_blank">https://mail.xfce.org/mailman/listinfo/xfce4-dev</a></p>
              </blockquote>
              _______________________________________________<br
                class="gmail_msg">
              Xfce4-dev mailing list<br class="gmail_msg">
              <a moz-do-not-send="true" href="mailto:Xfce4-dev@xfce.org"
                class="gmail_msg" target="_blank">Xfce4-dev@xfce.org</a><br
                class="gmail_msg">
              <a moz-do-not-send="true"
                href="https://mail.xfce.org/mailman/listinfo/xfce4-dev"
                rel="noreferrer" class="gmail_msg" target="_blank">https://mail.xfce.org/mailman/listinfo/xfce4-dev</a></blockquote>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Xfce4-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xfce4-dev@xfce.org">Xfce4-dev@xfce.org</a>
<a class="moz-txt-link-freetext" href="https://mail.xfce.org/mailman/listinfo/xfce4-dev">https://mail.xfce.org/mailman/listinfo/xfce4-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>