Commit Graph

903 Commits

Author SHA1 Message Date
Matthias Clasen
05e78f9805 Plug some leaks.
2007-03-10  Matthias Clasen <mclasen@redhat.com>

        * tests/print-editor.c: Plug some leaks.



svn path=/trunk/; revision=17452
2007-03-10 05:52:29 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Kristian Rietveld
31e8b394cc also handle keyboard tooltips. (#408325, Matthias Clasen).
2007-02-16  Kristian Rietveld  <kris@imendio.com>

	* tests/testtooltips.c (query_tooltip_text_view_cb): also handle
	keyboard tooltips. (#408325, Matthias Clasen).


svn path=/trunk/; revision=17313
2007-02-16 20:10:48 +00:00
Emmanuele Bassi
4a559d6ec8 Add support for both prepending and appending custom menu items.
2007-02-09  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkrecentchoosermenu.c: Add support for both prepending
	and appending custom menu items.

	(gtk_recent_chooser_menu_constructor): Add a placeholder menu
	item for the empty menu case, and for giving us a starting
	point for the recent items populating process.

	(gtk_recent_chooser_menu_insert_item),
	(gtk_recent_chooser_menu_dispose_items): Insert an item at
	the position following the placeholder (and find that position
	if needed).

	(idle_populate_func), (idle_populate_clean_up): Show the
	placeholder menu item, instead of creating one each time.

	(gtk_recent_chooser_menu_populate): Kill some indirections
	and hide the placeholder before populating the menu.

	(set_recent_manager): Remember to remove the idle population
	source if the manager changes.

	* tests/testrecentchoosermenu.c: Test the appending and
	prepending of the menu items to the recent chooser menu
	widget.

svn path=/trunk/; revision=17281
2007-02-09 14:24:19 +00:00
Emmanuele Bassi
ada1782221 Keep count of the displayed items to build the menu items mnemonic instead
2007-02-08  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkrecentchoosermenu.c (idle_populate_func): Keep count
	of the displayed items to build the menu items mnemonic instead
	of the overall item count. (#377164)

	(idle_populate_clean_up): Append a menu item if all the items
	got filtered in the idle populate function. (#405696)

svn path=/trunk/; revision=17277
2007-02-08 14:22:20 +00:00
Tim Janik
8a8202ce13 applied patch from Xan Lopez which adds GTK_BUTTONBOX_CENTER to
Thu Feb  8 13:07:08 2007  Tim Janik  <timj@imendio.com>

        * applied patch from Xan Lopez which adds GTK_BUTTONBOX_CENTER to
        GtkButtonBox (bug #336159).

        * gtk/gtkenums.h:
        * gtk/gtkvbbox.c, gtk/gtkhbbox.c, gtk/gtkbbox.c:
        support GTK_BUTTONBOX_CENTER.

        * tests/testbbox.c: new button box test, which allows testing of 
        the various button box properties.

        * tests/testgtk.c: added GTK_BUTTONBOX_CENTER. to button box test.



svn path=/trunk/; revision=17276
2007-02-08 12:11:02 +00:00
Kristian Rietveld
af7f77d97b remove unused get of has_tooltip.
2007-02-06  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (find_topmost_widget_coords_from_event):
	remove unused get of has_tooltip.

	* tests/testtooltips.c (query_tooltip_tree_view_cb): use the
	portable g_snprintf instead of snprintf.


svn path=/trunk/; revision=17266
2007-02-06 13:13:19 +00:00
Kristian Rietveld
0ef946ed64 New tooltips API.
2007-02-06  Kristian Rietveld  <kris@imendio.com>

	New tooltips API.

	* gtk/Makefile.am
	* gtk/gtk.h
	* gtk/gtk.symbols: build system foo.

	* gtk/gtkmain.c (gtk_main_do_event): call tooltip event handler
	hook for appropriate events.

	* gtk/gtkmarshalers.list: add BOOLEAN:INT,INT,BOOLEAN,OBJECT.

	* gtk/gtkrc.c: add style for gtk-tooltip.

	* gtk/gtksettings.c (gtk_settings_class_init): make the
	different tooltip timeouts configurable.

	* gtk/gtkwidget.[ch]: add new properties, signals, make sure
	tooltips are hidden on unmap, destroy, update window event
	mask on realize, hook into focus change and show help
	handlers.

	* gtk/gtkwindow.h: move GtkWindow typdef to gtkwidget.h ...

	* gtk/gtktooltip.[ch]: new files.

	* tests/Makefile.am
	* tests/testtooltips.c: add test application.


svn path=/trunk/; revision=17264
2007-02-06 10:25:21 +00:00
Matthias Clasen
0030448e26 Fix GtkStatusIcon to not take up space on the panel if it is invisible.
2007-01-27  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkstatusicon.c:
        * gtk/gtktrayicon-x11.c: Fix GtkStatusIcon to not
        take up space on the panel if it is invisible.  (340110, Christian
        Persch)

        * tests/teststatusicon.c:
        * tests/Makefile.am: Updates



svn path=/trunk/; revision=17224
2007-01-27 05:51:19 +00:00
Matthias Clasen
8ce94262f1 Implement editing of flags.
2006-12-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/prop-editor.c: Implement editing of flags.


svn path=/trunk/; revision=16985
2006-12-31 00:49:44 +00:00
Matthias Clasen
c5be44fd0a Display children of containers and cell renderers of cell layouts.
2006-12-29  Matthias Clasen  <mclasen@redhat.com>

        * tests/prop-editor.c: Display children of containers
        and cell renderers of cell layouts.
2006-12-29 14:54:18 +00:00
Matthias Clasen
721c3bc101 Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * *.c: Replace a lot of idle and timeout calls by
        the new gdk_threads api.
2006-12-22 19:10:43 +00:00
Matthias Clasen
f905c6cf68 typo fix 2006-12-22 15:39:09 +00:00
Matthias Clasen
d9a6a829ce Make it possible to track the embeddedness of statusicon (#387215, Martyn
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        Make it possible to track the embeddedness of
        statusicon (#387215, Martyn Russell, patch by Christian
        Persch)

        * gtk/gtkstatusicon.c: Add orientation and embedded properties.
        * gtk/gtkplug.c:
        * gtk/gtkplug-x11.c: Add an embedded property.
        * tests/teststatusicon.c: Test the new properties.
2006-12-22 07:18:21 +00:00
Mark McLoughlin
8241b0b7dd Fixes bug #376502 - multi-screen support for GtkStatusIcon
2006-11-19  Mark McLoughlin  <mark@skynet.ie>

        Fixes bug #376502 - multi-screen support for GtkStatusIcon

        * gtk/gtkstatusicon.[ch]:
        (gtk_status_icon_set_screen),
        (gtk_status_icon_get_screen): add multi-screen API. Allows
        an app to display an icon on a non-default screen
        (gtk_status_icon_class_init),
        (gtk_status_icon_set_property),
        (gtk_status_icon_get_property): add a "screen" property

        * tests/teststatusicon.c: update to test on multiple screens
2006-11-19 16:22:23 +00:00
Kristian Rietveld
faaf7814a4 connect to notify::popup-shown instead of popup-show (the latter does not
2006-10-18  Kristian Rietveld  <kris@imendio.com>

	* tests/testcombo.c (main): connect to notify::popup-shown instead of
	popup-show (the latter does not exist).
2006-10-18 12:06:42 +00:00
Behdad Esfahbod
ec366a4799 Update. 2006-10-02 17:33:08 +00:00
Tim Janik
fb12bbcebb added GtkArrow::arrow-scaling style property to control the arrow/border
Tue Sep 19 17:00:04 2006  Tim Janik  <timj@imendio.com>

        * gtk/gtkarrow.c: added GtkArrow::arrow-scaling style property to
        control the arrow/border ratio within the allocation.

        * tests/testgtk.c: added a GtkArrow to handle box test.

        * tests/testgtkrc: test ::arrow-scaling property.
2006-09-19 15:51:19 +00:00
Tim Janik
259980785a intialize random number generator state upon program start, to enable
Thu Sep 14 12:28:51 2006  Tim Janik  <timj@imendio.com>

        * tests/testrichtext.c (main): intialize random number generator state
        upon program start, to enable truely random testing.
2006-09-14 10:31:40 +00:00
Tim Janik
2c0d76bfa2 fixed compiler warnings.
Mon Sep 11 14:22:39 2006  Tim Janik  <timj@imendio.com>

        * tests/testgtk.c: fixed compiler warnings.
2006-09-11 12:24:32 +00:00
Kristian Rietveld
023cb79cd2 change file_exists_and_is_not_folder checks to get the file info for the
2006-09-03  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkfilechooserdefault.c (save_entry_get_info_cb),
	(file_exists_get_info_cb), (gtk_file_chooser_default_should_respond):
	change file_exists_and_is_not_folder checks to get the file info
	for the path directly instead of querying the current file folder
	of the save entry.

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault): add
	new field.

	* tests/autotestfilechooser.c (wait_for_idle_idle), (wait_for_idle),
	(test_reload_sequence), (test_button_folder_states_for_action): wait
	for idle after setting a folder to ensure the async operations to load
	the folder are finished,
	(test_confirm_overwrite), (test_confirm_overwrite_for_path):
	factor out test_confirm_overwrite code so we can add tests for more
	paths more easily.
2006-09-03 20:47:54 +00:00
Tim Janik
219dc5bdee allow (most) windows to be resizable. added ellipsization settings to
Tue Aug 29 11:57:40 2006  Tim Janik  <timj@imendio.com>

        * tests/testgtk.c: allow (most) windows to be resizable.
        added ellipsization settings to progress bars.
2006-08-29 10:01:02 +00:00
Michael Natterer
0fa6144940 don't write out </apply_tag> for tags that have already been closed by the
2006-08-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktextbufferserialize.c (serialize_text): don't write out
	</apply_tag> for tags that have already been closed by the logic
	which turns overlapping spans into XML-able trees. Fixes broken
	XML when there are overlapping tags in the buffer. Also free two
	leaked GLists and did some cleanup.

	* tests/Makefile.am
	* tests/testrichtext.c: new test which creates randomly tagged
	GtkTextBuffers and serializes/deserializes them.
2006-08-28 16:14:42 +00:00
Federico Mena Quintero
f459043f9a Renamed to gtk_file_system_create() so that it will get exported and we
2006-08-23  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilesystem.[ch] (_gtk_file_system_create): Renamed to
	gtk_file_system_create() so that it will get exported and we can
	use it in the test program.

	* gtk/gtk.symbols: Added gtk_file_system_create.

	* gtk/gtkfilechooserdefault.c (set_file_system_backend): Use
	gtk_file_system_create().

	* tests/autotestfilesystem.c: New file with automatic tests for
	the async callbacks and cancelation policy of GtkFileSystem.

	* tests/Makefile.am: Added autotestfilesystem.
2006-08-23 21:59:18 +00:00
Federico Mena Quintero
ad0ca3897b Enable "/" and "~" as bindings to activate the location entry again. Fixes
2006-08-17  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserdefault.c
	(_gtk_file_chooser_default_class_init): Enable "/" and "~" as
	bindings to activate the location entry again.  Fixes bug #340856.
	(tree_view_keybinding_cb): Likewise.
	(trap_activate_cb): Likewise.
	(location_popup_handler): Handle the "path" argument again; set it
	as the text on the location entry.
	(location_set_user_text): New helper function.
	(load_setup_timer): Fix comment.

	* tests/autotestfilechooser.c (main): Oops, enable all the tests again.
2006-08-17 21:31:08 +00:00
Paolo Borelli
2bca4a48d0 make sure the has-selection property is updated when the delection is
2006-08-17  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtktextbuffer.c: make sure the has-selection property is
	updated when the delection is deleted. Bug #329752
	* tests/testtext.c: add a copy menu item and show how to
	update its sensitivity tracking the has-selection property.
2006-08-17 01:12:02 +00:00
Matthias Clasen
ab299968d0 Don't allow dragging a notebook tab to one of its children. (#348626,
2006-08-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_drag_motion): Don't allow
	dragging a notebook tab to one of its children.  (#348626,
	Benjamin Otte)
2006-08-06 04:10:11 +00:00
Federico Mena Quintero
b87930d7ee Argh, initialize "passed"! (set_filename_timeout_cb): Renamed from
2006-07-19  Federico Mena Quintero  <federico@novell.com>

	* tests/autotestfilechooser.c (test_black_box): Argh, initialize
	"passed"!
	(set_filename_timeout_cb): Renamed from timeout_cb().
	(test_confirm_overwrite): New function, test confirmation before
	overwriting a file in SAVE mode.
2006-07-20 20:21:10 +00:00
Federico Mena Quintero
3f498adfb0 Fix https://bugzilla.novell.com/show_bug.cgi?id=184875 - make the location
2006-07-18  Federico Mena Quintero  <federico@novell.com>

	Fix https://bugzilla.novell.com/show_bug.cgi?id=184875 - make the
	location entry in Save mode preserve the stuff from
	set_filename(); it was overwriting it with $cwd.

	This is the same fix for
	http://bugzilla.gnome.org/show_bug.cgi?id=347066

	* tests/autotestfilechooser.c: (test_black_box): Added black-box
	test for set_filename() and set_current_name().

	* gtk/gtkfilechooser.c (gtk_file_chooser_get_type): Cast to
	GClassInitFunc in the call to g_type_register_static_simple(), to
	avoid a compiler warning.

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault):
	Added a browse_files_last_selected_name field.  We'll copy the
	logic from gtkfilesel.c to see when to clear the location entry.
	(struct _GtkFileChooserDefault): Removed the
	processing_pending_selections field.

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize):
	Free impl->browse_files_last_selected_name.
	(pending_select_paths_process): Don't use
	impl->processing_pending_selections.
	(update_chooser_entry): Keep track of the name that was last
	selected in the file list.  We use this to know when to clear the
	location entry.  The logic is similar to that of
	gtkfilesel.c:gtk_file_selection_file_changed().  This also lets us
	get rid of the processing_pending_selections flag.
	(update_chooser_entry): Clear the entry if we didn't have a
	selection before.
	(location_switch_to_filename_entry): Do not set $cwd as the
	contents of the location entry here...
	(location_popup_handler): ... but do it here instead, only as the
	result of the user asking to turn on the location entry.
	(gtk_file_chooser_default_get_paths): If the location entry is
	empty, do the fallback of seeing if it is sensible to say that
	$cwd is the selected path.
	(gtk_file_chooser_default_update_current_folder): Don't set the
	text of the location entry; this is no longer needed with the
	fixes above.
	(shortcuts_activate_iter): Clear the location entry when
	activating a shortcut if we are not in SAVE mode.  This keeps the
	contents of the location entry consistent even when switching
	folders via the shortcuts.
2006-07-18 16:36:19 +00:00
Matthias Clasen
e6cdab1bfc Don't open a display connection.
2006-06-18  Matthias Clasen  <mclasen@redhat.com>

	* tests/testnouiprint.c (main): Don't open a display connection.

	* gtk/gtkprintbackend.c (gtk_print_backend_load_modules): Make
	this work without a display connection.  (339702, Alexander Larsson)
2006-06-19 03:52:10 +00:00
Matthias Clasen
d9d210ad23 Add a "Preview" menu item.
2006-06-16  Matthias Clasen  <mclasen@redhat.com>

	* tests/print-editor.c: Add a "Preview" menu item.
2006-06-16 16:39:09 +00:00
Matthias Clasen
ada7aa635e fix build 2006-06-09 01:55:29 +00:00
Matthias Clasen
4c8e92f4d6 Update for api changes.
2006-06-08  Matthias Clasen  <mclasen@redhat.com>

	* tests/print-editor.c: Update for api changes.
2006-06-08 19:16:29 +00:00
Alexander Larsson
79041f07cd Update windows to build with new APIs and first cut at preview work.
2006-06-08  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkprintoperation-win32.c:
	Update windows to build with new APIs and first cut
	at preview work.

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation.c
	Various updates needed when making the preview work on win32.

	* tests/print-editor.c:
	Print, don't preview.
2006-06-08 09:09:50 +00:00
Matthias Clasen
f9d3a6aba2 Update callers 2006-06-08 01:08:16 +00:00
Alexander Larsson
9bea38595f Clean up APIs: Make async a setting instead of separate calls. Combine
2006-06-07  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation.[ch]:
	Clean up APIs:
	Make async a setting instead of separate calls.
	Combine settings like show_dialog, show_preview and pdf_target into
	an action enum that you pass to gtk_print_dialog_run().

	* tests/print-editor.c:
	* tests/testnouiprint.c:
	* tests/testprint.c:
	* demos/gtk-demo/printing.c:
	Update to new APIs
2006-06-07 15:09:03 +00:00
Alexander Larsson
fad69ba06c Add gtkprintoperationpreview.[ch] Set default preview command. Hardcoded
2006-06-02  Alexander Larsson  <alexl@redhat.com>

	* gtk/Makefile.am:
	Add gtkprintoperationpreview.[ch]
	Set default preview command. Hardcoded for now.

	* gtk/gtkmarshalers.list:
	Add BOOLEAN:OBJECT,OBJECT,OBJECT

	* gtk/gtkprintbackend.c:
	Add preview command property.

	* gtk/gtkprintcontext.[ch]:
	Make less dependent on PrintOperation for output settings
	Externally set cairo_t and dpi. Resettable.
	Create fontmap without metrics hinting (so that print preview
	text layout doesn't depend on zoom level).

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation.[ch]:
	Initial work on print preview API and default implementation
	using an external preview app.

	* gtk/gtkprintoperation-win32.c:
	Some needed updates. Not done, needs more work.

	* gtk/gtkprintoperationpreview.[ch]:
	New interface used in print preview api.

	* gtk/gtkprintunixdialog.c:
	Add print preview dialog.

	* tests/print-editor.c:
	Test using an custom print preview widget.
2006-06-02 15:16:13 +00:00
Matthias Clasen
b900778ffd Small tweaks 2006-06-01 16:41:40 +00:00
Alexander Larsson
50d17b73b6 Further updates from the GtkPrintContext functions rename.
2006-05-31  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtk.symbols:
	* demos/gtk-demo/printing.c:
	* tests/print-editor.c:
	* tests/testnouiprint.c:
	* tests/testprint.c:
	* tests/testprintfileoperation.c:
	Further updates from the GtkPrintContext functions rename.

	* modules/printbackends/cups/gtkcupsutils.c:
	Always set requesting-user-name when doing cups requests.
2006-05-31 14:06:02 +00:00
Matthias Clasen
7f6f61c9ff Custom tab label 2006-05-24 16:15:15 +00:00
Alexander Larsson
d2cb6c6eb2 Make sure grab-notify is emitted on toplevels as well as child widgets.
2006-05-22  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkmain.c:
	Make sure grab-notify is emitted on toplevels as well as
	child widgets.

	* gtk/Makefile.am:
	* gtk/gtkwin32embedwidget.[ch]
	Add new widget used for win32 port to embed gtk+
	widgets in windows dialog.

	* gtk/gtkmarshalers.list:
	Add POINTER:VOID

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation.[ch]:
	Generic support for custom widgets in print dialog.

	* gtk/gtkprintoperation-win32.c:
	Implement custom widget support for win32.

	* tests/print-editor.c:
	Allow setting of font using custom widgets in the print dialog.
2006-05-22 17:19:10 +00:00
Behdad Esfahbod
3023c03a36 Update. 2006-05-22 00:39:48 +00:00
Kristian Rietveld
62479cafaf sssssssssh 2006-05-20 12:46:30 +00:00
Alexander Larsson
3f529199e5 Added gtk_print_job_set/get_track_print_status
2006-05-15  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkprintjob.[ch]:
	Added gtk_print_job_set/get_track_print_status

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation.[ch]:
	Add gtk_print_operation_set_track_print_status.

	* gtk/gtkprintoperation-unix.c:
	Implement track_print_status on unix

	* gtk/gtkprintoperation-win32.c:
	Implement track_print_status on win32

	* gtk/gtk.symbols:
	Added symbols

	* modules/printbackends/cups/gtkprintbackendcups.c:
	Implement track_print_status for cups

	* tests/print-editor.c:
	Test track_print_status.
2006-05-15 16:22:38 +00:00
Alexander Larsson
c459feaab1 Fix build errors.
2006-05-12  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkrecentmanager.c:
	Fix build errors.

	* gtk/gtk.symbols:
	* demos/gtk-demo/printing.c:
	* gtk/gtkprintoperation-win32.c:
	* gtk/gtkprintoperation.[ch]:
	* gtk/gtkprintsettings.[ch]:
	* modules/printbackends/cups/gtkprintbackendcups.c:
	* modules/printbackends/lpr/gtkprintbackendlpr.c:
	* modules/printbackends/pdf/gtkprintbackendpdf.c:
	* tests/print-editor.c:
	* tests/testnouiprint.c:
	* tests/testprint.c:
	* tests/testprintfileoperation.c:
	Rename functions from nr_of_pages to n_pages, and num_copies to
	n_copies to match other gtk+ names.

	* gtk/gtkmenu.c: (gtk_menu_popdown):
	Only re-set window group on popdown if we set it on popup (i.e.
	if there is a parent menu shell).
	Fixed part of bug #340401

	* gtk/gtkwindow.c:
	Add (contruct) property "transient-for" to GtkWindow. This
	is needed for the fix to bug #340401.

	* gtk/gtkprintunixdialog.c:
	Use the transient-for property on construction and populate the dialog
	with widgets after that. This fixes bug #340401.
	More n_pages renames.
2006-05-12 09:47:58 +00:00
Matthias Clasen
2fba613b4d 2.9.0 2006-05-05 16:21:19 +00:00
Alexander Larsson
719050ed1f Implement per-page paper sizes.
2006-05-05  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkprintoperation-unix.c:
	Implement per-page paper sizes.

	* gtk/gtkprintoperation.c:
	Implement per-page paper sizes for pdf output.
	Make gtk_print_operation_set_pdf_target() work again

	* tests/Makefile.am:
	* tests/testprint.c:
	* tests/testprintfileoperation.[ch]:
	Add more test code for printing support.
	This tests per-page paper sizes & orientation and
	deriving from GtkPrintOperation.
2006-05-05 11:03:33 +00:00
Alexander Larsson
c36d8f3cb3 Added new symbols
2006-05-04  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtk.symbols:
	Added new symbols

	* gtk/gtkpagesetupunixdialog.c:
	* gtk/gtkprintunixdialog.c:
	Destroy backends when finalizing dialogs.
	Fix printer leak in selected_printer_changed.

	* gtk/gtkprintbackend.[ch]:
	Convert from interface to baseclass.
	Move printer hashtable here so that the baseclass can handle
	the slightly complicated ownership model.
	Add gtk_print_backend_destroy which runs the dispose method,
	causing the ref-cycles between the backend and its printers
	to be broken.
	Add gtk_print_backend_unref_at_idle().

	* gtk/gtkprinter.[ch]:
	GtkPrinter objects now ref their backend so that its always
	availible, since its needed for the printer object to work.
	This causes a reference-cycle that is broken using
	gtk_print_backend_destroy.
	Add gtk_printer_compare.

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation.c:
	Implement !show_dialog for unix.
	Make sure the print data is fully spooled before returning
	from a sync run_dialog.


	* modules/printbackends/cups/gtkcupsutils.[ch]:
	Add gtk_cups_request_ipp_add_strings

	* modules/printbackends/cups/gtkprintbackendcups.c:
	* modules/printbackends/cups/gtkprintercups.c:
	* modules/printbackends/lpr/gtkprintbackendlpr.c:
	* modules/printbackends/pdf/gtkprintbackendpdf.c:
	Convert backends to derive instead of implementing interface.
	Move common code into baseclass.
	CUPS:
	  Remove the printer polling in dispose, not finalize.
	  In the cups watch, remove the backend at idle instead of
	  immediately, since the unref can cause the module to be unloaded.
	  Limit the number of printer attributes requested
	  Get printer uri in initial printer listing so that we can use
	  the printer object immediately.

	* tests/Makefile.am:
	* tests/testnouiprint.c:
	Add testcase for !show_dialog.
2006-05-04 13:43:32 +00:00
Federico Mena Quintero
d955928bd5 Merged the federico-filename-entry branch, to fix bug #136541. Combined
2006-05-03  Federico Mena Quintero  <federico@novell.com>

	Merged the federico-filename-entry branch, to fix bug #136541.
	Combined ChangeLogs:

	2006-04-17  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserdefault.c (pending_select_paths_process):
	Oops, we *do* need to check that we are in OPEN mode before
	selecting the first row in the file list.  See
	https://bugzilla.novell.com/show_bug.cgi?id=166906
	(gtk_file_chooser_default_get_paths): If we are in the case for
	the file list, and the list has no selected rows, jump to the case
	for the filename entry.  This is so that

	       1. The user types a filename in the SAVE filename entry
	          ("foo.txt").

	       2. He then double-clicks on a folder ("bar") in the file
		  list.

	will yield the expected "bar/foo.txt" selection.

	2006-03-29  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkpathbar.c (gtk_path_bar_init): Reduce the inter-button
	spacing to 0.

	* gtk/gtkfilechooserdefault.c (browse_widgets_create): Make the
	location label bold.

	2006-03-29  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserdefault.c (location_mode_set): Just change the
	location_mode field if we are in SAVE/CREATE_FOLDER modes.
	(gtk_file_chooser_default_get_paths): Get the path based on the
	currently focused widget, or the last-focused widget.  This is
	what we should have been doing in the beginning, but it worked out
	fine because we didn't have the possibility of a filename entry in
	OPEN mode.
	(gtk_file_chooser_default_should_respond): Handle the case where
	the last focused widget is the location_entry.

	2006-03-28  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechoosersettings.[ch]: New files with a simple
	framework for saving/loading settings from the file chooser in
	$XDG_CONFIG_HOME/gtk-2.0/gtkfilechooser.

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_unmap):
	Save the current settings.
	(settings_save): New helper function.  We save the location_mode
	and show_hidden flags.
	(gtk_file_chooser_default_map): Load the settings.
	(settings_load): New helper function.

	* gtk/gtkfilechooserentry.c
	(_gtk_file_chooser_entry_set_file_part): Oops, don't modify
	in_change.  Our handlers are what set the file_part, so they
	*must* be run when we modify the text.

	2006-03-27  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault):
	Removed the save_file_name_entry.  We'll make this be the same as
	the location_entry widget.
	(struct _GtkFileChooserDefault): Leave only location_button,
	location_entry_box, location_label, location_entry.  We'll use a
	single toggle button for the location entry, which will appear
	below the path bar.
	(struct _GtkFileChooserDefault): Added a
	processing_pending_selections flag.

	* gtk/gtkfilechooserdefault.c (save_widgets_create): Destroy the
	old location_entry if necessary, and hide the location toggle
	widgets.
	(update_chooser_entry): In multiple selection mode, just clear the
	location_entry.
	(check_save_entry): Allow running in OPEN or SELECT_FOLDER modes
	if we are in LOCATION_MODE_FILENAME_ENTRY.
	(gtk_file_chooser_default_should_respond): Switch to a folder if
	the location_entry contains a folder name in OPEN and SAVE mode,
	not just SAVE mode.  If the entry doesn't contain a folder name,
	but is otherwise well-formed, and we are in OPEN mode, return that
	we should respond with that filename.
	(gtk_file_chooser_default_initial_focus): Focus the location_entry
	if appropriate.
	(browse_widgets_create): Create the location_entry_box and the
	location_label here.
	(update_appearance): Call location_mode_set() when switching back
	to OPEN/SELECT_FOLDER mode.  Hide the location_button when
	switching to SAVE/CREATE_FOLDER mode.
	(pending_select_paths_process): Turn the
	processing_pending_selections flag on and off around changes to
	the current selection.  Don't special-case OPEN mode anymore,
	since the new flag will take care of things in
	update_chooser_entry().
	(update_chooser_entry): Don't do anything if
	processing_pending_selections is TRUE.  This keeps the entry from
	being polluted when changing folders.
	(location_popup_handler): In OPEN/SELECT_FOLDER modes, toggle
	between the path bar and the entry.  In SAVE/CREATE_FOLDER modes, simply focus the
	location_entry.
	(update_from_entry): Removed.
	(location_entry_create): Removed.
	(open_location_cb): Removed.
	(file_list_build_popup_menu): Don't add an "Open _Location" menu item.
	(location_entry_set_initial_text): Don't do anything if
	current_folder is NULL.

	* gtk/gtkfilechooserentry.c
	(_gtk_file_chooser_entry_set_file_part): Turn in_change on and off
	around the call to gtk_entry_set_text().  This makes completion
	not happen when the caller has explicitly set a name.

	2006-03-24  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault):
	Added fields location_mode_box, location_pathbar_radio,
	location_filename_radio, location_widget_box, location_label,
	location_entry.  The radio buttons will switch between the pathbar
	and the location entry; the other boxes are for layout purposes.
	(enum LocationMode): New enum.
	(struct _GtkFileChooserDefault): Added a location_mode field.

	* gtk/gtkfilechooserdefault.c (browse_widgets_create): Create the
	location radio buttons to switch between the pathbar and the
	location entry.  Pack the browse_path_bar in the new
	location_widget_box instead of a generic hbox.
	(location_buttons_create): New function.
	(gtk_file_chooser_default_init): Initialize impl->location_mode.
	(location_switch_to_path_bar): New function.
	(location_switch_to_filename_entry): New function.

	* gtk/gtkfilechooserbutton.c (model_add_special): The display_name
	should not be const.
2006-05-03 22:30:52 +00:00
Kristian Rietveld
ebe22cb38a (broken pipe) 2006-04-26 12:39:25 +00:00