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 128567 - Drawer not updated always on bottom panels.
Drawer not updated always on bottom panels.
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
unspecified
Other Linux
: High normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-12-05 04:20 UTC by Arvind S N
Modified: 2005-08-15 01:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch which fixes the bug (1.51 KB, patch)
2003-12-10 12:16 UTC, Leena Gunda
none Details | Review

Description Arvind S N 2003-12-05 04:20:07 UTC
Have a drawer on a bottom panel, with a couple of launchers already in it.

Now drop another launcher on the drawer. Notice that the drawer is not
updated. You will feel you lost the launcher, but wait, drag the drawer to
a top panel, click on the drawer, you will find the launcher back.
Comment 1 Leena Gunda 2003-12-10 12:15:16 UTC
When a launcher is added to the drawer, panel_applet_register () is
called which tries to add the applet to the panel. In
panel_applet_register () there is a piece of code like:

        if (panel_widget_add (panel, applet, locked, pos,
insert_at_pos) == -1) {
                GSList *l;

                for (l = panels; l; l = l->next)
                        if (panel_widget_add (panel, applet, locked,
0, TRUE) != -1)
                                break;
                ................

                panel = PANEL_WIDGET (l->data);
        }

Now if the applet cannot be added to the specified position the panel
list is traversed to find an empty position (in fact the applet will
never get added to other panels as the panel data is never changed). 

Here the panel data is changed after the applet is added to the panel,
and the orientation of the applet is being changed based on this data.
If the orientation is different from the panel to which the applet is
added there won't be proper scaling of the applet and the drawer,
hence the launcher will not be visible.

Note: This bug is also reproducible on top panel.
Comment 2 Leena Gunda 2003-12-10 12:16:37 UTC
Created attachment 22289 [details] [review]
patch which fixes the bug
Comment 3 Leena Gunda 2003-12-15 05:29:18 UTC
Mark: I am not clear what this piece of code does in applet.c
(panel_applet_register):

                for (l = panels; l; l = l->next)
                        if (panel_widget_add (panel, applet, locked,
0, TRUE) != -1)
                                break;

                if (!l) {
                        g_warning (_("Can't find an empty spot"));
                        panel_profile_delete_object (info);
                        return NULL;
                }

                panel = PANEL_WIDGET (l->data);
Comment 4 alexander.winston 2004-01-04 23:02:20 UTC
Bumping the priority level to High because a patch is attached.
Comment 5 Mark McLoughlin 2004-02-16 19:59:39 UTC
What a horrible little bug! Thanks for your patch Leena, I've
committed a very similar patch.

The code you're referring to is just broken, you had fixed it up
correctly in your patch.

2004-02-16  Mark McLoughlin  <mark@skynet.ie>
                                                                     
                                                                         
        Resolve the mystery of the disappearing applets. Fix for
        bug #128567 based on a patch from Leena gunda.
                                                                     
                                                                         
        * applet.c: (panel_applet_register): if adding at the
        saved position fails, try adding at the beginning of the
        panel.