Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-07-22 19:43:46

Aldebaraan
Member
Registered: 2020-07-22
Posts: 6

XFCE desktop right click menu

I'm trying to edit the desktop right click menu to include some applications that i use more regularly. I edited the xfdesktop-file-icon-manager.c and compiled but when i right click it opens up all the programs that i added this way:

        
#include <stdlib.h>

  img = gtk_image_new_from_icon_name("terminal", GTK_ICON_SIZE_MENU);
  mi = xfdesktop_menu_create_menu_item_with_mnemonic(_("Terminal"), img);
  gtk_widget_show(mi);
  gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
  g_signal_connect(G_OBJECT(mi), "activate",
        //G_CALLBACK(exo-open --launch TerminalEmulator),
          system("exo-open --launch TerminalEmulator"),
          fmanager);

Any help?

Offline

#2 2020-07-22 23:47:54

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: XFCE desktop right click menu

Hello and welcome.

Instead of editing the code and needing to maintain a separate code base, why not just use Thunar Custom Actions (they will show up on the desktop as well). For example, to run gimp, create a new custom action with the following parameters:
- Name = Run gimp
- Command = gimp
- Icon = <your choice>
- Appearance Conditions: check all


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2020-07-23 01:09:00

Aldebaraan
Member
Registered: 2020-07-22
Posts: 6

Re: XFCE desktop right click menu

ToZ wrote:

Hello and welcome.

Instead of editing the code and needing to maintain a separate code base, why not just use Thunar Custom Actions (they will show up on the desktop as well). For example, to run gimp, create a new custom action with the following parameters:
- Name = Run gimp
- Command = gimp
- Icon = <your choice>
- Appearance Conditions: check all

Hi. Is there a way to create them just for desktop? Or exclude some actions from appearing in the desktop?

Last edited by Aldebaraan (2020-07-23 01:09:20)

Offline

#4 2020-07-23 01:21:28

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: XFCE desktop right click menu

Almost.

The best you can do is to change the "File Pattern" in "Appearance Condition" to "Desktop", and in the options below, specify only "Directories".

This way it will only show up for the Desktop folder in Thunar, but also in the Desktop menu.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2020-07-23 16:20:56

Aldebaraan
Member
Registered: 2020-07-22
Posts: 6

Re: XFCE desktop right click menu

ToZ wrote:

Almost.

The best you can do is to change the "File Pattern" in "Appearance Condition" to "Desktop", and in the options below, specify only "Directories".

This way it will only show up for the Desktop folder in Thunar, but also in the Desktop menu.

That doesn't seem to be working. Adding "Desktop" and checking only directories doesn't make them appear only in the desktop.
EDIT: Nevermind. xfdesktop needs to be restarted for it to appear. How do i add a condition that excludes a item from appearing in the desktop?

Last edited by Aldebaraan (2020-07-23 16:34:11)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.008 seconds, 8 queries executed - Memory usage: 534.04 KiB (Peak: 534.88 KiB) ]