void init_title (WindowckPlugin *wckp) { set_title_colors(wckp); resize_title(wckp); gtk_label_set_ellipsize(wckp->title, PANGO_ELLIPSIZE_END); if (wckp->prefs->size_mode != SHRINK) gtk_misc_set_alignment(GTK_MISC(wckp->title), wckp->prefs->title_alignment / 10.0, 0.5); /* get the xfwm4 chanel */ wckp->wm_channel = wck_properties_get_channel (G_OBJECT (wckp->plugin), "xfwm4"); /* try to set title settings from the xfwm4 theme */ if (wckp->wm_channel && wckp->prefs->sync_wm_font) { apply_wm_settings (wckp); g_signal_connect (wckp->wm_channel, "property-changed", G_CALLBACK (on_xfwm_channel_property_changed), wckp); } gtk_alignment_set_padding(GTK_ALIGNMENT(wckp->alignment), ICON_PADDING, ICON_PADDING, wckp->prefs->title_padding, wckp->prefs->title_padding); gtk_box_set_spacing (GTK_BOX(wckp->hvbox), wckp->prefs->title_padding); /* get the xsettings chanel to update the gtk theme */ wckp->x_channel = wck_properties_get_channel (G_OBJECT (wckp->plugin), "xsettings"); if (wckp->x_channel) g_signal_connect (wckp->x_channel, "property-changed", G_CALLBACK (on_x_chanel_property_changed), wckp); }
static void windowck_screen_position_changed(XfcePanelPlugin *plugin, XfceScreenPosition *position, WindowckPlugin *wckp) { if (wckp->prefs->size_mode != SHRINK) { xfce_panel_plugin_set_shrink (plugin, FALSE); gtk_label_set_width_chars(wckp->title, 1); xfce_panel_plugin_set_shrink (plugin, TRUE); resize_title(wckp); } }