After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 144475 - Context Menu Cleanup
Context Menu Cleanup
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
2.6.x
Other All
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-06-16 15:53 UTC by Christian Neumair
Modified: 2006-08-09 15:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch #1. Cleans up "Delete This Menu" menuitem. (3.03 KB, patch)
2004-06-16 15:57 UTC, Christian Neumair
needs-work Details | Review
Patch #2. Move "New Panel" to the top (3.03 KB, patch)
2004-06-16 16:01 UTC, Christian Neumair
none Details | Review
Patch #2, 2nd attempt. (1.65 KB, patch)
2004-06-16 16:03 UTC, Christian Neumair
needs-work Details | Review

Description Christian Neumair 2004-06-16 15:53:05 UTC
I've prepared two context menu cleanups.

regs,
 Chris
Comment 1 Christian Neumair 2004-06-16 15:57:40 UTC
Created attachment 28769 [details] [review]
Patch #1. Cleans up "Delete This Menu" menuitem.

Patch 1: According to the HIG
(http://developer.gnome.org/projects/gup/hig/1.0/menus.html#menu-item-types),
delete items don't need trailing "..." characters. That saves us a helper.
Besides, I've cleaned up the remove_panel function.

regs,
 Chris
Comment 2 Christian Neumair 2004-06-16 16:01:03 UTC
Created attachment 28771 [details] [review]
Patch #2. Move "New Panel" to the top

Patch 2: It feels more consistent with the rest of the desktop to have "New"
entries at the top of menus (cp. File->New). I've separated it out because I
don't think all of you will like it.

regs,
 Chris
Comment 3 Christian Neumair 2004-06-16 16:01:58 UTC
Comment on attachment 28771 [details] [review]
Patch #2. Move "New Panel" to the top

Sorry, resent first patch.
Comment 4 Christian Neumair 2004-06-16 16:03:06 UTC
Created attachment 28772 [details] [review]
Patch #2, 2nd attempt.
Comment 5 Mark McLoughlin 2004-06-17 06:23:42 UTC
Okay, so patch 1) contains a number of changes

 a) Don't update the sensitivity of the "Delete This Panel" menu item before
    showing it, just set the sensitivity when creating the menu item.

     => This looks broken. We only create the menu item once, so what happens
        if after we create the menu when delete all our panels but this one?
        The menu item should be insensitive, but it won't be.

 b) Removing the code which adds ellipses if delete requires confirmation

     => Fine with this

 c) Passing the toplevel directly to remove_panel() instead using the 
    "menu_panel" data on the menu item

     => I'm fine with this too (we probably did it when we had the panel menu
        as a submenu of object's context menu - and we could move objects
        between panels, so the panel the menu was created for might not have
        been the same panel as when you clicked on the item)

        However, I want us to get rid of it everywhere for the panel context
        menu if we're going to do it. That means removing the g_object_set_data
        in create_panel_context_menu() and making sure it works everywhere
        down the line.

Conclusion: commit the bit for (b), forget about (a) and if you have time work
on (c). If you don't have time to do (c) (it'll take a fair bit of testing) then
just add:

  /* FIXME: the panel which the context menu refers to cannot change, so
   * we don't need this "find the panel from the menu item" stuff for the
   * context menu. Should remove it and fixup everywhere down the line to
   * use the panel specified at creation time.
   */
Comment 6 Mark McLoughlin 2004-06-17 06:29:27 UTC
For patch 2) you should open another bug cc-ing
usability-maint@bugzilla.gnome.org with your suggestion. Note the original
layout was decided in bug #85619. I suspect the suggestion won't fly, though.
"Add to Panel" is used far more than "New Panel" which is why it makes sense on top.
Comment 7 Vincent Untz 2006-08-09 15:10:37 UTC
Patch 1 was rewritten and is in. Patch 2 is WONTFIX.