Commit Graph

259 Commits

Author SHA1 Message Date
Matthias Clasen
ccb9dcc86b singleselection: Make constructor transfer full
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.

Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
a46cfd3ff4 sortlistmodel: Make constructor transfer full
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.

Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
706d464ae6 filterlistmodel: Make constructor transfer full
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.

Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
1e8be87026 flattenlistmodel: Make the constructor transfer full
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.

Update all callers.
2020-07-26 18:02:44 -04:00
Benjamin Otte
3078b180fe Replace "gdouble" with "double" 2020-07-25 00:47:36 +02:00
Benjamin Otte
d375dce9f5 Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
Benjamin Otte
d7266b25ba Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
Benjamin Otte
495069c868 Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master

See merge request GNOME/gtk!2251
2020-07-16 19:43:45 +00:00
Benjamin Otte
e518c1f2f3 stringfilter: Make the constructor take an expression
An expression is critically important for a string filter and people
should be made aware of it when constructing the filter.
2020-07-16 20:43:16 +02:00
Matthias Clasen
edb792503b printunixdialog: Plug a leak
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Benjamin Otte
5080730728 listmodels: Stop respecting item-type
Simplify all view model APIs and always return G_TYPE_OBJECT as the
item-type for every model.

It turns out nobody uses item-type anyway.

So instead of adding lots of APIs, forcing people to think about it and
trying to figure out how to handle filter or map models that modify item
types, just having an easy life is a better approach.

All the models need to be able to deal with any type of object going
through anyway.
2020-07-05 02:59:21 +02:00
Timm Bäder
9eaeb04863 Fix print dialog node name 2020-06-19 05:25:52 +02:00
Matthias Clasen
990a87fd79 printdialog: Convert some leftover code
There was still some code expecting to deal with tree
models. Convert it to work with list models.
2020-06-15 23:10:23 -04:00
Matthias Clasen
74ac435ae6 printdialog: Replace the papersize combo with a dropdown
This one is more complicated, since it involves
separators and a custom item.
2020-06-12 09:22:36 -04:00
Matthias Clasen
ed9941ec2c printdialog: Replace some combo boxes with drop downs
These are just the simple cases.
2020-06-12 08:49:01 -04:00
Matthias Clasen
2a3e5422ad docs: Cosmetics
Remove a few instances of GTK+ from the docs, and
remove references to ancient versions.
2020-06-11 17:25:57 -04:00
Matthias Clasen
ebc07d1458 printdialog: Port to column view 2020-06-03 13:35:09 -04:00
Yuri Chornoivan
01bd4cc4e1 Fix minor typos 2020-05-28 11:00:03 +03:00
Emmanuele Bassi
0a6848d70b Remove gtk_dialog_run() from GtkPrintUnixDialog
Replace it with an explicit nested main loop, as we need to block the
signal handler currently being emitted depending on the response of the
overwrite confirmation dialog.

This is a bit of a hack, and the only reason we need it is that the
print dialog will load the last used path as the output file name, when
printing to a file; this means that, in theory, it would be possible to
press Print without selecting a file, and accidentally overwriting an
existing file.

It would be much simpler if we did not store the last used path, and
always explicitly asked the user to select a file; this would avoid
destructive actions, and would allow us to rely on the overwrite
confirmation dialog right inside the file chooser.
2020-05-12 13:45:15 +01: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
932aa58237 Avoid container api on grids
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
025375ff5f Replace gtk_widget_destroy everywhere
Replace all remaining uses of gtk_widget_destroy
by gtk_container_remove or g_object_unref.
2020-05-11 12:20:59 -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
329994291a Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

See merge request GNOME/gtk!1867
2020-05-11 14:24:45 +00:00
Matthias Clasen
3a5cf61a4d print dialog: Fix frame <> box confusion
It is a bad idea to have a GtkBox called frame, event
if it started out its existence as a GtkFrame.
2020-05-11 08:15:55 -04:00
Timm Bäder
bcdd6d5425 printunixdialog: Use two "paper" css nodes
Instead of save_named'ing to a temporary "paper" node.
2020-05-10 09:30:15 +02:00
Matthias Clasen
82f4b1630c printunixdialog: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -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
40337aa1b3 printunixdialog: Drop the Private struct 2020-03-29 09:04:19 -04:00
Benjamin Otte
146b921246 cssnode: Convert name + id from interned string to GQuark
The reason for this is simply that I want to get hash functions that
have their values close together, so they can fit in a smaller range
(the goal here is 12 bits). By using GQuark, we get consecutive numbers
starting with 1 (and applications have <1000 quarks usually), whereas
interned strings can be all over the place.

As a side effect we also save 64 bytes per declaration.
2020-01-28 02:17:03 +01:00
Matthias Clasen
28539ba838 print dialog: Fix up page drawing
This fixes up page drawing enough to appear properly
with the builtin themes.
2019-12-24 12:30:28 -05:00
Matthias Clasen
19a4e76034 Update the print dialog for headerbar changes
This was breaking the templates test.
2019-11-01 12:51:42 -04:00
Guillaume Maudoux
76b2f97602 PrintUnixDialog: Slightly ease page range entry
Page ranges entry can now be focused directly, and will automatically
select the page ranges button when doing so.
This avoids the sometimes counter-intuitive previous behavior where the
entry was automatically focused when toggling the radio button, but the
user may still find themselves clicking uselessly in the text entry
because they scheduled it in their mental model.
2019-06-13 21:11:56 +00:00
Matthias Clasen
7447abb52b Stop using gtk_widget_get_toplevel
All uses of it can be replaced by gtk_widget_get_root.
2019-05-28 20:25:16 +00:00
Matthias Clasen
948347afa9 Stop using gtk_widget_is_toplevel 2019-05-28 20:25:16 +00:00
Matthias Clasen
18788c2a86 Remove gtk_widget_get/set_has_surface
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
2019-05-28 20:25:15 +00:00
Matthias Clasen
15f4c40a91 Rename gtkprintbackend.h to gtkprintbackendprivate.h
Follow the naming convention for private headers.
2019-05-26 22:23:52 +00:00
Matthias Clasen
cb2369bf70 Rename gtkprinter-private.h
Name this header gtkprinterprivate.h, following
our convention for private headers.
2019-05-26 16:29:57 -04:00
Matthias Clasen
c0eea6c5de print dialog: Drop the priv pointer 2019-05-26 20:08:01 +00:00
Matthias Clasen
bb46cc6470 print dialog: Make final
Nobody should subclass this.
2019-05-26 19:55:41 +00:00
Matthias Clasen
5c8a870510 print dialog: Rewrite example
The ui file example was still using GTK3 syntax
for GtkNotebooks.
2019-04-05 14:41:46 -04:00
Matthias Clasen
08d8f2bb80 print dialog: Stop using gtk_container_child_get
The grid does not have child properties anymore.
2019-04-05 12:01:43 +00:00
Matthias Clasen
9e0c471b03 entry, spin button: Drop redundant API
Avoid duplicating GtkEditable APIs. Port existing users.
2019-02-28 16:34:00 -05:00
Bastien Nocera
5a6a7b50af all: Don't warn about deprecated gtk_window_present usage
Avoid compilation warnings about internal users of gtk_window_present().
2019-02-25 17:38:08 +01:00
Emmanuele Bassi
25fd230327 gtk: Drop the "plus"
Source names should use "[gtk]" without the plus.
2019-02-05 11:26:20 +01:00
Timm Bäder
bd71e744d2 Stop using gtk_box_pack_end
It might soon go away!
2019-01-23 19:30:46 -05:00
Emmanuele Bassi
3543a54545 Specify the C include for Unix printing API
Instead of using the INCLUDE directive inside the sections file, we can
specify the default C include in the gtkdoc-mkdb arguments, and override
it inside the C sources that need it.
2019-01-19 00:00:34 +00:00
Alexander Larsson
63e060a21d GtkWidget: Start renaming widget->window
This is an automated change doing these command:

git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface
git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface
git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface
git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface
git sed -f g gtk_widget_set_window gtk_widget_set_surface
git sed -f g gtk_widget_get_window gtk_widget_get_surface
git sed -f g gtk_widget_register_window gtk_widget_register_surface
git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface

git checkout NEWS*
2018-03-20 15:21:12 +01:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Emmanuele Bassi
334acbfc39 Replace gdk_threads_add_idle* with g_idle_add()
The main GDK thread lock is not portable and deprecated.

The only reason why gdk_threads_add_idle() and
gdk_threads_add_idle_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 idle callbacks.

https://bugzilla.gnome.org/show_bug.cgi?id=793124
2018-02-03 12:06:58 +01:00