diff --git a/panel-plugin/sample.c b/panel-plugin/sample.c index a157ecc..8e04620 100644 --- a/panel-plugin/sample.c +++ b/panel-plugin/sample.c @@ -130,12 +130,20 @@ sample_read (SamplePlugin *sample) +static void +style_update_cb (const gchar *command) +{ + g_spawn_command_line_sync (command, NULL, NULL, NULL, NULL); +} + + + static SamplePlugin * sample_new (XfcePanelPlugin *plugin) { SamplePlugin *sample; GtkOrientation orientation; - GtkWidget *label; + GtkWidget *label, *button; /* allocate memory for the plugin structure */ sample = g_slice_new0 (SamplePlugin); @@ -162,9 +170,14 @@ sample_new (XfcePanelPlugin *plugin) gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (sample->hvbox), label, FALSE, FALSE, 0); - label = gtk_label_new (_("Plugin")); - gtk_widget_show (label); - gtk_box_pack_start (GTK_BOX (sample->hvbox), label, FALSE, FALSE, 0); + button = gtk_button_new_with_label (_("Plugin")); + gtk_widget_show (button); + gtk_box_pack_start (GTK_BOX (sample->hvbox), button, FALSE, FALSE, 0); + + g_signal_connect_swapped (label, "style-updated", G_CALLBACK(style_update_cb), + "notify-send 'label style updated'"); + g_signal_connect_swapped (button, "style-updated", G_CALLBACK(style_update_cb), + "notify-send 'button style updated'"); return sample; }