add Gtk+ version 2
This commit is contained in:
parent
810184bb0d
commit
8b9d738e49
@ -78,6 +78,7 @@ source "package/libfloat/Config.in"
|
||||
source "package/libglib12/Config.in"
|
||||
source "package/libglib2/Config.in"
|
||||
source "package/libgtk12/Config.in"
|
||||
source "package/libgtk2/Config.in"
|
||||
source "package/libmad/Config.in"
|
||||
source "package/libpcap/Config.in"
|
||||
source "package/libpng/Config.in"
|
||||
|
14
package/libgtk2/Config.in
Normal file
14
package/libgtk2/Config.in
Normal file
@ -0,0 +1,14 @@
|
||||
config BR2_PACKAGE_LIBGTK2
|
||||
bool "libgtk2"
|
||||
default n
|
||||
select BR2_PACKAGE_ATK
|
||||
select BR2_PACKAGE_PANGO
|
||||
select BR2_PACKAGE_CAIRO
|
||||
select BR2_PACKAGE_JPEG
|
||||
select BR2_PACKAGE_TIFF
|
||||
select BR2_PACKAGE_PNG
|
||||
depends BR2_PACKAGE_XORG
|
||||
help
|
||||
The GTK+ version 2 graphical user interface library
|
||||
|
||||
http://www.gtk.org/
|
24
package/libgtk2/automake-lossage.patch
Normal file
24
package/libgtk2/automake-lossage.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- gtk+-2.4.1/docs/tutorial/Makefile.am~ 2003-05-06 22:54:20.000000000 +0100
|
||||
+++ gtk+-2.4.1/docs/tutorial/Makefile.am 2004-05-08 12:31:41.000000000 +0100
|
||||
@@ -52,21 +52,5 @@
|
||||
|
||||
dist-hook: html
|
||||
cp -Rp $(srcdir)/html $(distdir)
|
||||
-else
|
||||
-html:
|
||||
- echo "***"
|
||||
- echo "*** Warning: Tutorial not built"
|
||||
- echo "***"
|
||||
-
|
||||
-pdf:
|
||||
- echo "***"
|
||||
- echo "*** Warning: Tutorial not built"
|
||||
- echo "***"
|
||||
-
|
||||
-dist-hook:
|
||||
- echo "***"
|
||||
- echo "*** Warning: Tutorial not built"
|
||||
- echo "*** DISTRIBUTION IS INCOMPLETE"
|
||||
- echo "***"
|
||||
endif
|
||||
|
50
package/libgtk2/disable-print.patch
Normal file
50
package/libgtk2/disable-print.patch
Normal file
@ -0,0 +1,50 @@
|
||||
--- gtk+-2.10.0/configure.in~ 2006-07-05 18:11:44.000000000 +0200
|
||||
+++ gtk+-2.10.0/configure.in 2006-07-05 18:11:44.000000000 +0200
|
||||
@@ -1539,26 +1539,27 @@
|
||||
# Printing system checks
|
||||
################################################################
|
||||
|
||||
-AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
|
||||
-if test "x$CUPS_CONFIG" != "xno"; then
|
||||
- CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
|
||||
- CUPS_LIBS=`cups-config --libs`
|
||||
-
|
||||
- CUPS_API_VERSION=`cups-config --api-version`
|
||||
- CUPS_API_MAJOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $1}'`
|
||||
- CUPS_API_MINOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $2}'`
|
||||
-
|
||||
- if test $CUPS_API_MAJOR -gt 1 -o \
|
||||
- $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
|
||||
- AC_DEFINE(HAVE_CUPS_API_1_2)
|
||||
- fi
|
||||
-
|
||||
- AC_SUBST(CUPS_API_MAJOR)
|
||||
- AC_SUBST(CUPS_API_MINOR)
|
||||
- AC_SUBST(CUPS_CFLAGS)
|
||||
- AC_SUBST(CUPS_LIBS)
|
||||
-fi
|
||||
-AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
|
||||
+#AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
|
||||
+#if test "x$CUPS_CONFIG" != "xno"; then
|
||||
+# CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
|
||||
+# CUPS_LIBS=`cups-config --libs`
|
||||
+#
|
||||
+# CUPS_API_VERSION=`cups-config --api-version`
|
||||
+# CUPS_API_MAJOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $1}'`
|
||||
+# CUPS_API_MINOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $2}'`
|
||||
+#
|
||||
+# if test $CUPS_API_MAJOR -gt 1 -o \
|
||||
+# $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
|
||||
+# AC_DEFINE(HAVE_CUPS_API_1_2)
|
||||
+# fi
|
||||
+#
|
||||
+# AC_SUBST(CUPS_API_MAJOR)
|
||||
+# AC_SUBST(CUPS_API_MINOR)
|
||||
+# AC_SUBST(CUPS_CFLAGS)
|
||||
+# AC_SUBST(CUPS_LIBS)
|
||||
+#fi
|
||||
+#AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
|
||||
+AM_CONDITIONAL(HAVE_CUPS,false)
|
||||
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
|
11
package/libgtk2/disable-tooltips.patch
Normal file
11
package/libgtk2/disable-tooltips.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- gtk+-2.4.3/gtk/gtktooltips.c.old 2004-07-04 18:52:04.000000000 +0100
|
||||
+++ gtk+-2.4.3/gtk/gtktooltips.c 2004-07-04 18:52:08.000000000 +0100
|
||||
@@ -118,7 +118,7 @@
|
||||
tooltips->tips_data_list = NULL;
|
||||
|
||||
tooltips->delay = DEFAULT_DELAY;
|
||||
- tooltips->enabled = TRUE;
|
||||
+ tooltips->enabled = FALSE;
|
||||
tooltips->timer_tag = 0;
|
||||
tooltips->use_sticky_delay = FALSE;
|
||||
tooltips->last_popdown.tv_sec = -1;
|
149
package/libgtk2/gtk+-handhelds.patch
Normal file
149
package/libgtk2/gtk+-handhelds.patch
Normal file
@ -0,0 +1,149 @@
|
||||
Index: gtk+-2.10.6/gtk/gtkarrow.c
|
||||
===================================================================
|
||||
--- gtk+-2.10.6.orig/gtk/gtkarrow.c 2006-05-14 05:25:28.000000000 +0100
|
||||
+++ gtk+-2.10.6/gtk/gtkarrow.c 2006-11-14 12:03:45.000000000 +0000
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
-#define MIN_ARROW_SIZE 15
|
||||
+#define MIN_ARROW_SIZE 7
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
@@ -53,6 +53,8 @@
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
+static void gtk_arrow_size_request (GtkWidget *arrow,
|
||||
+ GtkRequisition *requisition);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GtkArrow, gtk_arrow, GTK_TYPE_MISC)
|
||||
@@ -88,6 +90,7 @@
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
widget_class->expose_event = gtk_arrow_expose;
|
||||
+ widget_class->size_request = gtk_arrow_size_request;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -143,13 +146,18 @@
|
||||
}
|
||||
|
||||
static void
|
||||
+gtk_arrow_size_request (GtkWidget *arrow,
|
||||
+ GtkRequisition *requisition)
|
||||
+{
|
||||
+ requisition->width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
|
||||
+ requisition->height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
gtk_arrow_init (GtkArrow *arrow)
|
||||
{
|
||||
GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW);
|
||||
|
||||
- GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
|
||||
- GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
|
||||
-
|
||||
arrow->arrow_type = GTK_ARROW_RIGHT;
|
||||
arrow->shadow_type = GTK_SHADOW_OUT;
|
||||
}
|
||||
Index: gtk+-2.10.6/gtk/gtkentry.c
|
||||
===================================================================
|
||||
--- gtk+-2.10.6.orig/gtk/gtkentry.c 2006-11-14 12:03:45.000000000 +0000
|
||||
+++ gtk+-2.10.6/gtk/gtkentry.c 2006-11-14 12:07:02.000000000 +0000
|
||||
@@ -577,6 +577,18 @@
|
||||
0.0,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
+ // Added by gtk+-handhelds.patch
|
||||
+ gtk_widget_class_install_style_property (widget_class,
|
||||
+ g_param_spec_int ("min_width",
|
||||
+ P_("Minimum width"),
|
||||
+ P_("Minimum width of the entry field"),
|
||||
+ 0,
|
||||
+ G_MAXINT,
|
||||
+ MIN_ENTRY_WIDTH,
|
||||
+ G_PARAM_READABLE));
|
||||
+
|
||||
+
|
||||
+
|
||||
/**
|
||||
* GtkEntry:truncate-multiline:
|
||||
*
|
||||
@@ -1286,7 +1298,7 @@
|
||||
{
|
||||
GtkEntry *entry = GTK_ENTRY (widget);
|
||||
PangoFontMetrics *metrics;
|
||||
- gint xborder, yborder;
|
||||
+ gint xborder, yborder, min_width;
|
||||
GtkBorder inner_border;
|
||||
PangoContext *context;
|
||||
|
||||
@@ -1302,8 +1314,10 @@
|
||||
_gtk_entry_get_borders (entry, &xborder, &yborder);
|
||||
_gtk_entry_effective_inner_border (entry, &inner_border);
|
||||
|
||||
+ gtk_widget_style_get (widget, "min_width", &min_width, NULL);
|
||||
+
|
||||
if (entry->width_chars < 0)
|
||||
- requisition->width = MIN_ENTRY_WIDTH + xborder * 2 + inner_border.left + inner_border.right;
|
||||
+ requisition->width = min_width + xborder * 2 + inner_border.left + inner_border.right;
|
||||
else
|
||||
{
|
||||
gint char_width = pango_font_metrics_get_approximate_char_width (metrics);
|
||||
Index: gtk+-2.10.6/gtk/gtkrange.c
|
||||
===================================================================
|
||||
--- gtk+-2.10.6.orig/gtk/gtkrange.c 2006-11-14 12:03:44.000000000 +0000
|
||||
+++ gtk+-2.10.6/gtk/gtkrange.c 2006-11-14 12:07:40.000000000 +0000
|
||||
@@ -197,6 +197,7 @@
|
||||
static gboolean gtk_range_key_press (GtkWidget *range,
|
||||
GdkEventKey *event);
|
||||
|
||||
+static GdkAtom recognize_protocols_atom, atom_atom;
|
||||
|
||||
static guint signals[LAST_SIGNAL];
|
||||
|
||||
@@ -213,6 +214,9 @@
|
||||
object_class = (GtkObjectClass*) class;
|
||||
widget_class = (GtkWidgetClass*) class;
|
||||
|
||||
+ recognize_protocols_atom = gdk_atom_intern ("RECOGNIZE_PROTOCOLS", FALSE);
|
||||
+ atom_atom = gdk_atom_intern ("ATOM", FALSE);
|
||||
+
|
||||
gobject_class->set_property = gtk_range_set_property;
|
||||
gobject_class->get_property = gtk_range_get_property;
|
||||
gobject_class->finalize = gtk_range_finalize;
|
||||
@@ -1020,6 +1024,12 @@
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (range->event_window, range);
|
||||
|
||||
+ gdk_property_change (range->event_window,
|
||||
+ recognize_protocols_atom,
|
||||
+ atom_atom,
|
||||
+ 32, GDK_PROP_MODE_REPLACE,
|
||||
+ NULL, 0);
|
||||
+
|
||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||
}
|
||||
|
||||
@@ -1569,7 +1579,7 @@
|
||||
|
||||
/* ignore presses when we're already doing something else. */
|
||||
if (range->layout->grab_location != MOUSE_OUTSIDE)
|
||||
- return FALSE;
|
||||
+ return TRUE;
|
||||
|
||||
range->layout->mouse_x = event->x;
|
||||
range->layout->mouse_y = event->y;
|
||||
@@ -1778,7 +1788,7 @@
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
- return FALSE;
|
||||
+ return TRUE;
|
||||
}
|
||||
|
||||
/**
|
10
package/libgtk2/gtklabel-resize-patch
Normal file
10
package/libgtk2/gtklabel-resize-patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- gtk+-2.4.3/gtk/gtklabel.c~ 2004-06-11 13:50:34.000000000 +0100
|
||||
+++ gtk+-2.4.3/gtk/gtklabel.c 2004-07-05 13:33:57.000000000 +0100
|
||||
@@ -1623,6 +1623,7 @@
|
||||
|
||||
/* We have to clear the layout, fonts etc. may have changed */
|
||||
gtk_label_clear_layout (label);
|
||||
+ gtk_widget_queue_resize (GTK_WIDGET (label));
|
||||
}
|
||||
|
||||
static void
|
166
package/libgtk2/libgtk2.mk
Normal file
166
package/libgtk2/libgtk2.mk
Normal file
@ -0,0 +1,166 @@
|
||||
#############################################################
|
||||
#
|
||||
# libgtk2.0
|
||||
#
|
||||
#############################################################
|
||||
LIBGTK2_VERSION:=2.10.7
|
||||
LIBGTK2_SOURCE:=gtk+-$(LIBGTK2_VERSION).tar.bz2
|
||||
LIBGTK2_SITE:=ftp://ftp.gtk.org/pub/gtk/v2.10
|
||||
LIBGTK2_CAT:=$(BZCAT)
|
||||
LIBGTK2_DIR:=$(BUILD_DIR)/gtk+-$(LIBGTK2_VERSION)
|
||||
LIBGTK2_BINARY:=libgtk-x11-2.0.a
|
||||
|
||||
|
||||
$(DL_DIR)/$(LIBGTK2_SOURCE):
|
||||
$(WGET) -P $(DL_DIR) $(LIBGTK2_SITE)/$(LIBGTK2_SOURCE)
|
||||
|
||||
libgtk2-source: $(DL_DIR)/$(LIBGTK2_SOURCE)
|
||||
|
||||
$(LIBGTK2_DIR)/.unpacked: $(DL_DIR)/$(LIBGTK2_SOURCE)
|
||||
$(LIBGTK2_CAT) $(DL_DIR)/$(LIBGTK2_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
||||
toolchain/patch-kernel.sh $(LIBGTK2_DIR) package/libgtk2/ \*.patch*
|
||||
$(CONFIG_UPDATE) $(LIBGTK2_DIR)
|
||||
touch $(LIBGTK2_DIR)/.unpacked
|
||||
|
||||
$(LIBGTK2_DIR)/.configured: $(LIBGTK2_DIR)/.unpacked
|
||||
(cd $(LIBGTK2_DIR); rm -rf config.cache; \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
PKG_CONFIG=$(STAGING_DIR)/usr/bin/pkg-config \
|
||||
GLIB_CONFIG=$(STAGING_DIR)/bin/glib-config \
|
||||
ac_cv_func_mmap_fixed_mapped=yes \
|
||||
ac_cv_func_posix_getpwuid_r=yes \
|
||||
glib_cv_stack_grows=no \
|
||||
glib_cv_uscore=no \
|
||||
ac_cv_func_strtod=yes \
|
||||
ac_fsusage_space=yes \
|
||||
fu_cv_sys_stat_statfs2_bsize=yes \
|
||||
ac_cv_func_closedir_void=no \
|
||||
ac_cv_func_getloadavg=no \
|
||||
ac_cv_lib_util_getloadavg=no \
|
||||
ac_cv_lib_getloadavg_getloadavg=no \
|
||||
ac_cv_func_getgroups=yes \
|
||||
ac_cv_func_getgroups_works=yes \
|
||||
ac_cv_func_chown_works=yes \
|
||||
ac_cv_have_decl_euidaccess=no \
|
||||
ac_cv_func_euidaccess=no \
|
||||
ac_cv_have_decl_strnlen=yes \
|
||||
ac_cv_func_strnlen_working=yes \
|
||||
ac_cv_func_lstat_dereferences_slashed_symlink=yes \
|
||||
ac_cv_func_lstat_empty_string_bug=no \
|
||||
ac_cv_func_stat_empty_string_bug=no \
|
||||
vb_cv_func_rename_trailing_slash_bug=no \
|
||||
ac_cv_have_decl_nanosleep=yes \
|
||||
jm_cv_func_nanosleep_works=yes \
|
||||
gl_cv_func_working_utimes=yes \
|
||||
ac_cv_func_utime_null=yes \
|
||||
ac_cv_have_decl_strerror_r=yes \
|
||||
ac_cv_func_strerror_r_char_p=no \
|
||||
jm_cv_func_svid_putenv=yes \
|
||||
ac_cv_func_getcwd_null=yes \
|
||||
ac_cv_func_getdelim=yes \
|
||||
ac_cv_func_mkstemp=yes \
|
||||
utils_cv_func_mkstemp_limitations=no \
|
||||
utils_cv_func_mkdir_trailing_slash_bug=no \
|
||||
ac_cv_func_memcmp_working=yes \
|
||||
ac_cv_have_decl_malloc=yes \
|
||||
gl_cv_func_malloc_0_nonnull=yes \
|
||||
ac_cv_func_malloc_0_nonnull=yes \
|
||||
ac_cv_func_calloc_0_nonnull=yes \
|
||||
ac_cv_func_realloc_0_nonnull=yes \
|
||||
jm_cv_func_gettimeofday_clobber=no \
|
||||
gl_cv_func_working_readdir=yes \
|
||||
jm_ac_cv_func_link_follows_symlink=no \
|
||||
utils_cv_localtime_cache=no \
|
||||
ac_cv_struct_st_mtim_nsec=no \
|
||||
gl_cv_func_tzset_clobber=no \
|
||||
gl_cv_func_getcwd_null=yes \
|
||||
gl_cv_func_getcwd_path_max=yes \
|
||||
ac_cv_func_fnmatch_gnu=yes \
|
||||
am_getline_needs_run_time_check=no \
|
||||
am_cv_func_working_getline=yes \
|
||||
gl_cv_func_mkdir_trailing_slash_bug=no \
|
||||
gl_cv_func_mkstemp_limitations=no \
|
||||
ac_cv_func_working_mktime=yes \
|
||||
jm_cv_func_working_re_compile_pattern=yes \
|
||||
ac_use_included_regex=no \
|
||||
gl_cv_c_restrict=no \
|
||||
ac_cv_path_GLIB_GENMARSHAL=/usr/bin/glib-genmarshal \
|
||||
ac_cv_path_CUPS_CONFIG=no \
|
||||
./configure \
|
||||
--host=$(REAL_GNU_TARGET_NAME) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--prefix=$(STAGING_DIR) \
|
||||
--exec_prefix=$(STAGING_DIR) \
|
||||
--libdir=$(STAGING_DIR)/lib \
|
||||
--includedir=$(STAGING_DIR)/include \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--libexecdir=/usr/lib \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--localstatedir=/var \
|
||||
--mandir=/usr/man \
|
||||
--infodir=/usr/info \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
--with-x \
|
||||
--x-includes=$(STAGING_DIR)/usr/X11R6/include \
|
||||
--x-libraries=$(STAGING_DIR)/usr/X11R6/lib \
|
||||
--disable-glibtest \
|
||||
--enable-explicit-deps=no \
|
||||
--disable-debug \
|
||||
--disable-glibtest \
|
||||
--disable-xim \
|
||||
--with-gdktarget=x11 \
|
||||
);
|
||||
touch $(LIBGTK2_DIR)/.configured
|
||||
|
||||
$(LIBGTK2_DIR)/gtk/.libs/$(LIBGTK2_BINARY): $(LIBGTK2_DIR)/.configured
|
||||
$(MAKE) CC=$(TARGET_CC) -C $(LIBGTK2_DIR)
|
||||
touch -c $(LIBGTK2_DIR)/gtk/.libs/$(LIBGTK2_BINARY)
|
||||
|
||||
$(STAGING_DIR)/lib/$(LIBGTK2_BINARY): $(LIBGTK2_DIR)/gtk/.libs/$(LIBGTK2_BINARY)
|
||||
$(MAKE) prefix=$(STAGING_DIR) \
|
||||
exec_prefix=$(STAGING_DIR) \
|
||||
bindir=$(STAGING_DIR)/bin \
|
||||
sbindir=$(STAGING_DIR)/sbin \
|
||||
libexecdir=$(STAGING_DIR)/libexec \
|
||||
datadir=$(STAGING_DIR)/share \
|
||||
sysconfdir=$(STAGING_DIR)/etc \
|
||||
sharedstatedir=$(STAGING_DIR)/com \
|
||||
localstatedir=$(STAGING_DIR)/var \
|
||||
libdir=$(STAGING_DIR)/lib \
|
||||
includedir=$(STAGING_DIR)/include \
|
||||
oldincludedir=$(STAGING_DIR)/include \
|
||||
infodir=$(STAGING_DIR)/info \
|
||||
mandir=$(STAGING_DIR)/man \
|
||||
-C $(LIBGTK2_DIR) install;
|
||||
touch -c $(STAGING_DIR)/lib/$(LIBGTK2_BINARY)
|
||||
|
||||
$(TARGET_DIR)/lib/libgtk-x11-2.0.so.0: $(STAGING_DIR)/lib/$(LIBGTK2_BINARY)
|
||||
cp -a $(STAGING_DIR)/lib/libgtk-x11-2.0.so $(TARGET_DIR)/lib/
|
||||
cp -a $(STAGING_DIR)/lib/libgtk-x11-2.0.so.0* $(TARGET_DIR)/lib/
|
||||
cp -a $(STAGING_DIR)/lib/libgdk*-2.0.so $(TARGET_DIR)/lib/
|
||||
cp -a $(STAGING_DIR)/lib/libgdk*-2.0.so.0* $(TARGET_DIR)/lib/
|
||||
$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libgtk-x11-2.0.so.0*
|
||||
$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libgdk*-2.0.so.0*
|
||||
touch -c $(TARGET_DIR)/lib/libgtk-x11-2.0.so.0
|
||||
|
||||
libgtk2: uclibc png jpeg tiff xorg libglib2 \
|
||||
cairo pango atk $(TARGET_DIR)/lib/libgtk-x11-2.0.so.0
|
||||
|
||||
libgtk2-clean:
|
||||
rm -f $(TARGET_DIR)/lib/libgtk* $(TARGET_DIR)/lib/libgdk*
|
||||
-$(MAKE) -C $(LIBGTK2_DIR) clean
|
||||
|
||||
libgtk2-dirclean:
|
||||
rm -rf $(LIBGTK2_DIR)
|
||||
|
||||
#############################################################
|
||||
#
|
||||
# Toplevel Makefile options
|
||||
#
|
||||
#############################################################
|
||||
ifeq ($(strip $(BR2_PACKAGE_LIBGTK2)),y)
|
||||
TARGETS+=libgtk2
|
||||
endif
|
51
package/libgtk2/menu-deactivate.patch
Normal file
51
package/libgtk2/menu-deactivate.patch
Normal file
@ -0,0 +1,51 @@
|
||||
--- gtk+-2.10.0/gtk/gtkmenushell.c.orig 2006-07-05 17:17:34.000000000 +0200
|
||||
+++ gtk+-2.10.0/gtk/gtkmenushell.c 2006-07-05 17:19:01.000000000 +0200
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
-#define MENU_SHELL_TIMEOUT 500
|
||||
+#define MENU_SHELL_TIMEOUT 2000
|
||||
|
||||
#define PACK_DIRECTION(m) \
|
||||
(GTK_IS_MENU_BAR (m) \
|
||||
@@ -203,6 +203,8 @@
|
||||
|
||||
G_DEFINE_TYPE (GtkMenuShell, gtk_menu_shell, GTK_TYPE_CONTAINER)
|
||||
|
||||
+static int last_crossing_time;
|
||||
+
|
||||
static void
|
||||
gtk_menu_shell_class_init (GtkMenuShellClass *klass)
|
||||
{
|
||||
@@ -517,6 +519,7 @@
|
||||
gtk_grab_add (GTK_WIDGET (menu_shell));
|
||||
menu_shell->have_grab = TRUE;
|
||||
menu_shell->active = TRUE;
|
||||
+ last_crossing_time = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -669,6 +672,13 @@
|
||||
menu_shell->activate_time = 0;
|
||||
deactivate = FALSE;
|
||||
}
|
||||
+
|
||||
+ if (last_crossing_time != 0
|
||||
+ && ((event->time - last_crossing_time) < 500))
|
||||
+ {
|
||||
+ last_crossing_time = 0;
|
||||
+ deactivate = FALSE;
|
||||
+ }
|
||||
|
||||
if (deactivate)
|
||||
{
|
||||
@@ -716,6 +726,8 @@
|
||||
{
|
||||
menu_item = gtk_get_event_widget ((GdkEvent*) event);
|
||||
|
||||
+ last_crossing_time = event->time;
|
||||
+
|
||||
if (!menu_item ||
|
||||
(GTK_IS_MENU_ITEM (menu_item) &&
|
||||
!_gtk_menu_item_is_selectable (menu_item)))
|
10
package/libgtk2/no-demos.patch
Normal file
10
package/libgtk2/no-demos.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- gtk+-2.10.1/Makefile.am.orig 2006-08-08 12:37:30.000000000 +0100
|
||||
+++ gtk+-2.10.1/Makefile.am 2006-08-08 12:37:48.000000000 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
## Makefile.am for GTK+
|
||||
|
||||
-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib
|
||||
+SRC_SUBDIRS = gdk-pixbuf gdk gtk modules tests perf contrib
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros
|
||||
|
||||
# require automake 1.4
|
151
package/libgtk2/no-xwc.patch
Normal file
151
package/libgtk2/no-xwc.patch
Normal file
@ -0,0 +1,151 @@
|
||||
diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c
|
||||
--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00
|
||||
+++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00
|
||||
@@ -576,12 +576,14 @@
|
||||
GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2);
|
||||
}
|
||||
}
|
||||
+#ifdef HAVE_XWC
|
||||
else if (font->type == GDK_FONT_FONTSET)
|
||||
{
|
||||
XFontSet fontset = (XFontSet) GDK_FONT_XFONT (font);
|
||||
XmbDrawString (xdisplay, impl->xid,
|
||||
fontset, GDK_GC_GET_XGC (gc), x, y, text, text_length);
|
||||
}
|
||||
+#endif
|
||||
else
|
||||
g_error("undefined font type\n");
|
||||
}
|
||||
@@ -613,6 +615,7 @@
|
||||
GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length);
|
||||
g_free (text_8bit);
|
||||
}
|
||||
+#ifdef HAVE_XWC
|
||||
else if (font->type == GDK_FONT_FONTSET)
|
||||
{
|
||||
if (sizeof(GdkWChar) == sizeof(wchar_t))
|
||||
@@ -633,6 +636,7 @@
|
||||
g_free (text_wchar);
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
else
|
||||
g_error("undefined font type\n");
|
||||
}
|
||||
diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c
|
||||
--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00
|
||||
+++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00
|
||||
@@ -525,10 +525,12 @@
|
||||
width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2);
|
||||
}
|
||||
break;
|
||||
+#ifdef HAVE_XWC
|
||||
case GDK_FONT_FONTSET:
|
||||
fontset = (XFontSet) private->xfont;
|
||||
width = XmbTextEscapement (fontset, text, text_length);
|
||||
break;
|
||||
+#endif
|
||||
default:
|
||||
width = 0;
|
||||
}
|
||||
@@ -578,6 +580,7 @@
|
||||
width = 0;
|
||||
}
|
||||
break;
|
||||
+#ifdef HAVE_XWC
|
||||
case GDK_FONT_FONTSET:
|
||||
if (sizeof(GdkWChar) == sizeof(wchar_t))
|
||||
{
|
||||
@@ -595,6 +598,7 @@
|
||||
g_free (text_wchar);
|
||||
}
|
||||
break;
|
||||
+#endif
|
||||
default:
|
||||
width = 0;
|
||||
}
|
||||
@@ -667,6 +671,7 @@
|
||||
if (descent)
|
||||
*descent = overall.descent;
|
||||
break;
|
||||
+#ifdef HAVE_XWC
|
||||
case GDK_FONT_FONTSET:
|
||||
fontset = (XFontSet) private->xfont;
|
||||
XmbTextExtents (fontset, text, text_length, &ink, &logical);
|
||||
@@ -681,6 +686,7 @@
|
||||
if (descent)
|
||||
*descent = ink.y + ink.height;
|
||||
break;
|
||||
+#endif
|
||||
}
|
||||
|
||||
}
|
||||
@@ -753,6 +759,7 @@
|
||||
*descent = overall.descent;
|
||||
break;
|
||||
}
|
||||
+#ifdef HAVE_XWC
|
||||
case GDK_FONT_FONTSET:
|
||||
fontset = (XFontSet) private->xfont;
|
||||
|
||||
@@ -780,6 +787,7 @@
|
||||
if (descent)
|
||||
*descent = ink.y + ink.height;
|
||||
break;
|
||||
+#endif
|
||||
}
|
||||
|
||||
}
|
||||
diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c
|
||||
--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00
|
||||
+++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00
|
||||
@@ -48,6 +48,7 @@
|
||||
void
|
||||
_gdk_x11_initialize_locale (void)
|
||||
{
|
||||
+#ifdef HAVE_XWC
|
||||
wchar_t result;
|
||||
gchar *current_locale;
|
||||
static char *last_locale = NULL;
|
||||
@@ -93,7 +94,8 @@
|
||||
GDK_NOTE (XIM,
|
||||
g_message ("%s multi-byte string functions.",
|
||||
gdk_use_mb ? "Using" : "Not using"));
|
||||
-
|
||||
+#endif
|
||||
+
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -136,6 +138,7 @@
|
||||
{
|
||||
gchar *mbstr;
|
||||
|
||||
+#ifdef HAVE_XWC
|
||||
if (gdk_use_mb)
|
||||
{
|
||||
GdkDisplay *display = find_a_display ();
|
||||
@@ -178,6 +181,7 @@
|
||||
XFree (tpr.value);
|
||||
}
|
||||
else
|
||||
+#endif
|
||||
{
|
||||
gint length = 0;
|
||||
gint i;
|
||||
@@ -210,6 +214,7 @@
|
||||
gint
|
||||
gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
|
||||
{
|
||||
+#ifdef HAVE_XWC
|
||||
if (gdk_use_mb)
|
||||
{
|
||||
GdkDisplay *display = find_a_display ();
|
||||
@@ -242,6 +247,7 @@
|
||||
return len_cpy;
|
||||
}
|
||||
else
|
||||
+#endif
|
||||
{
|
||||
gint i;
|
||||
|
2456
package/libgtk2/pangoxft2.10.6.diff
Normal file
2456
package/libgtk2/pangoxft2.10.6.diff
Normal file
File diff suppressed because it is too large
Load Diff
19
package/libgtk2/run-iconcache.patch
Normal file
19
package/libgtk2/run-iconcache.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- gtk+-2.10.7/gtk/Makefile.am.orig 2007-01-05 11:32:46.000000000 -0700
|
||||
+++ gtk+-2.10.7/gtk/Makefile.am 2007-01-11 01:03:52.000000000 -0700
|
||||
@@ -1123,11 +1123,11 @@
|
||||
./gtk-update-icon-cache
|
||||
endif
|
||||
|
||||
-gtkbuiltincache.h: @REBUILD@ stamp-icons
|
||||
- $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
|
||||
- $(gtk_update_icon_cache_program) --force --ignore-theme-index \
|
||||
- --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
|
||||
- mv gtkbuiltincache.h.tmp gtkbuiltincache.h
|
||||
+#gtkbuiltincache.h: @REBUILD@ stamp-icons
|
||||
+# $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
|
||||
+# $(gtk_update_icon_cache_program) --force --ignore-theme-index \
|
||||
+# --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
|
||||
+# mv gtkbuiltincache.h.tmp gtkbuiltincache.h
|
||||
|
||||
EXTRA_DIST += \
|
||||
$(STOCK_ICONS) \
|
11
package/libgtk2/scroll-timings.patch
Normal file
11
package/libgtk2/scroll-timings.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- gtk+-2.10.0/gtk/gtkrange.c.orig 2006-07-05 12:41:39.000000000 +0200
|
||||
+++ gtk+-2.10.0/gtk/gtkrange.c 2006-07-05 12:41:58.000000000 +0200
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "gtkalias.h"
|
||||
|
||||
#define SCROLL_DELAY_FACTOR 5 /* Scroll repeat multiplier */
|
||||
-#define UPDATE_DELAY 300 /* Delay for queued update */
|
||||
+#define UPDATE_DELAY 1000 /* Delay for queued update */
|
||||
|
||||
enum {
|
||||
PROP_0,
|
56
package/libgtk2/single-click.patch
Normal file
56
package/libgtk2/single-click.patch
Normal file
@ -0,0 +1,56 @@
|
||||
Index: gtk+-2.10.6/gtk/gtkcalendar.c
|
||||
===================================================================
|
||||
--- gtk+-2.10.6.orig/gtk/gtkcalendar.c
|
||||
+++ gtk+-2.10.6/gtk/gtkcalendar.c
|
||||
@@ -2482,9 +2482,11 @@ calendar_main_button_press (GtkCalendar
|
||||
}
|
||||
|
||||
calendar_select_and_focus_day (calendar, day);
|
||||
- }
|
||||
+
|
||||
+ // This change causes the calendar to disappear after choosing a day
|
||||
+/* }
|
||||
else if (event->type == GDK_2BUTTON_PRESS)
|
||||
- {
|
||||
+ {*/
|
||||
priv->in_drag = 0;
|
||||
if (day_month == MONTH_CURRENT)
|
||||
g_signal_emit (calendar,
|
||||
Index: gtk+-2.10.6/gtk/gtkfilesel.c
|
||||
===================================================================
|
||||
--- gtk+-2.10.6.orig/gtk/gtkfilesel.c
|
||||
+++ gtk+-2.10.6/gtk/gtkfilesel.c
|
||||
@@ -2426,6 +2426,33 @@ gtk_file_selection_file_changed (GtkTree
|
||||
if (fs->last_selected != NULL)
|
||||
g_free (fs->last_selected);
|
||||
|
||||
+ // Single-click directory entry
|
||||
+ if (new_names->len == 1)
|
||||
+ {
|
||||
+ GtkTreeView *tree_view;
|
||||
+ GtkTreeModel *model;
|
||||
+ GtkTreePath *path;
|
||||
+ GtkTreeIter iter;
|
||||
+ gboolean is_file;
|
||||
+
|
||||
+ tree_view = gtk_tree_selection_get_tree_view (selection);
|
||||
+
|
||||
+ if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
+ {
|
||||
+ path = gtk_tree_model_get_path (model, &iter);
|
||||
+ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1);
|
||||
+
|
||||
+ if (!is_file)
|
||||
+ {
|
||||
+ gtk_file_selection_dir_activate (tree_view, path,
|
||||
+ gtk_tree_view_get_column (tree_view, DIR_COLUMN),
|
||||
+ user_data);
|
||||
+ }
|
||||
+
|
||||
+ gtk_tree_path_free (path);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
fs->last_selected = g_strdup (g_ptr_array_index (new_names, index));
|
||||
filename = get_real_filename (fs->last_selected, FALSE);
|
||||
|
267
package/libgtk2/small-gtkfilesel.patch
Normal file
267
package/libgtk2/small-gtkfilesel.patch
Normal file
@ -0,0 +1,267 @@
|
||||
diff -urNd ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c
|
||||
--- ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100
|
||||
+++ gtk+-2.4.4/gtk/gtkfilesel.c 2004-09-13 13:40:09.000000000 +0100
|
||||
@@ -68,6 +68,7 @@
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkscrolledwindow.h"
|
||||
#include "gtkstock.h"
|
||||
+#include "gtksignal.h"
|
||||
#include "gtktreeselection.h"
|
||||
#include "gtktreeview.h"
|
||||
#include "gtkvbox.h"
|
||||
@@ -77,6 +78,7 @@
|
||||
#include "gtkmessagedialog.h"
|
||||
#include "gtkdnd.h"
|
||||
#include "gtkeventbox.h"
|
||||
+#include "gtkimage.h"
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
#include "gtkoptionmenu.h"
|
||||
@@ -245,7 +247,8 @@
|
||||
};
|
||||
|
||||
enum {
|
||||
- DIR_COLUMN
|
||||
+ DIR_COLUMN,
|
||||
+ ISFILE_COLUMN
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -400,6 +403,12 @@
|
||||
GtkTreePath *path,
|
||||
GtkTreeViewColumn *column,
|
||||
gpointer user_data);
|
||||
+
|
||||
+static void gtk_file_selection_activate (GtkTreeView *tree_view,
|
||||
+ GtkTreePath *path,
|
||||
+ GtkTreeViewColumn *column,
|
||||
+ gpointer user_data);
|
||||
+
|
||||
static void gtk_file_selection_file_changed (GtkTreeSelection *selection,
|
||||
gpointer user_data);
|
||||
static void gtk_file_selection_dir_activate (GtkTreeView *tree_view,
|
||||
@@ -419,6 +428,7 @@
|
||||
static void gtk_file_selection_create_dir (GtkWidget *widget, gpointer data);
|
||||
static void gtk_file_selection_delete_file (GtkWidget *widget, gpointer data);
|
||||
static void gtk_file_selection_rename_file (GtkWidget *widget, gpointer data);
|
||||
+static void gtk_file_selection_style_set (GtkWidget *widget, GtkStyle *prev_style);
|
||||
|
||||
static void free_selected_names (GPtrArray *names);
|
||||
|
||||
@@ -578,6 +588,23 @@
|
||||
G_PARAM_WRITABLE));
|
||||
object_class->destroy = gtk_file_selection_destroy;
|
||||
widget_class->map = gtk_file_selection_map;
|
||||
+ widget_class->style_set = gtk_file_selection_style_set;
|
||||
+
|
||||
+ gtk_widget_class_install_style_property (widget_class,
|
||||
+ g_param_spec_boolean ("show_fileops_default",
|
||||
+ _("Show fileop buttons by default"),
|
||||
+ _("Whether file operation buttons are shown by default"),
|
||||
+ TRUE,
|
||||
+ G_PARAM_READABLE));
|
||||
+
|
||||
+ gtk_widget_class_install_style_property (widget_class,
|
||||
+ g_param_spec_int ("border_width",
|
||||
+ _("Border width"),
|
||||
+ _("Width of border around the main dialog area"),
|
||||
+ 0,
|
||||
+ G_MAXINT,
|
||||
+ 10,
|
||||
+ G_PARAM_READABLE));
|
||||
}
|
||||
|
||||
static void gtk_file_selection_set_property (GObject *object,
|
||||
@@ -649,7 +676,29 @@
|
||||
gtk_widget_grab_default (widget);
|
||||
return FALSE;
|
||||
}
|
||||
-
|
||||
+
|
||||
+static void
|
||||
+gtk_file_selection_style_set (GtkWidget *filesel,
|
||||
+ GtkStyle *prev_style)
|
||||
+{
|
||||
+ gboolean show_fileops;
|
||||
+ gint border_width;
|
||||
+
|
||||
+ gtk_widget_style_get (filesel,
|
||||
+ "show_fileops_default",
|
||||
+ &show_fileops,
|
||||
+ "border_width",
|
||||
+ &border_width,
|
||||
+ NULL);
|
||||
+
|
||||
+ gtk_container_set_border_width (GTK_CONTAINER (filesel), border_width);
|
||||
+
|
||||
+ if (show_fileops)
|
||||
+ gtk_file_selection_show_fileop_buttons (GTK_FILE_SELECTION (filesel));
|
||||
+ else
|
||||
+ gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (filesel));
|
||||
+}
|
||||
+
|
||||
static void
|
||||
gtk_file_selection_init (GtkFileSelection *filesel)
|
||||
{
|
||||
@@ -674,17 +723,15 @@
|
||||
|
||||
/* The dialog-sized vertical box */
|
||||
filesel->main_vbox = dialog->vbox;
|
||||
- gtk_container_set_border_width (GTK_CONTAINER (filesel), 10);
|
||||
|
||||
/* The horizontal box containing create, rename etc. buttons */
|
||||
filesel->button_area = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (filesel->button_area), GTK_BUTTONBOX_START);
|
||||
- gtk_box_set_spacing (GTK_BOX (filesel->button_area), 0);
|
||||
gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->button_area,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (filesel->button_area);
|
||||
|
||||
- gtk_file_selection_show_fileop_buttons (filesel);
|
||||
+ gtk_file_selection_style_set (GTK_WIDGET (filesel), NULL);
|
||||
|
||||
/* hbox for pulldown menu */
|
||||
pulldown_hbox = gtk_hbox_new (TRUE, 5);
|
||||
@@ -723,25 +770,32 @@
|
||||
|
||||
/* The directories list */
|
||||
|
||||
- model = gtk_list_store_new (1, G_TYPE_STRING);
|
||||
+ model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); /* MA */
|
||||
filesel->dir_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
|
||||
g_object_unref (model);
|
||||
|
||||
- column = gtk_tree_view_column_new_with_attributes (_("Folders"),
|
||||
+ column = gtk_tree_view_column_new_with_attributes (/*_("Folders")*/ NULL,
|
||||
gtk_cell_renderer_text_new (),
|
||||
"text", DIR_COLUMN,
|
||||
NULL);
|
||||
label = gtk_label_new_with_mnemonic (_("Fol_ders"));
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->dir_list);
|
||||
gtk_widget_show (label);
|
||||
- gtk_tree_view_column_set_widget (column, label);
|
||||
+
|
||||
+ /* gtk_tree_view_column_set_widget (column, label); */
|
||||
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (filesel->dir_list), FALSE);
|
||||
+
|
||||
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->dir_list), column);
|
||||
|
||||
gtk_widget_set_size_request (filesel->dir_list,
|
||||
DIR_LIST_WIDTH, DIR_LIST_HEIGHT);
|
||||
g_signal_connect (filesel->dir_list, "row_activated",
|
||||
- G_CALLBACK (gtk_file_selection_dir_activate), filesel);
|
||||
+ G_CALLBACK (gtk_file_selection_activate), filesel);
|
||||
+
|
||||
+ g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->dir_list)), "changed",
|
||||
+ G_CALLBACK (gtk_file_selection_file_changed), filesel);
|
||||
+
|
||||
|
||||
/* gtk_clist_column_titles_passive (GTK_CLIST (filesel->dir_list)); */
|
||||
|
||||
@@ -758,41 +812,6 @@
|
||||
gtk_widget_show (filesel->dir_list);
|
||||
gtk_widget_show (scrolled_win);
|
||||
|
||||
- /* The files list */
|
||||
- model = gtk_list_store_new (1, G_TYPE_STRING);
|
||||
- filesel->file_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
|
||||
- g_object_unref (model);
|
||||
-
|
||||
- column = gtk_tree_view_column_new_with_attributes (_("Files"),
|
||||
- gtk_cell_renderer_text_new (),
|
||||
- "text", FILE_COLUMN,
|
||||
- NULL);
|
||||
- label = gtk_label_new_with_mnemonic (_("_Files"));
|
||||
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->file_list);
|
||||
- gtk_widget_show (label);
|
||||
- gtk_tree_view_column_set_widget (column, label);
|
||||
- gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
|
||||
- gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->file_list), column);
|
||||
-
|
||||
- gtk_widget_set_size_request (filesel->file_list,
|
||||
- FILE_LIST_WIDTH, FILE_LIST_HEIGHT);
|
||||
- g_signal_connect (filesel->file_list, "row_activated",
|
||||
- G_CALLBACK (gtk_file_selection_file_activate), filesel);
|
||||
- g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list)), "changed",
|
||||
- G_CALLBACK (gtk_file_selection_file_changed), filesel);
|
||||
-
|
||||
- /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->file_list)); */
|
||||
-
|
||||
- scrolled_win = gtk_scrolled_window_new (NULL, NULL);
|
||||
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), GTK_SHADOW_IN);
|
||||
- gtk_container_add (GTK_CONTAINER (scrolled_win), filesel->file_list);
|
||||
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
|
||||
- GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
||||
- gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 0);
|
||||
- gtk_container_add (GTK_CONTAINER (list_container), scrolled_win);
|
||||
- gtk_widget_show (filesel->file_list);
|
||||
- gtk_widget_show (scrolled_win);
|
||||
-
|
||||
/* action area for packing buttons into. */
|
||||
filesel->action_area = gtk_hbox_new (TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->action_area,
|
||||
@@ -2008,6 +2027,23 @@
|
||||
}
|
||||
|
||||
static void
|
||||
+gtk_file_selection_activate (GtkTreeView *tree_view,
|
||||
+ GtkTreePath *path,
|
||||
+ GtkTreeViewColumn *column,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ GtkTreeModel *model = gtk_tree_view_get_model (tree_view);
|
||||
+ GtkTreeIter iter;
|
||||
+ gboolean is_file;
|
||||
+
|
||||
+ gtk_tree_model_get_iter (model, &iter, path);
|
||||
+ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1);
|
||||
+
|
||||
+ if (! is_file)
|
||||
+ gtk_file_selection_dir_activate (tree_view, path, column, user_data);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
gtk_file_selection_file_activate (GtkTreeView *tree_view,
|
||||
GtkTreePath *path,
|
||||
GtkTreeViewColumn *column,
|
||||
@@ -2103,7 +2139,6 @@
|
||||
PossibleCompletion* poss;
|
||||
GtkTreeIter iter;
|
||||
GtkListStore *dir_model;
|
||||
- GtkListStore *file_model;
|
||||
gchar* filename;
|
||||
gchar* rem_path = rel_path;
|
||||
gchar* sel_text;
|
||||
@@ -2125,10 +2160,8 @@
|
||||
g_assert (cmpl_state->reference_dir);
|
||||
|
||||
dir_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->dir_list)));
|
||||
- file_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->file_list)));
|
||||
|
||||
gtk_list_store_clear (dir_model);
|
||||
- gtk_list_store_clear (file_model);
|
||||
|
||||
/* Set the dir list to include ./ and ../ */
|
||||
gtk_list_store_append (dir_model, &iter);
|
||||
@@ -2150,13 +2183,17 @@
|
||||
strcmp (filename, ".." G_DIR_SEPARATOR_S) != 0)
|
||||
{
|
||||
gtk_list_store_append (dir_model, &iter);
|
||||
- gtk_list_store_set (dir_model, &iter, DIR_COLUMN, filename, -1);
|
||||
+ gtk_list_store_set (dir_model, &iter,
|
||||
+ DIR_COLUMN, filename,
|
||||
+ ISFILE_COLUMN, FALSE, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
- gtk_list_store_append (file_model, &iter);
|
||||
- gtk_list_store_set (file_model, &iter, DIR_COLUMN, filename, -1);
|
||||
+ gtk_list_store_append (dir_model, &iter);
|
||||
+ gtk_list_store_set (dir_model, &iter,
|
||||
+ DIR_COLUMN, filename,
|
||||
+ ISFILE_COLUMN, TRUE, -1);
|
||||
}
|
||||
}
|
||||
|
130
package/libgtk2/spinbutton.patch
Normal file
130
package/libgtk2/spinbutton.patch
Normal file
@ -0,0 +1,130 @@
|
||||
Index: gtk+-2.10.6/gtk/gtkspinbutton.c
|
||||
===================================================================
|
||||
--- gtk+-2.10.6.orig/gtk/gtkspinbutton.c
|
||||
+++ gtk+-2.10.6/gtk/gtkspinbutton.c
|
||||
@@ -682,7 +682,7 @@ gtk_spin_button_size_allocate (GtkWidget
|
||||
|
||||
spin = GTK_SPIN_BUTTON (widget);
|
||||
arrow_size = spin_button_get_arrow_size (spin);
|
||||
- panel_width = arrow_size + 2 * widget->style->xthickness;
|
||||
+ panel_width = (2 * arrow_size) + 4 * widget->style->xthickness;
|
||||
|
||||
widget->allocation = *allocation;
|
||||
|
||||
@@ -815,19 +815,16 @@ gtk_spin_button_draw_arrow (GtkSpinButto
|
||||
{
|
||||
width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness;
|
||||
|
||||
+ y = widget->style->ythickness;
|
||||
+ height = widget->requisition.height - (2 * y);
|
||||
+
|
||||
if (arrow_type == GTK_ARROW_UP)
|
||||
{
|
||||
x = 0;
|
||||
- y = 0;
|
||||
-
|
||||
- height = widget->requisition.height / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
- x = 0;
|
||||
- y = widget->requisition.height / 2;
|
||||
-
|
||||
- height = (widget->requisition.height + 1) / 2;
|
||||
+ x = width;
|
||||
}
|
||||
|
||||
if (spin_button_at_limit (spin_button, arrow_type))
|
||||
@@ -857,32 +854,17 @@ gtk_spin_button_draw_arrow (GtkSpinButto
|
||||
shadow_type = GTK_SHADOW_OUT;
|
||||
}
|
||||
}
|
||||
-
|
||||
+
|
||||
gtk_paint_box (widget->style, spin_button->panel,
|
||||
state_type, shadow_type,
|
||||
NULL, widget,
|
||||
- (arrow_type == GTK_ARROW_UP)? "spinbutton_up" : "spinbutton_down",
|
||||
+ NULL,
|
||||
x, y, width, height);
|
||||
|
||||
height = widget->requisition.height;
|
||||
|
||||
- if (arrow_type == GTK_ARROW_DOWN)
|
||||
- {
|
||||
- y = height / 2;
|
||||
- height = height - y - 2;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- y = 2;
|
||||
- height = height / 2 - 2;
|
||||
- }
|
||||
-
|
||||
width -= 3;
|
||||
-
|
||||
- if (widget && gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
|
||||
- x = 2;
|
||||
- else
|
||||
- x = 1;
|
||||
+ height -= 3;
|
||||
|
||||
w = width / 2;
|
||||
w -= w % 2 - 1; /* force odd */
|
||||
@@ -1062,7 +1044,7 @@ gtk_spin_button_button_press (GtkWidget
|
||||
if (GTK_ENTRY (widget)->editable)
|
||||
gtk_spin_button_update (spin);
|
||||
|
||||
- if (event->y <= widget->requisition.height / 2)
|
||||
+ if (event->x <= (spin_button_get_arrow_size (spin) + widget->style->xthickness))
|
||||
{
|
||||
if (event->button == 1)
|
||||
start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment);
|
||||
@@ -1097,44 +1079,11 @@ gtk_spin_button_button_release (GtkWidge
|
||||
|
||||
arrow_size = spin_button_get_arrow_size (spin);
|
||||
|
||||
- if (event->button == spin->button)
|
||||
- {
|
||||
- int click_child = spin->click_child;
|
||||
+ gtk_spin_button_stop_spinning (spin);
|
||||
|
||||
- gtk_spin_button_stop_spinning (spin);
|
||||
-
|
||||
- if (event->button == 3)
|
||||
- {
|
||||
- if (event->y >= 0 && event->x >= 0 &&
|
||||
- event->y <= widget->requisition.height &&
|
||||
- event->x <= arrow_size + 2 * widget->style->xthickness)
|
||||
- {
|
||||
- if (click_child == GTK_ARROW_UP &&
|
||||
- event->y <= widget->requisition.height / 2)
|
||||
- {
|
||||
- gdouble diff;
|
||||
-
|
||||
- diff = spin->adjustment->upper - spin->adjustment->value;
|
||||
- if (diff > EPSILON)
|
||||
- gtk_spin_button_real_spin (spin, diff);
|
||||
- }
|
||||
- else if (click_child == GTK_ARROW_DOWN &&
|
||||
- event->y > widget->requisition.height / 2)
|
||||
- {
|
||||
- gdouble diff;
|
||||
-
|
||||
- diff = spin->adjustment->value - spin->adjustment->lower;
|
||||
- if (diff > EPSILON)
|
||||
- gtk_spin_button_real_spin (spin, -diff);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- spin_button_redraw (spin);
|
||||
+ spin_button_redraw (spin);
|
||||
|
||||
- return TRUE;
|
||||
- }
|
||||
- else
|
||||
- return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->button_release_event (widget, event);
|
||||
+ return TRUE;
|
||||
}
|
||||
|
||||
static gint
|
16
package/libgtk2/xsettings.patch
Normal file
16
package/libgtk2/xsettings.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- gtk+-2.4.4/gdk/x11/gdkevents-x11.c.old Sun Aug 22 17:14:00 2004
|
||||
+++ gtk+-2.4.4/gdk/x11/gdkevents-x11.c Sun Aug 22 17:14:00 2004
|
||||
@@ -2827,10 +2827,9 @@
|
||||
{
|
||||
GdkScreenX11 *screen = data;
|
||||
|
||||
- if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent))
|
||||
- return GDK_FILTER_REMOVE;
|
||||
- else
|
||||
- return GDK_FILTER_CONTINUE;
|
||||
+ xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent);
|
||||
+
|
||||
+ return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
|
||||
static void
|
Loading…
Reference in New Issue
Block a user