Mass api change from GtkExtendedLayout --> GtkSizeRequest
This commit makes a few massive changes to the extended layout
code:
a.) gtkextendedlayout.c --> gtksizerequest.c
b.) _is_height_for_width --> get_request_mode()
c.) get_desired_size(), get_desired_width(), get_desired_height() -->
get_size(), get_width(), get_height()
This is the first partial commit and only effects portions
of the tree that have already been merged in master (in order to
easily cherry pick this commit).
Emmanuele Bassi [Thu, 17 Jun 2010 14:41:12 +0000 (15:41 +0100)]
application: Allow sub-classes to override the Window creation
Sub-classes of GtkApplication might want to override the way an
application window is created - for instance, to hook into GtkBuilder
or to set up some basic UI or state.
A new GtkApplication::create_window() virtual function is added to the
GtkApplicationClass vtable, which returns the newly created GtkWindow.
The gtk_application_create_window() function calls the vfunc and adds
the returned window to the list of windows managed by the application
instance.
Calling gtk_application_add_window() will also set the default window,
if one is not already set.
This commit also removes a spurious g_object_ref_sink() on the newly
created GtkWindow.
Carlos Garnacho [Fri, 4 Jun 2010 15:06:57 +0000 (17:06 +0200)]
gdk_event_get_device(): Fallback to core pointer/keyboard.
Events could be injected by third party code, which could not have a
GdkDevice set for newer GdkEvent types holding a GdkDevice. This
function will now fallback to core pointer/keyboard, plus issuing
a warning about the problem.
Carlos Garnacho [Fri, 4 Jun 2010 14:17:41 +0000 (16:17 +0200)]
GdkDeviceManagerCore: protect against xevent->xany.window not being a GdkWindow.
Conceivably this GdkEventTranslator may still be asked for events such as
NoExpose or GraphicsExpose for pixmaps. It is not meant to translate such events,
but should at least behave with them.
Fixed negative allocations from gtk_box_size_allocate()
Fixed the allocation loop to check if it was allocated at least
enough space to hold its visible children before going and distributing
extra space among children. Fixes bgo #617444.
Carlos Garnacho [Tue, 15 Jun 2010 17:06:51 +0000 (19:06 +0200)]
Make GTK+ device grabs take precedence over GTK+ grabs
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=620440 (Reported by
Marek Kašík), where the print dialog modality would impair the pop-up
window from getting events. Device GTK+ grabs gain in specificness.
Tor Lillqvist [Wed, 9 Jun 2010 07:52:11 +0000 (10:52 +0300)]
Fix build breakage on non-X11
AM_CONDITIONALs need to be seen in all code paths. The one for
XINPUT_NONE was only in the X11 if branch. But as that Automake
confitional wasn't used in any Makefile.am anyway, just drop the
AM_CONDITIONAL.
Matthias Clasen [Wed, 9 Jun 2010 04:29:55 +0000 (00:29 -0400)]
Get rid of GtkProgress
The entire api was deprecated since 2.0. This patch detangles
GtkProgress from GtkProgressBar and moves all the pieces into
GtkProgressBar that are required for non-deprecated progressbar
functionality.
Add (transfer none) to the return value of gtk_text_buffer_create_mark(),
as the documentation clearly states the caller doesn't have ownership of
the returned value.
Matthias Clasen [Mon, 7 Jun 2010 20:44:58 +0000 (16:44 -0400)]
Add GtkApplication
This is a work in progress to stub out an application class. The
primary goal is to provide a mechanism for applications to export
GtkActions, and there is a standard "Quit" action.
This is based on GApplication.
Future work:
* Add a way to say "This is my application menubar", which gets
put into all toplevel windows on non-OS-X, and into the top
on OS X.
* Support session management.
* Support application settings.
Marek Kasik [Mon, 7 Jun 2010 12:52:38 +0000 (14:52 +0200)]
Return error instead of showing an error dialog when printing
Remove message dialogs showing an error when printing. Return
GTK_PRINT_OPERATION_RESULT_ERROR and set error in such a case.
Also return GTK_PRINT_OPERATION_RESULT_CANCEL when cancelled.
Do it for synchronous and asynchronous cases (#549127).
Sven Herzberg [Thu, 3 Jun 2010 12:00:34 +0000 (14:00 +0200)]
drop the draw_string() function from GtkStyle
Reviewed by Michael Natterer.
* gtk/gtkstyle.c,
* gtk/gtkstyle.h: gdk_draw_string() has been deprecated and removed
already. There's no one left who should be using this function
(found this when porting sapwood to GTK+ 3.0)
* modules/engines/pixbuf/pixbuf-draw.c: don't implement this unused
function