Commit Graph

312 Commits

Author SHA1 Message Date
Matthias Clasen
3489ed087d Merge branch 'kill-buttonbox' into 'master'
Drop GtkButtonBox

See merge request GNOME/gtk!554
2019-02-05 13:06:09 +00:00
Emmanuele Bassi
803ae6a62f examples: Rename the pkg-config file for GTK 4
We dropped the '+' and the major.minor version from the pkg-config file
name.
2019-02-05 10:27:57 +01:00
Matthias Clasen
5120748981 Drop GtkButtonBox
This widget does not seem worth keeping,
and we want to get rid of child properties.
2019-02-04 12:44:55 -05:00
Timm Bäder
e9e40ddb42 box: Remove gtk_box_pack_start 2019-01-23 19:30:46 -05:00
Guido Günther
06e4c3c991 examples: Use appliction id as desktop file base name 2018-08-02 11:10:21 +02:00
Timm Bäder
f6d70f7225 search bar example: remove unused function 2018-06-16 10:16:41 +02:00
Mohammed Sadiq
b2db7bb95b examples: Simplify handling events in search-bar
In search-bar example, we can use gtk_search_bar_set_key_capture_widget()
which would simplify handling keyboard events.
2018-06-14 23:23:17 +05:30
Mohammed Sadiq
6033bc56b4 examples: Fix alignment of search-bar example
The search entry was taking the whole window size.
Let's reduce the size so as to have more natural size.
2018-06-14 11:09:19 +05:30
Mohammed Sadiq
7ddad8aa62 examples: Remove unused variables 2018-05-12 17:32:16 +05:30
Mohammed Sadiq
47872e5172 examples: Use icon-name property to set button icons
Gtk4 added an icon-name property for GtkButton.
2018-05-09 15:28:28 +05:30
Mohammed Sadiq
65b423eb05 examples: Simplify counting buffer lines
We do have a gtk_text_buffer_get_line_count() function
to get the line count.
2018-05-09 15:28:15 +05:30
Mohammed Sadiq
88ddda6d60 examples: Remove explicit gtk_widget_show()
In gtk4, widgets are visible by default.
2018-05-09 15:27:55 +05:30
Mohammed Sadiq
8fcc401e05 examples: Take advantage of user_data passed
The last parameter of the signal callback from .ui
is the template's object from which the class is
derived.

And so, we already have access to the window object.
Let's just use it.
2018-05-08 18:55:48 +05:30
Mohammed Sadiq
bf1c344443 examples: Don't use private members for final classes
Only derivable classes are required to have private members
so that derived classes can't override them.
2018-05-08 14:34:43 +05:30
Mohammed Sadiq
772c994fd0 examples: Simplify .ui files
Run gtk4-builder-tool recursively
2018-05-07 22:30:40 +05:30
Mohammed Sadiq
c5976fed9a examples: Fix Makefiles to use gtk4 for build 2018-05-07 22:29:32 +05:30
Carlos Garnacho
15e00759c7 eventcontrollerkey: Port to new API model 2018-04-26 17:59:42 +02:00
Benjamin Otte
1e6eb1f8b9 draggesture: Port to new API model 2018-04-26 17:59:42 +02:00
Benjamin Otte
4ddc94b293 multipressgesture: Port to new API model 2018-04-26 17:59:42 +02:00
Matthias Clasen
b033e30318 search bar: Stop using ::key-press-event
Use a key event controller instead.
2018-04-05 19:26:53 +02:00
Benjamin Otte
169203951b widget: Remove clip from size-allocate vfunc
As the clip is no longer needed, get rid of it.
2018-04-05 14:56:38 +02:00
Benjamin Otte
73650c6da2 gtk: Remove gtk_widget_queue_draw_region()
... and gtk_widget_queue_draw_area().

They don't doi anything anymore.
2018-04-05 14:56:38 +02: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
Alexander Larsson
391727bd0d GdkWindow -> GdkSurface initial type rename
This renames the GdkWindow class and related classes (impl, backend
subclasses) to surface. Additionally it renames related types:
GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType,
GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge

This is an automatic conversion using the below commands:

git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass

git sed -f g GdkWindow GdkSurface
git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing
git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING
git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2"
git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE
git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo

git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE"
git sed -f g "broadway_window" "broadway_surface"
git sed -f g "BroadwayWindow" "BroadwaySurface"
git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE"
git sed -f g "wayland_window" "wayland_surface"
git sed -f g "WaylandWindow" "WaylandSurface"
git sed -f g "X11_WINDOW" "X11_SURFACE"
git sed -f g "x11_window" "x11_surface"
git sed -f g "X11Window" "X11Surface"
git sed -f g "WIN32_WINDOW" "WIN32_SURFACE"
git sed -f g "win32_window" "win32_surface"
git sed -f g "Win32Window" "Win32Surface"
git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE"
git sed -f g "quartz_window" "quartz_surface"
git sed -f g "QuartzWindow" "QuartzSurface"

git checkout NEWS* po-properties
2018-03-20 11:40:08 +01:00
Krzesimir Nowak
7f300c9da7 examples, gtk-demo: Fix copy-pasta in signal name 2018-01-03 09:59:19 +01:00
Matthias Clasen
c9267e70a9 Port drawing example to gestures
Use a drag and a multi-press gesture.
2018-01-02 18:14:13 -05:00
Matthias Clasen
bb568a51d4 Make drawing example work again
Using ::configure-event and ::draw on a drawing area
doesn't work anymore. Use ::size-allocate and a
draw function instead.
2018-01-02 18:14:13 -05:00
Matthias Clasen
029a84aa74 Fix fallout from the show-close-button rename
I had overlooked ui files. We should really
validate those during build.
2017-12-08 11:29:14 -05:00
Matthias Clasen
fec0dc2b13 Rename GtkHeaderBar::show-close-button
It is about all window buttons, so rename it to ::show-title-buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=779862
2017-12-07 22:37:06 -05:00
Benjamin Otte
f53848c360 textview: Redo clipboard handling
Instead of using GtkClipboard and handling everything ourselves, we now
put GtkTextBuffer into the GdkClipboard and register (de)serializers for
text/plain.
2017-12-03 05:46:48 +01:00
Benjamin Otte
a59572f96d widget: gtk_widget_get_clipboard => gtk_widget_get_old_clipboard
Just rename the function, so the previous one can be used for the
new clipboard.
2017-12-03 05:46:47 +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
Benjamin Otte
3f7ada506e examples: Use right function to query size 2017-11-10 14:56:42 +01:00
Benjamin Otte
9151e0b9f5 stylecontext: Port to use display instead of screen 2017-10-31 03:05:54 +01:00
Matthias Clasen
d5d0ee6f9d examples: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Carlos Garnacho
a72404dd5a gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.

Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
2017-05-25 16:25:58 +02:00
Emmanuele Bassi
17518ef89b build: Improve consistency of the "coding" style
We're mixing a lot of styles in the Meson build files. This is an
attempt at making everything slightly more consistent in terms of
whitespace and indentation.
2017-05-03 15:10:57 +01:00
Tim-Philipp Müller
3ac88fa6b6 meson: examples: update
Mostly style changes. Don't create resource source files
with spaces in them, that's tempting our luck.
2017-05-03 15:10:53 +01:00
Timm Bäder
8ae847e4fc Build examples 2017-05-03 15:10:52 +01:00
Timm Bäder
a9fdf49ed4 examples/drawing: Don't call gtk_main_quit
This is a GtkApplication so it will do the right thing when closing the
window.
2017-05-03 14:53:34 +01: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
2c7e567f05 Update callers
Adapt all our tests and examples to the new initialization api.
2017-01-19 13:50:17 -05:00
Alexander Larsson
723b588b5d Make gdk.la and gsk.la a noninst helper library
This merged gtk, gdk and gsk into one library, making it possible to
have internal private APIs between gtk them, as well as producing more
efficient code.

https://bugzilla.gnome.org/show_bug.cgi?id=773100
2016-10-26 16:34:15 +02:00
Benjamin Otte
dbeeaf7de6 cssprovider: Remove GError out argument from load functions
People should use the GtkCssProvider::parsing-error signal instead.
2016-10-17 16:52:05 +02:00
Benjamin Otte
4df6ddad54 API: container: Remove gtk_container_set_border_width() 2016-10-16 18:18:58 +02:00
Timm Bäder
7377b7e5c2 plugman: Stop using gtk_override_color 2016-10-16 18:17:21 +02:00
Timm Bäder
f45dadadd0 box: Remove 'padding' child property 2016-10-16 18:17:21 +02:00