Matthias Clasen
14cbd13ef2
gtk-demo: Use typographic style classes
...
We don't need to hardcode <u> in markup anymore.
Use the heading style class instead.
2020-11-02 08:38:20 -05:00
Matthias Clasen
44c6619660
gtk-demo: Speed up image demo
...
The progressive loading demo here was so slow as to appear
broken. Make it faster, and ensure that it updates regularly.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ef7499a31b
gtk-demo: Add alternative text to a GtkPicture
...
This lets us text GtkPicture a11y support.
2020-10-22 07:51:44 -04:00
Matthias Clasen
d732c869c2
gtk-demo: Add keywords to demos
...
Add the names of the main widgets as keywords to
our demos, but also things like "game". This helps
finding relevant demos in our growing list. You
can now for example type "label", and find the
"error states" and "links" demos showing GtkLabel
features.
2020-09-13 15:00:14 -04:00
Matthias Clasen
63fb2126db
gtk-demo: Make the image demo more robust
...
Make sure we don't crash if the demo is closed
early.
Fixes : #3058
2020-08-10 16:35:56 -04:00
Benjamin Otte
d7266b25ba
Replace "gint" with "int"
2020-07-25 00:47:36 +02:00
Matthias Clasen
2a24b8c653
Replace most remaining uses of container api
...
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
cd0081d08a
Use gtk_window_destroy
...
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -04:00
Matthias Clasen
8f9c3ed44a
Stop using gtk_widget_destroyed
...
Replace all internal use of gtk_widget_destroyed
by g_object_add_weak_pointer.
2020-05-11 12:19:37 -04:00
Matthias Clasen
f59f355190
Use gtk_window_set_child throughout
...
Replace all uses of gtk_container_add on windows
by gtk_window_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
1706b80815
Use gtk_frame_set_child throughout
...
Replace all uses of gtk_container_add for
frames with gtk_frame_set_child.
2020-05-04 17:01:18 -04:00
Matthias Clasen
edae2a8dc5
frame: Drop shadow-type
...
Frames that don't draw frames are not very useful,
so just drop the shadow-type property.
2020-04-17 10:57:36 -04:00
Matthias Clasen
b5bacb3be6
Drop the margin property
...
Replace it with margin-start, -end, -top, -bottom throughout.
2020-02-25 20:59:04 -05:00
Benjamin Otte
a278edab22
window: Remove type argument from gtk_window_new()
2020-02-14 21:18:49 +01:00
Emmanuele Bassi
589cb19715
demos: Drop the '+' from GTK
...
The demos have user-visible text that should refer to "GTK", not "GTK+"
any more.
2019-02-05 10:19:57 +01:00
Timm Bäder
e9e40ddb42
box: Remove gtk_box_pack_start
2019-01-23 19:30:46 -05:00
Benjamin Otte
cbd47fa770
gtk-demo: Port images demo to use a GtkPicture in places
2018-06-10 02:23:02 +02:00
Benjamin Otte
139882bc76
demos: Add an image demo for widget paintables
2018-04-05 14:56:39 +02:00
Benjamin Otte
5bd85058d9
gtk-demo: Add a video example (with controls) to the images demo
2018-03-18 21:01:23 +01:00
Emmanuele Bassi
c655759cef
Replace gdk_threads_add_timeout* with g_timeout_add()
...
The main GDK thread lock is not portable and deprecated.
The only reason why gdk_threads_add_timeout() and
gdk_threads_add_timeout_full() exist is to allow invoking a callback
with the GDK lock held, in case 3rd party libraries still use the
deprecated gdk_threads_enter()/gdk_threads_leave() API.
Since we're removing the GDK lock, and we're releasing a new major API,
such code cannot exist any more; this means we can use the GLib API for
installing timeout callbacks.
https://bugzilla.gnome.org/show_bug.cgi?id=793124
2018-02-03 12:06:58 +01:00
Matthias Clasen
2301d8d90b
enums: Change GtkIconSize values
...
The new values are the ones we intend to keep. The old ones had
duplicated meanings and nobody knew which one to take.
2017-11-15 14:22:17 -05:00
Matthias Clasen
dbfaa99107
image: Remove icon-size argument from icon setters
...
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.
Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
07164e098a
window: Turn gtk_window_set_screen() into gtk_window_set_display()
...
And have a priv->display instead of a priv->screen.
Includes turning gtk_menu_set_screen() into gtk_menu_set_display(),
because that function just forwards to its window.
2017-10-31 08:25:37 +01:00
Alexander Larsson
2b194089dd
GtkImage: Drop support for storing pixbufs
...
This drops the pixbuf property and the pixbuf getters. We keep
gtk_image_new/set_from_pixbuf, but these are small helpers that
immediately convert to a surface, and there is no way to later get
back the pixbuf you passed in.
The from file/resource codepaths are also changed to load a surface
instead of a pixbuf.
2017-10-23 15:28:33 +02:00
Timm Bäder
c92b7d4224
box: Remove fill child property
...
GtkWidget:halign and GtkWidget:valign are sufficient
2017-04-25 20:30:37 +02:00
Timm Bäder
5729ea7744
box: Remove expand child property
...
GtkWidget already has hexpand/vexpand properties.
2017-04-25 20:30:37 +02:00
Timm Bäder
ea897c6df4
Remove gtk_widget_show_all
2017-01-20 21:37:04 +01:00
Matthias Clasen
50a75b37a9
More gtk-demo spacing fixes
2016-10-26 20:37:23 -04:00
Benjamin Otte
4df6ddad54
API: container: Remove gtk_container_set_border_width()
2016-10-16 18:18:58 +02:00
Timm Bäder
f45dadadd0
box: Remove 'padding' child property
2016-10-16 18:17:21 +02:00
Matthias Clasen
609e04ddcf
gtk-demo: Cosmetic changes
...
Clean up the code of many examples in minor ways, fix some memory
leaks, and avoid the use of dialogs where a regular toplevel works
just as well.
2015-06-28 17:41:35 -04:00
Matthias Clasen
8ccdd5b7cf
gtk-demo: Fix images demo
...
The incremental loading was broken by GtkIconHelper - queuing a
redraw is no longer sufficient to cause GtkImage to redraw with
the new pixbuf contents.
Pointed out by Jasper St. Pierre.
2014-04-12 20:40:27 -07:00
Bastien Nocera
f71f7215ab
all: Name more idles and timeouts
...
Following up from 438cd857c4
,
name more timeouts and idles.
The original grep was missing checking for gdk_threads_add_*()
functions (at least for some of the files).
https://bugzilla.gnome.org/show_bug.cgi?id=726870
2014-03-26 20:09:30 -04:00
William Jon McCann
cdc2f07a1e
demo: use the installed named icon
2013-11-05 15:31:11 -05:00
Benjamin Otte
bc473257c7
gtk-demo: Replace logo with a transparent one
...
That way, we don't have to make it transparent in all the demos.
2013-02-01 21:57:40 +01:00
Benjamin Otte
ad69528bde
gtk-demo: Remove demo_find_file() function
...
It's not used anymore. With it, the demo-common.h header is not needed
anymore and is removed, too (and all the needless includes).
2013-02-01 17:44:13 +01:00
Benjamin Otte
a4749d4f3a
gtk-demo: Port images example to resources
2013-02-01 17:42:44 +01:00
Benjamin Otte
32903fc753
gtk-demo: Port images example to GInputStream
2013-02-01 17:42:44 +01:00
Matthias Clasen
1204a850f3
Formatting cleanups
...
While we normally try to avoid whitespace fixes, the gtk-demo
code is shown as exemplary, so it should be in good shape,
formatting-wise.
2011-09-01 23:56:58 -04:00
Matthias Clasen
c5cd4174c3
gtk-demo: Drop uses of GtkAlignment
2011-09-01 23:56:57 -04:00
Bastien Nocera
8f870ddcdc
gtk-demo: Use symbolic icon that exists
...
For the Images test.
2011-02-05 03:20:27 +00: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
Tristan Van Berkom
427226b083
Fixing demos/ directory to build for removal of GtkObject type.
2010-09-27 15:10:50 +09:00
Matthias Clasen
6b939d57c7
Support 'symbolic' themed icons
...
Add gtk_icon_info_load_symbolic() to load symbolic icons, and
theme their background/foreground colours to match the
colours used in the theme.
Adds the gtk_icon_info_load_symbolic() function, explicit
support in GtkImage and GtkCellRendererPixbuf, and test cases
for those 2 widgets.
With help from Bastien Nocera <hadess@hadess.net>
https://bugzilla.gnome.org/show_bug.cgi?id=614711
2010-04-28 12:02:05 +01: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
Sven Neumann
092187e99c
demos/gtk-demo/changedisplay.c demos/gtk-demo/clipboard.c
...
2008-08-11 Sven Neumann <sven@gimp.org>
* demos/gtk-demo/changedisplay.c
* demos/gtk-demo/clipboard.c
* demos/gtk-demo/drawingarea.c
* demos/gtk-demo/iconview.c
* demos/gtk-demo/images.c
* demos/gtk-demo/pixbufs.c: use canonical signal names in the
demos.
svn path=/trunk/; revision=21074
2008-08-11 19:12:58 +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
e142731885
Fix typos
2006-09-25 14:48:31 +00:00
Tor Lillqvist
ce02e5cacc
Use g_fopen().
...
2004-12-05 Tor Lillqvist <tml@iki.fi>
* demos/gtk-demo/main.c (load_file): Use g_fopen().
* demos/gtk-demo/images.c (progressive_timeout): Use
g_fopen(). Open png file in binary mode.
2004-12-05 12:47:42 +00:00