Commit Graph

26341 Commits

Author SHA1 Message Date
Wouter Verhelst
28fc4de6aa Clarify that one cannot use the same variable
A naive way to perform an action on all parent nodes of a given node
could be to do:

while(gtk_tree_model_iter_parent(model, &iter, &iter)) {
	/* perform some action on iter here */
}

However, since gtk_tree_model_iter_parent() will initialize the iterator
pointed to by the second parameter before performing the lookup, this
will not work.

Explicitly document this behaviour.

Signed-off-by: Wouter Verhelst <w@uter.be>

https://bugzilla.gnome.org/show_bug.cgi?id=573380
2016-04-05 11:01:53 -04:00
Bastien Nocera
becc0d45b6 recent-manager: Fix "format not a string literal" error
https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-05 12:58:58 +02:00
Bastien Nocera
6a5224ffcb file-chooser-widget: Fix "format not a string literal" error
https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-05 12:58:58 +02:00
Bastien Nocera
a8c59543cf about-dialog: Fix "format not a string literal" errors
A non-intrusive fix.

https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-05 12:58:58 +02:00
Bastien Nocera
bf8653c2e1 ui-manager: Fix "format not a string literal" errors
Quite a bit of code movement, but necessary to build with the
default format errors produced by newer versions of GCC.

https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-05 12:58:58 +02:00
Lapo Calamandrei
85e37925f0 Adwaita: transparent textview border border
So it will play nicely with gedit color combinations.
See https://bugzilla.gnome.org/show_bug.cgi?id=764203
2016-04-04 12:03:11 +02:00
Timm Bäder
58891c1fe5 headerbar: Don't underallocate the label box
We use a label_sizing_box to make sure the headerbar can always contain
both a title and a subtitle without resizing when showing/hiding either
of them, but we should only do that for the height; the min width of the
label_box can be larger than that of the label_sizing_box.
2016-04-02 17:03:52 +02:00
Lapo Calamandrei
d23c6c6246 Adwaita: style textview border
see https://bugzilla.gnome.org/show_bug.cgi?id=764203
2016-04-02 16:24:52 +02:00
Lapo Calamandrei
f2f1725b40 Adwaita: cosmetic fixes 2016-04-02 16:03:02 +02:00
Lapo Calamandrei
b1205a9c96 Adwaita: set secondary caret color to selection blue
see https://bugzilla.gnome.org/show_bug.cgi?id=764204
2016-04-01 16:48:13 +02:00
Rui Matos
4bfa6c30bf gtkwindow: Don't allow unresizable windows to be smaller than required
Commit cdc580463e made it so that
unresizable windows can't be smaller than a set default size but it
lost the logic to ensure these windows remain at least big enough to
comply with their requisition.

https://bugzilla.gnome.org/show_bug.cgi?id=764174
2016-04-01 15:30:03 +02:00
Timm Bäder
84dfda1a2b widget: Always warn when underallocating widgets 2016-04-01 10:04:25 +02:00
Matthias Clasen
d1acb786a7 icon theme: Make the builtin hicolor index match reality
We were missing all of the status directories, and a few sizes.
This was causing us to not find image-missing on systems without
hicolor icon theme (this basically only happens on Windows).

https://bugzilla.gnome.org/show_bug.cgi?id=764378
2016-03-31 07:12:50 -04:00
Matthias Clasen
d8da5879aa Adwaita: theme acceleditor > label
We need to have an opaque background here, otherwise the underlying
cell shines through.

https://bugzilla.gnome.org/show_bug.cgi?id=764376
2016-03-30 19:50:22 -04:00
Matthias Clasen
72178fd0c9 Accel cell renderer: Set a css name
Give the event box we use here the distinctive name "acceleditor".
2016-03-30 19:50:22 -04:00
Benjamin Otte
71a5f07620 widget: queue a redraw only if resize highlighting is enabled
e8aa9b0440 introduced a new debug mode
that highlights resizes. Unfortunately it has the side effect of
always queueing redraws even when the debug mode is not enabled.
Make the redraw conditional.
2016-03-30 21:44:58 +02:00
Debarshi Ray
fd143a2b38 window: Make the sample code obey the party line on geometry widgets
The geometry_widget parameter is deprecated [1]. If one is passed, we
remove GDK_HINT_BASE_SIZE and GDK_HINT_RESIZE_INC from the mask [2].

[1] commit 08974a1e9a
[2] commit f7cc4abbad

https://bugzilla.gnome.org/show_bug.cgi?id=764321
2016-03-30 13:21:50 +02:00
Debarshi Ray
27a1b50bc6 window: Fix gtk_window_set_geometry_hints documentation
The geometry_widget parameter is ignored from 3.20 onwards [1], not
3.18 as mentioned in the documentation.

[1] commit 08974a1e9a

https://bugzilla.gnome.org/show_bug.cgi?id=764321
2016-03-29 19:31:59 +02:00
Lapo Calamandrei
38f94194a6 Adwaita: set caret-color for drop targets 2016-03-29 15:06:11 +02:00
Lapo Calamandrei
e7cd3dddd8 Adwaita: cosmetic fix 2016-03-29 15:01:57 +02:00
Benjamin Otte
a91237d65e window: Remove suspicious branch
While this commit was found to make emacs windows shrink (and it was
reverted in the gtk-3-20 branch for that reason), that was the only
observed breakage, while the reversal broke several of our unit tests.

Closer study of the emacs sources revealed that it does some really
unsupportable things like doing its own X event handling behind GTK+'s
back and freely mixing sizes of GtkWindows and GdkWindows obtained in
various ways. I've filed a bug against emacs with suggestions for how
to avoid the shrinking window, regardless of this commit.

Original commit message:

It seems this branch is not needed anymore. It was originally added in
1999 to support gtk_widget_realize(), but all those reasons seem
obsolete today.
Instead just call gtk_widget_realize().

If you end up at this commit when bisecting:
There is no bug that made me remove this code, it was purely meant to be
cleanup / dead code removal. I seem to have introduced a new bug or
bisecting wouldn't have let you here. So it seems we should just revert
this commit.
2016-03-28 17:05:09 -04:00
Timm Bäder
aeed695e26 gtkapplication: _get_app_menu can return NULL 2016-03-28 18:18:20 +02:00
Matthias Clasen
568feffa69 Use dngettext instead of ngettext
Since we are a library, we have to pass the domain explicitly.

https://bugzilla.gnome.org/show_bug.cgi?id=764261
2016-03-27 19:00:31 -04:00
Matthias Clasen
5dabfa7b39 places sidebar: Plug a small memory leak
_gtk_trash_moniotr_get_icon is transfer full, so we have
to unref the icon.
2016-03-27 18:42:25 -04:00
Cosimo Cecchi
b6b53fc19c GtkClipboard: fix a typo 2016-03-27 08:39:44 -07:00
Cosimo Cecchi
efea673c31 GtkCssSection: remove duplicated documentation
Fixes a build time warning.
2016-03-27 08:35:13 -07:00
Cosimo Cecchi
26f9dc6508 scale: fix marks node position for scales with value
We should only count the value node as the first/last one if its
position matches.
2016-03-26 22:43:53 -07:00
Cosimo Cecchi
9f48b6b07a range: use gadget pointers for grab/mouse locations
Simplify code and remove the mouse location indirection.
2016-03-26 22:43:53 -07:00
Cosimo Cecchi
6efc06ef5c scale: remove impossible case
We only create the gadget when the markup is not empty, so we don't
need to check again here.
2016-03-26 22:43:53 -07:00
Cosimo Cecchi
b989910293 scale: cache pango layouts for mark labels
Constantly creating pango layouts while drawing means that animations
will be slow. Instead, cache the pango layout in the mark structure.
2016-03-26 22:43:53 -07:00
Matthias Clasen
100cf2442e Add a function to get the selection of a clipboard
This was requested in
http://bugzilla.gnome.org/show_bug.cgi?id=730821
2016-03-26 23:30:21 -04:00
Matthias Clasen
cb738bc201 Remove private clipboard api from public headers 2016-03-26 23:17:53 -04:00
Matthias Clasen
0d0980f30e filter model: Mark property nicks and blurbs for translation
Better descriptions are not going to happen... might as well
admit it.
2016-03-26 18:59:02 -04:00
Matthias Clasen
b1b271ab09 Drop some more code
This ifdefed out function was only used in the code I just nuked,
so it can go as well.
2016-03-26 18:53:55 -04:00
Matthias Clasen
543ad3aabb file chooser: Drop unused code
We've never restored filechooser positions, and we aren't going to.
2016-03-26 18:52:04 -04:00
Matthias Clasen
8d874cf0f8 Stop using pango_split_file_list
Add a copy of this deprecated utility in gtkutils.c and use
it instead of the pango API.
2016-03-26 18:19:37 -04:00
Matthias Clasen
6994fe03ee Split off copied pango utils in their own source
This will make it easier to use them in more than one place.
2016-03-26 18:12:16 -04:00
Matthias Clasen
e2d89b9931 Revert "window: Remove suspicious branch"
This reverts commit 67ab00e01e.

Bisection showed that this commit caused emacs windows to shrink
to a small size when first shown.
2016-03-26 17:38:40 -04:00
Matthias Clasen
7fe1037e84 range: Simplify highlight allocation
Since we are really only interested in the center point of the
slider allocation, the pre-computed slider geometry is perfectly
fine, just use it always. This avoids the complication with
gadget visibility.
2016-03-26 13:50:42 -04:00
Matthias Clasen
e33188ad41 range: Avoid miscalculating highlight allocation
The slider gadget may be turned invisible as side-effect of
gtk_range_calc_slider(). If that happens,
gtk_css_gadget_get_content_allocation() returns { 0, 0, 0, 0},
which leads us to calculate a negative allocation for the highlight
node. Avoid this, by just reusing our already calculated slider
allocation in this case (it is not technically the same as the
content, allocation, but the difference hardly matter here.

https://bugzilla.gnome.org/show_bug.cgi?id=764022
2016-03-26 10:50:00 -04:00
Matthias Clasen
82bde5b84d HighContrastInverse: Fix suggested-action colors
Choose a suitable foreground color instead of hardcoding white.

https://bugzilla.gnome.org/show_bug.cgi?id=764170
2016-03-25 22:45:55 -04:00
Christoph Reiter
72346cb209 inspector: add slider for adjusting the font scale
https://bugzilla.gnome.org/show_bug.cgi?id=761435
2016-03-25 16:10:28 -04:00
Matthias Clasen
826f729b6f stack switcher: Add a missing include 2016-03-25 15:52:33 -04:00
Matthias Clasen
6ac7b54378 dnd: Move GtkDragDest to a separate file
This follows what was done for GtkDragSource in
415030d25f and shaves another
500 lines off gtkdnd.c.
2016-03-25 15:37:20 -04:00
Mohammed Sadik
d47c7f7ba0 gtkaboutdialog: don't break ABI in GtkLicense enum
As the elements in the enum are not explicitly numbered, inserting an
element between some other elements shall change the values of elements
after the insertion. So append the new element at the end.

Anyway, no code should rely on the position of an element in an enum.

https://bugzilla.gnome.org/show_bug.cgi?id=763850
2016-03-25 18:38:46 +01:00
Olivier Fourdan
5d34cf64a2 popover: raise when showing
Some other widget might have mapped and raised another child window of
the toplevel in the meantime, causing the popover window to be covered.

Raise the popover window to avoid the issue.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=763627
2016-03-25 17:23:34 +01:00
Razvan Chitu
65687ba392 trashmonitor: change trash monitoring process
The trash is monitored for state changes - going from empty to non-empty and the
other way round. Monitoring is done by handling change signals from a regular
file monitor. On each signal, an enumeration of the trash contents is started in
order to see if it is empty or not. This causes issues when many files are
trashed, because the gvfs trash backend is flooded with enumeration requests,
resulting in CPU usage spikes. In order to fix this, the "item-count" attribute
of the trash should be queried instead.

Replace asynchronous enumeration with asynchronous information query and update
the trash state based on the "item-count" attribute. Emit state change signal
only when the state actually changes.

https://bugzilla.gnome.org/show_bug.cgi?id=763600
2016-03-24 23:20:14 -04:00
Mohammed Sadik
40e777ae30 gtkaboutdialog: Add support for GNU Affero GPLv3+
Add support for GNU Affero GPLv3 (or later) to GtkLicense enum

https://bugzilla.gnome.org/show_bug.cgi?id=763850
2016-03-24 23:18:40 -04:00
Benjamin Otte
cd78fa15ed menu: Clip children to view window
Don't overdraw the arrow allocations.

https://bugzilla.gnome.org/show_bug.cgi?id=764118
2016-03-24 20:25:49 +01:00
Jakub Steiner
ac62bc0df9 High Contrast Inverse: switches
- make sure both non active and active states are contrasty

https://bugzilla.gnome.org/show_bug.cgi?id=763802
2016-03-24 16:43:20 +01:00