Skip to content

Instantly share code, notes, and snippets.

@lf94
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lf94/8bdbbd40fdf14aeee274 to your computer and use it in GitHub Desktop.
Save lf94/8bdbbd40fdf14aeee274 to your computer and use it in GitHub Desktop.
XFCE panel plugin body
static void
constructor(XfcePanelPlugin *plugin) {
// Use any GTK_CONTAINER you wish, it will be packed into the XfcePanelPlugin (plugin) variable.
GtkWidget *scroll_win = gtk_scrolled_window_new(NULL, NULL);
/* Now program as if you were creating any old GTK application. */
// Pack your container into the plugin's container.
gtk_container_add(GTK_CONTAINER(plugin), scroll_win);
// Run these commands so GTK shows your widgets.
gtk_widget_show_all(scroll_win); // change scroll_win to your container's name
xfce_panel_plugin_set_expand (XFCE_PANEL_PLUGIN(plugin), TRUE); // nothing to change here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment