From d1208dfcc54f19d51b736b4d7ec9db7ba87a7604 Mon Sep 17 00:00:00 2001 From: bartbes Date: Tue, 3 Aug 2010 14:11:28 +0200 Subject: [PATCH] gmenu2x: Fixed file explorer/dialog --- gmenu2x/Makefile | 2 +- gmenu2x/patches/001-filedialog.patch | 40 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 gmenu2x/patches/001-filedialog.patch diff --git a/gmenu2x/Makefile b/gmenu2x/Makefile index 25ee1eb..0eaebf7 100644 --- a/gmenu2x/Makefile +++ b/gmenu2x/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gmenu2x PKG_VERSION:=20100222 PKG_REV:= 745321edf9101688ac1ffe3a0bff5773f08b36db -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=git://projects.qi-hardware.com/gmenu2x.git diff --git a/gmenu2x/patches/001-filedialog.patch b/gmenu2x/patches/001-filedialog.patch new file mode 100644 index 0000000..5cd8b79 --- /dev/null +++ b/gmenu2x/patches/001-filedialog.patch @@ -0,0 +1,40 @@ +--- gmenu2x/src/filedialog.cpp 2010-08-03 12:18:26.000000000 +0200 ++++ gmenu2xm/src/filedialog.cpp 2010-08-03 13:31:40.000000000 +0200 +@@ -35,7 +35,7 @@ + this->text = text; + this->filter = filter; + this->file = ""; +- setPath("/card"); ++ setPath("/"); + title = "File Browser"; + if (!file.empty()) { + string::size_type pos = file.rfind("/"); +@@ -50,7 +50,7 @@ + bool FileDialog::exec() { + bool close = false, result = true, ts_pressed = false; + if (!fileExists(path())) +- setPath("/card"); ++ setPath("/"); + + fl.setFilter(filter); + fl.browse(); +@@ -155,7 +155,7 @@ + } break; + case FD_ACTION_GOUP: { + string::size_type p = path().rfind("/"); +- if (p==string::npos || path().substr(0,11)!="/card" || p<4) ++ if (p==string::npos || path().substr(0,11)!="/" || p<4) + return false; + else + setPath( path().substr(0,p) ); +--- gmenu2x/src/gmenu2x.cpp 2010-08-03 13:55:31.000000000 +0200 ++++ gmenu2xm/src/gmenu2x.cpp 2010-08-03 13:55:50.000000000 +0200 +@@ -998,7 +998,7 @@ + } + + void GMenu2X::explorer() { +- FileDialog fd(this,tr["Select an application"],".gpu,.dge,.sh"); ++ FileDialog fd(this,tr["Select an application"],".gpu,.dge,.sh,"); + if (fd.exec()) { + if (confInt["saveSelection"] && (confInt["section"]!=menu->selSectionIndex() || confInt["link"]!=menu->selLinkIndex())) + writeConfig();