2004-09-21 Matthias Clasen <mclasen@redhat.com>
* configure.in: Check for mallinfo.
* tests/testtreemodel.c: Only include malloc.h if HAVE_MALLINFO
is defined. (#153168, Darren Creutz)
2004-09-14 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_focus_to_cursor): Set the cursor
to the first selected row instead of always to the first row if there
is no cursor. (#143270, Jean Bréfort)
* tests/testfilechooser.c (main): Fix a few typos.
2004-08-17 Matthias Clasen <mclasen@redhat.com>
* tests/testfilechooserbutton.c: Use g_message() throughout, add RTL envar for
rtl testing.
* gtk/gtkfilechooserbutton.c: Get rid of HAVE_CONFIG_H.
(gtk_file_chooser_button_init): Use gtk_drag_dest_add_text_targets().
(gtk_file_chooser_button_drag_data_received): Use gtk_selection_data_get_text().
(gtk_file_chooser_button_set_dialog): _gtk_file_chooser_entry_set_base_folder()
seems to expect a path, not an uri.
(update_dialog): Handle g_filename_from_uri() returning NULL, don't free
info if it is NULL.
* gtk/gtkfilechooserbutton.h: Minor stylistic changes.
2004-08-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.[hc]: New widget to go along with
GtkFontButton and GtkColorButton for use in preference dialogs.
Replaces GnomeFileEntry. (#148108, James M. Cape)
* gtk/gtk.h: Include gtkfilechooserbutton.h
* gtk/Makefile.am (gtk_public_h_sources): Add gtkfilechooserbutton.h
(gtk_c_sources): Add gtkfilechooserbutton.c
* gtk/gtk.symbols: Add the GtkFileChooserButton symbols.
* gtk/gtkfilechooserutils.[hc]: Make the delegate quark available.
* gtk/gtkfilechooserentry.[hc] (_gtk_file_chooser_entry_new): Allow
to suppress tab-eating using the new eat_tabs argument. Adjust all
callers.
* tests/testfilechooserbutton.c: Test for GtkFileChooserButton.
* tests/Makefile.am (noinst_PROGRAMS): Add testfilechooserbutton
Sat Aug 14 17:56:33 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkentry.c (gtk_entry_get_pixel_ranges): New function.
* gtk/gtkentry.c (in_selection): New function using
gtk_entry_get_pixel_ranges() to determine whether a click is in
the selection. Improve entry behavior wrt. dragging and
selecting. Bug #143249.
Sat Aug 14 17:53:46 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* configure.in: Require glib 2.5.2
* gtk/gtksequence.[ch]: New internal data structure.
* gtk/gtkliststore.[hc]: Reimplement in terms of new data
structure
* tests/Makefile.am (testtreemodel_SOURCES):
* tests/testtreemodel.c: New test program written by Matthias.
2004-08-06 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkwindow-win32.c : make it compile and more
similar to the X11 implementation [backward compatibility
for GDK_WINDOW_TEMP, GDK_INPUT_ONLY (fixes bug #148702),
use the *screen* function variants, dont reparent already
destroyed]
(get_visible_region) : take the win32 part into account
(_gdk_windowing_window_destroy) : remove from handle table
* gdk/win32/gdkdisplay-win32.c : added
gdk_display_(request|supports)_selection_notification ()
with a currently mostly pointless implementation ;-)
* gtk/gtkfilesystemwin32.c (*_to_path) : same changes as on *NIX,
plugs memory leak
(gtk_file_system_win32_render_icon) : use new GTK_STOCK_DIRECTORY
* gtk/makefile.msc.in demos/gtk-demo/makefile.msc.in
gtk/stock-icons/makefile.msc tests/makefile.msc : updated
* gdk/gdk.def gtk/gtk.def : updated externals
* tests/testiconview.c : remove unneeded dirent.h inclusion
2004-08-04 Matthias Clasen <mclasen@redhat.com>
* tests/testiconview.c: Add buttons to select and unselect all
nodes, make the popup menu actually work.
* gtk/gtkiconview.c: Make GTK_SELECTION_BROWSE work as intended,
let button 3 presses through to the app, to make popup menus
work.
2004-08-04 Matthias Clasen <mclasen@redhat.com>
* tests/Makefile.am: Add testiconview.
* tests/testiconview.c: A test for GtkIconView
* tests/gnome-textfile.png: ...which uses this image.
2004-07-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.h:
* gtk/gtkcombobox.c: Change the api for separators to use a
separator function instead of a boolean column.
* tests/testcombo.c: Update to match the api change.
Thu Jul 22 01:05:16 2004 Matthias Clasen <maclas@gmx.de>
* configure.in: Require Pango 1.5.1 (for ellipsisation).
* gtk/gtklabel.h:
* gtk/gtklabel.c (gtk_label_class_init): Add a new :ellipsise
property which controls ellipsisation of the label. (#125250,
Tim Van Wassenhove, patch by James M. Cape)
* tests/testellipsise.c: Simple test for ellipsisation.
2004-07-20 Matthias Clasen <mclasen@redhat.com>
* tests/testactions.c (main):
* tests/testmerge.c (main): Add some refcount debugging.
* gtk/gtkuimanager.c (update_node, free_node): Ref an sink
all proxies, so that we can properly clean up floating proxies
which the app didn't adopt. (#147926, Tommi Komulainen)
2004-07-07 Matthias Clasen <mclasen@redhat.com>
Support separators in combo boxes and more generally in tree
views (#135873):
* gtk/gtkcombobox.h:
* gtk/gtkcombobox.c (gtk_combo_box_get_row_separator_column):
* gtk/gtkcombobox.c (gtk_combo_box_set_row_separator_column):
Add a ::row-separator-column property with getter and setter,
which can indicate a boolean model column to determine which
rows are separators.
* gtk/gtkcombobox.c: Display separator rows as separator menu
items in menu mode, and by using the new treeview separator
functionality in list mode.
* gtk/gtktreeview.h:
* gtk/gtktreeview.c (gtk_tree_view_get_row_separator_func):
* gtk/gtktreeview.c (gtk_tree_view_set_row_separator_func):
Add a callback to determine whether a row is a separator.
* gtk/gtktreeview.c (gtk_tree_view_bin_expose):
* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon):
* gtk/gtktreeview.c (validate_row): Use the new callback
to determine whether a row is a separator, and draw it
as a separator then. Since separators should take up less
vertical space than regular rows, this requires removing
the redundant MAX(...,expander_size) calls which appear in
many places. Instead, the MAX() is now only done in
validate_row(), and only if the row is not a separator.
To catch possible side effects of this intrusive change,
I have left EXPANDER_MAX() calls in place of the MAX() calls
which will emit a warning if something breaks. They should
be removed before 2.6.
* gtk/gtktreeselection.c (row_is_selectable): Don't let
separator rows be selected.
* tests/testcombo.c (create_blaat): Add a separator column.
Sat Jun 5 20:05:39 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testmerge.c: Add a checkbox to queue an
merge/unmerge. Patch from Matthias Clasen.
* gtk/gtktoolbar.c (struct _GtkToolbarPrivate): Add a new flag
"need_rebuild"
(rebuild_menu): New function that rebuilds the overflow menu and
makes sure it doesn't start or end with a separator.
(toolbar_content_new_tool_item)
(toolbar_content_remove)
(toolbar_content_new_compatibility): Set the rebuild_needed flag
(gtk_toolbar_size_allocate): Only show the overflow arrow when we
have actually overflown an item with a proxy menu item. Also make
sure we rebuild the menu if needed.
Fix#125504, #142377, #143463
* gtk/gtkseparatortoolitem.c (gtk_separator_tool_item_expose):
Obey the "priv->draw" flag. (#143692)
2004-05-10 Matthias Clasen <mclasen@redhat.com>
* tests/testentrycompletion.c: Make the second example use the
::match-selected signal to make it actually work.
2004-05-01 Hans Breuer <hans@breuer.org>
* tests/Makefile.am : tests/makefile.msc is in CVS for
a long time, finally added to EXTRA_DIST : fixes bug
#141334, John Ehresman
Mon Mar 15 01:50:28 2004 Jonathan Blandford <jrb@gnome.org>
* gtkfilechooserentry.c: Rewritten to use the GtkEntryCompletion
API more correctly. Now pops down the dropdown well.
* gtkfilesystem.c (gtk_file_path_get_type): New boxed type for the
FilePath.
* test/testfilechooser.c: disable preview widget temporarily.
It's not representative of a good preview widget.
Sun Mar 14 19:26:48 2004 Owen Taylor <otaylor@redhat.com>
#136672, reported by Christian Persch; fixes based
on a patch by Soeren Sandmann.
* gtk/gtkmenu.c: Change the handling of mixed gridded
and non-gridded menu items; the old method was causing
major performance problems even with the "avoid relayout
on destruction" hack put in recently.
Now we first lay out the gridded items and then put the
non-gridded items into empty rows / after the gridded items.
Layout is done in a central menu_shell_ensure_layout(). Also
avoid emitting property notifications when we initially
insert or attach items.
* gtk/gtkmenushell.[ch] gtk/gtkmenu.c: Stop setting the
unused menu_shell->menu_flag, and document it as unused
in the header.
* tests/testactions.c: Add a test of creating/removing
lots of items.
* test/testgtk.c: Add some more cruft to the menu test.
Thu Mar 11 15:59:05 2004 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c (create_spins): Use gtk_entry_set_width_chars()
rather than gtk_widget_set_size_request().
Wed Mar 10 02:41:05 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c: (gtk_path_bar_init), (gtk_path_bar_class_init),
(remove_settings_signal), (gtk_path_bar_dispose),
(gtk_path_bar_style_set), (gtk_path_bar_screen_changed),
(gtk_path_bar_scroll_up), (reload_icons), (change_icon_theme),
(settings_notify_cb), (gtk_path_bar_check_icon_theme),
(get_button_image), (gtk_path_bar_update_button_appearance),
(make_directory_button), (gtk_path_bar_check_parent_path): Support
changes in icon themes.
* gtk/gtkpathbar.h: add two elements
* tests/testfilechooser.c: (main): use gnome-vfs method again to
get more testing.
Mon Mar 8 04:50:12 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (create_path_bar): new function to
consolidate creating the path_bar.
(gtk_file_chooser_default_set_current_folder): no longer need to
pass in the filesystem.
* gtk/gtkpathbar.h: Removed unused set_pixbuf functions in favor
of just setting the filesystem.
* gtk/gtkpathbar.c (gtk_path_bar_finalize): Free root path and
home_dir.
(get_button_image): Add images to path_bar.
(update_button_appearance): use images
(make_directory_button): Clasify buttons based upon location.
(_gtk_path_bar_set_path): no longer need a file-system. Also, add
rerooting, #135845, #135914
* tests/testfilechooser.c: Fix reused error handling.
2004-03-08 Tor Lillqvist <tml@iki.fi>
* tests/testfilechooser.c: Correct localtime_r() emulation on Win32.
Remove a couple of unnecessary Win32-only includes.
Mon Mar 8 01:06:17 2004 Matthias Clasen <maclas@gmx.de>
* tests/testentrycompletion.c: Test dynamic addition/removal.
Sun Mar 7 22:38:49 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkframe.c (gtk_frame_paint): Use ythickness, not
xthickness in the calculation of vertical dimensions.
2004-03-07 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkproperty-win32.c (gdk_screen_get_setting) :
some more settings from system, also reflect some name changes
done a while ago in the x11 backend
* gdk/win32/makefile.msc : build gdkspawn-win32.c
* gtk/gtkdnd.c : gtk_drag_source_[gs]et_target_list, added "Since: 2.4"
* gtk/makefile.msc.in : build gtkpathbar, link shell32.lib
* tests/makefile.msc : some more tests get build
2004-03-05 Federico Mena Quintero <federico@ximian.com>
Fixes#136082 and #135265, patch by Morten Welinder.
* configure.in: Use AC_SYS_LARGEFILE.
* */*.c: #include <config.h>
Tue Mar 2 23:39:55 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdialog.c
(file_chooser_widget_default_realized_size_changed): Split
function into realized and unrealized variants, and consolidate
the handling fo size-changing and default changing.
* gtk/gtkfilechooserembed.[ch] (gtk_file_chooser_embed_class_init):
remove resizable-hints-changed, as it just complicated things.
* gtk/gtkfilechooserdefault.c (update_appearance): Don't emit
resizable-hints-changed.
Wed Mar 3 00:28:59 2004 Matthias Clasen <maclas@gmx.de>
* tests/testcombochange.c: Add an animation mode, to test
how the combobox behaves if the model changes while it is popped
up.
Tue Mar 2 16:47:40 2004 Owen Taylor <otaylor@redhat.com>
* tests/testfilechooser.c (set_filename_existing_nonexistent_cb):
Move the /nonexistant stuff out of the main window,
keep the main window somewhat normal looking.
Tue Mar 2 16:18:43 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_reorder)
* gtk/gtkliststore.c (gtk_list_store_reorder): Fix
up the interpretation of new_order to match what
it means elsewhere, document the meaning of new_order.
* gtk/gtkcombobox.c (gtk_combo_box_model_rows_reordered):
Fix interpretation of new_order.
* tests/testcombochange.c (on_reorder): Fix interpretation
of new_order.
* tests/testcombochange.c (on_reorder): Fix hitting
"reorder" with an empty list.
Tue Mar 2 21:23:30 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Patch from Frederic Crozat, test code from Jean-Philippe
Chancelier. Fixes bug #120479.
* gtk/gtkcombo.c (gtk_combo_popup_list): Make sure popup belongs
to the right window group.
* gtk/gtkmenu.c (gtk_menu_popup): Same
* tests/testsocket.c (main): Pack the plugs into an hbox instead
of a vbox.
* tests/testsocket_common.c: Add a GtkMenuBar, a GtkCombo and a
GtkComboBox to the children.
Tue Mar 2 14:38:23 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_model_row_inserted):
If the model was empty before, select the first inserted
item.
* gtk/gtkcombobox.c (gtk_combo_box_model_row_deleted):
Fix up the logic for the new row to select.
* gtk/gtkcombobox.c (gtk_combo_box_class_init):
Rename "appearance" property to "appears-as-list".
* tests/testcombochange.c tests/Makefile.am: Test case
for combos and dynamically changing models.
2004-03-02 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_set_current_folder): Don't update the
save folder combo if we are already switching folders; based on a
patch by Jonathan Blandford.
* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
Handle failure to insert the path. Based on a patch by Morten
Welinder attached to bug #135380.
* tests/testfilechooser.c (extra_widget_create): Add a bunch of
buttons to test various things.
Tue Mar 2 20:59:23 2004 Matthias Clasen <maclas@gmx.de>
* tests/Makefile.am: Add testentrycompletion.
* tests/testentrycompletion.c: New file to test some of the
more exotic GtkEntryCompletion features.
2004-03-02 Morten Welinder <terra@gnome.org>
* tests/testfilechooser.c (size_prepared_cb): Don't scale images
that are small enough to fit. Avoid using incompatibly typed data
pointer.
Mon Mar 1 19:30:25 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch]: Add gtk_drag_source_set/get_target_list().
(#127499, based on patch from Michael Natterer)
* tests/testgtk.c: Fix bidi strings to display correctly
with new auto-bidi.
Sun Feb 29 22:01:49 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.[ch]: Add gtk_entry_set_alignment()
to allow right-aligned entries and a "xalign"
property. (#59799, patch from Egon Andersen and
Steffen Gutmann)
* gtk/gtkmisc.c (gtk_misc_class_init): Use improved
xalign property description here too.
* tests/testtext.c: UNDERLINE_ERROR test addition
from Nicolas Settons' patch.
Thu Feb 26 22:20:44 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcomboboxentry.h:
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new_text): New
convenience API to construct simple text combos, implemented by
Damon Chaplin.
* tests/testcombo.c: Use gtk_combo_box_entry_new_text.
2004-02-10 Federico Mena Quintero <federico@ximian.com>
Fixes#133995, patch by Morten Welinder <mortenw@gnome.org>.
* tests/prop-editor.c (create_prop_editor): Free the title.
(object_changed): Free the children list.
2004-02-04 Federico Mena Quintero <federico@ximian.com>
Fix#59707.
* gtk/gtklabel.c (gtk_label_focus): Removed, so we don't ignore
the focus chain.
(gtk_label_button_press): Fix prototype.
(gtk_label_button_release): Likewise.
(gtk_label_motion): Likewise.
* tests/testgtk.c (create_message_dialog): For the dialog with
only GTK_BUTTONS_CLOSE, make GTK_RESPONSE_CLOSE the default.
Sun Jan 18 13:16:34 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testgtk.c (create_toolbar): Set a small size request and
make the window resizable, to test mapping/unmapping of buttons.
* gtk/gtktoolbar.c (gtk_toolbar_remove_content,
gtk_toolbar_insert_tool_item): remove these functions.
* gtk/gtktoolbar.c (gtk_toolbar_show_all,
toolbar_content_show_all, gtk_toolbar_hide_all,
toolbar_content_hide_all): New functions.
Ignore show_all/hide_all for buttons created in compatibility mode.
* gtk/gtktoolbar.c (internal_insert_element, gtk_toolbar_show_all,
gtk_toolbar_hide_all): Make sure buttons are ignored by
gtk_toolbar_show_all() and gtk_toolbar_hide_all().
* gtk/gtktoolbar.c: s/regular_widget/compatibility/g
* gtk/gtktoolbar.c (struct _ToolbarContent): Allocate
GtkToolbarChild inline. Get rid of GtkToolbarChildSpace.
* gtk/gtktoolbar.c (toolbar_content_expose): Fix bug where widget
could become NULL.
* gtk/gtktoolbar.c (gtk_toolbar_add): Append new tool items
instead of prepending them.
* gtk/gtktoolbar.c (gtk_toolbar_size_allocate): Use the same
'elapsed' for all items.
* gtk/gtktoolbar.c (struct _GtkToolbarPrivate): Turn booleans
into bitfields.
* gtk/gtktoolbar.c: Many formatting fixes
Mon Jan 12 23:40:34 2004 Matthias Clasen <maclas@gmx.de>
* tests/testmerge.c: Adjust to the new connect_proxy signals.
* gtk/gtkuimanager.c
* gtk/gtkactiongroup.c
* gtk/gtkaction.c: Move the connect_proxy and disconnect_proxy signals
from GtkAction to GtkActionGroup and proxy it on GtkUIManager. This
removes the confusion between the disconnect_/connect_proxy signals
and the (unrelated) virtual functions of the same name and aligns
the setup with the pre_/post_activate signals.
2004-01-12 Jody Goldberg <jody@gnome.org>
* gtk/gtkaction.c (connect_proxy) : only connect activate for menus
with no submenus otherwise it looks like we activate every time a
submenu opens.
2004-01-10 Jody Goldberg <jody@gnome.org>
* gtk/gtkuimanager.c (d) : Add a debug macro to quiet the spew.
s/merge_signals/ui_manager_signals/ for readability.
(gtk_ui_manager_class_init) : add pre_activate and post_activate
signals.
(cb_proxy_pre_activate) : new.
(cb_proxy_post_activate) : new.
(gtk_ui_manager_insert_action_group) : connect the proxies for
GtkActionGroup::pre/post_activate
(gtk_ui_manager_remove_action_group) : disconnect them.
* gtk/gtkactiongroup.c (gtk_action_group_class_init) : add
'sensitive', and 'visible' properties. Also add pre_activate and
post_activate signals to help deal with activations at a higher
level (eg GtkUIManager)
(gtk_action_group_init) : init sensitive and visible
(gtk_action_group_set_property) : add sensitive and visible
(gtk_action_group_get_property) : add sensitive and visible
(gtk_action_group_get_sensitive) : new.
(gtk_action_group_get_visible) : new.
(cb_set_action_sensitivity) : new with minor optimization that only
signals sensitivity changes if the action could possibly change.
(cb_set_action_visiblility) : ditto.
(gtk_action_group_set_sensitive) : new. walk the actions directly
rather than using notify::sensitive because that is simpler, easier
to read, and more efficient.
(gtk_action_group_set_visible) : ditto.
(gtk_action_group_add_action) : Each action can only be in 1 group,
set GtkAction::action_group.
(gtk_action_group_remove_action) : clear it.
(gtk_action_group_add_toggle_actions_full) : warning suppression.
(gtk_action_group_add_radio_actions_full) : warning suppression.
(_gtk_action_group_emit_pre_activate) : new protected routine for use
by GtkAction.
(_gtk_action_group_emit_post_activate) : ditto.
* gtk/gtkaction.c (gtk_action_class_init) : add 'action_group' property.
(gtk_action_init) : initialize it.
(gtk_action_get_property) : get.
(gtk_action_set_property) : set it via
(gtk_action_set_action_group) : new function.
(gtk_action_sync_sensitivity) : new routine to sync proxy sensitivity
with the logical sensitivity (action & group) rather than the simple
action::sensitivity.
(gtk_action_sync_visible) : use gtk_action_is_visible to handle
logical visibility (action & group) rather than the simple
action::visible. Use widget show/hide directly.
(connect_proxy) : handle the custom sensitivity handler.
Make the TOOL_BUTTON signals more general and support TOOL_ITEM
directly, with special cases for TOOL_BUTTON. Still not especially
good it might be useful to handle label/use_underline by parmspec
lookup. Those are likely to be implemented by custom types, and are
assumed to exist in GtkToolItem.
(disconnect_proxy) : disconnect the new sensitivity handler.
(_gtk_action_emit_activate) : add pre/post signals.
(gtk_action_activate) : use logical sensitivity.
(gtk_action_is_sensitive) : logical sensitivity.
(gtk_action_get_sensitive) : actual sensitivity.
(closure_accel_activate) : use logical sensitivity.
Fri Jan 9 00:34:57 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.h:
* gtk/gtkuimanager.c (gtk_ui_manager_get_toplevels): New function to
obtain a list of toplevel widgets constructed by the ui manager.
* gtk/gtkuimanager.h (GtkUIManagerItemType): Change to flags, so that
the values can be combined for gtk_ui_manager_get_toplevels().
* tests/testmerge.c: Add a "Dump toplevels" button to test
gtk_ui_manager_get_toplevels().
Wed Dec 31 02:05:39 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_add_actions_full):
(gtk_action_group_add_toggle_actions_full):
(gtk_action_group_add_radio_actions_full): Pull accelerator key
from the stock item if stock_id is given, but accelerator
not. (Noticed by Jeff Franks and Jody Goldberg)
* tests/testmerge.c: Remove the accelerator from the "Open" entry
to test the above change.
2003-12-14 Hans Breuer <hans@breuer.org>
* gtk/gtkprivate.h gtk/gtkmain.c : handle GTK_DATADIR
similar as the other filesystem placement 'constants' (dynamic
resolving on win32)
* gtk/gtkfilechooserwidget.c : handle file system to win32
renaming here as will
* gtk/gtkfilesystemwin32.c : implement render_icon
* gtk/gtk.def gdk/gdk.def : updated externals
* gdk/win32/gdkdisplay-win32.c : make it compile without
<multimon.h> - i.e. even older sdk
* gdk/win32/gdkevents-win32.c : match resize_timer_proc
with TIMERPROC prototype
* gdk/win32/gdkwindow-win32.c : older msvc does not know
BITMAPV5HEADER (from win xp) either
* gtk/gtkimmodule.c : make it compile even if GTK_LOCALEDIR is
not defined
* tests/testfilechooser.c : recent GLib crashes on
g_print ("%s", NULL) so avoid this
2003-12-10 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
Added toolbar items for the filter separator and the filter item.
(toolbar_create): Add the filter widgets here.
(filter_create): Renamed from create_filter(). Don't store the
alignment in the impl structure, just return it.
(toolbar_show_filters): New function.
(gtk_file_chooser_default_add_filter): Use toolbar_show_filters().
(gtk_file_chooser_default_remove_filter): Likewise.
(gtk_file_chooser_default_constructor): Don't create the filter
widget here.
(struct _GtkFileChooserDefault): Added a field for a current
folder label.
(gtk_file_chooser_default_constructor): Create the folder label.
(gtk_file_chooser_default_set_current_folder): Set the current
folder label.
* tests/testfilechooser.c (main): Dramatically improved the
usability of the extra widget through careful word choice.
2003-11-15 Hans Breuer <hans@breuer.org>
* gdk/makefile.msc gdk/gdk.def
gtk/gtk.def gtk/makefile.msc.in : updated
* tests/makefile.msc : added all the new tests
* gtk/gtkfilefilter.c(finalize) : initialize filter
from object not from itself
* gtk/gtkfilesystemwin32.[hc] : copied from gtkfilesystemunix.[hc]
modified as less as posible to have aworking implementation
on win32. There maybe the desire to merge the unchanged pats into
a common base class.
Also implemented a simple glib based bookmark handling, which
is currently missing in gtkfilesystemunix.[hc] but can be copied
over there.
* gtk/gtkfilechooserwidget.c : conditional include gtkfilesystemwin32.h
* gdk/win32/gdkwindow-win32.c : implement
gdk_window_set_keep_above() and gdk_window_set_keep_below()
* tests/testmerge.c : don't include unistd.h unconditionally,
#define STDOUT_FILENO if it isn't defined
* tests/testfilechooser.c : make it compile on win32
Fri Oct 31 02:43:34 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (get_item_requisition): delete this function
(toolbar_item_is_homogeneous): cache max_homogeneous_pixels
instead of re-calculating for each item.
(gtk_toolbar_size_allocate): Update comments
Thu Oct 30 17:57:53 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (logical_to_physical): Make it work even when
item 0 is a placeholder. (#125826)
* tests/testtoolbar.c: add an assertion that
gtk_toolbar_get_nth_item (0) != NULL
Wed Oct 29 02:54:35 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.[ch] (gtk_toolbar_set_drop_highlight_item): Add this
function; remove gtk_toolbar_highlight_drop_location() and
gtk_toolbar_unhighlight_drop_location().
Also fix bug where the number of overflowed items were miscounted.
Wed Oct 22 23:20:04 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilechooser.[ch] gtk/gtkfilefilter.[ch]
gtk/gtkfilechooserwidget.[ch] gtk/gtkfilechooserdialog.[ch]:
gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]:
Basic framework for the new file selector widget.
* gtk/gtkfilechooserdefault.[ch] gtk/gtkcellrenderersep.[ch]
gtk/gtkfilechooserentry.[ch] gtk/gtkfilesystemmodel.[ch]:
Initial implementation of the GtkFileChooser user interface.
* gtk/gtkfilesystemunix.[ch]: GtkFileSystem implementation
for Unix files.
* configure.in gtk/Makefile.am gtk/xdgmime: Build code
for freedesktop.org MIME system on Unix.
* tests/testfilechooser.c: Test program for GtkFileChooser
* tests/prop-editor.c: Add support for properties on interfaces.
Mon Oct 20 20:27:22 2003 Soeren Sandmann <sandmann@daimi.au.dk>
Add support for OS X like sliding of toolbar items during drag and
drop, (#110919, Dave Bordoley)
Make dnd highlighting the responsibility of the
application. (Fixes#116298, Owen Taylor)
* gtk/gtktoolbar.h: Add prototypes for new API.
* gtk/gtktoolbar.c
(physical_to_logical, logical_to_physical): new functions
converting between "position including placeholders" and "position
excluding placeholders".
(gtk_toolbar_class_init): remove drag_leave and drag_motion
handlers
(struct _ToolbarContent): new struct containing information
related to toolbar items.
(gtk_toolbar_highlight_drop_location): new public function
(gtk_toolbar_unhighlight_drop_location): new public function
* tests/testtoolbar.c
(toolbar_drag_motion, toolbar_drag_leave): new functions
(main): connect to dnd signals. Make the "New" item expand to
make drag and drop more exciting.
2003-10-17 Federico Mena Quintero <federico@ximian.com>
* gtkfilesystemgnomevfs.c
(gtk_file_system_gnome_vfs_get_supports_bookmarks): Removed.
(gtk_file_system_gnome_vfs_set_bookmarks): Removed.
(gtk_file_system_gnome_vfs_add_bookmark): Implement.
(gtk_file_system_gnome_vfs_remove_bookmark): Implement.
* gtkfilechooserprivate.h (struct _GtkFileChooserIface): Replaced
the ::set_shortcut_folders() method with :;add_shortcut_folder()
and ::remove_shortcut_folder().
* gtkfilechooserutils.c (delegate_add_shortcut_folder): New function.
(delegate_remove_shortcut_folder): New function.
(delegate_list_shortcut_folders): New function.
* gtkfilechooserimpldefault.c (create_shortcuts_model): Insert the
Desktop directory as well.
(shortcuts_insert_path): Renamed from shortcuts_append_path; now
takes a position index instead of a parent node iter. Also takes
a GError argument.
(struct _GtkFileChooserImplDefault): Removed the shortcuts_folder
list. It is all kept in the model now.
(shortcuts_append_home): Save whether adding a shortcut for the
home directory was successful.
(shortcuts_append_desktop): Likewise for the desktop.
(shortcuts_append_file_system_roots): Count and save the number of
roots added.
(shortcuts_append_shortcut_folders): Removed.
(gtk_file_chooser_impl_default_add_shortcut_folder): Implement.
(shortcuts_append_bookmarks): Now that we don't have a bookmarks
parent node, don't expand the tree.
(add_bookmark_button_clicked_cb): Use gtk_file_system_add_bookmark().
(remove_bookmark_button_clicked_cb): Use gtk_file_system_remove_bookmark().
(gtk_file_chooser_impl_default_list_shortcut_folders): Get the
folders from the shortcuts model; we no longer keep a separate list.
* gtkfilesystem.h (struct _GtkFileSystemIface): Oops, there
shouldn't be shortcuts-related virtual methods here.
* gtkfilechooser.c (file_paths_to_strings): New helper function.
(gtk_file_chooser_get_filenames): Use file_paths_to_strings().
(gtk_file_chooser_get_uris): Likewise.
(gtk_file_chooser_set_shortcut_folders): Removed.
(gtk_file_chooser_list_shortcut_folders): Return a list of
strings, not of GtkFilePath*.
(gtk_file_chooser_list_shortcut_folder_uris): New function.
(gtk_file_chooser_add_shortcut_folder): New function.
(gtk_file_chooser_remove_shortcut_folder): New function.
(gtk_file_chooser_add_shortcut_folder_uri): New function.
(gtk_file_chooser_remove_shortcut_folder_uri): New function.
(_gtk_file_chooser_add_shortcut_folder): New function.
(_gtk_file_chooser_remove_shortcut_folder): New function.
* gtkfilechooser.h: New enum.
* gtkfilechooser.c (gtk_file_chooser_error_quark): New function.
* gtkfilesystem.c (gtk_file_system_get_supports_bookmarks): Removed.
(gtk_file_system_set_bookmarks): Removed.
(gtk_file_system_add_bookmark): New function.
(gtk_file_system_remove_bookmark): New function.
* gtkfilesystemunix.c
(gtk_file_system_unix_get_supports_bookmarks): Removed.
(gtk_file_system_unix_set_bookmarks): Removed.
(gtk_file_system_unix_add_bookmark): Just a stub for now.
(gtk_file_system_unix_remove_bookmark): Likewise.
* testfilechooser.c (main): Add a shortcut for testing purposes.
Sun Oct 12 00:18:02 2003 Matthias Clasen <maclas@gmx.de>
* tests/testtreeview.c:
* demos/testpixbuf-scale.c:
* tests/prop-editor.c: These files still use option menus,
so turn off GTK_DISABLE_DEPRECATED to fix the build.
Wed Oct 1 22:43:40 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellview.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header,
(gtk_cell_view_set_cell_data): added support for cell data funcs.
* gtk/gtkcombobox.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header, implemented
cell data func support.
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new): updated
for the move to GtkCellLayout.
* tests/testcombo.c (create_combo_box_grid_demo), (main): ditto.
2003-10-01 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_class_init):
(gtk_action_[gs]et_property): Introduce a separate
"hide_if_empty" property for empty menu handling.
(_gtk_action_sync_menu_visible): ...and use it here.
* tests/testmerge.c (main): ...and here.
2003-09-30 Matthias Clasen <maclas@gmx.de>
* tests/merge-*.ui:
* tests/testmerge.c: Test handling of empty menus.
* gtk/gtkuimanager.c (_gtk_menu_is_empty): New function to determine
whether a menu is empty. Used in gtkaction.c.
(update_smart_separators): Also update the visibility of empty menus.
(update_node): When creating a new menu proxy, insert an "Empty" menu
item which only gets shown if the menu is empty.
* gtk/gtkaction.c (gtk_action_class_init): Document the meaning of
"is_important" for menu proxies.
(_gtk_action_sync_menu_visible): New function to sync the visibility
of menu proxies. Used in gtkuimanager.c.
(gtk_action_sync_visible): New function to sync the visibility of
proxies.
2003-09-27 Matthias Clasen <maclas@gmx.de>
* tests/testtext.c: Turn off GTK_DISABLE_DEPRECATED, since
this test uses the soon-to-be-deprecated GtkItemFactory.
* demos/gtk-demo/Makefile.am (demos): Add ui_manager.c,
remove item_factory.c
* demos/gtk-demo/ui_manager.c: Duplicate of item_factory.c
using GtkUIManager instead of GtkItemFactory.
2003-09-27 Matthias Clasen <maclas@gmx.de>
* tests/testmerge.c: Demonstrate the use of the
connect-proxy signal.
* gtk/gtkaction.c (connect_proxy): Add connect-proxy and
disconnect-proxy signals to do small customizations
like displaying tooltips in the statusbar without
custom actions. (#122894, Philip Langdale)
* gtk/gtkuimanager.c (update_node): Don't leak tooltip.
Fri Sep 26 23:49:44 2003 Kristian Rietveld <kris@gtk.org>
Landing the new ComboBox. Note that only gtkcombobox.h and
gtkcomboboxentry.h are public.
* gtk/gtkcellview.[ch], gtk/gtkcellviewmenuitem.[ch],
gtk/gtkcombobox.[ch], gtk/gtkcomboboxentry.[ch]: new files.
* gtk/Makefile.am, gtk/gtk.h: adding the new files.
* tests/testcombo.c: and a new test.
* tests/Makefile.am: adding the new test.
2003-09-22 Matthias Clasen <maclas@gmx.de>
* tests/testmerge.c (main): Initially activate the JUSTIFY_RIGHT
group member to test the fix for #122904.
* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
Add the action to the group before activating it, otherwise we
may end up with multiple active group members. (#122904, Marco
Pesenti Gritti)
2003-09-18 Matthias Clasen <maclas@gmx.de>
Install accelerators on actions, not on proxies, support
accelerator-only actions:
* gtk/gtkmenu.c (get_accel_path): New function to get the accel path
and its lock status either via _gtk_widget_get_accel_path() or by
looking at the accel_path stored in the menu item itself and determining
its lock status by peeking into the contained accel label. This was
already (accidentally) committed a week ago.
* gtk/gtkaction.h (gtk_action_set_accel_group):
(gtk_action_[dis]connect_accelerator): New functions.
* gtk/gtkaction.c (struct _GtkActionPrivate): Add accel_group,
accel_closure and accel_count. We must have a reference to the accel_group,
since we need it in connect_proxy. The count is necessary to ensure
that the accelerator isn't removed before the last proxy requesting
it has been unmerged.
(connect_proxy): Connect the accelerator to the
action now, only set the accel_path on the menuitem.
(remove_proxy): Disconnect the accelerator from the action, not from
the menuitem.
(gtk_action_set_accel_group): Set the accel group.
(gtk_action_[dis]connect_accelerator): Count the number of times
this functions have been called and install/remove the accelerator if
the count leaves/reaches zero.
* gtk/gtkuimanager.h (GtkUIManagerItemType): Add
GTK_UI_MANAGER_ACCELERATOR.
* gtk/gtkuimanager.c (NodeType): Add NODE_TYPE_ACCELERATOR.
(start_element_handler): Create NODE_TYPE_ACCELERATOR nodes from
<accelerator> elements.
(gtk_ui_manager_add_ui): Create NODE_TYPE_ACCELERATOR nodes when
type is GTK_UI_MANAGER_ACCELERATOR.
(update_node): Set the accel group on actions before creating their
proxies. Don't set the accel group on created menus. For
NODE_TYPE_ACCELERATOR nodes, [dis]connect the actions' accelerator.
(print_node): Also emit <accelerator> elements.
* tests/testmerge.c (dump_accels): Add a "Dump Accels" button.
* gtk/gtkuimanager.c (update_smart_separators): New function which
implements "smart" separators by iterating once over the entries of a
menu, hiding and showing separators as necessary.
(update_node): Mark separators used as fences of placeholders as
hidden. Explicitly added separators are marked as smart. Call
update_smart_separators after updating a menu or toolbar node.
Connect update_smart_separators to "notify::visible" signal on menu
and tool items.
* tests/merge-[12].ui: Test smart separators.
* gtk/tmpl/gtkuimanager.sgml: Add a paragraph about smart separators.
2003-09-15 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.[hc]: (gtk_action_group_add_radio_actions):
(gtk_action_group_add_radio_actions_full): Add value parameter to allow
setting the currently selected group member before connecting signals.
(GtkToggleActionEntry): Separate struct for constructing toggle actions,
including a boolean to initialize the action state before connecting
signals.
(gtk_action_group_add_toggle_actions):
(gtk_action_group_add_toggle_actions_full): New functions to construct
toggle actions from an array of GtkToggleActionEntries.
* demos/gtk-demo/appwindow.c:
* tests/testactions.c:
* tests/testmerge.c: Adjust to new action group API.
* gtk/gtk-sections.txt: Add gtk_action_group_add_toggle_actions[_full].
2003-09-10 Federico Mena Quintero <federico@ximian.com>
* TODO: Added an API point about needing a way to fetch the hpaned
position so we can save it.
* gtkfilechooser.c (_gtk_file_chooser_get_paths): Fixed API docs.
(gtk_file_chooser_get_uris): Likewise.
(gtk_file_chooser_get_filenames): Likewise.
* gtkfilechooserdialog.c (file_chooser_widget_file_activated): New
callback, calls gtk_window_activate_default().
* testfilechooser.c (response_cb): Print the selected files if the
user clicks OK.
2003-09-08 Federico Mena Quintero <federico@ximian.com>
* gtkfilesystem.c (gtk_file_info_free): Free the display_key.
* gtkfilechooserimpldefault.c (list_mtime_data_func): New
function.
(create_file_list): Add a modification time column; remove the
size column.
(mtime_sort_func): New callback.
(tree_selection_changed): Add a sorting function for the mtime
column. Have the model fetch the modification time as well.
(tree_selection_changed): Do allow the file list model to show
directories.
* testfilechooser.c (my_new_from_file_at_size): Do not try to read
non-regular files.