Commit Graph

19844 Commits

Author SHA1 Message Date
William Jon McCann
648511ed44 docs: remove <emphasis> 2014-02-07 10:07:16 -05:00
William Jon McCann
0ce016650b docs: Use markup for links 2014-02-07 09:42:12 -05:00
Benjamin Otte
6d3347de63 widget: Ignore text direction in gtk_widget_set_state_flags()
Previously we did a semi-successful job at ignoring it. Unfortunately
this job was bad enough that we could lose the direction.

We still allow passing in the enum values, because we want code like
this to work:
  set_state_flags (get_state_flags() | SOME_FLAGS)
2014-02-07 14:48:54 +01:00
Carlos Garcia Campos
ae36e57c61 gtkmagnifier: do not use P_() macro for property names 2014-02-07 10:01:49 +01:00
Ignacio Casal Quinteiro
4238cc4b7b Revert "Fix memory leak in GtkTreeViewAccessible"
This reverts commit 7a411eb6dd.
This also makes gedit external tools manager to crash
2014-02-06 22:15:12 +01:00
Ryan Lortie
974c843253 GtkApplication: install gtk option group
Install Gtk's GOptionGroup in GApplication just before commandline
arguments are parsed.
2014-02-06 17:42:33 +00:00
Claudio Saavedra
7faf5ee765 GtkTreeViewColumn: fix critical warning
Do not call _column_autosize() if there is no treeview set yet.

https://bugzilla.gnome.org/show_bug.cgi?id=723637
2014-02-06 19:41:02 +02:00
Claudio Saavedra
b91859a19a gtkwindow: remove delete-event idle function on finalize
Heavy duty can prevent this idle function from being called before
the window is destroyed, so make sure that the source is removed
when the window is finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=723771
2014-02-06 18:18:23 +02:00
William Jon McCann
16db6bbccf docs: fix quotes in example 2014-02-06 10:55:12 -05:00
Bastien Nocera
d74ca9f02c popover: Emit ::closed once modality is cleared
Otherwise, calling gtk_widget_grab_focus() on a widget when the
popover send ::closed won't work.
2014-02-06 16:13:43 +01:00
William Jon McCann
f999ac686b docs: Don't use warnings 2014-02-06 09:53:49 -05:00
Carlos Garnacho
99f16d25a7 popover: Add ::closed signal
This signal is emitted when the popover is dismissed either through
API or user interaction, somewhat more friendly than connecting to
::unmap.
2014-02-06 15:32:48 +01:00
Carlos Garnacho
13b37bd4e0 popover: Add padding pointers to GtkPopoverClass 2014-02-06 15:32:40 +01:00
William Jon McCann
e78ebaa089 docs: don't use <important> 2014-02-06 08:01:49 -05:00
William Jon McCann
334d34178a docs: don't use <warning> 2014-02-06 08:01:49 -05:00
William Jon McCann
6abe7a7094 docs: use markdown instead of <note> 2014-02-06 08:01:49 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
c3dfb17031 docs: fix missing quotation mark 2014-02-05 15:08:42 -05:00
William Jon McCann
fd7adf3b51 docs: add back id for section heading
It was lost during the markdown conversion.
2014-02-05 12:33:39 -05:00
William Jon McCann
b4d4ffcf38 docs: Don't use <xi:include> 2014-02-05 12:32:20 -05:00
Benjamin Otte
25d02909c8 label: Invalidate link colors on style change
Discovered-by: Timm Bäder <mail@baedert.org>

https://bugzilla.gnome.org/show_bug.cgi?id=721309
2014-02-05 13:38:54 +01:00
Benjamin Otte
219357d69c label: refactor code
Split out function for setting attributes. This will be needed in future
patches.
2014-02-05 13:38:54 +01:00
Benjamin Otte
a0bfbc8ae1 label: Avoid creating new attribute list
Only create an attribute list for merging if we actually need to merge.

This bug was introduced in 5230cfe805
2014-02-05 13:38:54 +01:00
Bastien Nocera
4439453b75 widget: Fix margin-start and margin-end properties
The margin-start and margin-end properties were incorrectly
defined, so margins weren't respected for RTL languages.

https://bugzilla.gnome.org/show_bug.cgi?id=723627
2014-02-05 13:28:24 +01:00
Matthias Clasen
f13b3e3aeb Add minimal popover theming to Raleigh
Add background and border, so the popover boundaries are visible.
2014-02-05 01:10:33 -05:00
William Jon McCann
3b3d8ca456 docs: Use "#" for refsect2 instead of ## 2014-02-04 21:00:58 -05:00
William Jon McCann
c6ef8bdc9c docs: don't use <para id=""> 2014-02-04 20:21:05 -05:00
William Jon McCann
aeaa35262f docs: use a list instead of a table 2014-02-04 20:00:53 -05:00
William Jon McCann
446095f9ab docs: don't use <variablelist> 2014-02-04 19:40:34 -05:00
William Jon McCann
a9c454e0e6 docs: don't use itemizedlist 2014-02-04 19:33:43 -05:00
William Jon McCann
2c4431e6ba docs: don't use <keycap> tags 2014-02-04 19:29:00 -05:00
William Jon McCann
8ad75bdfff docs: don't use <replaceable> 2014-02-04 19:20:16 -05:00
William Jon McCann
5dd751f006 docs: don't use ulink. use markdown instead 2014-02-04 18:53:51 -05:00
William Jon McCann
56f76214b7 docs: don't use <varnam> 2014-02-04 18:32:42 -05:00
William Jon McCann
d81e4edbd1 docs: don't use <parameter> tags 2014-02-04 18:30:46 -05:00
William Jon McCann
a22358c0c0 docs: use ` instead of <literal> 2014-02-04 18:24:29 -05:00
William Jon McCann
76447c3512 docs: use quotes instead of <firstterm> 2014-02-04 18:10:11 -05:00
William Jon McCann
a3bad427c7 docs: don't use <application> tags 2014-02-04 18:01:24 -05:00
William Jon McCann
2dcbe27a06 docs: don't use <option> 2014-02-04 17:48:33 -05:00
William Jon McCann
7dcbfe119f docs: don't use <quote> 2014-02-04 17:42:22 -05:00
William Jon McCann
6ba5e6bb1a docs: don't use <tag> docbook elements 2014-02-04 17:38:09 -05:00
William Jon McCann
bf7afa48f8 docs: replace all figures with headings and images 2014-02-04 17:20:43 -05:00
William Jon McCann
76472608c7 docs: fix last commit 2014-02-04 17:09:12 -05:00
William Jon McCann
63e887e165 docs: replace all <examples> with markdown headings 2014-02-04 16:58:54 -05:00
William Jon McCann
28376c2600 docs: Use markdown for section headings 2014-02-04 16:58:54 -05:00
William Jon McCann
9f99f567c8 docs: use markdown instead of inlinegraphic tags 2014-02-04 16:58:53 -05:00
William Jon McCann
50e06e11ee docs: use markdown instead of <filename> tags 2014-02-04 16:58:53 -05:00
William Jon McCann
a479ee5de5 docs: use markdown for <envar> tags 2014-02-04 16:58:53 -05:00
Carlos Garnacho
6e88f1bcb0 scalebutton: Apply a shape on the popover
This hideous hack is necessary so far because the main users of
GtkScaleButton are also clutter users, so the GtkScaleButton popover
will be very likely shaped against a clutter-enabled native window.

https://bugzilla.gnome.org/show_bug.cgi?id=723556
2014-02-04 21:29:25 +01:00
Carlos Garnacho
2d9c09d6c0 popover: Add private _gtk_popover_set_apply_shape() call
Popovers no longer sets a shape, unless this function is called. This
function exists so widgets that are potentially placed on top of other
native windows can get a popover that's nicely shaped, even if it has
no border shadow around.

https://bugzilla.gnome.org/show_bug.cgi?id=723556
2014-02-04 21:29:25 +01:00
Alexander Larsson
0493d74650 popover: Apply child shapes on the GtkWidget popover subwindow
https://bugzilla.gnome.org/show_bug.cgi?id=723556
2014-02-04 21:29:10 +01:00
Matthias Clasen
30fa1426cf Use gdk_screen_get_preferred_visual()
When creating windows, and when returning a widgets
visual, use the new API to get the preferred visual.
2014-02-04 13:15:47 -05:00
Matthias Clasen
2b95d1a34e Introduce API to get the preferred visual
Unless GDK_RGBA=0 is set, this will be the RGBA visual.
The new function is called gdk_screen_get_preferred_visual().

https://bugzilla.gnome.org/show_bug.cgi?id=630217
2014-02-04 13:15:46 -05:00
Matthias Clasen
8ca2376495 Ignore hide-titlebar-when-maximized for custom titlebars
Try this again, this time being a bit more careful about size
allocation of titlebars.
2014-02-04 08:07:26 -05:00
Matthias Clasen
9177b3c0d2 Revert "Ignore hide-titlebar-when-maximized for CSD"
This reverts commit 54ec157599.
2014-02-04 08:07:26 -05:00
Matthias Clasen
0c483e1423 Make gtk_window_set_titlebar work on realized windows
Since realize does a lot of the heavy lifting of setting up
csd, we have to re-realize the window if we go from no-custom
titlebar to a custom titlebar or vice versa.

https://bugzilla.gnome.org/show_bug.cgi?id=722919
2014-02-03 22:38:06 -05:00
Matthias Clasen
365902cd58 Re-realize the window if needed
When gtk_window_set_titlebar is called, we need to set up
client-side decorations properly, and the easiest way to do
so is to realize the window again. Really, you should call
set_titlebar before the window is realized.

https://bugzilla.gnome.org/show_bug.cgi?id=722919
2014-02-03 22:22:27 -05:00
Olivier Brunel
a8d72a9c1e widget: Fix set_focus_child handling during focus changes
10b5ec20 made sure not to set focus_child to NULL all the way up to the
top, but only up to the common ancestor. However, it would never set it
on the common ancestor itself, which would therefore remain with a
focus_child set when it shouldn't.

A manifestation of the bug: focus column headers of a treeview, press Tab.
Now pressing Shift+Tab will go to another widget and not the column
headers, and Tab will (appear to) do nothing, all because the treeview
still has a focus_child set to column headers after a grab_focus().

Signed-off-by: Olivier Brunel <jjk@jjacky.com>

https://bugzilla.gnome.org/show_bug.cgi?id=723402
2014-02-03 21:25:07 -05:00
Matthias Clasen
5e80ec87f3 Avoid a gtk-doc warning 2014-02-03 21:12:43 -05:00
Matthias Clasen
e966a12fb2 Fix docs build 2014-02-03 21:03:37 -05:00
Matthias Clasen
05f2f63426 GtkMountOperation: Clean up a dangling signal handler
Based on a patch by Eugene Shatokhin,
https://bugzilla.gnome.org/show_bug.cgi?id=723366
2014-02-03 21:00:17 -05:00
Matthias Clasen
841a8d811a Update gtkvolumebutton.ui.h
Removing the tooltips removed some strings.
2014-02-03 16:43:45 -05:00
Matthias Clasen
ffea6a5624 Revert "fixed: draw css background and borders"
This reverts commit ba6128f8af.

This change breaks emacs drawing entirely. Since GtkFixed is
somewhat of a legacy widget anyway, lets just not bother doing
this modernization there, at least for now.
2014-02-03 16:02:16 -05:00
Matthias Clasen
f058b402e4 GtkVolumeButton: Remove tooltips
Showing tooltips on top of a transient popup does not work
out well, and is not really necessary here. At the same time,
remove the unnecessary repetitions of properties. In particular,
setting the label of the buttons here defeats the scale buttons
use of symbolic icons.

https://bugzilla.gnome.org/show_bug.cgi?id=723181
2014-02-03 15:43:24 -05:00
Matthias Clasen
c46b1c2a05 GtkScaleButton: Use a popover
This works better than the contortions we're currently doing
with an undecorated dialog, and grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=723181
2014-02-03 15:43:24 -05:00
Benjamin Otte
e9fb8ad1f7 css: Fix computation of pixels occupied by blur radius
These computations were done randomly in lots of places and more often
than not, they were also wrong.
This function was copied (with docs) from Firefox:
  http://lxr.mozilla.org/mozilla-central/source/gfx/2d/Blur.cpp

https://bugzilla.gnome.org/show_bug.cgi?id=723159
2014-02-03 21:38:16 +01:00
Benjamin Otte
43baa213b2 a11y: Ignore deprecation warnings for ATK focus tracker 2014-02-03 21:38:16 +01:00
William Jon McCann
8a71798c05 docs: add missing close para tag
From 30cc1512e
2014-02-03 09:57:01 -05:00
William Jon McCann
dcd43cc77a docs: fix spurious list close tag
Missed by patch 30cc1512e
2014-02-03 09:51:40 -05:00
Matthias Clasen
245c385ae7 Docs: Don't use note elements
In most cases, the text itself makes the message clear enough.
2014-02-02 01:22:14 -05:00
Matthias Clasen
30cc1512e6 Docs: Use markdown for lists
This greatly reduces the amount of xml in the docs.
2014-02-02 01:07:39 -05:00
Matthias Clasen
09d1b28249 docs: Convert to markdown
Specifically, switch to using markdown syntax for sections.
2014-02-02 00:30:27 -05:00
William Jon McCann
f5db0e7c75 docs: remove spurious para 2014-02-01 05:35:44 -05:00
William Jon McCann
66071234f6 docs: list items require blank lines 2014-02-01 05:35:43 -05:00
William Jon McCann
d86a63776b docs: use markdown instead of docbook tags 2014-02-01 05:18:53 -05:00
Matthias Clasen
7956dd271c Fix a case of nested comments 2014-01-31 18:48:13 -05:00
Jasper St. Pierre
328155d8b3 Update ui.h file for GtkFileChooserDefault rename 2014-01-31 15:20:38 -05:00
Jasper St. Pierre
f929a61399 gtkicontheme: Don't query CONTENT_TYPE to determine if something is an SVG
We already know based on the suffix of the filename.

https://bugzilla.gnome.org/show_bug.cgi?id=721895
2014-01-31 14:34:52 -05:00
Matthias Clasen
54ec157599 Ignore hide-titlebar-when-maximized for CSD
This setting really only makes sense for wm titlebars,
client-side titlebars are under application control
anyway.
2014-01-31 08:45:23 -05:00
Murray Cumming
a220871250 docs: Improve grammar in GtkHeaderBar overview 2014-01-31 11:24:34 +01:00
Matthias Clasen
4e066a750a GtkPopover: avoid a critical
focus_widget can be NULL, as pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=723181#c7
2014-01-30 08:13:05 -05:00
William Jon McCann
6a285daa79 assistant: add text-button style class
https://bugzilla.gnome.org/show_bug.cgi?id=723212
2014-01-29 20:56:21 -05:00
William Jon McCann
9698d73ade assistant: set window title with page title
This will set the headerbar title when necessary

https://bugzilla.gnome.org/show_bug.cgi?id=723212
2014-01-29 20:56:21 -05:00
William Jon McCann
8ea33c29d7 assistant: make button labels match mockups
https://bugzilla.gnome.org/show_bug.cgi?id=723212
2014-01-29 20:56:21 -05:00
William Jon McCann
ec10bbd6f5 assistant: add ability to use header bar
https://bugzilla.gnome.org/show_bug.cgi?id=723212
2014-01-29 20:56:20 -05:00
Giovanni Campagna
8e19b76543 GtkStyleContext: don't use disconnect_by_func()
disconnect_by_func() is slow, and this becomes particularly evident
when disposing a number of widgets (and their associated style
context) at once, such as when using a language binding which
uses a GC.

https://bugzilla.gnome.org/show_bug.cgi?id=723183
2014-01-29 23:06:07 +01:00
William Jon McCann
e31ebda1d7 docs: don't escape entities in example code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
768bc44081 docs: use |[ ]| instead of <programlisting></programlisting>
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
b4d4e08b05 docs: add docs for GtkFileChooserWidget signals
https://bugzilla.gnome.org/show_bug.cgi?id=723157
2014-01-28 23:10:04 -05:00
William Jon McCann
d87ea4776a Merge GtkFileChooserWidget and GtkFileChooserDefault
It seems that alternate implementations of GtkFileChooserWidget
never materialized. The split between GtkFileChooserWidget and
GtkFileChooserDefault is awkward. The immediate problem is that
it makes it difficult to document the keybinding signals. So it
makes sense to drop the abstraction and just have one thing.

https://bugzilla.gnome.org/show_bug.cgi?id=723157
2014-01-28 23:09:42 -05:00
William Jon McCann
eb0f1c63ba docs: remove spurious quotation mark 2014-01-28 15:59:49 -05:00
Carlos Garnacho
628b1f5e1c listbox: return GDK_EVENT_STOP if button events were handled
The button press/release handlers did invariably return FALSE, even
though it shouldn't if a row was found on the event coordinates. Also,
use GDK_EVENT_* defines for the return values.
2014-01-28 16:44:01 +01:00
Carlos Garnacho
709fb26587 popover: Improve minimal size allocation
The minimal size if no child widget was present/shown was far too small
to have enough room for the arrow width plus border radii, so
gtk_render_frame_gap would spew warnings about the gap being out of
boundaries.

Fixes issues seen in
https://bugzilla.gnome.org/show_bug.cgi?id=723031#c2
2014-01-28 16:20:05 +01:00
Carlos Garnacho
7b4ef99320 popover: Hide/ungrab on button release
If the grab is released during button press, the button release is
just then sent to the widget below the pointer. Depending on the
widget implementation, this could already trigger actions if the
widget does not perform any kind of button state tracking. It is
safer to ungrab on button release so no extra actions are possibly
triggered, and the behavior is uniform across widgets.

But the opposite situation may also happen, that a popover is
shown/grabbed on a button press event, so it'd get the sole button
release event after being shown, so prepare for that case by making
popover ignore single button release events with no preceding button
press.

Fixes issues seen in
https://bugzilla.gnome.org/show_bug.cgi?id=723031#c2
2014-01-28 16:18:53 +01:00
Kjell Ahlstedt
3fa9846399 Improve doc of gtk_widget_override_color()
Mention that it's not recursively applied to a container's children.

https://bugzilla.gnome.org/show_bug.cgi?id=566945
2014-01-28 16:02:07 +01:00
William Jon McCann
17d45484d7 docs: don't use <guimenuitem>
We don't want to assume menu bar structures.
2014-01-28 02:16:33 -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
5d053e03a9 docs: fix css properties table 2014-01-28 01:27:39 -05:00
William Jon McCann
0a1d276f4f docs: don't use <type> tags
Use # syntax where appropriate.
2014-01-28 00:21:26 -05:00
Matthias Clasen
05655c5bfa Trivial typo fix 2014-01-27 23:30:38 -05:00
Matthias Clasen
9d9a60c466 Paper dialog: Use baseline alignment
This improves the positioning of the labels wrt to the spin
buttons.
2014-01-27 23:30:37 -05:00
Matthias Clasen
3e67b57396 Print dialog: Use baseline alignment in page setup tab
Based on a patch from
https://bugzilla.gnome.org/show_bug.cgi?id=722722
2014-01-27 23:30:37 -05:00
Nikita Churaev
40ccb8e79c Fix vertical alignment of labels in "Paper" section of the print dialog
https://bugzilla.gnome.org/show_bug.cgi?id=722722
2014-01-27 23:30:37 -05:00
William Jon McCann
bf35c77f14 docs: use () instead of <function> tags 2014-01-27 23:08:08 -05:00
William Jon McCann
4a2043cbd2 docs: don't use footnotes
Temporarily remove documentation for keybinding signals for
GtkFileChooserDefault until we can find a way to add them
properly.
2014-01-27 22:32:24 -05:00
Matthias Clasen
3d17e3f88c GtkPlacesSidebar: Stop drives that can be stopped
Removable USB drives or memory sticks should be powered down
when the eject button is pressed. For this, we need to call
g_drive_stop() instead of g_drive_eject(), provided the drive
can be stopped.

https://bugzilla.gnome.org/show_bug.cgi?id=723121
2014-01-27 21:53:49 -05:00
Matthias Clasen
04e8d9fa5e GtkPlacesSidebar: Fix two copy-paste errors
Sadly, this means the code can have never been tested :-(
2014-01-27 21:53:49 -05:00
Matthias Clasen
2783395eae GtkPlacesSidebar: Remove to FIXMEs
It doesn't hurt to just add the ref here, as the FIXME suggests.
2014-01-27 21:53:49 -05:00
William Jon McCann
4872ee75e6 docs: don't use structfield tags 2014-01-27 19:59:58 -05:00
William Jon McCann
22586ea7c2 docs: use #*-struct instead of <structname> 2014-01-27 19:59:55 -05:00
Marek Kasik
8418e6422f printing: Enable search through locations in printers list
Add printer_compare() function for comparing printers according
to their names and locations. It is possible to search by multiple
keys separated by space or tabulator using logical conjunction.

Based on patch by William Hua.

https://bugzilla.gnome.org/show_bug.cgi?id=692931
2014-01-27 16:40:43 +01:00
Lionel Landwerlin
ed447eba08 widget: emit synthesized crossing event with correct device position
https://bugzilla.gnome.org/show_bug.cgi?id=704456
2014-01-27 13:25:55 +00:00
Marek Kasik
f17b36dc02 printing: Show "Replace" button when printing to existing file
Use gtk_dialog_add_button() which adds the button to
the message dialog correctly and uses gtk_widget_show() on it.
2014-01-27 11:12:48 +01:00
Ignacio Casal Quinteiro
62fe7ca077 win32: scale slider with marks was off by 2 pixels 2014-01-27 09:43:17 +01:00
Matthias Clasen
9347d27040 Use suggested-action style
When using header bars, make the default button in
GtkDialog use the suggested-action style.
2014-01-26 10:44:18 -05:00
Matthias Clasen
86972cee30 Revert "resources: Make Raleigh the real name of the theme"
This reverts commit 6fa703b506.

This did not work after all - we're trying to load the theme
css by its name, and the alias makes that not work.
2014-01-25 14:02:52 -05:00
Matthias Clasen
0e9a245e0f GtkGrid: fix property installation
The previous commit was misapplied.
2014-01-25 13:49:27 -05:00
David Schleef
26b4fc65b9 window: add note about window references
https://bugzilla.gnome.org/show_bug.cgi?id=665928
2014-01-24 23:53:13 -05:00
Javier Jardón
65ce9a523a gtkgrid: Use g_object_class_install_properties() and g_object_notify_by_pspec()
https://bugzilla.gnome.org/show_bug.cgi?id=634793
2014-01-24 22:55:09 -05:00
Javier Jardón
a2637160e3 gtkaccelgroup: Use g_object_class_install_properties() and g_object_notify_by_pspec() 2014-01-24 22:46:30 -05:00
Christian Dywan
dcf41924fe Clarify documentation of GtkAboutDialog::logo
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=636594
2014-01-24 22:43:51 -05:00
Matthias Clasen
5034920f78 Deprecate gtk_widget_get_root_window
The root window is a fairly X-centric concept, and it
really has no place in the GtkWidget API. Plus, this
is a rarely-used one-line convenience function with
poor documentation.
2014-01-24 20:16:34 -05:00
Matthias Clasen
e1d9974537 Drop internal uses of gtk_widget_get_root_window
This function is just a one-line convenience function that
is about to be deprecated.
2014-01-24 20:16:33 -05:00
William Jon McCann
6fd7e547c5 notebook: don't use a null page 2014-01-24 18:41:22 -05:00
Matthias Clasen
1bc1302af0 Respect 12/24-hour clock setting in the file chooser
Based on a patch by Garrett Regier in bug 699224.
2014-01-24 18:05:26 -05:00
Garrett Regier
e4be589448 Use GDateTime in the file chooser
Signed-off-by: Garrett Regier <garrett@yorba.org>

https://bugzilla.gnome.org/show_bug.cgi?id=699224
2014-01-24 18:05:26 -05:00
William Jon McCann
66f8026622 notebook: add a style class when the child tab is reorderable 2014-01-24 17:27:27 -05:00
Cosimo Cecchi
22bcd62e2e aboutdialog: make use-header-bar override work from bindings
Instead of setting "use-header-bar" from gtk_about_dialog_new(),
override its default value by inspecting the properties at constructor()
time. This makes it work from bindings as well, since they don't use the
convenience C constructor.

https://bugzilla.gnome.org/show_bug.cgi?id=722574
2014-01-24 15:50:36 -05:00
Matthias Clasen
6e96111d9f GtkHeaderBar: try harder to find the best window icon
GtkWindow has 4 (!) APIs for setting window icons, and we
have to try them all in the right order to find the right
icon. This commit makes it so, and keeps the icon list
manipulation inside gtkwindow.c by adding a private API
for getting a single icon at the right size.

https://bugzilla.gnome.org/show_bug.cgi?id=722515
2014-01-24 15:40:37 -05:00
William Jon McCann
3437f83ff3 notebook: add a style for prelighted labels 2014-01-24 13:15:44 -05:00
Ignacio Casal Quinteiro
bfcc6c015e win32: set color for scale marks 2014-01-24 18:27:43 +01:00
Ignacio Casal Quinteiro
f7a3d54a76 win32: add margin to scale trough 2014-01-24 17:57:59 +01:00
Ignacio Casal Quinteiro
b4ff954218 win32: add more width to the slider to not cut it when using marks 2014-01-24 17:30:28 +01:00
William Jon McCann
974e930fb8 Use a define for the default theme name 2014-01-24 08:08:34 -05:00
William Jon McCann
6fa703b506 resources: Make Raleigh the real name of the theme
And make gtk-default.css an alias to it.
2014-01-24 07:55:00 -05:00
Matthias Clasen
b011192111 Add an #ifdef to shut gtk-doc up
gtk-doc complains that the stock macros are deprecated,
but not in an #ifdef block. So add one.
2014-01-23 21:09:24 -05:00
Matthias Clasen
f4831df8ff Fix gtkenums doc section 2014-01-23 21:09:24 -05:00
Matthias Clasen
fec0116493 Slight rewording of some docs 2014-01-23 21:09:24 -05:00
Matthias Clasen
41944337af Trivial formatting fix 2014-01-23 21:09:24 -05:00
William Jon McCann
4a11acdc8c resources: move resources into a subdirectory 2014-01-23 21:04:59 -05:00
William Jon McCann
0426abd3c6 Improve docs for focus-line-pattern 2014-01-23 16:58:18 -05:00
William Jon McCann
b617b003ef Use 16px as default button and small toolbar icon sizes
https://bugzilla.gnome.org/show_bug.cgi?id=350190
2014-01-23 11:51:51 -05:00
Yosef Or Boczko
773e40ca7b docs: Add more a reference in GtkHeaderBar 2014-01-23 18:29:31 +02:00
Jakub Steiner
2eedebce19 stock icons: print icons no longer fuzzy
- improve legibility by aligning to the grid
- less dramatic stroke around application-exit
2014-01-23 16:05:55 +01:00
Carlos Garnacho
090a4f0af3 window: add missing return
A branch in the if/else if/else was missing a return, that was
unintended.
2014-01-22 20:50:33 +01:00
Carlos Garnacho
8595a38145 magnifier: Fix compiler warning 2014-01-22 20:50:33 +01:00
Carlos Garnacho
074e17e100 popover: Don't overdraw background
It was only done so the background would connect visually to the popover
tail, but then it brings aliasing issues when the border is drawn over the
background. Instead, overdraw the tail, so it also fills the gap left by
the border.
2014-01-22 18:32:16 +01:00
Carlos Garnacho
eb2c1242fe popover: Update child visibility when scrolling happens
If pointing_to starts falling outside of the parent scrollable allocation,
the popover will be automatically hidden, and shown back again when
pointing_to scrolls back to visibility.
2014-01-22 17:10:07 +01:00
Carlos Garnacho
8d3439db61 popover: Track parent scrollable adjustments
This makes sure popovers follow the relative_to widget if it is
contained within a GtkScrollable.
2014-01-22 17:10:07 +01:00
Carlos Garnacho
9fe26a93eb texthandle: Update child visibility of handles within scrollables
If the rect a handle points to starts falling outside of the parent
scrollable allocation, the handle will be automatically hidden, and
shown again when the rectangle is visible too.
2014-01-22 17:10:07 +01:00
Carlos Garnacho
328404795b texthandle: Track parent scrollable adjustments
This makes sure texthandles follow the parent if it is contained within a
GtkScrollable.
2014-01-22 17:10:07 +01:00
Carlos Garnacho
360d5f04c0 texthandle: ensure handles are recreated on parent hierarchy changes
This ensures the handles come out right even if the parent widget is
reparented to a different toplevel.
2014-01-22 17:10:07 +01:00
Carlos Garnacho
81f13232d8 popover: fix g-i warning 2014-01-22 17:10:07 +01:00
Carlos Garnacho
d0c74dc288 popover: Fix documentation blurb
The grabbing behavior is no longer exclusively controlled by the caller,
mention gtk_popover_set_modal().
2014-01-22 17:10:07 +01:00
Carlos Garnacho
834ad653ea texthandle: Use GtkWindow private popover API. 2014-01-22 17:10:07 +01:00
Carlos Garnacho
5f667b5820 popover: use GtkWindow private popover API 2014-01-22 17:10:07 +01:00
Carlos Garnacho
168227165d window: Make popover window private 2014-01-22 17:10:07 +01:00
Carlos Garnacho
889a280979 window: Use GList to store popover structs
When all popovers are removed on destroy(), if a popover is nested into
(eg. with relative_to within) another popover, the removal of one can
lead to the other being removed while the hashtable is being iterated,
which would lead to undefined behavior in further iterations.

Then, use a GList to store popovers, iterating can be made more resilient
on these situations, and unless on pathological cases there's not going
to be as many of those popovers as to cause performance decreases at the
times those are iterated.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
5bb259bc6a textview: Set GTK_STYLE_CLASS_OSD on text selection popovers 2014-01-22 17:10:06 +01:00
Carlos Garnacho
65edb10243 entry: Set GTK_STYLE_CLASS_OSD on text selection popovers 2014-01-22 17:10:06 +01:00
Carlos Garnacho
649004ce43 popover: Do not set GTK_STYLE_CLASS_OSD directly
That's up to the caller, popovers are by design not only meant to
have that role.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
462e7f0de1 popover: Fix allocation of CSS margins
that was forgotten about, leaving no room for theme shadows that'd
make popovers look less flat.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
69182c03fb popover: Flip popovers positioning on left/right on RTL.
If widgets have GTK_TEXT_DIRECTION_RTL, popovers being positioned
on GTK_POS_LEFT/RIGHT will default to appearing on the other side
too.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
a3b3b4621c window: Remove popovers on dispose() before unsetting focus.
The popovers may return keyboard grabs to previous widgets, so if
called after unsetting the focus, the window may be left with a
dangling GtkWidget that would cause crash at later dispose() calls.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
d105a3a36a entry: Improve positioning of touch selection magnifier
Always show completely above or below entry to avoid covering
content, and limit horizontal position so it doesn't overflow
to the right.
2014-01-22 17:10:06 +01:00
Matthias Clasen
ea0a1e31a7 Implement wfh functions
With only get_preferred_width and get_preferred_height implemented,
we end up calling the GtkBin height_for_width implmementation, which
knows nothing about the margins and paddings that GtkPopover needs.
As a result, a listbox added to a popover was getting cut off
at the bottom.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
e8fa9e1851 popover: Remember last focused widget on the toplevel when a popover is shown
This is so the previously focused widget can regain focus when a modal popover
is dismissed.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
1d495cbafd popover: Add a "modal" boolean property to GtkPopover
This property is TRUE by default, when a popover is modal, it
will automatically set a GTK+ grab on the popover, and grab
the keyboard focus into the popover.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
31042fe95f popover: Fix memory management of popovers
Popovers are strange in the sense that they aren't attached to a
parent directly, they rely on the relative_to widget so the toplevel
is shared, and when they have a parent, it is the toplevel itself,
not relative_to. This also means that there are conditions where the
popover loses it's parent, so they must survive unparenting.

The previous code would be floating the last reference as soon as the
parent is gone, but it was non-obvious who'd own that reference. So
fix this situation by granting the ownership of popovers to their
relative_to widget, an extra reference may be held by the toplevel
when the popover has a parent, but the popover object will be
guaranteed to be alive as long as the parent lives.

This way, memory management of popovers is as hidden from the user
as regular widgets within containers are, users are free to call
gtk_widget_destroy() on a popover, but it'd eventually become
destructed when relative_to is.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
342c23da23 popover: Implement keyboard focus behavior
When a popover is focused, the focus is forwarded so the first
child what would get the focus actually gets it. Also, implement
correct focus chain, so the keyboard focus stays within the popover
when navigating with keyboard.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
bd5490ad62 texthandle: Fix arguments in ::style-updated callback 2014-01-22 17:10:06 +01:00
Carlos Garnacho
36abb4b829 gtkmain: Let windows handle WM-related events before delivering to the grab_widget
This makes it possible to move/resize client-side decorated windows that are
otherwise obscured by a GTK+ grab somewhere else, either a popover within the
window itself or a modal dialog above the window.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
bfc87a315d entry: Show a GtkMagnifier popover on touch selection 2014-01-22 17:10:05 +01:00
Carlos Garnacho
4a8a2286e1 texthandle: Remove relative_to API
It's unused now, GtkTextHandle uses widget coordinates.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
844c6b8951 texthandles: Use GtkWindow popovers API
This offers the same behavior, but GDK_WINDOW_TEMP windows aren't used
anymore, involving less translations from/to root coordinates, plus no
glitches in having handles snap to content as windows move.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
db9e1d36d0 window: Keep track of popover children mapped status
In order to maintain visibility of the GdkWindow that's the parent window
of the popover widget.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
ace25368b1 window: Add gtk_window_get_popover_position()
A getter to complement the setter
2014-01-22 17:10:05 +01:00
Carlos Garnacho
7b9e060994 entry: Set use-underline in popover GtkToolButtons 2014-01-22 17:10:05 +01:00
Carlos Garnacho
d7acd29421 textview: Set use-underline in popover GtkToolButtons 2014-01-22 17:10:05 +01:00
Carlos Garnacho
3e6462c71b textview: Use GtkMagnifier on touch selection
The magnifier renders the area covered by the finger, making it easier to follow
the text being selected.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
61ab302c75 Add GtkMagnifier
This is a private widget that takes another widget on construction, and is able
to render parts of it, possibly at a different magnification level.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
15d7d5b31f pixelcache: check whether cached surface and cairo_t scales match 2014-01-22 17:10:05 +01:00
Carlos Garnacho
bb7ef098c4 popover: Add documentation 2014-01-22 17:10:05 +01:00
Carlos Garnacho
4d12d85919 popover: Honor GtkContainer::border-width
The border width is now set around the contained widget.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
7c10fc5580 popover: remove GTK+ grab (if any) on unmap
If there is a GTK+ grab on the popover, ensure that it's removed when it's
unmapped. If no GTK+ grab was performed on the popover, this function will
do nothing.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
b4805f7076 popover: listen harder on the widget being pointed to
Hierarchy, size allocation and widget visibility are now listened
to in order to update the popover state accordingly.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
caeb896096 Introduce GtkPopover
Now that the GtkBubbleWindow object has been cleaned up and made
more generic, rename it as GtkPopover and make it public.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
8a661b8786 bubblewindow: Remove popup/popdown() APIs
Those functions aren't as useful anymore, hiding/showing can be
controlled by setting the widget visibility, and grabbing can be
achieved by performing a GTK+ grab.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
8384ef961e entry: Avoid bubblewindow popup/popdown API
Besides setting all positioning properties at once, popup() would just
show the widget, so do that directly after just updating the position.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
1813c8391c textview: Avoid bubblewindow popup/popdown API
Besides setting all positioning properties at once, popup() would just
show the widget, so do that directly after just updating the position.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
49277953d3 bubblewindow: Point to the entire widget area by default
This way pointing_to is not fully needed, unless you're pointing
to an specific rectangle within the widget, passing NULL would unset
the region too.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
617f23b7eb bubblewindow: check the border-radius when rendering the bubble tail. 2014-01-22 17:10:04 +01:00
Carlos Garnacho
d55f39d26d bubblewindow: Improve overflow cases
If the bubble window doesn't fit into one direction, it must
lay at the other side of the pointed_to rectangle.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
923da6a8b8 bubblewindow: Make it relative to GtkWidget coordinates
GdkWindows are gone now from the API, the pointed_to rectangle
is from now on relative to the widget allocation. GtkTextView
and GtkEntry were updated to adapt to this change.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
e506f67c9b bubblewindow: Remove grab API
This is not as necessary now that bubble windows are popovers, if
a modal behavior is wanted on popover contents, a GTK+ grab on the
popover widget will suffice.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
12b0033266 bubblewindow: Turn into a GtkWindow popover
This way GtkBubbleWindows are rendered on top of all window content, without
the need of a GDK_WINDOW_TEMP window.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
85a19c894f window: Add lowlevel popovers API
Popovers are transient floating widgets that are confined to the
window space. These have their own GdkWindow that is set on top
of the regular window contents, so they can be used for popup menu
alike UIs with custom popup/popdown/grabs behavior.
2014-01-22 17:10:04 +01:00
William Jon McCann
89a51bd15d docs: fix improper description of GtkTreeModel "rows-reordered" iter
https://bugzilla.gnome.org/show_bug.cgi?id=698398
2014-01-22 01:21:27 -05:00
William Jon McCann
798d53c7fd docs: use correct syntax for signals 2014-01-21 23:20:38 -05:00