Tue Apr 25 10:25:28 2006 Søren Sandmann <sandmann@redhat.com>
* tests/testgtk.c (create_alpha_window): Create 'composited' label.
* tests/testgtk.c (on_composited_changed): New function, change
the label to say whether the screen is composited or not.
* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
composited status change, invalidate the window and propagate the signal;.
* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
if reset_type_hint is TRUE.
* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
the old hints, store a shadow copy in the public window->type_hint
bitfield, otherwise set this field to normal. Set the private
field to the type hint.
* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.
* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
"reset_type_hint" indicating whether the type hint needs to be
reset. New field type_hint containing a GdkWindowTypeHint.
* gtk/gtkwidget.c (propagate_composited_changed): New function to
propagate changes in composited status.
(gtk_widget_class_init): Add composited_changed signal.
* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.
* gtk/gtkwidget.c (gtk_widget_is_composited): New function.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.
* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
the item belongs to a menubar. Set the type_hint appropriately
depending on the outcome.
* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.
* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
changed on the attach widget.
* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
set the transient_for property for menus.
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.
* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
transient for the toplevel.
* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
transient-for, for the popup window.
* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
new window types.
* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
for new window types.
* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
New function called whenever the compositing manager comes and goes.
* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.
* gdk/x11/gdkscreen-x11.c
(_gdk_x11_screen_request_cm_notification, make_cm_atom,
check_is_composited): New functions
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
_gdk_x11_screen_process_owner_change when an
XFixesSelectionNotifyEvent is received.
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
_gdk_x11_screen_request_cm_notification() on all screens.
* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
implementation.
* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
'composited-changed'.
* gdk/gdkwindow.h: Add new EWMH window types.
* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-04-05 Paolo Borelli <pborelli@katamail.com>
* gtk/gtktextiter.c (gtk_text_iter_ends_line): handle the case of \r
and \n split across lines. Bug #337022.
* tests/testtextbuffer.c: add unit test.
2006-03-23 Matthias Clasen <mclasen@redhat.com>
Support subclasses in RC files. (#142417, Todd Berman, patch
based on a patch by Benjamin Berg)
* gtk/gtkrc.h:
* gtk/gtkrc.c: Support <classname> elements in widget_class paths
in rc files which match any classes derived from named class.
(_gtk_rc_init): Use the new syntax in the default rc string.
* gtk/gtkbindings.c: Support the new syntax for bindings too.
* tests/testrc.c: Tests for widget_class path matching
2006-03-22 Matthias Clasen <mclasen@redhat.com>
* tests/prop-editor.c:
* tests/testtreeview.c: Remove pointless includes of config.h,
to make it easier compilable against system GTK+.
2006-03-22 Carlos Garnacho <carlosg@gnome.org>
* gtk/gtknotebook.c: send a GtkWidget** instead of a GtkNotebookPage*
when doing tabs DnD, this allows DnD interaction with other widgets,
added some docs for this too.
* tests/testnotebookdnd.c: add some code to test it.
2006-03-14 Matthias Clasen <mclasen@redhat.com>
* tests/testcellrenderertext.c: Add test cases for alignment.
* gtk/gtkcellrenderertext.c: Add an alignment property,
and fix some cases where ellipsize_set was being used to
mean "we're ellipsizing" even when ellipsize was set to NONE.
(#318761, Ross Burton)
2006-03-08 Carlos Garnacho <carlosg@gnome.org>
Rename ::tab-added and ::tab-removed signals to ::page-added and
::page-removed for not conflicting with other tab reordering
implementations. Fixes bug #333743.
Also rename ::tab-reordered to ::page-reordered, and emit it in
gtk_notebook_reorder_child () to make it behave consistently with the
other two signals.
* gtk/gtknotebook.c (gtk_notebook_class_init): rename signals.
(gtk_notebook_reorder_tab)
(gtk_notebook_button_release)
(gtk_notebook_remove)
(gtk_notebook_real_insert_page): emit respectively renamed signals
(gtk_notebook_reorder_child): also emit ::page-reordered here
* tests/testnotebookdnd.c: use renamed signals
2006-03-07 Michael Natterer <mitch@imendio.com>
Add infrastructure for copy/paste and DND of rich text for
GtkTextBuffer. Fixes bug #324177.
* gtk/gtktextbufferrichtext.[ch]: new files implementing a
per-buffer registry of rich text formats.
* gtk/gtk.h: #include gtktextbufferrichtext.h
* gtk/gtktextbufferserialize.[ch]: new files implementing an
internal serialization format that can handle all of a text
buffer's tags and pixbufs. It's not useful for anything except
tranfer between instances of GtkTextBuffer (Anders Carlsson).
* gtk/Makefile.am: build the new files.
* gtk/gtkclipboard.[ch]: added convenience APIs for rich text,
just as they exist for plain text and pixbufs.
* gtk/gtkselection.[ch]: added rich text convenience APIs here
too. Return the target list from gtk_target_list_ref(). Register
GtkTargetList as boxed type. Added
gtk_target_table_new_from_list() and gtk_target_table_free(),
which make converting between GtkTargetList and arrays of
GtkTargetEntry considerably easier.
* gtk/gtktextutil.[ch]: added _gtk_text_util_create_rich_drag_icon()
which creates a fancy rich text icon (Matthias Clasen).
* gtk/gtktextbuffer.[ch]: use all the new stuff above and
implement copy and paste of rich text. Added APIs for getting the
target lists used for copy and paste. Added public enum
GtkTextBufferTargetInfo which contains the "info" IDs associated
with the entries of the target lists.
* gtk/gtktextview.c: use the new rich text APIs and
GtkTextBuffer's new target list API to enable DND of rich text
chunks.
* gtk/gtk.symbols: export all the new symbols added.
* tests/testtext.c: added rich text testing stuff.
2006-01-28 Behdad Esfahbod <behdad@gnome.org>
* configure.in: If major.minor of required and available glib versions
are the same, add -DG_DISABLE_DEPRECATED to GLIB_CFLAGS. (bug #328617)
* */Makefile.am: Remove hardcoded -DG_DISABLE_DEPRECATED.
2006-01-24 Kristian Rietveld <kris@gtk.org>
#322591, Jonathan Blandford.
* gtk/gtktreeview.[ch] (gtk_tree_view_get_search_entry),
(gtk_tree_view_set_search_entry),
(gtk_tree_view_get_search_position_func),
(gtk_tree_view_set_search_position_func): New functions,
and small adaptions to the tree view code to allow for setting
the entry and search position function.
* gtk/gtktreeprivate.h: Removed GtkTreeViewSearchDialogPositionFunc
typedef, which is now in gtktreeview.h as
GtkTreeViewSearchPositionFunc. Add/update fields.
* gtk/gtk.symbols: Add new functions.
* tests/testtreesort.c: Add a little test for _set_search_entry().
2006-01-23 Behdad Esfahbod <behdad@gnome.org>
* gtk/gtklabel.c (get_layout_location): Fix misalignment of RTL
text in ellipsized GtkLabel: use layout width if set, otherwise
fallback to ink extents width. (#322042)
2006-01-13 Kristian Rietveld <kris@imendio.com>
* tests/testtreefocus.c (set_indicator_size), (main): add a little
test for the newly introduced indicator-size property.
2006-01-06 Hans Breuer <hans@breuer.org>
* tests/makefile.msc : added a bunch of tests
* tests/testcellrenderertext.c : use g_snprintf()
* tests/testfilechooserbutton.c : don't include unistd.h twice.
Removed the unconditional one and added direct.h for G_OS_WIN32
Thu Dec 22 16:01:27 2005 Tim Janik <timj@imendio.com>
* gtk/gtkobject.c: derive GtkObject from GUnowned,
so it initially has a floating reference count.
gtk_object_class_init(): installa floating flag handler with
libgobject, so for GtkObjects the flag is stored as GTK_FLOATING
in the ->flags member.
* tests/floatingtest.c: test floating flag uses.
2005-12-14 Michael Natterer <mitch@imendio.com>
* gdk-pixbuf/io-jpeg.c: applied patch from maemo-gtk which avoids
the allocation of an intermediate buffer for non-progressive
jpegs. Fixed bug #305894.
* tests/test-images/valid_jpeg_progressive_test: new test image so
we can test both loading code paths in io-jpeg.c
2005-11-28 Federico Mena Quintero <federico@ximian.com>
Fix bug #321560, based on a patch by Bogdan Nicula (bogdanni@hotmail.com):
* gtk/gtkfilechooserdefault.c (up_folder_handler): Don't add the
current_folder to the pending select paths here; the path bar will
give it to us now.
(path_bar_clicked): Add the child_path to the pending select paths
here.
(show_and_select_paths): Don't filter out folders.
(show_and_select_paths): Don't take separate arguments for
only_one_path and multiple paths.
* tests/autotestfilechooser.c (test_folder_switch_and_filters):
New test about preserving the filters when we change folders.
2005-11-23 Michael Natterer <mitch@imendio.com>
Added symbolic themable colors. Patch is a merged version of
proposals from Matthias and maemo-gtk. Fixes bug #114355.
* configure.in: require glib >= 2.9.1 for refcountable hashtables.
* gtk/gtksettings.c: added property "color-scheme" which is a
string defining colors like "foreground:black\nbackground:grey".
Automatically provide a name->GdkColor hash table mapping for the
color scheme.
* gtk/gtkrc.[ch]: added list of color hashes that works like the
list of icon factories. Append the color scheme hash from
GtkSettings if it exists. Extended gtkrc syntax to allow defining
and referencing of logical colors. Also allow to modulate colors
in gtkrc by using arbitrary expressions of mix(), shade(),
lighter() and darker(). Added internal function
_gtk_rc_style_get_color_hashes().
* gtk/gtkstyle.[ch]: keep a private list of color hashes around.
Get the list from _gtk_rc_style_get_color_hashes(). Export
internal function _gtk_style_shade() (used by above color
expressions). Added public API gtk_style_lookup_color() which
looks up a logical color by name.
* gtk/gtk.symbols: add gtk_style_lookup_color
* tests/testgtkrc: use symbolic colors for making
the scrollbars red.
2005-11-16 Michael Natterer <mitch@imendio.com>
* gtk/gtkimage.c (animation_timeout): call
gtk_window_process_updates() so the animation keeps running even
if the main loop is busy with sources that eat a lot of cpu with
high priority. Fixes bug #321444.
(gtk_image_new_from_animation): document the fact that the
animation will stop running if the main loop is busy with sources
that have priorities higher than G_PRIORITY_DEFAULT.
* tests/testimage.c: added test case that shows an animation even
though a cpu-eating idle function is running.
2005-11-11 Federico Mena Quintero <federico@ximian.com>
* tests/autotestfilechooser.c (main): Use
g_log_set_default_handler() instead of explicitly setting a
handler for each domain.
2005-11-10 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c: Add show-popup and hide-popup signals and
emit them when the popup is shown or hidden. (#162531, Tommi
Komulainen)
2005-11-03 Tor Lillqvist <tml@novell.com>
* tests/teststatusicon.c (icon_activated): Position the dialog
with GTK_WIN_POS_CENTER.
(do_quit): New function, hide and unref the GtkStatusIcon, and
call gtk_main_quit().
(popup_menu): Add a Quit menu item that calls do_quit().
2005-10-18 Federico Mena Quintero <federico@ximian.com>
Fixes bug #317999:
* tests/autotestfilechooser.c
(test_button_folder_states_for_action): Test that we have either
$cwd or the explicitly-set folder.
(test_reload_sequence): Likewise.
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_get_current_folder): If our reload_state
is RELOAD_EMPTY, return a GtkFilePath corresponding to $cwd.
2005-10-07 Federico Mena Quintero <federico@ximian.com>
Fixes bug #317999:
* tests/autotestfilechooser.c (test_reload_sequence): Ensure that
the the result of gtk_file_chooser_get_folder() is NULL or
non-NULL at the right times. Log the tests.
(test_button_folder_states): New test for the initial states of
the current folder in GtkFileChooserButton.
(main): Test that the number of warnings/errors/critical errors is
zero.
* gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder):
Clarify the documentation on when this can return NULL.
(gtk_file_chooser_get_current_folder_uri): Likewise.
* gtk/gtkfilechooserbutton.c (struct
_GtkFileChooserButtonPrivate): Added a folder_has_been_set flag;
we use it to keep track of whether a folder has been set.
(gtk_file_chooser_button_map): Implement. If no folder has been
loaded before, we at least try to load $cwd here.
(gtk_file_chooser_button_constructor): If the construct-time
dialog already has a folder set, turn on our folder_has_been_set
flag.
(dialog_current_folder_changed_cb): Turn on our
folder_has_been_set flag.
2005-09-28 Federico Mena Quintero <federico@ximian.com>
* tests/autotestfilechooser.c (test_reload_sequence): Oops, return
if the unmap test fails.
(test_reload_sequence): Use gtk_widget_show_now() instead of
gtk_widget_show() for the dialog.
Thanks to Tim Janik for noticing these.
2005-09-28 Federico Mena Quintero <federico@ximian.com>
* tests/testcellrenderertext.c: New file with a set of tests for
GtkCellRendererText. The idea is to run a text renderer through
most of its interesting property values to see that it works
correctly.
* tests/Makefile.am: Added testcellrenderertext.
* gtk/gtkfilechooserdefault.c (load_set_model): Mark the
entry/exit of this function for profiling.
(gtk_file_chooser_default_style_set): Mark the start/end of the
calls to the parent class and the the signal emission for profiling.
2005-09-27 Federico Mena Quintero <federico@ximian.com>
Don't reload the current folder unnecessarily on ::map().
* gtk/gtkfilechooserprivate.h (ReloadState): New enum to represent
the reloading state.
(struct _GtkFileChooserDefault): Added a "reload_state" field.
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init):
Initialize impl->reload_state.
(gtk_file_chooser_default_map): Check the impl->reload_state; load
a default folder if no folder has been set, or reload the current
one only if we had been unmapped first.
(gtk_file_chooser_default_update_current_folder): Set the
reload_state to RELOAD_HAS_FOLDER.
(gtk_file_chooser_default_unmap): Implement, and set the
reload_state to RELOAD_WAS_UNMAPPED.
(shortcuts_model_create): Don't call shortcuts_add_bookmarks()
here; they'll get (re)loaded on ::map() anyway.
* gtk/gtkfilechooserwidget.c
(gtk_file_chooser_widget_constructor): Don't set a default folder here.
* tests/autotestfilechooser.c (test_action_widgets): Don't take in
a dialog; build it ourselves.
(test_reload): New test to ensure that we don't load the default
folder more than once, and that we reload it when
unmapping/remapping.
(get_impl_from_dialog): New utility function.
(test_widgets_for_current_action): Use get_impl_from_dialog().