Addon for desktop-menu-plugin.c

Jannis Pohlmann info at sten-net.de
Thu Sep 30 21:26:38 CEST 2004


Hello!

I postet a feature request to the XFce forum 
(http://forum.xfce.org/viewtopic.php?t=1046) and tried
to edit xfdesktop/panel-plugin/desktop-menu-plugin.c of a current CVS 
snapshot. I manipulated the
code as followed:

typedef struct _DMPlugin {
    (...)
    GtkWidget* edit_fb;
    (...)
} DMPlugin;

static void
editbutton_click_cb(GtkWidget *w, gpointer user_data)
{
    DMPlugin *dmp = user_data;
    char cmd[1024];
    strcpy(cmd,"xfce4-menueditor ");
    strcat(cmd, dmp->menu_file);
    xfce_exec(cmd, FALSE, FALSE, NULL);
}

static void
dmp_create_options(Control *ctrl, GtkContainer *con, GtkWidget *done)
{
    (...)
    gtk_box_pack_start(GTK_BOX(hbox), filebutton, FALSE, FALSE, 0);
    (...)
    dmp->edit_fb = editbutton = gtk_button_new_with_label(_("Edit menu"));
    gtk_container_add(GTK_CONTAINER(editbutton), image);
    gtk_widget_show(editbutton);
    gtk_box_pack_end(GTK_BOX(hbox), editbutton, FALSE, FALSE, 0);
    g_signal_connect(G_OBJECT(editbutton), "clicked",
            G_CALLBACK(editbutton_click_cb), dmp);
    (...)
}

--
1) Is it a common method to run external applaction using xfce_exec()?
2) How can one make the now opened menueditor in front of the options 
dialog
   (on my system, it is opened in the back of the dialog)?
3) If this feature is optimized, is it possible to commit it to the offical
   XFce4 development tree?

Greetings,
Jannis



More information about the Xfce4-dev mailing list