2005-07-03 Hans Breuer <hans@breuer.org>
* **/makefile.msc[.in] : updated
* gtk/gtkiconcache.c : <io.h> for open()
* gtk/gtkstyle.c : use G_PI instead of M_PI
* gdk/win32/gdkcursor-win32.c : implement gdk_cursor_new_from_name()
by mapping the lower case win32 api name to the respective cursor.
E.g. pass "wait" to get the IDC_WAIT cursor. Also allows to load
cursors from named resources in the executable.
(gdk_cursor_get_image) : just return NULL for now.
* gdk/win32/gdkgeometry-win32.c : implement gdk_window_move_region()
by delegation to ScollWindowEx(), untested.
* gdk/win32/gdkwindow-win32.c : stub for gdk_window_set_urgency_hint()
2005-06-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkuimanager.c (gtk_ui_manager_add_ui): Make this
work for inserting before/after an existing menuitem or
toolitem. (#155946, Christian Persch)
* tests/testmerge.c (delayed_toggle_dynamic): Test the
"insert after" functionality of gtk_ui_manager_add_ui.
2005-06-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtksettings.c: Add two new settings,
gtk-cursor-theme-name and gtk-cursor-theme-size to
control the cursor theme.
* gdk/x11/gdkevents-x11.c: Add two new X settings,
Gtk/CursorThemeName and Gtk/CursorThemeSize, and map
these to the gtk settings.
* tests/testgtk.c (create_cursors): Add a cursor theme
testcase.
2005-05-11 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
to draw the swatch in to avoid having an extraneous window.
2005-05-11 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
to draw the swatch in to avoid having an extraneous window.
* gtk/gtkcolorsel.c (color_sample_draw_sample): Actually se tthe
color when !has_opacity.
2005-05-10 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcairo.[ch] gdk/gdkcolor.[ch] gdk/Makefile.am: Add source
files for Cairo convenience functionality.
* gdk/gdkcairo.h (gdk_cairo_rectangle, gdk_cairo_region): Add a
convenience functions to add GdkRectangle, GdkRegion to a cairo path.
* gdk/gdkwindow.c gdk/gdkgc.c gtk/gtkcolorsel.c gtk/gtkiconview.c
gtk/gtkstyle.c: Use gdk_cairo_rectangle/region().
* gdk/gdkcairo.[ch] gdk/gdkdrawable.h gdk/gdkdraw.c: Rename
gdk_drawable_create_cairo_context() to gdk_cairo_create().
* gdk/gdkcairo.c gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c:
Rename gdk_pixbuf_set_as_cairo_source() to
gdk_cairo_set_source_pixbuf().
* gdk/gdkdraw.c gdk/gdkpango.c gtk/gtkcolorsel.c gtk/gtkhruler.c
gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkstyle.c gtk/gtkvruler.c:
Adjust for renames.
* gdk/gdk.symbols: Update.
* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): Fix
coordinate system problem that was causing the wrong portions
to be invalidated.
* gtk/gtkcellrenderer.c (gtk_cell_renderer_render)
gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render)
gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_render)
gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render)
gtk/gtkcellview.c (gtk_cell_view_expose)
gtk/gtkdnd.c (gtk_drag_highlight_expose)
gtk/gtkentry.c (gtk_entry_draw_text)
gtk/gtktextview.c (text_window_invalidate_rect): Some cairoization.
* gtk/gtkcalendar.[ch]: Beat into something roughly resembling
GTK+ style ... use instance-private data and standard names for
private structure, etc. Move function docs inline.
* gtk/gtkcalendar.[ch]: Switch to drawing everything in
expose. Switch drawing to Cairo.
* gtk/gtkcalendar.c (gtk_calendar_freeze): Deprecate
gtk_calendar_freeze/thaw
2005-05-09 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_convert_0888_br, gdk_rgb_convert_8880_br):
Fill in unused bits so they can be used for the depth-32 target case.
Rewrite so that that gives a marginal speedup rather than a
marginal slowdown. (on x86)
* gdk/gdkscreen.h gdk/x11/gdkscreen-x11.[ch] gdk/x11/gdkvisual-x11.c:
Add gdk_screen_get_rgba_colormap/visual to get a visual for
windows with an alpha channel, if one exists.
* gdk/win32/gdkscreen-win32.c gdk/linux-fb/gdkscreen-fb.c:
Stub out gdk_screen_get_rgba_colormap/visual.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors): computation of
"unused" wasn't right for depth == 32, since it depended on
shifting by 32.
* gdk/gdkrgb.c: Fill in alpha bits with 1s. (Based on patch from
Keith Packard,
http://mail.gnome.org/archives/gtk-devel-list/2004-June/msg00080.html)
* gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_get_picture):
Implement again, without using Xft.
* tests/testgtk.c: Add a test for windows with an alpha channel.
2005-05-06 Matthias Clasen <mclasen@redhat.com>
* tests/testiconview.c: Test DND.
* gtk/gtk.symbols:
* gtk/gtkiconview.[hc]: Add DND support similar to the DND
support in the tree view. (#150270)
2005-05-02 Matthias Clasen <mclasen@redhat.com>
* tests/testiconview.c: Test cell renderers.
* gtk/gtk.symbols: Add new functions.
* gtk/gtkiconview.[hc]: Implement GtkCellLayout and use
cell renderers for drawing and editing. (#148144, #160242)
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* tests/testiconview.c: Add some more tests.
* gtk/gtkiconview.c (gtk_icon_view_select_path): Don't crash
if the path does not point to a row in the model. (#300909,
Mathias Hasselmann)
(gtk_icon_view_rows_reordered): Re-layout here. (#301009,
Mathias Hasselmann)
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* tests/testtext.c: Add some more attribute tests.
* gtk/gtktexttag.c (gtk_text_tag_class_init): Correct the documentation
of the rise property. String change, but it is more important to
be correct than to be translated. (#301740)
2005-04-18 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c
* gdk/gdkcolor.c gdk/gdkwindow.c gdk/gdkpixbuf-render.c
gdk/gdkpango.c tests/testcairo.c: Update to new Cairo API for
setting color and opacity. (#301066, Vincent Noel)
2005-04-03 Hans Breuer <hans@breuer.org>
[merged from gtk-2-6 branch]
* gdk/win32/gdkdrawable-win32.c : let dash_offset shift the start of
the line pattern not the start of the line. Fixes bug #171641.
* gtk/makefile.msc.in : follow .symbols changes
* gdk/win32/gdkwindow-win32.c : declare and resolve GetAncestor()
dynamically. (It is not available in _WIN_VER <= 0x0400)
* gdk/win32/makefile.msc : removed gdkpango-win32.obj
* gtk/gtkhsv.c gtk/gtkstyle.c : use G_PI instead of M_PI
[also applied to gtk-2-6 branch]
* gdk/makefile.msc gdk-pixbuf/makefile.msc : handle gdk*alias.def
* gdk/makefile.msc.in : add gtkmnemonichash.obj
* test/testgtk.c(set_parent_signal) : use g_message instead of
g_print to keep the 'testgtk --bench=all' output clean
2005-03-15 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkpixmap.c gdk/gdkwindow.c
gdk/x11/gdkdrawable-x11.c gdk/x11/gdkpixmap-x11.c gdk/x11/gdkwindow-x11.c
gdk/gdkinternals.h: Switch set_cairo_target() virtual function to
ref_cairo_surface()
* gdk/gdkdrawable.h gdk/gdkdraw.h: Switch set_cairo_target() virtual
function to create_cairo_context()
* gdk/gdkwindow.c: Clear double buffer pixmaps with Cairo.
* gdk/x11/gdkwindow-x11.c: Keep all components in GdkWindowObject.bg_color,
not just the pixel.
* tests/testcairo.c: Update for create_cairo_context()
* gdk/gdkdraw.c (gdk_draw_trapezoids, gdk_draw_glyphs[_transformed]):
Reimplement in terms of Cairo, bypass the vtable entries.
* gdk/x11/gdkdrawable-x11.[ch] gdk/x11/gdkdisplay-x11.[ch]
gdk/x11/gdkgc-x11.c gdk/x11/gdkpango-x11.c
gdk/x11/gdkprivate-x11.h gdk/x11/Makefile.am: Remove
implementation of draw_trapezoids / draw_glyphs[_transformed].
* gdk/gdkpango.c: Switch GdkPangoRenderer to use Cairo
* gdk/gdkpango.c gdk/x11/gdkpango-x11.c: Move
gdk_pango_context_get_for_screen() into the backend independent code.
* gdk/x11/gdkdrawable-x11.[ch]: Remove Xft use, use RENDER directly
for drawing images.
* gdk/gdkdrawable.h gdk/x11/gdkdrawable-x11.c: Remove
gdk_draw_rectangle_alpha_libgtk_only.
* gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c: Add
gdk_pixbuf_set_as_cairo_source()
* gdk/gdk.symbols: Update
* gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkruler.[ch]
gtk/gtk[hv]ruler.c: Convert to Cairo rendering.
* gtk/gtkstyle.c (gtk_default_draw_check, gtk_default_draw_focus,
gtk_default_draw_option): Switch to Cairo. Simplify the checkbutton,
radio button style for now to get something more scalable.
* gtk/gtksettings.c: #if 0 out the code to use PangoXft for hinting/
antialiasing/dpi settings.
2005-02-11 Matthias Clasen <mclasen@redhat.com>
Support vertical menubars (#166632):
* gtk/gtkenums.h (GtkPackDirection): New enumeration for pack
directions, with values for left-to-right, right-to-left,
top-to-bottom and bottom-to-top.
* gtk/gtk.symbols:
* gtk/gtkmenubar.h:
* gtk/gtkmenubar.c: Add two properties, pack-direction and
child-pack-direction, which specify how children and
grandchildren of a menubar are packed, with getters and setters.
* gtk/gtkmenubar.c (gtk_menu_bar_set_property):
(gtk_menu_bar_get_property): Implement set_property and get_property.
* gtk/gtkmenubar.c (gtk_menu_bar_size_request):
(gtk_menu_bar_size_allocate): Take pack direction into account.
* gtk/gtkmenubar.c (gtk_menu_bar_move_current): Implement
move_current here move all the menubar-specific direction
tweaking from the generic menushell implementation here.
* gtk/gtkmenu.c (gtk_menu_move_current): Move menu-specific
direction tweaking from the generic menushell implementation here.
* gtk/gtkmenuitem.c (gtk_menu_item_size_request):
(gtk_menu_bar_size_allocate): Take pack direction into account.
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_size_request)
(gtk_image_menu_item_size_allocate):
(gtk_image_menu_item_toggle_size_request): Take child pack
direction into account and pack the image vertically if
necessary.
* gtk/gtkmenushell.c (gtk_menu_shell_real_select_item):
Set the submenu direction to left-right for menuitems in
vertical menubars.
(gtk_real_menu_shell_move_current): Simplify by moving
direction tweaking to menu- and menubar-specific
implementations. Take pack direction into account when
doing fallbacks.
* tests/testmenubars.c: Test menubars in various packing
direction combinations.
* tests/Makefile.am (noinst_PROGRAMS): Add testmenubars.
2005-02-05 Hans Breuer <hans@breuer.org>
* gdk/makefile.msc gdk/win32/makefile.msc gtk/makefile.msc.in :
build with Cairo dependency. The patch to acually use Cairo
on win32 will be on gtk-devel-list soon.
* tests/makefile.msc : add testcairo building
* gtk/stock-icons/makefile.msc : split command line into two to
work with the shells default
Fri Feb 4 14:16:31 2005 Manish Singh <yosh@gimp.org>
* gtk/gtkaccelgroup.c (substitute_underscores): remove unused
function.
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
Add some extra parens for bitop order of operations disambiguiation.
* gtk/gtkstock.c: Fix const confusion, make our own copy of the
domain when setting a translate function.
* tests/testcombo.c: removed unused variable.
2005-02-03 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdrawable.[ch] gdkpixmap.c gdkwindow.c: Add
gdk_drawable_set_cairo_target().
* tests/testtreeflow.c (enum): Use grand not rand as a variable
name because one of the cairo headers is pulling in stdlib.h.
* tests/testcairo.c tests/Makefile.am: Add a simple cairo based
example.
* configure.in: Bump release to 2.7.0, gtk_binary_version to 2.7.0.
* Require libpangocairo for all backends.
2005-01-24 Federico Mena Quintero <federico@ximian.com>
Merged from gtk-2-6:
Fix#147785 and clean up the loading code:
* gtk/gtkfilechooserdefault.c (LoadState): Make the set of states
be EMPTY, PRELOAD, LOADING, FINISHED.
(gtk_file_chooser_default_init): Start in the LOAD_EMPTY state.
(struct _GtkFileChooserDefault): Added a pending_select_paths
field.
(load_remove_timer): Add the new states.
(load_setup_timer): Likewise.
(load_timeout_cb): Likewise. Switch to the LOAD_LOADING state.
(browse_files_model_finished_loading_cb): Switch to the
LOAD_FINISHED state.
(enum PendingOp): Removed.
(struct _GtkFileChooserDefault): Removed the pending_op and
pending_select_path fields.
(pending_select_paths_free): New utility function.
(pending_select_paths_add): New utility function.
(gtk_file_chooser_default_finalize): Call
pending_select_paths_free().
(pending_op_queue): Removed.
(pending_op_process): Removed.
(pending_select_paths_process): New function.
(browse_files_model_finished_loading_cb): Call
pending_select_paths_process().
(center_selected_row_foreach_cb): Handle multiple selection by
only centering the first row.
(get_is_file_filtered): Constify.
(gtk_file_chooser_default_select_path): Queue into a list of paths
to select if we are not finished loading.
(show_and_select_paths): New utility function.
(up_folder_handler): Use pending_select_paths_add().
(gtk_file_chooser_default_should_respond): Do not call
pending_op_queue(); free the pending_selected_paths instead.
(gtk_file_chooser_default_initial_focus): Don't queue a pending
operation, and don't select the first row unconditionally --- this
will happen when the folder is done loading.
(shortcuts_row_activated_cb): Free the pending_select_paths.
(pending_select_paths_store_selection): New utility function.
(gtk_file_chooser_default_map): Call
pending_select_paths_store_selection() to save the selection
before reloading the folder.
(select_func): Umm? Call gtk_tree_selection_select_iter(). Don't
move the cursor here; it will be done when processing the pending paths.
* tests/testfilechooser.c (main): Add a button to the command
window to unmap and remap the file chooser.
Wed Dec 22 14:22:19 2004 Søren Sandmann <sandmann@redhat.com>
* tests/testtoolbar.c (timeout_cb): Add sensitivity-changing
timeout. Written by Christian Persch.
Wed Dec 22 14:14:02 2004 Søren Sandmann <sandmann@redhat.com>
Bug #161561
* gdk/x11/gdkwindow-x11.c (tmp_{re,un}set_bg): Only set/reset the
background for windows that get expose events.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Remove
hack to repaint !expose windows.
2004-12-12 Matthias Clasen <mclasen@redhat.com>
* tests/testfilechooserbutton.c (tests_button_clicked_cb): Rename
a local variable to avoid a conflict. (#161109, Robert Ögren)
1
Sat Nov 20 15:13:51 2004 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpango.[ch]: Add GdkPangoRenderer, a subclass of
PangoRenderer targeting GDK drawables. Use to implement the old
gdk_draw_layout() and friends.
* gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkwindow.c gdk/gdkpixmap.c:
Add gdk_draw_glyphs_transformed() gdk_draw_trapezoids() and
the corresponding members of GdkDrawableClass. Add a fallback
implementation of gdk_draw_trapezoids() in terms of pixbufs.
* gdk/gdkwindowing.h gdk/x11/gdkg-x11.h: Add
_gdk_windowing_gc_get_foreground() to enable the fallback
trapezoid implementation.
* gdk/x11/gdkdrawable-x11.c gdk/x11/gdkdisplay-x11.h: Implement
draw_glyph_transformed, draw_trapezoids.
* gdk/x11/gdkdrawable-x11.[ch]: Add
_gdk_x11_drawable_draw_xtrapezoids, _gdk_x11_drawable_draw_xft_glyphs
for use of GdkX11Renderer.
* gdk/x11/gdkgc-x11.c gdk/x11/gdkprivate-x11.h: Implement
GDK_TILED, GDK_STIPPLED, GDK_OPAQUE_STIPPLED in the RENDER codepath.
* gdk/gdkpango-x11.c: Add GdkX11Renderer... a subclass of
PangoXftRenderer that does tiles/stipples and fallback rendering
of trapezoids without the RENDER extension.
* gdk/gdkpango-x11.c gdk/x11/gdkscreen-x11.[ch] _gdk_x11_renderer_get:
Add _gdk_x11_renderer_get() to get a singleton GdkX11Renderer
for the screen.
* gdk/x11/gdkdrawable-x11.c (get_impl_drawable): Fix a None/NULL
confusion.
* gtk/gtklabel.[ch] gtk/gtk.symbols: Add gtk_label_set/get_angle(),
and an ::angle property.
* gtk/gtklabel.c: Remove #if 0'd dead code gtk_label_paint_word().
* gtk/gtktextdisplay.c: Switch to using a GtkTextRenderer subclass
of GdkPangoRenderer for drawing.
* gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c: Switch to using
gtk_attr_shape_new_with_data() to store backreferences to
embedded pixmaps and widgets. Leave line_display->shaped_objects
around for backwords compatibility.
* gdk/gdkpango.[ch] (gdk_pango_context_set_colormap): Describe
as deprecated, remove implementation.
* gtk/gtkwidget.c (gtk_widget_create_pango_context): Remove
call to gdk_pango_context_set_colormap.
* demos/gtk-demo/Makefile.am demos/gtk-demo/rotated_text.c: Add
a demo showing drawing rotated text.
* tests/testgtk.c: Add a rotated-label test, and also a rotated
drawing test (differs from demos/gtk-demo/rotated_text by also
using a tile)
2004-11-08 Matthias Clasen <mclasen@redhat.com>
* tests/testfilechooserbutton.c (main): Disable the SAVE
and CREATE_FOLDER modes. (#157675, Christian Persch)
2004-11-07 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilefilter.h:
* gtk/gtkfilefilter.c (gtk_file_filter_add_pixbuf_formats):
New convenience function to add a filter for image files
which can be loaded by GdkPixbuf. (#145388, Anders Carlsson)
* tests/testfilechooser.c: Test the image filter.
2004-10-31 Matthias Clasen <mclasen@redhat.com>
* tests/testentrycompletion.c (animation_timer): Don't try to
remove stuff from an empty model. (#156575, Christian Persch)
2004-10-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimage.h:
* gtk/gtkimage.c (gtk_image_new_from_icon_name)
(gtk_image_set_from_icon_name, gtk_image_get_icon_name)
(gtk_image_set_pixel_size, gtk_image_get_pixel_size): Add a
new type GTK_IMAGE_ICON_NAME for named icons, update the size
and content of stock, icon set and named icon images upon style
changes, and allow to set a fixed pixel size for named icon
images. (#155688, James Henstridge)
* tests/testimage.c: Test application for theming behaviour of
different image types and for image dnd.