~cairo-dock-team/cairo-dock-plug-ins/3.1.x

« back to all changes in this revision

Viewing changes to Status-Notifier/src/applet-item.c

  • Committer: Matthieu Baerts
  • Date: 2012-12-01 22:36:58 UTC
  • Revision ID: matttbe@gmail.com-20121201223658-yh3de1eatr0jpw07
Merge rev 2639 from Trunk
Status-Notifier: use g_object_ref_sink on the menu

Show diffs side-by-side

added added

removed removed

Lines of Context:
725
725
        if (pItem->cIconThemePath)
726
726
                cd_satus_notifier_remove_theme_path (pItem->cIconThemePath);
727
727
        if (pItem->pMenu != NULL)
728
 
                g_signal_handlers_disconnect_by_func (pItem->pMenu, _on_draw_menu_reposition, pItem);  // will remove the 'reposition' callback too.
 
728
                g_object_unref (pItem->pMenu);  // will remove the 'reposition' callback too.
729
729
        g_object_unref (pItem->pProxy);
730
730
        g_object_unref (pItem->pProxyProps);
731
731
        g_free (pItem->cService);
822
822
                if (pItem->cMenuPath != NULL && *pItem->cMenuPath != '\0' && strcmp (pItem->cMenuPath, "/NO_DBUSMENU") != 0)  // hopefully, if the item doesn't provide a dbusmenu, it will not set something different as these 2 choices  (ex.: Klipper).
823
823
                {
824
824
                        pItem->pMenu = dbusmenu_gtkmenu_new ((gchar *)pItem->cService, (gchar *)pItem->cMenuPath);
 
825
                        if (g_object_is_floating (pItem->pMenu))  // claim ownership on the menu.
 
826
                                g_object_ref_sink (pItem->pMenu);
825
827
                        /* Position of the menu: GTK doesn't do its job :-/
826
828
                         * e.g. with Dropbox: the menu is out of the screen every time
827
829
                         * something has changed in this menu (it displays 'connecting',