After some searching, it turns out that gtk-doc now interprets
markdown, and can no longer accept '-' in the docs without making
a mess. I hope that this does not affect more places in more
subtle ways.
Basically, don't ever set the current folder, and only use
gtk_file_chooser_set_filename() for 'File/Save As'. This is so
that the file chooser will be able to present its recently-used
lists as appropriate, giving the user good suggestions by default.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
We used to explicitly map and unmap the child GtkFileChooserWidget when
mapping and unmapping the dialog, respectively. Now that GtkWidget actually
unmaps child widgets (instead of avoiding that), we can assume that the
child GtkFileChooserWidget will be unmapped when we wanted it to be.
This fixes a warning that happened with the new GtkWidget invariant checker,
as we were mapping our child widget before calling our parent class' ::map() handler.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.
Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.
So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.
The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API
https://bugzilla.gnome.org/show_bug.cgi?id=610474
Previously the rightmost button with a proper response id was activated,
this is now only done if there is no default button set.
With this patch the right widget gets activated when there are multiple
widgets wth response ids conforming to is_stock_accept_response_id() as
the selected widget is made the new default widget before showing the
overwrite confirmation dialog.
* gtk/gtkfilechooserdialog.c
(file_chooser_widget_default_size_changed): Simply resize the
dialog to the default size without any fancy clamping. Also,
leave in place ifdef-ed out code to restore the file chooser's
position in addition to its size. The code to restore the
position doesn't quite work yet, but we'll leave it in as a
reference.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=22118
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-05-19 Federico Mena Quintero <federico@novell.com>
http://bugzilla.gnome.org/show_bug.cgi?id=322298 - Save dialog
can't be resized until you expand the "Browse for other folders"
section.
* gtk/gtkfilechooserembed.h (struct _GtkFileChooserEmbedIface):
Removed the "get_resizable" method.
(_gtk_file_chooser_embed_get_resizable): Removed.
* gtk/gtkfilechooserembed.c: Removed the _get_resizable() machinery.
* gtk/gtkfilechooserdefault.c: Likewise.
* gtk/gtkfilechooserdialog.c
(file_chooser_widget_default_size_changed): Act as if the dialog
were always resizable.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=20113
2007-06-01 Michael Natterer <mitch@imendio.com>
* gtk/gtkfilechooserdialog.c (response_cb): change fix for #347883
to not obfuscate the code.
svn path=/trunk/; revision=18001
2007-05-18 Carlos Garnacho <carlos@imendio.com>
Refactor GtkFileChooserDialog sizing.
* gtkfilechooserembed.[ch] (delegate_get_resizable_hints)
(_gtk_file_chooser_embed_get_resizable_hints):
s/resizable_hints/resizable/, return just one boolean value to
determine whether the filechooser should be resizable or not.
* gtkfilechooserprivate.h (struct GtkFileChooserDialogPrivate): remove
variables related to the GtkFileChooserEmbed get_default_size() and
get_resizable() implementations.
(struct GtkFileChooserDefault): Move default size management here.
* gtkfilechooserdefault.c (gtk_file_chooser_default_size_allocate):
Added, store currently allocated size to calculate default size later.
(gtk_file_chooser_default_get_resizable_hints):
s/resizable_hints/resizable/.
(gtk_file_chooser_default_set_property): Reload settings if the file
chooser action changes, this way the save expander state will be known
before mapping the window, avoiding wrong window positioning and
flickering. (#424299, #424309)
(find_good_size_from_style): Only get size from style if it wasn't set
previously.
(gtk_file_chooser_default_get_default_size): return default size based
on stored default size and preview/extra widget sizes.
* gtkfilechooserdialog.c (file_chooser_widget_update_hints)
(file_chooser_widget_realized_size_changed)
(file_chooser_widget_unrealized_size_changed): simplified to
(file_chooser_widget_size_changed): set window size and resizability
based on the GtkFileChooserEmbed interface implementation. (Bug
#420285, Tomeu Vizoso)
(gtk_file_chooser_dialog_map): force a dialog size change, so it's
clamped for sure to the 75% of the screen size.
svn path=/trunk/; revision=17859
2007-02-26 Matthias Clasen <mclasen@redhat.com>
Apply a patch by Carlos Garnacho to fix several problems
with filechooser size handling (#325477, #151169, 143213,
#153785)
* gtk/gtkfilechooserdefault.c: Increase NUM_LINES slightly.
(browse_widgets_create): Don't force the paned position to 200.
(find_good_size_from_style): Take the size of the extra widget
into account.
* gtk/gtkfilechooserdialog.c (file_chooser_widget_update_hints):
Accept a minimal width parameter. Update all callers.
svn path=/trunk/; revision=17357
2006-12-25 Christian Persch <chpe@cvs.gnome.org>
* gtk/gtkaboutdialog.c: (gtk_about_dialog_class_init),
(gtk_about_dialog_init), (display_credits_dialog),
(display_license_dialog):
* gtk/gtkfilechooserdialog.c: (gtk_file_chooser_dialog_class_init),
(gtk_file_chooser_dialog_init),
(gtk_file_chooser_dialog_constructor),
(gtk_file_chooser_dialog_unmap):
* gtk/gtkrecentchooserdefault.c:
(_gtk_recent_chooser_default_init):
* gtk/gtkrecentchooserdialog.c:
(gtk_recent_chooser_dialog_class_init),
(gtk_recent_chooser_dialog_init),
(gtk_recent_chooser_dialog_constructor),
(gtk_recent_chooser_dialog_unmap): Set the HIG spacings directly
instead of using style-set handlers. Fix the filechooser's spacing
between content and action area to 12px. Bug #372447.
2006-02-16 Federico Mena Quintero <federico@novell.com>
* gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_map): Call
::initial_focus() on the child before calling ::map() on our
parent class. This will prevent the shortcuts treeview from
highlighting its first row as a result of getting assigned focus
by gtk_dialog_map().
2005-09-15 Federico Mena Quintero <federico@ximian.com>
* tests/autotestfilechooser.c: Start a set of automated tests for
the file chooser. The only test in there right now doesn't pass
yet. It specifies the intended behavior of the first optimization
of a series which I'll do on the file chooser (see
http://primates.ximian.com/~federico/news-2005-09.html#14 for the
details of this optimization).
* tests/Makefile.am: Added autotestfilechooser.c.
* gtk/gtkfilechooserprivate.h (struct
_GtkFileChooserDialogPrivate): Move all the file chooser's private
structures to here, so that they can be accessed by
tests/autotestfilechooser.c: _GtkFileChooserDialogPrivate,
_GtkFileChooserWidgetPrivate, LoadState, _GtkFileChooserDefault.
* gtk/gtkfilechooserdialog.c: See above.
* gtk/gtkfilechooserwidget.c: See above.
* gtk/gtkfilechooserdefault.c: See above.
2005-09-01 Matthias Clasen <mclasen@redhat.com>
* gdk/*.c: Intern some more strings.
* gtk/gtkintl.h:
* gtk/*.c: Define an I_() macro and use it instead of the
bulky g_intern_static_string().
2005-08-31 Matthias Clasen <mclasen@redhat.com>
* gdk/Makefile.am:
* gtk/Makefile.am: Intern type names in code generated by
glib-mkenums, too.
* gtk/*.c:
* gdk/x11/*.c:
* gdk/*.c: Intern type names before registering the type to avoid
unnecessary copies.
2005-03-20 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gtk/grk.symbols: Group symbols by header and source file.
* gtk/makegtkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegtkalias.pl -def
* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
this file.
* gtk/*.c: Include gtkalias.h after the other headers,
include gtkaliasdef.c at the bottom.
* gtk/*.h: Small cleanups.
2004-12-14 Federico Mena Quintero <federico@ximian.com>
Merged from gtk-2-4:
Fix#145470:
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_initial_focus): Queue a pending
operation to select the first row if we are not finished loading
yet.
(gtk_file_chooser_default_class_init): Override GtkWidget::map().
(gtk_file_chooser_default_map): New ::map() handler; refresh the
file and bookmark lists.
* gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_class_init):
Override GtkWidget::map() and GtkWidget::unmap().
(gtk_file_chooser_dialog_constructor): Don't call initial_focus()
here.
(gtk_file_chooser_dialog_map): Map the file chooser widget if
needed. Call initial_focus() here.
(gtk_file_chooser_dialog_unmap): Unmap the file chooser widget.
When we are re-mapped, the widget will get mapped as well and it
will have a chance to refresh.
Mon Aug 9 12:48:04 2004 Matthias Clasen <maclas@gmx.de>
Add hidden aliases for exported symbols which are
used internally in order to get rid of many PLT
entries. (#145519, Arjan van de Ven)
* gtk/Makefile.am: Add rules to generate gtk.def and
from gtk.symbols, and make make check check the abi
with abicheck.sh.
(gtk_private_h_sources): Add gtkinternals.h
(gtk_built_private_headers): Add gtkalias.h
(gtk_extra_sources): Add gtk.symbols
(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh
* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
The file can be processed by cpp to filter out certain
subsets of symbols.
* gtk/abicheck.sh: New file. Script to check the actually
symbols exported from libgtk-x11.2.0.so against the symbols
found in gtk.symbols.
* gtk/makegtkalias.pl: New file. Perl script to generate the
header containing the alias definitions for internally used
exported symbols from a list of symbols.
* gtk/gtkinternals.h: New file. An uninstalled header listing
symbols which must be exported for some reason and do not appear
in any other header.
* gtk/*.c: Include gtkalias.h
Fri Mar 12 23:37:15 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkfilechooserdialog.c
(file_chooser_widget_default_realized_size_changed): Clamp the
new size to the screen. Part of bug 129020.
2004-03-12 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkwindow.c (gtk_window_activate_focus): Don't ignore the
return value of gtk_widget_activate().
(gtk_window_activate_default): Likewise. Fixes#137008.
* gtk/gtkfilechooserdialog.c (response_cb): Act on positive
response IDs we recognize, rather than bailing out on cancellation
ones. Fixes#136237; patch by Olivier Andrieu
<oliv__a@users.sourceforge.net>.
(file_chooser_widget_file_activated): If the dialog doesn't have a
default widget, try to find a suitable response widget on our own.
People should *really* be using gtk_dialog_set_default_response(),
but this is to help lazy programmers.
* gtk/gtkdialog.c (_gtk_dialog_get_response_for_widget): New
internal function.
(get_response_data): Add a "create" argument so that we don't
unconditionally create the response data.
Thu Mar 11 16:18:51 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): revert
earlier change to insert_path so that we test that the directory
exists.
* gtk/gtkfilechooserdialog.c
(gtk_file_chooser_dialog_constructor): move focus.