~cairo-dock-team/ubuntu/precise/cairo-dock-plug-ins/984054

« back to all changes in this revision

Viewing changes to switcher/src/applet-init.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-10 00:05:57 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100810000557-pfxoz5w7hbyclcqh
Tags: 2.2.0~0beta4-0ubuntu1
* New Upstream Version (LP: #614625)
* Fixed a few bugs on LP:
 - LP: #483963: Dustbin applet does not display trashes on all volumes
 - LP: #485159: Some apps have problem with Systray
 - LP: #500677: ~/.xsession-errors is too much used by CD
 - LP: #500979: Shortcuts: the order gets messed up
 - LP: #521531: Mail: crashes on Maildir
 - LP: #519915: GTG: create a new applet to control GTG
 - LP: #526138: GMenu doesn't handle desktop file exec strings properly
 - LP: #531317: CMake: Added an error if the prefix of 'cairo-dock-plugins'
                 is not the same 'cairo-dock-core'
 - LP: #531319: CMake: check the version of 'cairo-dock' when building
                 'cairo-dock-plugins'
 - LP: #537115: Click at the position where icon lavel was, the icon
                 and dock still receive the event
 - LP: #537943: Terminal applet shortkey behaviour
 - LP: #538637: Trash applet doesn't create .trashinfo files on XFCE
 - More details on the 'ChangeLog' file
* debian/rules:
 - Autotools has been replaced by CMake
 - cdbs is now used.
* debian/copyright:
 - Updated with the new applets
* debian/control:
 - Autotools has been replaced by CMake
 - Added libcurl4-gnutls-dev, libindicator-dev, libdbusmenu-glib-dev
   libido-0.1-dev, libical-dev, libdbusmenu-gtk-dev as Build-deps
 - Bump Standard-Version to 3.9.1
 - Wget is required for dnd2share applet
 - Added the exact realease for 'cairo-dock-dev' in order to prevent any
    build error if this package is not already available (thx to didrocks)
* debian/cairo-dock-plug-ins*.install:
 - All sonames are now installed into lib32 or lib64 (lib*)

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
CD_APPLET_DEFINITION (N_("switcher"),
33
33
        2, 0, 9,
34
 
        CAIRO_DOCK_CATEGORY_DESKTOP,
 
34
        CAIRO_DOCK_CATEGORY_APPLET_DESKTOP,
35
35
        N_("This applet allows you to interact with your workspaces :\n"
36
36
        " - switch between your workspaces (scroll up/down with the mouse),\n"
37
37
        " - name them (in the config),\n"
39
39
        " - show the desktop (middle-click or in the menu),\n"
40
40
        " - list all windows on each workspace ((middle-click or in the menu)\n"
41
41
        "It has 2 modes : compact (on 1 icon) and expanded (with a sub-dock)."),
42
 
        "Cchumi & Fabounet")
 
42
        "Cchumi & Fabounet")
43
43
 
44
44
 
45
45
CD_APPLET_INIT_BEGIN
108
108
        {
109
109
                g_source_remove (myData.iSidAutoRefresh);
110
110
        }
 
111
        if (myData.iSidPainIcons != 0)
 
112
                g_source_remove (myData.iSidPainIcons);
111
113
        CD_APPLET_UNREGISTER_FOR_CLICK_EVENT;
112
114
        CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT;
113
115
        CD_APPLET_UNREGISTER_FOR_MIDDLE_CLICK_EVENT;
138
140
                myData.iSidRedrawMainIconIdle = 0;
139
141
        }
140
142
        
141
 
        if (myDesklet)
142
 
        {
143
 
                if (myConfig.bCompactView)
144
 
                {
145
 
                        CD_APPLET_SET_DESKLET_RENDERER ("Simple");
146
 
                }
147
 
                else
148
 
                {
149
 
                        gpointer pConfig[2] = {GINT_TO_POINTER (myConfig.bDesklet3D), GINT_TO_POINTER (FALSE)};
150
 
                        CD_APPLET_SET_DESKLET_RENDERER_WITH_DATA ("Caroussel", pConfig);
151
 
                }
152
 
        }
153
143
        cd_switcher_compute_nb_lines_and_columns ();
154
144
        
155
145
        cd_switcher_compute_desktop_coordinates (myData.switcher.iCurrentDesktop, myData.switcher.iCurrentViewportX, myData.switcher.iCurrentViewportY, &myData.switcher.iCurrentLine, &myData.switcher.iCurrentColumn);
156
146
        
157
147
        if (CD_APPLET_MY_CONFIG_CHANGED)
158
148
        {
 
149
                if (myDesklet && CD_APPLET_MY_CONTAINER_TYPE_CHANGED)  // we are now in a desklet, set a renderer.
 
150
                {
 
151
                        if (myConfig.bCompactView)
 
152
                        {
 
153
                                CD_APPLET_SET_DESKLET_RENDERER ("Simple");
 
154
                        }
 
155
                        else
 
156
                        {
 
157
                                CD_APPLET_SET_DESKLET_RENDERER_WITH_DATA ("Slide", NULL);
 
158
                        }
 
159
                }
 
160
                
159
161
                if (CD_APPLET_MY_OLD_CONTAINER != myContainer || ! myConfig.bCompactView)
160
162
                {
161
163
                        cairo_dock_remove_notification_func_on_container (CD_APPLET_MY_OLD_CONTAINER, CAIRO_DOCK_MOUSE_MOVED,
204
206
                if (myData.pDesktopBgMapSurface == NULL)
205
207
                        cd_switcher_load_default_map_surface ();
206
208
                if (! myConfig.bCompactView)
207
 
                        cd_switcher_paint_icons ();
 
209
                        cd_switcher_trigger_paint_icons ();
208
210
        }
209
211
        
210
212
        cd_switcher_draw_main_icon ();