Commit Graph

795 Commits

Author SHA1 Message Date
Matthias Clasen
6fa44ae407 Use gtk_image_new_from_icon_name().
2004-10-25  Matthias Clasen  <mclasen@redhat.com>

	* tests/testicontheme.c (main): Use gtk_image_new_from_icon_name().
2004-10-25 14:09:49 +00:00
Matthias Clasen
b63431c82a Add a new type GTK_IMAGE_ICON_NAME for named icons, update the size and
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.
2004-10-25 04:36:39 +00:00
Matthias Clasen
4be48e0e58 Add a "display" option.
* tests/testicontheme.c: Add a "display" option.
2004-10-19 18:49:03 +00:00
Matthias Clasen
e746e7ffb8 Set the locale, tidy up output.
2004-10-19  Matthias Clasen  <mclasen@redhat.com>

	* tests/testicontheme.c: Set the locale, tidy up output.
2004-10-19 04:30:35 +00:00
Paolo Borelli
1cb70ed408 exit on close.
2004-09-30  Paolo Borelli  <pborelli@katamail.com>

	* tests/testellipsize.c: exit on close.
2004-09-30 14:46:21 +00:00
Paolo Borelli
26e50e26b3 add a GtkMenuToolButton.
2004-09-29  Paolo Borelli  <pborelli@katamail.com>

	* tests/testtoolbar.c: add a GtkMenuToolButton.
2004-09-29 06:48:00 +00:00
Manish Singh
3f280a1699 #include <config.h> for HAVE_MALLINFO define, other minor cleanups.
Tue Sep 21 16:55:38 2004  Manish Singh  <yosh@gimp.org>

        * tests/testtreemodel.c: #include <config.h> for HAVE_MALLINFO define,
        other minor cleanups.
2004-09-21 23:53:27 +00:00
Matthias Clasen
6f08d4cf61 Check for mallinfo.
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-21 18:03:57 +00:00
Matthias Clasen
542a674e7c 2.5.3 2004-09-19 05:40:00 +00:00
Matthias Clasen
03a6952c48 Set the cursor to the first selected row instead of always to the first
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-09-14 19:37:48 +00:00
Matthias Clasen
beb69e8c57 Typo fix. 2004-09-09 13:52:16 +00:00
Matthias Clasen
375537fff8 Update sensitivity of the "Select all" button.
2004-09-09  Matthias Clasen  <mclasen@redhat.com>

	* tests/testfilechooser.c (main): Update sensitivity of the "Select all"
	button.
2004-09-09 12:46:25 +00:00
Anders Carlsson
04d65a6d3d Make gtk argument parsing use goption. Add gtk_get_option_group and
2004-09-05  Anders Carlsson  <andersca@gnome.org>

	* gdk/gdk.c: (gdk_arg_class_cb), (gdk_arg_name_cb),
	(gdk_add_option_entries_libgtk_only), (gdk_pre_parse_libgtk_only),
	(gdk_parse_args):
	* gdk/gdk.h:
	* gdk/gdkinternals.h:
	* gdk/linux-fb/gdkmain-fb.c: (_gdk_windowing_init):
	* gdk/win32/gdkmain-win32.c: (_gdk_windowing_init):
	* gdk/x11/gdkdisplay-x11.c: (gdk_display_open):
	* gdk/x11/gdkmain-x11.c: (_gdk_windowing_init):
	* gtk/gtkmain.c: (gtk_arg_debug_cb), (gtk_arg_no_debug_cb),
	(gtk_arg_module_cb), (gtk_arg_warnings_cb),
	(do_pre_parse_initialization), (do_post_parse_initialization),
	(pre_parse_hook), (post_parse_hook), (gtk_get_option_group),
	(gtk_init_with_args), (gtk_parse_args):
	* gtk/gtkmain.h:
	Make gtk argument parsing use goption. Add gtk_get_option_group and
	gtk_init_with_args.

	* tests/testtreemodel.c: (main):
	Use gtk_init_with_args.
2004-09-05 15:09:55 +00:00
Manish Singh
5734f5f7e9 Shut up CVS 2004-08-18 15:38:21 +00:00
Matthias Clasen
3cc0ae605a Use g_message() throughout, add RTL envar for rtl testing.
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 16:52:04 +00:00
Matthias Clasen
a3aa10e5a6 New widget to go along with GtkFontButton and GtkColorButton for use in
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
2004-08-17 16:06:39 +00:00
Morten Welinder
36dfdad411 Comment out mallinfo stuff. Fix g_print %-strings.
2004-08-16  Morten Welinder  <terra@gnome.org>

	* tests/testtreemodel.c (test_run): Comment out mallinfo stuff.
	Fix g_print %-strings.
2004-08-16 19:05:58 +00:00
Soeren Sandmann
15ed3634a9 New function.
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-14 15:59:39 +00:00
Hans Breuer
7405177690 make it compile and more similar to the X11 implementation [backward
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-06 19:20:42 +00:00
Matthias Clasen
ea94ec3672 Add buttons to select and unselect all nodes, make the popup menu actually
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 20:32:26 +00:00
Matthias Clasen
8a7fd5b04f Add testiconview. A test for GtkIconView ...which uses this image.
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-08-04 14:32:45 +00:00
Matthias Clasen
6159834eb7 Some trees in combo boxes.
2004-08-02  Matthias Clasen  <mclasen@redhat.com>

	* tests/testcombo.c: Some trees in combo boxes.
2004-08-02 19:17:19 +00:00
Matthias Clasen
1f93c4359c Change the api for separators to use a separator function instead of a
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.
2004-07-30 20:55:17 +00:00
Matthias Clasen
ccb1f08ef8 Require Pango 1.5.1 (for ellipsisation).
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-22 05:06:39 +00:00
Matthias Clasen
f0505514b2 Don't leak models. (#148128, Tommi Komulainen)
Wed Jul 21 22:17:06 2004  Matthias Clasen  <maclas@gmx.de>

	* tests/testcombo.c (main): Don't leak models.  (#148128,
	Tommi Komulainen)
2004-07-22 02:19:19 +00:00
Matthias Clasen
82877f9ee9 Add some refcount debugging.
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-20 17:10:24 +00:00
Soeren Sandmann
9d2a946813 === Released 2.5.0 ===
Sun Jul 18 17:21:10 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

        * === Released 2.5.0 ===

        * NEWS: updates

        * tests/testcombo.c: Fix compilation
2004-07-20 02:26:06 +00:00
Matthias Clasen
1aa00e5215 Support separators in combo boxes and more generally in tree views
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.
2004-07-07 15:15:35 +00:00
Soeren Sandmann
e47c0d46b1 Add a checkbox to queue an merge/unmerge. Patch from Matthias Clasen.
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-06-05 18:24:53 +00:00
Matthias Clasen
310fd268e7 Support insensitive cells in tree views and combo boxes. 2004-05-27 03:31:17 +00:00
Matthias Clasen
b3e562abcf Add a progress cell renderer, based on the one found in Epiphany. 2004-05-12 16:07:44 +00:00
Matthias Clasen
d5136747a4 Make the second example use the ::match-selected signal to make it
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-10 17:55:49 +00:00
Hans Breuer
a516adebbe tests/makefile.msc is in CVS for a long time, finally added to EXTRA_DIST
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
2004-05-01 13:54:33 +00:00
Matthias Clasen
3f571c18e4 Add a missing cat. (#141070, Chris Sherlock)
2004-04-29  Matthias Clasen  <mclasen@redhat.com>

	* tests/testentrycompletion.c (main): Add a missing
	cat.  (#141070, Chris Sherlock)

	* gtk/gtkrc.c (gtk_rc_check_pixmap_dir): Remove unused
	variable.  (#141022, Chris Sherlock)

	* gtk/gtkcombo.c (gtk_combo_popup_list): Add a missing
	cast.  (#141013, Chris Sherlock)

	* gtk/gtkcellview.c (gtk_cell_view_cell_layout_clear): Remove
	unused variable.  (#141011, Chris Sherlock)
2004-04-29 14:12:20 +00:00
Jonathan Blandford
0aebe34351 Moved search entries into priv data.
Sun Apr 11 15:08:45 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtktreeprivate.h: Moved search entries into priv data.

        * gtk/gtktreeview.c: Prep for type-ahead support.

        (gtk_tree_view_destroy): Destroy the search window explicitly.
        (gtk_tree_view_key_press): Minor change; prep for type-ahead
        (gtk_tree_view_ensure_interactive_directory): New function
        (gtk_tree_view_focus_out): Rework to handle new entry life-cycle.
        (gtk_tree_view_real_start_interactive_search): rework
        (gtk_tree_view_search_dialog_hide): ditto
        (gtk_tree_view_search_delete_event): ditto
        (gtk_tree_view_search_button_press_event): ditto
        (gtk_tree_view_search_key_press_event): ditto
        (gtk_tree_view_search_move): ditto
        (gtk_tree_view_search_init): ditto

        * gtk/gtktreeviewcolumn.c:
        (gtk_tree_view_column_cell_layout_clear): remove unused variable.

        * tests/testfilechooser.c: (main): change
2004-04-11 19:15:24 +00:00
Morten Welinder
99aa131ee8 Plug leak.
2004-03-17  Morten Welinder  <terra@gnome.org>

	* tests/prop-editor.c (object_changed): Plug leak.
2004-03-17 21:38:58 +00:00
Morten Welinder
6cacaf3d15 Plug some leaks and expose others.
2004-03-17  Morten Welinder  <terra@gnome.org>

	* tests/testfilechooser.c (main): Plug some leaks and expose
	others.
2004-03-17 19:01:00 +00:00
Morten Welinder
c25fece766 Don't leak the tooltip object.
2004-03-17  Morten Welinder  <terra@gnome.org>

	* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
	object.
2004-03-17 18:51:03 +00:00
Jonathan Blandford
20808790d2 Rewritten to use the GtkEntryCompletion API more correctly. Now pops down
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.
2004-03-15 06:54:34 +00:00
Owen Taylor
3895bea4df #136672, reported by Christian Persch; fixes based on a patch by Soeren
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.
2004-03-15 02:03:59 +00:00
Hans Breuer
e8a4c8442d gtk/gtkcombobox.c : prototype cell_view_sync_cells() before first usage
2004-03-14  Hans Breuer  <hans@breuer.org>

	gtk/gtkcombobox.c : prototype cell_view_sync_cells() before
	first usage

	gtk/makefile.msc.in : updated 'gtk_public_h_sources'

	tests/makefile.msc : added testspinbutton
2004-03-14 16:02:33 +00:00
Morten Welinder
7bac818972 Ssssh! 2004-03-12 15:51:25 +00:00
Morten Welinder
ed649f3bff Add new testspinbutton.c
2004-03-12  Morten Welinder  <terra@gnome.org>

	* tests/Makefile.am: Add new testspinbutton.c
2004-03-12 15:49:22 +00:00
Owen Taylor
3e69627146 Use gtk_entry_set_width_chars() rather than gtk_widget_set_size_request().
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().
2004-03-11 21:06:16 +00:00
Morten Welinder
4061a44401 Add support for --multiple.
2004-03-10  Morten Welinder  <terra@gnome.org>

	* tests/testfilechooser.c (main): Add support for --multiple.
2004-03-10 14:56:28 +00:00
Jonathan Blandford
c630462c18 Support changes in icon themes.
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.
2004-03-10 07:42:20 +00:00
Morten Welinder
bf4ca3064f Destroy widgets to reveal leaks.
2004-03-09  Morten Welinder  <terra@gnome.org>

	* tests/testfilechooser.c (main): Destroy widgets to reveal leaks.
2004-03-09 15:42:55 +00:00
Jonathan Blandford
59938d927c new function to consolidate creating the path_bar.
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 09:56:34 +00:00
Tor Lillqvist
9d55608cd6 Correct localtime_r() emulation on Win32. Remove a couple of unnecessary
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.
2004-03-08 00:55:21 +00:00
Christian Neumair
4c24377fc0 Fixed typo in entry completion test. 2004-03-08 00:43:31 +00:00
Matthias Clasen
bc830c8827 Test dynamic addition/removal.
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-08 00:08:11 +00:00
Hans Breuer
985e3a24a3 some more settings from system, also reflect some name changes done a
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-07 13:40:19 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
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>
2004-03-06 03:38:59 +00:00
Mark McLoughlin
81ea424862 don't try and store pointers in ints. Fixes 64-bit build.
2004-03-03  Mark McLoughlin  <mark@skynet.ie>

        * tests/testsocket_common.c: (print_hello): don't try and store
        pointers in ints. Fixes 64-bit build.
2004-03-03 19:03:19 +00:00
Morten Welinder
eb7f75b721 Plug leak.
2004-03-03  Morten Welinder  <terra@gnome.org>

	* tests/testfilechooser.c (update_preview_cb): Plug leak.
2004-03-03 14:27:00 +00:00
Jonathan Blandford
bb5a499944 Split function into realized and unrealized variants, and consolidate the
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.
2004-03-03 04:52:01 +00:00
Matthias Clasen
2169f50919 Add an animation mode, to test how the combobox behaves if the model
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.
2004-03-02 23:29:21 +00:00
Owen Taylor
ce52e0776e Move the /nonexistant stuff out of the main window, keep the main window
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.
2004-03-02 21:55:01 +00:00
Owen Taylor
d0f6b48199 gtk/gtktreestore.c (gtk_tree_store_reorder) Fix up the interpretation of
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.
2004-03-02 21:34:19 +00:00
Soeren Sandmann
cddfd994ef Patch from Frederic Crozat, test code from Jean-Philippe Chancelier. Fixes
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.
2004-03-02 20:49:15 +00:00
Owen Taylor
f05cb42db9 If the model was empty before, select the first inserted item.
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 20:42:14 +00:00
Federico Mena Quintero
9133c58b8d Don't update the save folder combo if we are already switching folders;
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.
2004-03-02 20:05:08 +00:00
Matthias Clasen
596cbff960 Add testentrycompletion.
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 19:59:20 +00:00
Jonathan Blandford
fe8838bce2 improve tests a little.
Tue Mar  2 14:38:10 2004  Jonathan Blandford  <jrb@redhat.com>

        * tests/testfilechooser.c (main): improve tests a little.
2004-03-02 19:38:54 +00:00
Morten Welinder
e4cec76b6d Don't scale images that are small enough to fit. Avoid using incompatibly
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.
2004-03-02 17:03:04 +00:00
Owen Taylor
d52caae6d1 Add gtk_drag_source_set/get_target_list(). (#127499, based on patch from
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.
2004-03-02 00:45:33 +00:00
Owen Taylor
4ea9813d23 Add gtk_entry_set_alignment() to allow right-aligned entries and a
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.
2004-03-01 03:30:27 +00:00
Matthias Clasen
1637a9c55b New convenience API to construct simple text combos, implemented by Damon
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-26 21:40:09 +00:00
Michael Meeks
c19aa6739d re-arrange widgets to allow more overflowing toolbar goodness.
2004-02-20  Michael Meeks  <michael@ximian.com>

	* tests/testtoolbar.c (main): re-arrange widgets to allow
	more overflowing toolbar goodness.
2004-02-20 16:20:20 +00:00
Federico Mena Quintero
863252b654 Don't set a default size for the dialog - Federico 2004-02-14 02:11:47 +00:00
Federico Mena Quintero
ab09a860ed Fixes #133995, patch by Morten Welinder <mortenw@gnome.org>.
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-10 17:49:14 +00:00
Federico Mena Quintero
9a98cd8f87 Fix #59707.
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.
2004-02-04 21:55:33 +00:00
Hans Breuer
2d19ee19be new GTK_STOCK_NETWORK ... gtk/gtkstock.[hc] : ... define ...
2004-01-28  Hans Breuer  <hans@breuer.org>

	* gtk/stock-icons/stock_network_(16|24).png : new GTK_STOCK_NETWORK ...
	  gtk/gtkstock.[hc] : ... define ...
	  gtk/gtkiconfactory.c : ... register ...
	  gtk/stock-icons/Makefile.am gtk/stock-icons/makefile.msc : ... compile ...
	* gtk/gtkfilesystemwin32.c : ... and use. Also adapt to recent
	IFace changes.

	* gtk/gtk.def : added a bunch of new exported symbols

	* tests/testfilechooser.c (no_backup_files_filter) : don't crash
	on filter_info->display_name being NULL

	* tests/testgtk.c : make testgtk --bench=all work again
2004-01-28 21:46:02 +00:00
Soeren Sandmann
accc299dfa Set a small size request and make the window resizable, to test
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
2004-01-18 12:28:38 +00:00
Jody Goldberg
c73ab06ef5 Adjust to the new connect_proxy signals.
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.
2004-01-12 22:45:45 +00:00
Matthias Clasen
f2bb20cc15 New function to obtain a list of toplevel widgets constructed by the ui
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().
2004-01-08 23:37:34 +00:00
Matthias Clasen
e902118f0f Pull accelerator key from the stock item if stock_id is given, but
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-31 01:05:57 +00:00
Hans Breuer
4acd98a836 handle GTK_DATADIR similar as the other filesystem placement 'constants'
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-14 19:03:02 +00:00
Federico Mena Quintero
c9c99b3f1b Added toolbar items for the filter separator and the filter item.
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-12-10 20:49:44 +00:00
Kristian Rietveld
a4e8e3dee5 grrrr. broken pipe. 2003-11-16 23:20:23 +00:00
Hans Breuer
947b32b7dc updated added all the new tests
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
2003-11-15 20:35:55 +00:00
Soeren Sandmann
eb3f5776ac delete this function (toolbar_item_is_homogeneous): cache
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
2003-10-31 02:10:03 +00:00
Soeren Sandmann
aca1b6f391 Make it work even when item 0 is a placeholder. (#125826) add an assertion
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
2003-10-30 17:08:49 +00:00
Soeren Sandmann
f36e68a1e8 Add this function; remove gtk_toolbar_highlight_drop_location() and
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.
2003-10-29 01:58:38 +00:00
Søren Sandmann Pedersen
2ce4f1bc5b Broken pipe 2003-10-25 19:59:31 +00:00
Owen Taylor
9bca8eced6 cvsignore updates 2003-10-23 04:31:28 +00:00
Owen Taylor
b3bae3b40a gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: Basic framework
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.
2003-10-23 04:22:32 +00:00
Soeren Sandmann
7c659465e2 Add support for OS X like sliding of toolbar items during drag and drop,
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-20 18:56:05 +00:00
Federico Mena Quintero
b49a5ec5b4 Removed. (gtk_file_system_gnome_vfs_set_bookmarks): Removed.
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.
2003-10-18 04:29:40 +00:00
Kristian Rietveld
d4627e1da4 Still uses option menus, so turn off GTK_DISABLE_DEPRECATED.
Mon Oct 13 19:41:55 2003  Kristian Rietveld  <kris@gtk.org>

	* tests/testmenus.c: Still uses option menus, so turn off
	GTK_DISABLE_DEPRECATED.
2003-10-13 17:43:48 +00:00
Matthias Clasen
999256120a These files still use option menus, so turn off GTK_DISABLE_DEPRECATED to
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.
2003-10-11 22:21:04 +00:00
Matthias Clasen
7d7bbef321 Remove an extraneous unref. (#122336, Frederic Crozat)
Sun Oct  5 23:59:03 2003  Matthias Clasen  <maclas@gmx.de>

	* tests/testsocket.c (child_read_watch): Remove an
        extraneous unref.  (#122336, Frederic Crozat)
2003-10-05 22:00:49 +00:00
Kristian Rietveld
40743e126f implement the GtkCellLayout interface, drop packing/attribute/cell data
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 20:51:54 +00:00
Matthias Clasen
6e87629f1a Introduce a separate "hide_if_empty" property for empty menu handling.
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-10-01 19:07:36 +00:00
Matthias Clasen
57f13d815d Test handling of empty menus.
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-30 20:55:24 +00:00
Matthias Clasen
e4507b6018 Turn off GTK_DISABLE_DEPRECATED, since this test uses the
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-26 23:33:46 +00:00
Matthias Clasen
eeed9d1890 Demonstrate the use of the connect-proxy signal.
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.
2003-09-26 23:01:32 +00:00
Kristian Rietveld
c920afd9c5 Landing the new ComboBox. Note that only gtkcombobox.h and
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-26 21:57:06 +00:00
Matthias Clasen
cf639f4168 Initially activate the JUSTIFY_RIGHT group member to test the fix for
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-22 08:54:23 +00:00
Matthias Clasen
0ceb0db081 Install accelerators on actions, not on proxies, support accelerator-only
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.
2003-09-17 23:58:28 +00:00