~ubuntu-branches/ubuntu/intrepid/xfce4-panel/intrepid

« back to all changes in this revision

Viewing changes to panel/panel-item-manager.c

  • Committer: Bazaar Package Importer
  • Author(s): Jani Monoses
  • Date: 2006-09-12 15:36:53 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20060912153653-sajops08au69e9r6
Tags: 4.3.99.1-0ubuntu1
* New upstream release (4.4RC1)
* Bumped library and policy versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* vim: set expandtab ts=8 sw=4: */
2
2
 
3
 
/*  $Id: panel-item-manager.c 21753 2006-05-21 11:13:48Z jasper $
 
3
/*  $Id: panel-item-manager.c 22697 2006-08-09 18:36:00Z jasper $
4
4
 *
5
5
 *  Copyright © 2005 Jasper Huijsmans <jasper@xfce.org>
6
6
 *
31
31
#include <libxfcegui4/libxfcegui4.h>
32
32
 
33
33
#include <libxfce4panel/xfce-panel-item-iface.h>
 
34
#include <libxfce4panel/xfce-panel-macros.h>
34
35
#include <libxfce4panel/xfce-panel-internal-plugin.h>
35
36
#include <libxfce4panel/xfce-panel-external-item.h>
36
37
#include <libxfce4panel/xfce-panel-enums.h>
85
86
 
86
87
    g_free (class->file);
87
88
 
88
 
    g_free (class);
 
89
    panel_slice_free (XfcePanelItemClass, class);
89
90
}
90
91
 
91
92
static void
95
96
    GPtrArray *array = data;
96
97
    XfcePanelItemInfo *info;
97
98
 
98
 
    info = g_new0 (XfcePanelItemInfo, 1);
 
99
    info = panel_slice_new0 (XfcePanelItemInfo);
99
100
    
100
101
    info->name         = plugin_name;
101
102
    info->display_name = class->name;
158
159
            g_file_test (value, G_FILE_TEST_EXISTS))
159
160
 
160
161
        {
161
 
            class = g_new0 (XfcePanelItemClass, 1);
 
162
            class = panel_slice_new0 (XfcePanelItemClass);
162
163
            
163
164
            class->file = g_strdup (value);
164
165
            
169
170
        else if ((value = xfce_rc_read_entry (rc, "X-XFCE-Module", NULL)) &&
170
171
                 g_file_test (value, G_FILE_TEST_EXISTS))
171
172
        {
172
 
            class = g_new0 (XfcePanelItemClass, 1);
 
173
            class = panel_slice_new0 (XfcePanelItemClass);
173
174
            
174
175
            class->file = g_strdup (value);
175
176
            
485
486
        XfcePanelItemInfo *info = g_ptr_array_index (info_list, i);
486
487
 
487
488
        if (info->icon)
488
 
            g_object_unref (info->icon);
 
489
            g_object_unref (G_OBJECT (info->icon));
489
490
 
490
 
        g_free (info);
 
491
        panel_slice_free (XfcePanelItemInfo, info);
491
492
    }
492
493
 
493
494
    g_ptr_array_free (info_list, TRUE);