~ubuntu-branches/ubuntu/utopic/cairo-dock-plug-ins/utopic-proposed

« back to all changes in this revision

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

Tags: upstream-3.3.99.beta1.2.really.3.3.2
ImportĀ upstreamĀ versionĀ 3.3.99.beta1.2.really.3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
        }
161
161
}
162
162
 
163
 
static gboolean on_style_changed (GldiModuleInstance *myApplet)
164
 
{
165
 
        g_print ("%s (Clock)\n", __func__);
166
 
        
167
 
        if (! myConfig.bOldStyle)  // numeric mode
168
 
        {
169
 
                if (myConfig.textDescription.cFont == NULL)  // default font -> reload our text description
170
 
                {
171
 
                        gldi_text_description_set_font (&myConfig.textDescription, NULL);
172
 
                        pango_font_description_set_weight (myConfig.textDescription.fd, PANGO_WEIGHT_HEAVY);
173
 
                }
174
 
                cd_clock_update_with_time (myApplet);  // redraw in case the font or the text color has changed
175
 
        }
176
 
        return GLDI_NOTIFICATION_LET_PASS;
177
 
}
178
 
 
179
163
CD_APPLET_INIT_BEGIN
180
164
        if (myDesklet)
181
165
        {
210
194
                CD_APPLET_REGISTER_FOR_UPDATE_ICON_SLOW_EVENT;
211
195
                cairo_dock_launch_animation (myContainer);
212
196
        }
213
 
        gldi_object_register_notification (&myStyleMgr,
214
 
                NOTIFICATION_STYLE_CHANGED,
215
 
                (GldiNotificationFunc) on_style_changed,
216
 
                GLDI_RUN_AFTER, myApplet);
217
197
        
218
198
        //\_______________ On enregistre les backends de gestion des taches.
219
199
        cd_clock_register_backend_default (myApplet);