Commit Graph

36401 Commits

Author SHA1 Message Date
Marek Kasik
1b032b18cc gdkwindow: Handle references in "update_windows" list correctly
Since update_windows list is a static variable in GdkWindow.c which
contains pointers to windows which needs to be updated, it can happen
that it contains a pointer to a window even after quit from a gtk_main().
If another gtk_main() is called in the same process it tries to process
windows in the list which leads to a crash.
Correct reference count handling of added windows prevents such applications
from crash.

https://bugzilla.gnome.org/show_bug.cgi?id=711552
2013-12-16 17:58:04 +01:00
William Jon McCann
bfd27445e6 about dialog: add docs for new GtkLicense values 2013-12-16 11:50:33 -05:00
William Jon McCann
63c9342e30 about dialog: differentiate GPL "or later" versions
https://bugzilla.gnome.org/show_bug.cgi?id=720410
2013-12-16 11:44:35 -05:00
Matthias Clasen
ea8bb7e0ea GtkHeaderBar: Center buttons
Header bars can get taller than the buttons require, and we don't
want them to extend all the way. Center them instead.
2013-12-14 22:32:11 -05:00
Matthias Clasen
269282257d GtkHeaderBar: fix flipping of window controls
We were not keepign the separators at the inside.
2013-12-14 18:30:10 -05:00
Marek Kasik
11d9e5c95c printing: Add missing strings back for translation
There are string in gtkprintunixdialog.ui marked for translation
which are not in gtkprintunixdialog.ui.h.

https://bugzilla.gnome.org/show_bug.cgi?id=708907
2013-12-14 16:41:53 -05:00
Marek Kasik
083f834dd7 printing: Don't double free connection to CUPS
Don't call httpClose() on http connections which are created
outside of GtkCupsRequest in GtkCupsRequest's functions.

https://bugzilla.gnome.org/show_bug.cgi?id=720338
2013-12-14 16:33:02 -05:00
Emilio Pozuelo Monfort
4e1b73325d ScaleButton: make the popup transient to the button's window
Fixes the popup positioning on wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=720256
2013-12-14 15:49:38 -05:00
Takao Fujiwara
4d6c509943 GtkIMContextSimple: Update compose table
This adds Multi_key + f + i, as well as other sequences,
mainly Greek.

https://bugzilla.gnome.org/show_bug.cgi?id=710510
2013-12-14 15:34:54 -05:00
Bastien Nocera
4b42526e1f gdkwindow: Use GdkWindowHints instead of guint for flags
https://bugzilla.gnome.org/show_bug.cgi?id=720342
2013-12-14 15:29:44 -05:00
Matthias Clasen
9f1159a1a8 Fix a compiler warning
Don't return without a value from a non-void function.
2013-12-13 20:05:03 -05:00
Benjamin Otte
9849b292a9 window: Sanitize size hint computation
We don't want the maximum size to be smaller than the minimum size. Not
just because it's wrong but also because when this happens the rest of
GTK gets mighty confused and infloops resizing to min-size and
max-size in turns causing a flickering window. Well, at least if you
run X without a window manager. Or your window manager hasn't finished
starting up.

Private RHEL bug finding this issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1035409
2013-12-14 01:18:23 +01:00
Benjamin Otte
d4c8f1028a clipboard: Don't crash when data is requested from NULL window
This could happen if data was requested from a separate screen now that
multi-screen is no longer supported.

Ideally, we'd want to support copying to other screens, but that
requires solving in GDK as that's X-specific so cannot be well
abstracted by GDK (without the reintroduction of multiple screens).

https://bugzilla.gnome.org/show_bug.cgi?id=719314
2013-12-13 19:07:42 +01:00
Benjamin Otte
f123fe7fe7 gtk-demo: Make double-click work again 2013-12-13 19:07:42 +01:00
Daniel Mustieles
37b153c8a3 Updated Spanish translation 2013-12-13 17:23:01 +01:00
Matthias Clasen
f3d22d2a9b Make app menu fallback a bit more reliable
If the theme has no 'menu' control in the window decorations,
show the menubar after all.
2013-12-13 01:21:06 -05:00
Jasper St. Pierre
cf8fb209e3 headerbar: Don't add hidden widgets
This is a much simpler fix.
2013-12-13 01:11:27 -05:00
Jasper St. Pierre
a3933f96eb Revert "GtkHeaderBar: don't show dangling separators"
This reverts commit a33e5748db.
2013-12-13 01:09:42 -05:00
Matthias Clasen
acdd9c8ed6 Avoid double app menu fallback
Both GtkApplicationWindow and GtkHeaderBar listen for changes
of the gtk-shell-shows-app-menu setting, so they need to somehow
coordinate who is going to take action and show a fallback.
We prefer the menu button in the title over the menubar, so
let GtkApplicationWindow opt out if it finds that the header bar
has been configured to show window controls.
2013-12-13 01:02:36 -05:00
Matthias Clasen
3b8bf01604 Drop a reference to nonexisting API
The GtkApplicationWindow documentation had a reference
to gtk_header_bar_set_show_fallback_app_menu(). That
function no longer exists, so drop it.
2013-12-13 01:02:36 -05:00
Matthias Clasen
a33e5748db GtkHeaderBar: don't show dangling separators
If we don't have a window icon, we hide the titlebar_icon,
we still add it, so we can't simply go by the number of
children when deciding whether to show the separator or
now. Instead, update the separator visibility as we create
the various buttons.
2013-12-13 01:02:36 -05:00
Matthias Clasen
dc073b8020 Make window icons work in GtkHeaderBar 2013-12-13 01:02:36 -05:00
Matthias Clasen
abe994f1d7 testtitlebar: Set a window icon
This reveals that GtkHeaderBar does not pick up window icons
correctly for it menu button, currently.
2013-12-13 01:02:36 -05:00
Ryan Lortie
04897e5b09 gdk: add gdk_window_set_shadow_width()
And deprecate the X11-specific version of it.

We call this new API _set_shadow_width() and not _set_frame_extents()
because we already have a gdk_window_get_frame_extents() with a
different meaning and different type of value.

https://bugzilla.gnome.org/show_bug.cgi?id=720374
2013-12-12 23:53:47 -05:00
Jasper St. Pierre
ec61f290dc headerbar: Respect the show-close-button property 2013-12-12 21:55:06 -05:00
Jasper St. Pierre
01f5ff765b window: Update decorations when updating state
This fixes the maximize button not updating...
2013-12-12 21:55:02 -05:00
Matthias Clasen
a9eb813054 testtitlebar: Fix initial values
Make sure that the controls show the initial values fo the
headerbar properties, not the other way around.
2013-12-12 21:18:11 -05:00
Matthias Clasen
2f90781073 testtitlebar: more tests
Turn this into a GtkApplication with an app menu.
Allow to override the gtk-shell-shows-app-menu setting
and the decoration-button-layout style property.
2013-12-12 21:12:44 -05:00
Jasper St. Pierre
d9f92424b2 headerbar: Support all kinds of CSD decorations
Move the gtkwindow.c CSD code into GtkHeaderBar, and make it triggerable
by the show-close-button property, and remove shows-fallback-app-menu.

https://bugzilla.gnome.org/show_bug.cgi?id=720233
2013-12-12 19:30:59 -05:00
Matthias Clasen
d8401c5f0a GtkHeaderBar: treat "" as 'no subtitle'
This is one of the few cases where it makes some sense to blur
the line between and empty string and NULL: without this, it is
hard to reset the subtitle e.g. from a builder file. And we
have the has-subtitle property now to enforce subtitle size
allocation independently.
2013-12-12 19:29:52 -05:00
Volker Sobek
70eb35d569 GtkFileChooser: Don't fill location_entry if we just populated the file list
Only fill the location entry with the file name of the tree view's
selected file when the selection was done by the user.

When the file chooser's action is GTK_FILE_CHOOSER_ACTION_OPEN, it
selects the first file in the tree view once loading has finished. For
this case we don't want it to insert the file name in the location
entry, as it hinders efficient navigation using the location entry. To
achieve this, use a priv flag to keep track of whether the
selection-changed signal was caused by the file chooser itself.

https://bugzilla.gnome.org/show_bug.cgi?id=386569
2013-12-12 17:42:10 -06:00
Matthias Clasen
7ab7a262c1 Make testtitlebar more testy
Now that the nice titlebar example is in gtk3-demo, we can
use testtitlebar as an actual testbed for headerbar stuff.

This immediately reveals size allocation issues when titlebar
widgets change size.
2013-12-12 16:56:41 -05:00
Matthias Clasen
08202cb045 gtk-demo: Use title case consistently 2013-12-12 16:28:07 -05:00
Matthias Clasen
f7d4a2772b Add a header bar example to gtk-demo
This is basically standalone the testtitlebar example, turned
into a demo.
2013-12-12 16:28:07 -05:00
Daniel Mustieles
7a1bf9a919 Updated Spanish translation 2013-12-12 11:17:42 +01:00
Volker Sobek
d881edd33a testtitlebar: Fix -Wunused-variable warning
GtkWidget *title is no longer used.

https://bugzilla.gnome.org/show_bug.cgi?id=720296
2013-12-12 02:15:20 +01:00
Volker Sobek
06091ed457 GtkFileChooserDefault: Remove unused struct field
The field changing_folder is no longer used anywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=720293
2013-12-12 01:33:37 +01:00
Jasper St. Pierre
37baeed66e headerbar: Remove unused private API
Don't remove gtkheaderbarprivate.h, even though it's empty,
since we'll add more to it soon.

https://bugzilla.gnome.org/show_bug.cgi?id=720233
2013-12-11 19:28:30 -05:00
Jasper St. Pierre
e582404e90 wayland: Fix order of xdg-shell requests 2013-12-11 19:28:30 -05:00
Yosef Or Boczko
7e2fdad6c5 Updated Hebrew translation 2013-12-11 13:37:38 +02:00
Fran Diéguez
a756a99884 Updated Galician translations 2013-12-11 10:27:47 +01:00
Jehan
57f59010b8 Gettext comment for "default:LTR" must be before the string
https://bugzilla.gnome.org/show_bug.cgi?id=720096
2013-12-10 23:31:47 -05:00
Matthias Clasen
8596a34b8b Simplify a check
Whenever titlebar is set, title_box is pointing to the
same widget, so we can just always use title_box here.
Pointed out by Jasper St. Pierre.
2013-12-10 23:19:36 -05:00
Matthias Clasen
50a206223f Trivial typo fix 2013-12-10 23:03:12 -05:00
Matthias Clasen
0191760bdc Use ::has-subtitle in testtitlebar
This also gets simplified.
2013-12-10 23:03:12 -05:00
Matthias Clasen
05d34f9a5b Use ::has-subtitle when constructing CSD titlebars
GtkWindow was constructing a custom title label to
avoid the size reservation for a subtitle. This is
now easier with the ::has-subtitle property.
2013-12-10 23:03:12 -05:00
Matthias Clasen
1a6a86a867 GtkHeaderBar: Add a ::has-subtitle property
It is a fairly common case to just want a title, and not
reserve extra space for a subtitle. This is much easier
to get right by setting a boolean property than by
constructing a custom title widget.
2013-12-10 23:03:12 -05:00
Matthias Clasen
b6a6729ce1 Fix a segfault in the event axes demo
Seems that pointer_info can be NULL, after all.
2013-12-10 23:03:12 -05:00
Matthias Clasen
da08592ea1 Update headerbar title from window title
This removes a possible source of confusion in our API.
The title is now synchronized both ways between the window
and the headerbar.

https://bugzilla.gnome.org/show_bug.cgi?id=720067
2013-12-10 20:45:42 -05:00
Matthias Clasen
5918a4dae8 Sync the window title initially
When setting a custom titlebar that happens to be a GtkHeaderBar,
we connect to notify::title to pick up title changes on the headerbar,
but we forgot to sync the title initially. Fix that.
2013-12-10 18:44:26 -05:00