~ubuntu-branches/ubuntu/oneiric/cairo-dock-plug-ins/oneiric

« back to all changes in this revision

Viewing changes to kde-integration/src/applet-init.c

Tags: upstream-2.1.3-6
ImportĀ upstreamĀ versionĀ 2.1.3-6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
* This file is a part of the Cairo-Dock project
 
3
*
 
4
* Copyright : (C) see the 'copyright' file.
 
5
* E-mail    : see the 'copyright' file.
 
6
*
 
7
* This program is free software; you can redistribute it and/or
 
8
* modify it under the terms of the GNU General Public License
 
9
* as published by the Free Software Foundation; either version 3
 
10
* of the License, or (at your option) any later version.
 
11
*
 
12
* This program is distributed in the hope that it will be useful,
 
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
* GNU General Public License for more details.
 
16
* You should have received a copy of the GNU General Public License
 
17
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
*/
 
19
 
 
20
#include "stdlib.h"
 
21
 
 
22
#include "applet-vfs.h"
 
23
#include "applet-utils.h"
 
24
#include "applet-init.h"
 
25
 
 
26
 
 
27
CD_APPLET_PRE_INIT_BEGIN ("kde integration",
 
28
        1, 6, 2,
 
29
        CAIRO_DOCK_CATEGORY_PLUG_IN,
 
30
        N_("This applet provides functions for a better integration into a KDE environnement.\n"
 
31
        "It is auto-activated, so you don't need to activate it.\n"
 
32
        "It is designed for KDE4"),
 
33
        "Fabounet (Fabrice Rey)")
 
34
        if (g_iDesktopEnv == CAIRO_DOCK_KDE)
 
35
        {
 
36
                if (init_vfs_backend ())
 
37
                {
 
38
                        CairoDockDesktopEnvBackend *pVFSBackend = g_new0 (CairoDockDesktopEnvBackend, 1);
 
39
                        pVFSBackend->get_file_info = vfs_backend_get_file_info;
 
40
                        pVFSBackend->get_file_properties = vfs_backend_get_file_properties;
 
41
                        pVFSBackend->list_directory = vfs_backend_list_directory;
 
42
                        pVFSBackend->launch_uri = vfs_backend_launch_uri;
 
43
                        pVFSBackend->is_mounted = vfs_backend_is_mounted;
 
44
                        pVFSBackend->can_eject = vfs_backend_can_eject;
 
45
                        pVFSBackend->eject = vfs_backend_eject_drive;
 
46
                        pVFSBackend->mount = vfs_backend_mount;
 
47
                        pVFSBackend->unmount = vfs_backend_unmount;
 
48
                        pVFSBackend->add_monitor = vfs_backend_add_monitor;
 
49
                        pVFSBackend->remove_monitor = vfs_backend_remove_monitor;
 
50
                        pVFSBackend->delete_file = vfs_backend_delete_file;
 
51
                        pVFSBackend->rename = vfs_backend_rename_file;
 
52
                        pVFSBackend->move = vfs_backend_move_file;
 
53
                        pVFSBackend->get_trash_path = vfs_backend_get_trash_path;
 
54
                        pVFSBackend->get_desktop_path = vfs_backend_get_desktop_path;
 
55
                        pVFSBackend->logout = env_backend_logout;
 
56
                        pVFSBackend->shutdown = env_backend_shutdown;
 
57
                        pVFSBackend->setup_time = env_backend_setup_time;
 
58
                        pVFSBackend->show_system_monitor = env_backend_show_system_monitor;
 
59
                        cairo_dock_fm_register_vfs_backend (pVFSBackend);
 
60
                }
 
61
        }
 
62
        else
 
63
                return FALSE;
 
64
CD_APPLET_PRE_INIT_END