aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorross <ross@b067294f-1dea-0310-9683-c47a78595994>2004-11-02 14:46:24 +0000
committerross <ross@b067294f-1dea-0310-9683-c47a78595994>2004-11-02 14:46:24 +0000
commitea758608f3e30183da8653fd6a52b7e989e9924e (patch)
treebbf609541a7f5ddca5a052649b48183ecf936d71 /src
parent1975d8e049b0be3cec9df77d3513d9c0c8ec8cbf (diff)
downloadmatchbox-panel-ea758608f3e30183da8653fd6a52b7e989e9924e.tar.gz
matchbox-panel-ea758608f3e30183da8653fd6a52b7e989e9924e.tar.bz2
matchbox-panel-ea758608f3e30183da8653fd6a52b7e989e9924e.zip
Only parse .desktop files and set DISPLAY
git-svn-id: https://svn.o-hand.com/repos/matchbox/trunk/matchbox-panel@866 b067294f-1dea-0310-9683-c47a78595994
Diffstat (limited to 'src')
-rw-r--r--src/panel.c1
-rw-r--r--src/panel_menu.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/panel.c b/src/panel.c
index 035e352..451eece 100644
--- a/src/panel.c
+++ b/src/panel.c
@@ -1604,6 +1604,7 @@ MBPanel
if (!strcmp ("-display", argv[i]) || !strcmp ("-d", argv[i])) {
if (++i>=argc) panel_usage (argv[0]);
display_name = argv[i];
+ setenv("DISPLAY", display_name, 1);
continue;
}
if (!strcmp ("--no-session", argv[i]) || !strcmp ("-ns", argv[i])) {
diff --git a/src/panel_menu.c b/src/panel_menu.c
index c3640b7..9c7fb1b 100644
--- a/src/panel_menu.c
+++ b/src/panel_menu.c
@@ -195,6 +195,8 @@ panel_menu_init(MBPanel *panel)
while((dir_entry = readdir(dp)) != NULL)
{
struct stat stat_info;
+ if (strcmp(dir_entry->d_name+strlen(dir_entry->d_name)-8,".desktop"))
+ continue;
stat(dir_entry->d_name, &stat_info);
if (!(stat_info.st_mode & S_IFDIR))
{