Commit Graph

77 Commits

Author SHA1 Message Date
Matthias Clasen
049cbc8b74 GtkFontChooser: Allow a custom font map
This lets applications show their own fonts instead of
or in addition to system fonts.

https://bugzilla.gnome.org/show_bug.cgi?id=748771
2015-05-07 07:33:23 -04:00
Matthias Clasen
d6a467d48e GtkFontButton: Stop using deprecated API 2014-10-02 00:05:43 -04:00
Rui Matos
d05730db49 GtkFontButton: Make sure the dialog isn't destroyed on delete-event
The remaining code assumes that the dialog doesn't get destroyed, but
it actually does on delete-event.

In particular, the filter function and the preview text are lost as
soon as the dialog is created and thus when we create a new dialog we
don't have those properties to set on it anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=719936
2014-09-28 22:07:48 -04:00
Matthias Clasen
59fc2f0ac1 GtkFontButton: Avoid criticals
The font_family and font_face members may be NULL, and we
shouldn't cause critical warnings in that case.
2014-08-15 15:15:45 -04:00
Matthias Clasen
1815790bd3 GtkFontButton: Limit the decimals shown for size
It doesn't make sense to show a font size with 6 digits. Use
the same formatting we use in the font chooser widget now.

https://bugzilla.gnome.org/show_bug.cgi?id=724996
2014-08-15 15:09:45 -04:00
Matthias Clasen
e23f7c13b0 GtkFontButton: Use the same font name as the font chooser
The font chooser constructs the display name for the font from
the family and face names. Do the same in the font button, so
we don't end up calling the same font by different names, which
would be confusing.
2014-08-15 14:15:23 -04:00
Matthias Clasen
eebb73032a GtkFontButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:02 -04:00
Matthias Clasen
2a7bed6858 GtkFontButton Trivial cleanup
Replace GTK_PARAM_READABLE|GTK_PARAM_WRITABLE by GTK_PARAM_READWRITE.
2014-06-09 13:31:02 -04:00
Matthias Clasen
eb34ff5b48 GtkFontButton: Fix the handling of show-preview-button
We were not storing the value at all, and not notifying.
2014-06-09 13:31:02 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
a4b5929e81 docs: use apostrophe in *'re 2014-02-07 13:37:09 -05:00
William Jon McCann
2d003553e8 docs: don't use <emphasis>
It is a little heavy handed. The text can speak for itself.
2014-01-28 02:02:05 -05:00
William Jon McCann
4a11acdc8c resources: move resources into a subdirectory 2014-01-23 21:04:59 -05:00
Matthias Clasen
cda60c3c40 Another round of template binding api changes
We rename the gtk_widget_class_bind_template_child{_internal}
macros by appending a _private to their name. Otherwise, it
would be too magic to pass the 'public' names as arguments,
but affect a member of the Private struct. At the same time,

Add two new macros with the old names,
gtk_widget_class_bind_template_child{_internal} that operate
on members of the instance struct.
2013-07-26 16:29:12 -04:00
Emmanuele Bassi
89ae3524a3 Rename the widget template API
The macros and functions are inconsistently named, and are not tied to
the "template" concept - to the point that it seems plausible to use
them without setting the template.

The new naming scheme is as follows:

  gtk_widget_class_bind_template_child_full
  gtk_widget_class_bind_template_callback_full

With the convenience macros:

  gtk_widget_class_bind_template_child
  gtk_widget_class_bind_template_child_internal
  gtk_widget_class_bind_template_callback

https://bugzilla.gnome.org/show_bug.cgi?id=700898
https://bugzilla.gnome.org/show_bug.cgi?id=700896
2013-07-26 13:52:15 -04:00
Alexander Larsson
a8e84545d1 widget: Use a real offset in gtk_widget_class_automate_child
Using an offset from the struct means you can have children in
both the public and private (via G_PRIVATE_OFFSET) parts of the
instance. It also matches the new private macros nicer.

https://bugzilla.gnome.org/show_bug.cgi?id=702563

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2013-07-26 08:41:09 -04:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Tristan Van Berkom
36bacc4674 GtkFontButton: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
c6ab515735 Deprecate gtk_widget_push_composite_child & friends
Deprecate gtk_widget_push_composite_child, gtk_widget_pop_composite_child,
gtk_widget_set_composite_name, gtk_widget_get_composite_name.

This API is just bloat and was never useful, this patch deprecates
it and removes all internal calls to the composite child APIs
2013-04-08 21:19:27 +09:00
Matthias Clasen
df96b0239f GtkFontButton: default show-preview-entry to TRUE
This is what the property declaration says, after all.
https://bugzilla.gnome.org/show_bug.cgi?id=695948
2013-03-17 16:24:34 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Brian Cameron
0940974f5a Fix void function n gtkfontbutton.c so it does not try to return a value.
Fixes bug #661089.
2011-10-10 14:13:35 -05:00
Benjamin Otte
7c675b34c5 fontbutton: Properly display absolute sizes
Display them the same way as Pango does.
2011-09-22 21:44:06 +02:00
Benjamin Otte
d5bc1b66d2 fontbutton: Properly update label after property changes
Previously, the font wasn't properly updated after some changes.
2011-09-22 21:44:05 +02:00
Benjamin Otte
19623af04e fontbutton: Display the same text as elsewhere
In particular, display names of families that don't have an installed
font.
2011-09-22 21:44:05 +02:00
Christian Persch
71c16bad33 Take font size also from the font description 2011-09-13 12:55:34 +02:00
Christian Persch
b1ff243c57 Fix implementation of GtkFontButton:get_font_{family,face}
Returns a PangoFont{Family,Face} even when the font dialogue
has never been popped up.
2011-09-13 12:55:34 +02:00
Christian Persch
6902813a11 Rename gtk_font_chooser_get_{family,face,size}
... to gtk_font_chooser_get_font_{family,face,size}, in order to
avoid naming conflicts in bindings.
2011-09-13 12:55:33 +02:00
Christian Persch
abd9242f33 Add GtkFontChooser:font-desc property
Add a way to set/get the font as a PangoFontDescription.
2011-09-13 12:55:33 +02:00
Christian Persch
1b818f2e46 Remove GtkFontChooser:[sg]et_font
Now that the setter doesn't return a value anymore, we can just use
g_object_[sg]et instead of having these vfuncs.
2011-09-13 12:55:22 +02:00
Christian Persch
0b7db6888a Setters should not return a boolean
The setter for the "font" property returned a boolean that indicated
whether the given font has been found. Instead, fall back to the default
font name when the given font doesn't exist.
2011-09-13 12:55:22 +02:00
Christian Persch
ca4152995a GtkFontChooser implementation for GtkFontButton 2011-09-13 12:55:21 +02:00
Christian Persch
eb9efc9fd2 Rename GtkFontChooser:font-name to :font
GtkFontButton already has a property named "font-name" which may
conflict / be an ABI break when moving GtkFontButton to implement
GtkFontChooser. Also, this is more in line with how other parts in
gtk (e.g. GtkCellRendererText) call a font string property.
2011-09-13 12:55:21 +02:00
Christian Persch
5452525143 Make GtkFontChooser an interface
Make the GtkFontChooser API similar to the Gtk{File,Recent,App}Chooser
APIs by introducing GtkFontChooser as an interface, that has a default
implementation in GtkFontChooserWidget.

https://bugzilla.gnome.org/show_bug.cgi?id=657627
2011-09-13 12:55:21 +02:00
Matthias Clasen
6f39855c08 More include cleanups 2011-08-28 01:54:55 -04:00
Alberto Ruiz
a58a2dc0d3 GtkFontChooserDialog: GtkFontButton now uses GtkFontChooserDialog instead of GtkFontSelectionDialog 2011-08-15 18:57:57 -04:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Matthias Clasen
7d3c5b2763 Drop unneeded includes: gtkalignment.h 2011-06-07 21:53:11 -04:00
Matthias Clasen
b9a59c2ad6 Clean up more includes
Mainly removing unused h/v includes, but also adding some that
will be necessary as replacements.
2011-06-07 20:54:23 -04:00
Javier Jardón
9dc0e7460e Move documentation to inline comments: GtkFontButton 2011-04-11 02:47:43 +01:00
Michael Natterer
260ccdfebe gtk: remove "gboolean homogeneous" from gtk_box_new()
Because it's FALSE in virtually all use cases.
2010-11-02 12:04:35 +09:00
Javier Jardón
c15ef6405c Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 17:37:03 +09:00
Javier Jardón
821c3c6578 Use gtk_separator_new() instead gtk_[v|h]separator_new() 2010-10-30 17:37:02 +09:00
Javier Jardón
558a02c730 Use accessor funtions to access GtkFontSelectionDialog 2010-07-13 19:40:47 +02:00
Javier Jardón
f86456ccb5 gtkfontbutton: unseal private pointer 2010-07-13 19:40:47 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Javier Jardón
214a023e91 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 07:52:07 +01:00
Christian Dywan
bb1824c131 Deprecate flag macros for toplevel, state, no window and composite child
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE,
GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and
GTK_WIDGET_COMPOSITE_CHILD.

Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and
GTK_OBJECT_TYPE which have become redundant.

Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel,
GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD
is replaced with use of the "composite-child" property and uses of
GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window.

Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are
changed to direct flag usage.

Documentation is updated to refer to gtk_widget_set_has_window and
gtk_widget_get_has_window.

Gail and tests are updated as well.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-01-04 07:57:05 +01:00
Sven Herzberg
b07127231e Bug 562998 – GtkFontButton documentation improvements
2008-12-03  Sven Herzberg  <sven@imendio.com>

	Bug 562998 – GtkFontButton documentation improvements

	* gtk/gtkfontbutton.c: mention the way the font string should be used.
	Patch by Sven Herzberg and Nelson Benitez


svn path=/trunk/; revision=21842
2008-12-03 13:15:39 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00