summaryrefslogtreecommitdiff
path: root/gtk/gtkapplicationwindow.c
Commit message (Collapse)AuthorAgeFilesLines
* docs: Fix GTK links and locationsEmmanuele Bassi2019-02-061-1/+1
|
* widget: Don't pass a position to ->size_allocateTimm Bäder2018-11-131-3/+5
| | | | | The values have been 0/0 for a long time now, so just drop the GtkAllocation argument and replace it with width and height.
* widget: Remove clip from size-allocate vfuncBenjamin Otte2018-04-051-6/+4
| | | | As the clip is no longer needed, get rid of it.
* The big versioning cleanupMatthias Clasen2018-02-061-12/+0
| | | | | | | 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.
* applicationwindow: Fix measure implementationTimm Bäder2018-01-171-1/+2
| | | | Really calculate the menubar height, not the width.
* applicationwindow: Stop connecting to ::delete-eventMatthias Clasen2018-01-161-3/+1
| | | | We can just use GtkWindow::hide-on-close.
* applicationwindow: Fix code sampleTimm Bäder2017-10-111-7/+7
| | | | | Declare all variables, use proper GtkApplication constructor and the right GTK_APPLICATION() cast for gtk_application* API.
* Fix application window snapshot differentlyMatthias Clasen2017-10-081-13/+0
| | | | | | | As Timm Baedert pointed out, the previous fix made the menubar go on top of popovers, which is just wrong. Instead, make gtk_window_snapshot handle all direct children of the window, taking care to stack popovers correctly.
* application window: Make menubar appearMatthias Clasen2017-10-071-0/+15
| | | | This needed to be ported to snapshot, still.
* applicationwindw: Don't leak show-help-overlay actionTimm Bäder2017-10-061-0/+1
|
* applicationwindow: Remove some useless queue_resize callsTimm Bäder2017-07-191-4/+0
| | | | | The gtk_widget_{set_parent,unparent} calls before will already cause a resize when necessary.
* widget: Add baseline and out_clip parameters to size-allocateTimm Bäder2017-07-191-8/+10
| | | | | | | | | | | Since setting a clip is mandatory for almost all widgets, we can as well change the size-allocate signature to include a out_clip parameter, just like GtkCssGadget did. And since we now always propagate baselines, we might as well pass that one on to size-allocate. This way we can also make sure to transform the clip returned from size-allocate to parent-coordinates, i.e. the same coordinate space priv->allocation is in.
* set clip of more widgetsTimm Bäder2017-07-191-0/+2
|
* container: Remove include_internals parameter from forallTimm Bäder2017-04-251-2/+1
| | | | | | with include_internals=TRUE, this is the same as the (still private) gtk_widget_forall, or just using the children/sibling accessors in a loop.
* osx: fix buildChristoph Reiter2017-03-301-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=734946
* applicationwindow: Use gtk_widget_measure to measure widget sizesTimm Bäder2017-03-041-3/+3
|
* Remove gtk_widget_show_allTimm Bäder2017-01-201-1/+0
|
* applicationwindow: Fix issues with measure vfunc transitionBenjamin Otte2016-10-261-3/+3
|
* widget: Use ::measure vfunc to measure sizeTimm Bäder2016-10-221-86/+50
| | | | | | | | Add a new ::measure vfunc similar to GtkCssGadget's that widget implementations have to override instead of the old get_preferred_width, get_preferred_height, get_preferred_width_for_height, get_preferred_height_for_width and get_preferred_height_and_baseline_for_width.
* API: container: Remove gtk_container_set_border_width()Benjamin Otte2016-10-161-8/+4
|
* applicationwindow: fix leak of help_overlayAlan Jenkins2016-10-131-3/+9
| | | | | | | | | | | | | | | | | > Due to Gtk+ keeping a reference to the window internally, > gtk_window_new() does not return a reference to the caller. > To delete a GtkWindow, call gtk_widget_destroy(). Caller(s) aren't expecting a need to delete help_overlay themselves once they've installed it. (E.g. see gtk_application_window_added()). I didn't notice any direct precedents, but there's a parallel in the current implementation of gtk_container_destroy() which uses gtk_widget_destroy() on any added widget. This avoids leaking 100s of kB per window, when I tested nautilus. https://bugzilla.gnome.org/show_bug.cgi?id=772859
* menusectionbox: add support for "text-direction" attributeChristian Hergert2016-10-131-0/+3
| | | | | | | | | | | This allows the use of a "text-direction" hint set to one of "none", "rtl", or "ltr" to enforce the text direction of a "horizontal-buttons" display-hint. This is useful when a menu has buttons that map to physical space in the UI and therefore must match the application widgetry. https://bugzilla.gnome.org/show_bug.cgi?id=772775
* shortcuts: Follow changes of accelsMatthias Clasen2016-04-171-0/+3
| | | | | | | | | Add a way to associate a detailed action name with a shortcut. If the action name is set, update the accelerator whenever accels change on the window that the shortcuts window is associated with. https://bugzilla.gnome.org/show_bug.cgi?id=764975
* docs: trivial fixes in GtkApplication-related documentationSébastien Wilmet2016-04-091-3/+3
|
* GtkApplicationWindow: the help_overlay is nullableTimm Bäder2015-11-141-1/+1
|
* GtkApplicationWindow: Fix typosTimm Bäder2015-11-141-1/+1
|
* GtkApplicationWindow: Add missing annotationsTimm Bäder2015-10-221-1/+1
|
* Add automatic help overlay support to GtkApplicationMatthias Clasen2015-10-211-2/+76
| | | | | | | When the $(resource_prefix)/gtk/help-overlay.ui resource exists, load a GtkShortcutsWindow from it for each GtkApplicationWindow, and set up a win.show-help-overlay action with accels <Primary>F1 and <Primary>? to show it.
* Expand builder menu documentationMatthias Clasen2015-07-291-6/+24
| | | | List the supported attributes.
* GtkApplicationWindow: Fix small doc formatting issuesMatthias Clasen2015-04-261-3/+2
|
* GtkApplicationWindow: Documentation fixPatrick Welche2014-12-231-3/+3
| | | | | | gtk_builder_add_from_string takes more than 2 parameters. https://bugzilla.gnome.org/show_bug.cgi?id=741897
* GtkApplicationWindow: Use G_PARAM_EXPLICIT_NOTIFYMatthias Clasen2014-06-091-1/+1
|
* GtkApplicationWindow: Avoid a crashMatthias Clasen2014-06-091-4/+6
| | | | | In several places, we were not correctly dealing with the possibility of application not being set.
* applicationwindow: Properly unmap the menubar widgetBenjamin Otte2014-05-051-0/+13
|
* docs: fully break lines in examplesWilliam Jon McCann2014-02-121-1/+4
| | | | | | | | | Try to do a better job of keeping example content from being too wide. It is often rendered as <pre> text so the only time we can wrap it is in the source. It is best to full break lines at all punctuation and to try to keep the width under 70 chars or so.
* Docs: Remove all entities and turn off sgml modeMatthias Clasen2014-02-091-12/+9
| | | | | With all element markup gone, it is time to turn off sgml mode, and get rid of entities as well.
* docs: use proper quotesWilliam Jon McCann2014-02-051-2/+2
|
* docs: Don't use <xi:include>William Jon McCann2014-02-051-5/+1
|
* docs: use ` instead of <literal>William Jon McCann2014-02-041-3/+3
|
* docs: don't use <tag> docbook elementsWilliam Jon McCann2014-02-041-7/+7
|
* docs: fix last commitWilliam Jon McCann2014-02-041-1/+0
|
* docs: replace all <examples> with markdown headingsWilliam Jon McCann2014-02-041-3/+4
|
* docs: Identify examples that are C codeWilliam Jon McCann2014-01-291-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=723119
* docs: use |[ ]| instead of <programlisting></programlisting>William Jon McCann2014-01-291-5/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=723119
* GtkApplicationWindow: give up on handling disposeRyan Lortie2014-01-141-43/+2
| | | | | | | | | | | | | | | | | | | | Stop trying to deal with "theoretical possibilities". We can't possibly continue to be a faithful GActionGroup implementation across dispose because dispose has a side effect of removing everyone's signal handlers. The code that we ran after the dispose chainup to do all of the fancy signal emulation was therefore dead. The test that aimed to verify this was buggy itself due to an uninitialised variable, so really, it never worked at all. We keep the re-ordering of the chainup from the original commit to avoid having trouble with GtkActionMuxer and keep the checks in place that will prevent an outright segfault in the case that someone else tries to use the interface post-dispose. https://bugzilla.gnome.org/show_bug.cgi?id=722189
* gtkwindow: Rename get_decoration_size => get_shadow_widthJasper St. Pierre2014-01-101-2/+2
|
* Fix GtkApplicationWindow action group implementationRyan Lortie2014-01-071-3/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GtkApplicationWindow frees its internal action group on dispose for the usual reasons: to avoid the possibility of reference cycles caused by actions referring back to the window again. Unfortunately, if it happens to be inside of a GtkActionMuxer at the time that it is disposed, it will (eventually) be removed from the muxer after it has been disposed. Removing an action group from a muxer involves a call to g_action_group_list_actions() which will crash because the internal action group to which we normally delegate the call has been freed. A future patch that reworks the quartz menu code will introduce a use of GtkActionMuxer in a way that causes exactly this problem. We can guard against the problem in a number of ways. First, we can avoid the entire situation by ensuring that we are removed from the muxer before we destroy the action group. To this end, we delay destruction of the action group until after the chain-up to the dispose of GtkWindow (which is where the window is removed from the GtkApplication). Secondly, we can add checks to each of our GActionGroup and GActionMap implementation functions to check that the internal action group is still alive before we attempt to delegate to it. We have to be careful, though: because our _list_actions() call will suddenly be returning an empty list, people watching the group from outside will have expected to see "action-removed" calls for the now-missing items. Make sure we send those. but only if someone is watching. https://bugzilla.gnome.org/show_bug.cgi?id=710351
* Refactor GtkApplicationRyan Lortie2013-12-161-103/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gtkapplication.c has turned into a bit of an #ifdef mess over time, and many of the current checks are incorrect. As an example, if you build Gtk for wayland, and exclude the X11 backend, much of the functionality required by wayland (such as exporting menu models) will be disabled. Solve that by introducing a backend mechanism to GtkApplication (named GtkApplicationImpl) similar to the one in GApplication. Add backends for Wayland, X11 and Quartz, with X11 and Wayland sharing a common 'DBus' superclass. GtkApplicationImpl | /--------------+-------------------\ | | GtkApplicationImplDBus GtkApplicationImplQuartz | /-----------+-----------------\ | | GtkApplicationImplX11 GtkApplicationImplWayland GtkApplicationImpl itself is essentially a bunch of vfuncs that serve as hooks for various things that the platform-specific backends may be interested in doing (startup, shutdown, managing windows, inhibit, etc.) With this change, all platform specific code has been removed from gtkapplication.c and gtkapplicationwindow.c (both of which are now free of #ifdefs, except for a UNIX-specific use of GDesktopAppInfo in gtkapplicationwindow.c). Additionally, because of the movement of the property-setting code out of GtkApplicationWindow, the _GTK_APPLICATION_ID properties (and friends) will be set on non-GtkApplicationWindows, such as dialogs. https://bugzilla.gnome.org/show_bug.cgi?id=720550
* Drop a reference to nonexisting APIMatthias Clasen2013-12-131-1/+1
| | | | | | The GtkApplicationWindow documentation had a reference to gtk_header_bar_set_show_fallback_app_menu(). That function no longer exists, so drop it.
* wayland: Set DBus properties after we've constructed the xdg_surfaceJasper St. Pierre2013-11-191-2/+2
|