1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-12-22 15:21:43 +02:00

Merge branch 'master' of projects.qi-hardware.com:openwrt-packages

This commit is contained in:
M. Dietrich 2010-02-11 21:16:22 +01:00
commit b5e8bdf8d9
5 changed files with 226 additions and 14 deletions

62
dgclock/Makefile Normal file
View File

@ -0,0 +1,62 @@
#
# Copyright (C) 2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=dgclock
PKG_VERSION:=091222
PKG_RELEASE:=1
PKG_SOURCE:=dgclock$(PKG_VERSION).zip
PKG_SOURCE_URL:=http://clogging.web.fc2.com/dingoo/
PKG_MD5SUM:=2a5143b7a3db464488c917387445e092
PKG_BUILD_DIR:=$(BUILD_DIR)/dgclock-$(PKG_VERSION)
UNPACK_CMD=unzip -d $(1) $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS+=\
-I$(STAGING_DIR)/usr/lib/libintl/include/ \
-I$(STAGING_DIR)/usr/lib/libiconv/include/
TARGET_LDFLAGS+=\
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-L$(STAGING_DIR)/usr/lib/libintl/lib/ \
-L$(STAGING_DIR)/usr/lib/libiconv/lib/
define Package/dgclock
SECTION:=xorg-apps
CATEGORY:=Xorg
TITLE:=dgclock - sdl based date and time
URL:=http://clogging.web.fc2.com/dingoo/
DEPENDS:=+libsdl +libsdl-image +libsdl-ttf +libgl-mesa +dejavu-fonts-ttf
endef
define Package/dgclock/description
Clock and date in sdl
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/SDL
define Build/Compile
$(call Build/Compile/Default, \
A320=1\
)
endef
define Package/dgclock/install
$(INSTALL_DIR) \
$(1)/usr/bin
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/bin/a320/dgclock \
$(1)/usr/bin/
endef
$(eval $(call BuildPackage,dgclock))

View File

@ -0,0 +1,17 @@
diff -ruN dgclock/src/main.c dgclock.mod/src/main.c
--- dgclock/src/main.c 2009-12-21 16:00:00.000000000 +0100
+++ dgclock.mod/src/main.c 2010-02-10 11:30:11.000000000 +0100
@@ -60,11 +60,11 @@
SDL_ShowCursor(SDL_DISABLE);
- gTTFFont = TTF_OpenFont ( "mplus-2p-medium.ttf" , 15 );
+ gTTFFont = TTF_OpenFont ( "/usr/share/fonts/ttf-dejavu/DejaVuSans.ttf" , 15 );
if (!gTTFFont)
return -1;
- gTTFSmall = TTF_OpenFont ( "mplus-2p-medium.ttf" , 10 );
+ gTTFSmall = TTF_OpenFont ( "/usr/share/fonts/ttf-dejavu/DejaVuSans.ttf" , 10 );
if (!gTTFSmall)
return -1;

View File

@ -0,0 +1,47 @@
diff -ruN dgclock-091222/src/main.c dgclock-091222.mod/src/main.c
--- dgclock-091222/src/main.c 2010-02-10 11:51:51.000000000 +0100
+++ dgclock-091222.mod/src/main.c 2010-02-10 15:27:40.000000000 +0100
@@ -7,7 +7,7 @@
#include "text.h"
#include "settime.h"
-SDL_Surface *gSurfaceMain = NULL;
+SDL_Surface *gSurfaceMain, *gRealScreen = NULL;
TTF_Font *gTTFFont = NULL;
TTF_Font *gTTFSmall = NULL;
@@ -46,8 +46,9 @@
return -1;
}
- gSurfaceMain = SDL_SetVideoMode(320,240,16,0);
-
+ gSurfaceMain = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 240, 16, 0, 0, 0, 0);
+ gRealScreen = SDL_SetVideoMode(320,240,32,0);
+
if (!gSurfaceMain)
return -1;
@@ -560,7 +561,8 @@
SDL_Surface *pSurfaceText = NULL;
- SDL_Flip(gSurfaceMain);
+ SDL_BlitSurface(gSurfaceMain,NULL,gRealScreen,NULL);
+ SDL_Flip(gRealScreen);
i = 0;
quit_flag = 0;
@@ -612,8 +614,10 @@
app_make_time(&lctm);
}
- SDL_Flip(gSurfaceMain);
- SDL_Flip(gSurfaceMain); // seems double buffer
+ SDL_BlitSurface(gSurfaceMain,NULL,gRealScreen,NULL);
+ SDL_Flip(gRealScreen);
+ SDL_Flip(gRealScreen);
+
update_flag = 0;
}

View File

@ -8,10 +8,10 @@ From: Xiangfu Liu <xiangfu@sharism.cc>
src/gconf_file.cpp | 2 ++
src/inifile.cpp | 1 +
src/lib/common.cpp | 2 ++
src/lib/data.cpp | 1 +
src/lib/data.cpp | 2 ++
src/lib/http_client.cpp | 1 +
src/lib/pluginmanager.cpp | 2 +-
src/lib/stardict_client.cpp | 1 +
src/lib/stardict_client.cpp | 2 ++
src/lib/treedict.cpp | 1 +
src/pangoview.cpp | 2 ++
src/prefsdlg.cpp | 1 +
@ -35,7 +35,7 @@ From: Xiangfu Liu <xiangfu@sharism.cc>
.../stardict_xdxf_parsedata.cpp | 1 +
tests/t_config_file.cpp | 1 +
tests/t_xml.cpp | 1 +
30 files changed, 38 insertions(+), 6 deletions(-)
30 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/src/gconf_file.cpp b/src/gconf_file.cpp
@ -77,13 +77,14 @@ index 6575ad9..29faf9e 100644
static void parse_description(const char *p, long len, std::string &description)
diff --git a/src/lib/data.cpp b/src/lib/data.cpp
index 45c7d1a..1b29ec3 100644
index 45c7d1a..a428b37 100644
--- a/src/lib/data.cpp
+++ b/src/lib/data.cpp
@@ -22,6 +22,7 @@
@@ -22,6 +22,8 @@
# include "config.h"
#endif
+#include <cstdio>
+#include <cstring>
#include "kmp.h"
@ -113,13 +114,14 @@ index de3e92d..28a46c4 100644
StarDictPluginBaseObject::StarDictPluginBaseObject(const char *filename, GModule *module_, plugin_configure_func_t configure_func_):
plugin_filename(filename), module(module_), configure_func(configure_func_)
diff --git a/src/lib/stardict_client.cpp b/src/lib/stardict_client.cpp
index dcae5ce..c3d2511 100644
index dcae5ce..407a907 100644
--- a/src/lib/stardict_client.cpp
+++ b/src/lib/stardict_client.cpp
@@ -25,6 +25,7 @@
@@ -25,6 +25,8 @@
#include <glib.h>
#include <glib/gi18n.h>
+#include <cstdio>
+#include <cstdlib>
#include "sockets.hpp"
#include "md5.h"

View File

@ -5,21 +5,47 @@ From: Xiangfu Liu <xiangfu@sharism.cc>
---
configure.in | 2
configure.in | 26 ++-
src/class_factory.cpp | 2
src/conf.cpp | 6 -
src/stardict.cpp | 6 -
src/stardict.cpp | 35 +++-
src/x11_iskeyspressed.cpp | 351 ---------------------------------------------
src/x11_iskeyspressed.hpp | 65 --------
6 files changed, 8 insertions(+), 424 deletions(-)
6 files changed, 39 insertions(+), 446 deletions(-)
diff --git a/configure.in b/configure.in
index 83d3d95..3676e2c 100644
index 83d3d95..6be40db 100644
--- a/configure.in
+++ b/configure.in
@@ -428,7 +428,7 @@ LDFLAGS="$LDFLAGS $X_EXTRA_LIBS"
fi
@@ -414,21 +414,21 @@ dnl ==========================================================================
# Checks for header files. need by Solaris.
AC_PATH_XTRA
-if test -n "$X_CFLAGS"; then
-CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-fi
-if test -n "$X_LIBS"; then
-LDFLAGS="$LDFLAGS $X_LIBS"
-fi
-if test -n "$X_PRE_LIBS"; then
-LDFLAGS="$LDFLAGS $X_PRE_LIBS"
-fi
-if test -n "$X_EXTRA_LIBS"; then
-LDFLAGS="$LDFLAGS $X_EXTRA_LIBS"
-fi
+#if test -n "$X_CFLAGS"; then
+#CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+#fi
+#if test -n "$X_LIBS"; then
+#LDFLAGS="$LDFLAGS $X_LIBS"
+#fi
+#if test -n "$X_PRE_LIBS"; then
+#LDFLAGS="$LDFLAGS $X_PRE_LIBS"
+#fi
+#if test -n "$X_EXTRA_LIBS"; then
+#LDFLAGS="$LDFLAGS $X_EXTRA_LIBS"
+#fi
# Checks for libraries.
-AC_CHECK_LIB([X11], [main], , [AC_MSG_ERROR([X11 lib not found])])
@ -58,7 +84,7 @@ index 2d0f89d..a35bc5c 100644
std::auto_ptr<AppConf> conf;
diff --git a/src/stardict.cpp b/src/stardict.cpp
index 326ca4a..4c51d61 100644
index 326ca4a..0e820ed 100644
--- a/src/stardict.cpp
+++ b/src/stardict.cpp
@@ -351,9 +351,9 @@ void AppCore::Create(gchar *queryword)
@ -74,6 +100,64 @@ index 326ca4a..4c51d61 100644
oFloatWin.Create();
bool scan=conf->get_bool_at("dictionary/scan_selection");
oDockLet.reset(PlatformFactory::create_tray_icon(window, scan,
@@ -2005,10 +2005,19 @@ private:
void AppCore::PopupPrefsDlg()
{
+ static std::list<std::string> posb_combs;
+ if (posb_combs.empty()) {
+ posb_combs.push_back("Win");
+ posb_combs.push_back("Shift");
+ posb_combs.push_back("Alt");
+ posb_combs.push_back("Ctrl");
+ posb_combs.push_back("Ctrl+Alt");
+ }
+
if (!prefs_dlg) {
prefs_dlg = new PrefsDlg(GTK_WINDOW(window),
- get_impl(oAppSkin.icon),
- unlock_keys->possible_combs());
+ get_impl(oAppSkin.icon),
+ posb_combs);
bool enbcol =
conf->get_bool_at("dictionary/enable_collation");
int colf =
@@ -2153,17 +2162,17 @@ void AppCore::Quit()
if (!conf->get_bool_at("main_window/maximized")) {
gint width, height;
gtk_window_get_size(GTK_WINDOW(window), &width, &height);
- conf->set_int_at("main_window/window_width", width);
- conf->set_int_at("main_window/window_height", height);
+ conf->set_int_at("main_window/window_width", width);
+ conf->set_int_at("main_window/window_height", height);
}
gint pos = gtk_paned_get_position(GTK_PANED(oMidWin.hpaned));
- conf->set_int_at("main_window/hpaned_pos", pos);
+ conf->set_int_at("main_window/hpaned_pos", pos);
if (conf->get_bool_at("floating_window/lock")) {
gint x, y;
gtk_window_get_position(GTK_WINDOW(oFloatWin.FloatWindow), &x, &y);
- conf->set_int_at("floating_window/lock_x", x);
- conf->set_int_at("floating_window/lock_y", y);
+ conf->set_int_at("floating_window/lock_x", x);
+ conf->set_int_at("floating_window/lock_y", y);
}
End();
@@ -2171,9 +2180,9 @@ void AppCore::Quit()
#ifdef CONFIG_GNOME
bonobo_object_unref (stardict_app_server);
#endif
- unlock_keys.reset(0);
- conf.reset(0);
- gtk_main_quit();
+ unlock_keys.reset(0);
+ conf.reset(0);
+ gtk_main_quit();
}
void AppCore::on_main_win_hide_list_changed(const baseconfval* hideval)
diff --git a/src/x11_iskeyspressed.cpp b/src/x11_iskeyspressed.cpp
index 15e8fb0..8b13789 100644
--- a/src/x11_iskeyspressed.cpp