static void i3_workspaces_free (XfcePanelPlugin *plugin,
                                i3WorkspacesPlugin *i3_workspaces)
{
    /* destroy the panel widgets */
    gtk_widget_destroy (i3_workspaces->hvbox);

    /* free the plugin structure */
    panel_slice_free (i3WorkspacesPlugin, i3_workspaces);
}
static void
lightdash_free (XfcePanelPlugin *plugin,
                LightdashPlugin *lightdash)
{
    if (G_LIKELY (lightdash->button_title != NULL))
        g_free (lightdash->button_title);

    panel_slice_free (LightdashPlugin, lightdash);
}
static void
xkb_free (t_xkb *xkb)
{
    xkb_config_finalize ();

    gtk_widget_destroy (xkb->layout_image);
    gtk_widget_destroy (xkb->btn);
    xkb_destroy_popup_menu (xkb);

    panel_slice_free (t_xkb, xkb);
}
/**
 * destruct:
 * @plugin: the xfce plugin
 * @i3_workspaces: the i3 workspaces plugin
 *
 * Free all related resources.
 */
static void
destruct(XfcePanelPlugin *plugin, i3WorkspacesPlugin *i3_workspaces)
{
    /* save configuration */
    i3_workspaces_config_save(i3_workspaces->config, plugin);
    i3_workspaces_config_free(i3_workspaces->config);

    /* destroy the panel widgets */
    gtk_widget_destroy(i3_workspaces->hvbox);

    /* destroy the i3wm delegate */
    i3wm_destruct(i3_workspaces->i3wm);

    /* free the plugin structure */
    panel_slice_free(i3WorkspacesPlugin, i3_workspaces);
}
static void
time_out_free (XfcePanelPlugin *plugin,
               TimeOutPlugin   *time_out)
{
  /* Stop the countdowns */
  g_object_unref (time_out->break_countdown);
  g_object_unref (time_out->lock_countdown);

  /* Destroy lock screen */
  g_object_unref (time_out->lock_screen);

  /* Destroy the plugin widgets */
  gtk_widget_destroy (time_out->hvbox);

  /* Free the plugin structure */
  panel_slice_free (TimeOutPlugin, time_out);
}
示例#6
0
static void
sample_free (XfcePanelPlugin *plugin,
             SamplePlugin    *sample)
{
  GtkWidget *dialog;

  /* check if the dialog is still open. if so, destroy it */
  dialog = g_object_get_data (G_OBJECT (plugin), "dialog");
  if (G_UNLIKELY (dialog != NULL))
    gtk_widget_destroy (dialog);

  /* destroy the panel widgets */
  gtk_widget_destroy (sample->hvbox);

  /* cleanup the settings */
  if (G_LIKELY (sample->setting1 != NULL))
    g_free (sample->setting1);

  /* free the plugin structure */
  panel_slice_free (SamplePlugin, sample);
}