Re: GIO performance improvements
On Tue, 2011-11-15 at 17:49 +0100, André Gillibert wrote: I'm not sure this mailing list is the correct place to post GLIB-related requests, but I didn't find a glib-devel-list. I wrote a patch for GLIB 2.28 GIO subsystem to benefit from dirent::d_type and be as lazy as possible on lstat(2)/stat(2)/readlink(2)/access(2) syscalls on local file system when information is requested on a GFile or when a directory is listed. This patch is not yet very clean or commented but I can improve it before submitting it. May this type of patch be accepted in GIO ? Actually, I wrote this patch to bring dramatical performance improvements to Thunar-1.2, but I may wrote similar patches for Nautilus. Benjamins patches for this is already in git master. However, it is unlikely to help in many cases, only when you're *only* interested in name and file type (not including e.g. mime type (and thus icon)) is this useful. One particular place it *is* useful though is typeahead completion which is what benjamin needs it for, and i guess we should do that in nautilus too. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: RFC: Model-View-Controller
On Fri, 2011-11-11 at 15:55 +0100, Benjamin Otte wrote: [Talking about GtkButton] And it'd have those Controllers: (- Hover) - Click - Activate (- Focus) - KeyPress/Release I just took a quick look at ClutterClickAction and ClutterDragAction. They are certainly interesting. I wonder how things would look once you have widgets with complex behavior. Let me reintroduce something I talked about during the Desktop Summit - form languages and pattern languages. The way I see things, you want to encapsulate common actions as controllers, and common drawing idioms as views, so we can compose them into final widgets. I.e. you want to make the form language finer-grained and richer, so it will allow us to implement patterns more easily. Think of an app that lets you select graphical objects and move them by dragging. How would you implement something that needs both clicks (quick press/release with no movement) and drags (long press-move-release)? Do you need to somehow tie together a ClickController and a DragController, or do you have a generic PressMoveReleaseController, on top of which you implement the other two? As you said, for GTK+ it probably makes sense to start by abstracting out simple views and controllers. Exercise: do that in a branch for buttons and clicks, and refactor GtkButton and GtkScrollbar's arrow buttons to use that. See how the code looks. Then you may want to tackle GtkEntry's clickable icons in terms of the click controller as well. A much harder view/controller would be for selectable text. GtkEntry picks out the first PangoLayoutLine from the PangoLayout, and runs pango_layout_line_x_to_index() on it. However, GtkLabel does a direct pango_layout_xy_to_index(). No idea why GtkEntry does it like that; maybe it wants to explicitly ignore everything but the first line in the text. GtkEntry has scrolling offsets, but GtkLabel doesn't... etc. No idea how a SelectableTextController would look :) Federico ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: RFC: Model-View-Controller
hi Federico; On 17 November 2011 18:50, Federico Mena Quintero feder...@gnome.org wrote: On Fri, 2011-11-11 at 15:55 +0100, Benjamin Otte wrote: [Talking about GtkButton] And it'd have those Controllers: (- Hover) - Click - Activate (- Focus) - KeyPress/Release Think of an app that lets you select graphical objects and move them by dragging. How would you implement something that needs both clicks (quick press/release with no movement) and drags (long press-move-release)? Do you need to somehow tie together a ClickController and a DragController, or do you have a generic PressMoveReleaseController, on top of which you implement the other two? no, there's no base class, and there's no need for one. ClickAction and DragAction (and basically all event-related code in Clutter) do not use grabs: they use the capture phase of the event delivery cycle, and they will not stop the event propagation, so you can assign them both. the capture phase is far less destructive of event handling in complex scenarios than a X11 grab; gtk+ should get a ::captured-event signal as well in the near future. DragAction also uses the drag-threshold setting, so it will be able to detect a drag after a certain amount of space has been covered by the pointer with the BUTTON1 mask set. Lucas used ClickAction and DragAction inside his Board project, to be able to interact with the items on the board, as well as repositioning them around. aside from ClickAction and DragAction, Clutter also has a GestureAction that allows you to implement gesture recognisers, and cancel gestures in progress to pass the control flow to the next action; these gestures will be used more as soon as the multi-touch support in X11 lands, so we can have a common implementation across OSX, X11, and Wayland. ciao, Emmanuele. -- W: http://www.emmanuelebassi.name B: http://blogs.gnome.org/ebassi/ ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
gobject-introspection broken (?) on quartz ?
Building GTK stack on Quartz/OSX using instructions from: http://live.gnome.org/GTK%2B/OSX/Building *** Checking out gobject-introspection *** [8/14] curl --continue-at - -L http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/0.10/gobject-introspection-0.10.8.tar.bz2 -o /Users/paul/gtk/source/pkgs/gobject-introspection-0.10.8.tar.bz2 % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 1000k 100 1000k0 0 307k 0 0:00:03 0:00:03 --:--:-- 349k bunzip2 -dc /Users/paul/gtk/source/pkgs/gobject-introspection-0.10.8.tar.bz2 | tar xf - *** Applying patch http://git.gnome.org/browse/gtk-osx/plain/patches/girscanner-objc.patch *** [8/14] patch -p1 /Users/paul/.cache/jhbuild/girscanner-objc.patch patching file giscanner/scannerlexer.l *** Configuring gobject-introspection *** [8/14] ./configure --prefix /Users/paul/gtk/inst --libdir '/Users/paul/gtk/inst/lib' checking for a BSD-compatible install... /Users/paul/.local/bin/install-check checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking build system type... powerpc-apple-darwin8.11.0 checking host system type... powerpc-apple-darwin8.11.0 checking for Win32... no checking for gcc... /usr/bin/gcc-4.0 checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether /usr/bin/gcc-4.0 accepts -g... yes checking for /usr/bin/gcc-4.0 option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of /usr/bin/gcc-4.0... gcc3 checking whether /usr/bin/gcc-4.0 and cc understand -c and -o together... yes checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by /usr/bin/gcc-4.0... /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld checking if the linker (/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -p checking the name lister (/usr/bin/nm -p) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 196608 checking whether the shell understands some XSI constructs... yes checking whether the shell understands +=... no checking for /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld option to reload object files... -r checking for objdump... no checking how to recognize dependent libraries... pass_all checking for ar... ar checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -p output from /usr/bin/gcc-4.0 object... ok checking for dsymutil... dsymutil checking for nmedit... nmedit checking for lipo... lipo checking for otool... otool checking for otool64... otool64 checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking how to run the C preprocessor... /usr/bin/gcc-4.0 -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if /usr/bin/gcc-4.0 supports -fno-rtti -fno-exceptions... no checking for /usr/bin/gcc-4.0 option to produce PIC... -fno-common -DPIC checking if /usr/bin/gcc-4.0 PIC flag -fno-common -DPIC works... yes checking if /usr/bin/gcc-4.0 static flag -static works... no checking if /usr/bin/gcc-4.0 supports -c -o file.o... yes checking if /usr/bin/gcc-4.0 supports -c -o file.o... (cached) yes checking whether the /usr/bin/gcc-4.0 linker (/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin8.11.0 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for pkg-config... /Users/paul/gtk/inst/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for flex... flex checking lex output file root... lex.yy checking lex library... -lfl