Commit Graph

602 Commits

Author SHA1 Message Date
Javier Jardón
8177ad320e Use gtk_scale_new_with_range() instead gtk_[v|h]scale_new_with_range() 2010-10-30 02:26:23 +02:00
Javier Jardón
b3a7d401a1 Use gtk_paned_new() instead gtk_[v|h]paned_new() 2010-10-30 02:26:23 +02:00
Javier Jardón
f00f120fd7 Use gtk_ruler_new() instead gtk_[v|h]ruler_new() 2010-10-30 02:26:23 +02:00
Javier Jardón
8d008790be Use gtk_separator_new() instead gtk_[v|h]separator_new() 2010-10-30 02:26:23 +02:00
Javier Jardón
e31304fb7b Use gtk_button_box_new() instead gtk_[v|h]_button_box_new() 2010-10-30 02:26:23 +02:00
Vincent Untz
4f9f52a6ea Port tests to GtkScrollable API instead of deprecated GtkLayout API
https://bugzilla.gnome.org/show_bug.cgi?id=633374
2010-10-28 12:18:28 -04:00
Javier Jardón
49c409c498 tests: use accessor functions to access GtkToogleButton 2010-10-26 05:02:19 +02:00
Alberto Garcia
d6a73fd5b0 Assign all g_signal_connect() and friends to gulong variables
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=87821
2010-10-22 18:58:47 +02:00
Christian Dywan
6db62c6617 Use new GtkComboBoxEntry in all tests 2010-10-18 09:13:44 +02:00
Javier Jardón
e7f51ef6a4 Use the new GtkComboBoxText API
Also remove mentions of the old text convenience API from the docs,
and point to GtkComboBoxText instead.
2010-10-15 16:58:27 -04:00
Tristan Van Berkom
9612c64817 Deprecate GtkComboBoxEntry in favor of added properties to GtkComboBox
GtkComboBox now sports a construct-only "has-entry" property which
decides if it uses a GtkEntry to allow additional user input. Also
it has a new "entry-text-column" to fetch strings for the entry
from the model.

This patch deprecates the GtkComboBoxEntry and updates the rest of GTK+
to use the new semantics on GtkComboBox instead.

GtkComboBoxEntry will be removed altogether before GTK+ 3, in a
later commit.
2010-10-13 21:52:27 -04:00
Owen W. Taylor
88cf547029 Fix handling of the geometry widget
The geometry widget feature of gtk_window_set_geometry_hints() has
never really worked right because the calculation that GTK+ did to
compute the base size of the window only worked when the geometry
widget had a larger minimum size than anything else in the window.

Setup:
* Move the GtkSizeGroup private functions to a new private header
  gtksizegroup-private.h
* Add the possibilty to pass flags to _gtk_size_group_queue_resize(),
  with the flag GTK_QUEUE_RESIZE_INVALIDATE_ONLY to suppress adding
  the widget's toplevel to the resize queue.
* _gtk_container_resize_invalidate() is added to implement that feature
* _gtk_widget_override_size_request()/_gtk_widget_restore_size_request()
  allow temporarily forcing a large minimum size on the geometry
  widget without creating resize loops.

GtkWindow:
* Compute the extra width/height around the geometry widget
  correctly; print a warning if the computation fails.
* Always make the minimum size at least the natural minimum
  size of the toplevel; GTK+ now fails badly with underallocation.
* Always set the base size hint; we were failing to set it
  properly when the specified minimum size was overriden, but
  it's harmless to always set it.

Tests:
* New test 'testgeometry' that replaces the 'gridded geometry' test
  from testgtk. The new test is roughly similar but creates a bunch
  of windows showing different possibilities.
* The testgtk test is removed. No need to have both.

https://bugzilla.gnome.org/show_bug.cgi?id=68668
2010-10-11 14:05:29 -04:00
Benjamin Otte
2a1650843d Revert "testgtk: Remove snapshot test"
This reverts commit 99c82af20a and fixes
up things to compile again. Of course, the snapshotting now uses
gtk_widget_draw() instead.
2010-10-05 23:22:55 +02:00
Javier Jardón
b072ea220c Remove unneded casts
As gtk_adjustment_new() returns a GtkAdjustment* now

https://bugzilla.gnome.org/show_bug.cgi?id=630731
2010-09-29 01:18:10 +02:00
Javier Jardón
42f480a537 gtk_adjustment_new() should return a GtkAdjustment*
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=630731
2010-09-29 01:18:10 +02:00
Benjamin Otte
bf81be51eb testgtk: Use gtk_widget_set_visual() 2010-09-28 19:11:46 +02:00
Tristan Van Berkom
e4a0a39a56 Fixing tests/ build for removal of GtkObject type. 2010-09-27 15:10:23 +09:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Javier Jardón
3b8184cfee Move classes that currently derive from GtkObject to GInitiallyUnowned 2010-09-26 22:18:13 -04:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.

Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.

So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
  gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
  gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.

The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Benjamin Otte
15497825c0 testgtk: Get rid of gdk_drawable_get_size() usage 2010-09-26 15:11:44 +02:00
Benjamin Otte
1d3f6b30b0 API: Rename gtk_cairo_paint_*() to gtk_paint_*()
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
e194bc14fd testgtk: Use draw signal in layout test 2010-09-26 15:11:42 +02:00
Benjamin Otte
5442f5b9f2 testgtk: Use draw signal in scrolling test 2010-09-26 15:11:42 +02:00
Benjamin Otte
0ab6956579 testgtk: Use draw signal in cursors example 2010-09-26 15:11:41 +02:00
Benjamin Otte
87940287aa testgtk: Remove non-existing property from frame constructor 2010-09-26 15:11:41 +02:00
Benjamin Otte
38c932ace6 testgtk: Use draw signal in gridded geometry example 2010-09-26 15:11:41 +02:00
Benjamin Otte
c42f6ff4bf testgtk: Make big windows test not use expose events
Instead, use gdk_window_set_background().
2010-09-26 15:11:41 +02:00
Benjamin Otte
e1571a5936 testgtk: Use draw signal in resize grips example 2010-09-26 15:11:41 +02:00
Benjamin Otte
b8ebcdd0e0 testgtk: Connect to draw signal in "rotated text" example 2010-09-26 15:11:41 +02:00
Benjamin Otte
7af767333e testgtk: Connect to draw signals in "composited window" example 2010-09-26 15:11:41 +02:00
Benjamin Otte
ec604d11ec testgtk: Connect to draw signal in alpha test
Test still behaves weird, no idea why though.
2010-09-26 15:11:41 +02:00
Benjamin Otte
fc52c9daf3 testgtk: Check visual, not colormap for RGBA availability 2010-09-26 15:11:32 +02:00
Benjamin Otte
d7ede44dae testgtk: gtk_widget_set_colormap() => gtk_window_set_visual() 2010-09-26 15:11:32 +02:00
Benjamin Otte
08e6fc11ad testgtk: Don't set colormap when creating GDK windows 2010-09-26 15:11:31 +02:00
Benjamin Otte
a38472c139 testgtk: No need to set a custom colourmap here 2010-09-26 15:11:31 +02:00
Benjamin Otte
6607f2b794 API: Rename gdk_set_source_pixmap() to gdk_set_source_window()
That's what it's used for now.
2010-09-26 15:11:30 +02:00
Benjamin Otte
99c82af20a testgtk: Remove snapshot test
gtk_widget_get_snapshot is on its way out.

The test can be added back once we have gtk_widget_draw(), but until
then, there's no way to take snapshots.
2010-09-26 15:04:02 +02:00
Benjamin Otte
806a7239ae widget: shape_combine_mask => shape_cobine_region
Replace gtk_widget_shape_combine_region() with
gtk_widget_shape_combine_mask() and
gtk_widget_input_shape_combine_region() with
gtk_widget_input_shape_combine_mask().
As GdkBitmap is going away, and the region equivalents already exist,
this seems like pretty much the default step to take.

Includes code to fix up the users.
2010-09-26 15:02:59 +02:00
Benjamin Otte
dceb149ca4 testgtk: Convert WM hints example to use gdk_window_set_icon_list()
gdk_window_set_icon() is about to go away.

Also removes the circles.xbm file and uses the oncluded openfile logo
instead.
2010-09-26 15:02:59 +02:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Tor Lillqvist
dd36afc207 Don't use the same name for a function that used to be a variable
Rename the gtk_major_version() etc functions I introduced yesterday to
start with gtk_get. Avoids misleading results in client programs whose
developers that don't notice the change or the compiler warnings, and
when recompiling against gtk3 then use the function addresses as the
version numbers.
2010-09-09 11:06:26 +03:00
Colin Walters
913cdf3be7 GDK: Prefix key names with KEY_
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.

For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.

Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
2010-09-08 18:51:44 -04:00
Tor Lillqvist
cb24bcc613 Turn the gtk version and age variables into functions
Having variables exported from a DLL is slightly painful and
potentially error-prone on Windows, so let's try get rid of them now
when we can. Starting with these.
2010-09-08 21:31:33 +03:00
Matthias Clasen
76b21033f9 Adapt tests to dialog api change 2010-09-02 09:31:54 -04:00
Matthias Clasen
6b5672c199 Remove now unused GtkProgressBarOrientation enum 2010-09-01 23:30:21 -04:00
Matthias Clasen
3302f22da2 Adapt testgtk progressbar test to api changes 2010-09-01 23:26:19 -04:00
Javier Jardón
a0e0c9e89c tests/testgtk.c: Use accessor functions to access GtkWindow 2010-08-23 20:17:41 +02:00
Javier Jardón
252a8fc048 tests/testgtk.c: Use accessor functions to access GtkWidget 2010-08-22 18:30:03 +02:00
Benjamin Otte
aaf70d1327 testgtk: Use Cairo to load XBM image
This should really use GdkPixbuf, but apparently we can't load XBM
images. And I'm too lazy to convert it.
2010-08-10 21:02:31 +02:00
Benjamin Otte
de285edc72 testgtk: Use Pixbufs in the shapes example 2010-08-10 21:02:31 +02:00
Benjamin Otte
2513636877 testgtk: Rename pixmap => pixbuf in various places
Now that we use Pixbufs for the tests instead of Pixmaps, we should name
the tests like that.
2010-08-10 21:02:31 +02:00
Benjamin Otte
6b19815f87 testgtk: Use pixbufs instead of pixmaps
This is for creating a GtkImage with an icon.
2010-08-10 21:02:31 +02:00
Benjamin Otte
ad571a3a5e testgtk: Make image test not use Pixmaps, but Pixbufs 2010-08-10 21:02:31 +02:00
Benjamin Otte
727122b8d6 testgtk: Fix types and get rid of casting 2010-08-10 21:02:31 +02:00
Benjamin Otte
c661eb73a1 testgtk: Remove image from drawable test
The test only tested old APIs.
2010-08-10 21:02:27 +02:00
Benjamin Otte
a513bdf3f7 testgtk: Remove alpha drawing test
We use Cairo for that these days.
2010-08-10 21:02:26 +02:00
Javier Jardón
3ccc617052 Completely remove any use of GtkWindow allow-grow and allow-shrink properties
These have been deprecated and removed from master.
GtkWindow:resizable should be used instead.
This completes commit 1a03a65e36

Reported by Benjamin Otte
2010-08-07 17:19:16 +02:00
Benjamin Otte
e0efb8798a testgtk: Remove unused variable 2010-07-26 16:42:48 +02:00
Benjamin Otte
e8bf80ebea testgtk: Draw rotated text example with pangocairo 2010-07-26 16:42:48 +02:00
Benjamin Otte
8630657324 testgtk: Replace gdk_draw_rectangle() with Cairo 2010-07-26 16:42:48 +02:00
Benjamin Otte
17bd528df5 tests: Use gdk_screen_get_default_colormap()
We don't need the RGB colormap here.
2010-07-26 16:42:48 +02:00
Benjamin Otte
58ef2afdfa tests: Use GdkPixbuf for taking a screenshot, not GdkImage 2010-07-26 16:42:48 +02:00
Benjamin Otte
6d4bae5ccc tests: Remove gdk_draw_pixbuf() with Cairo equivalent 2010-07-26 16:42:47 +02:00
Javier Jardón
bf976cc1e4 Use accessor functions to access GtkStatusbar 2010-07-13 19:40:50 +02:00
Javier Jardón
c17dad9d32 Use accessor functions to access GtkSpinButton 2010-07-13 19:40:50 +02:00
Javier Jardón
92a1382bd6 Use accessor functions to access GtkPaned 2010-07-13 19:40:49 +02:00
Javier Jardón
fbf1de72c4 Use accessor funtions to access GtkLayout 2010-07-13 19:40:48 +02:00
Javier Jardón
7f2cc85db9 Use accessor functions to access GtkDialog 2010-07-13 19:40:47 +02:00
Javier Jardón
4427760bcc Use GtkBin accessors 2010-07-13 19:40:47 +02:00
Javier Jardón
9663801be7 Use accessor functions to access GtkColorSelectionDialog 2010-07-13 19:40:46 +02:00
Javier Jardón
d562611660 Use accessor functions to access GtkNotebook 2010-07-13 17:50:48 +02:00
Christian Dywan
04c54efe5c Deprecate GtkNotebookPage as used in switch-page
Fixes: 618327
2010-07-13 16:49:53 +02:00
Benjamin Otte
300e6b84cd s/GdkRegion/cairo_region_t/ in all of gtk
https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Benjamin Otte
3e96cfe8fc Deprecate the GdkRegion API
Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Matthias Clasen
5e0dfed135 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.

Bug #620618
2010-06-09 00:35:09 -04:00
Javier Jardón
da8643e457 Remove some GTK_DISABLE_DEPRECATED and ENABLE_BROKEN guards 2010-06-07 04:50:05 +02:00
Matthias Clasen
c51f965782 Some cleanups after the module cache file change
Bring the various 'run uninstalled' hacks in line with the
new way of doing things, and fix make install for module cache
files.

Patch by Tadej Borovsak.
2010-05-18 19:23:06 -04:00
Javier Jardón
901105766e Do not use deprecated GtkNoteBook api in testgtk 2010-05-03 01:51:23 +02:00
Javier Jardón
7065c566a3 Remove deprecated GtkProgress functionality from testgtk 2010-05-03 01:51:23 +02:00
Christian Dywan
7ccd787f04 Don't set child-min-width/ height in the button box test
This is not a property. The feature was removed.
2010-05-03 01:51:23 +02:00
Christian Dywan
786b5774e3 Revert accidental removal of book pixmap strings 2010-05-03 01:51:23 +02:00
Christian Dywan
09c84a006f Remove unused dump_accels() function from testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
0c0976be1d Remove GtkTipsQuery demo from testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
1dabde28ac Don't use gtk_widget_set_uposition/size in testgtk
Use gtk_window_move and gtk_widget_set_size_request instead.
2010-05-03 01:51:22 +02:00
Christian Dywan
646b417c20 Remove unused text helper functions from testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
6536ad7299 Use new 2.14 GtkColorSelection API in testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
eaf3ccfba0 Replace GtkFileSelection with GtkFileChooser in testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
c30e1865d8 Use GtkComboBoxEntry for the display list in testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
36c3426efb Use GtkComboBoxEntry in entry test in testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
81c8fcb72b Declare book_open/closed_xpm in testgtk notebook 2010-05-03 01:51:22 +02:00
Christian Dywan
a927f1f17d Remove item factory test from testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
e0602fd6a8 Remove obsolete GtkText test from testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
2f70bb98cb Remove obsolete GtkTree test from testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
1eefd43961 Use an array and new toolbar API in testgtk 2010-05-03 01:51:22 +02:00
Christian Dywan
274395063a Replace option menus in testgtk with combo boxes 2010-05-03 01:51:22 +02:00
Christian Dywan
63131903ad Use new progress bar API in testgtk progress test 2010-05-03 01:51:22 +02:00
Christian Dywan
3b721ea9c9 Use a tree view in testgtk selection target test 2010-05-03 01:51:21 +02:00
Christian Dywan
e8f1a3ccf0 Remove deprecated GtkTooltips 2010-05-03 01:51:21 +02:00
Javier Jardón
04a548a463 Removed a call to a recently removed test function
The function was a test of the deprecated GtkList
2010-05-03 01:51:20 +02:00
Javier Jardón
d97ca04f5b Remove GtkGammaCurve completely 2010-05-03 01:51:20 +02:00
Javier Jardón
20342702f4 Remove gtkmain stuff from docs and tutorial.
Also, substitue the deprecated functions with the new ones in
documentation and in tests code
2010-05-03 01:51:18 +02:00
Javier Jardón
858d4fb007 Remove remaining GtkButtonBox deprecated stuff
This completes commit b1b986cc604bffd924a13fbcb180dd234a0b8d14
2010-05-03 01:49:40 +02:00
Javier Jardón
c9dae4c600 Remove deprecated code: GtkCheckMenuItem 2010-05-03 01:48:45 +02:00
Christian Dywan
a42886d81d Remove GtkCList, GtkCTree, GtkFileSelection and GtkPreeview tests 2010-05-03 01:39:50 +02:00
Javier Jardón
32b9aeaadd Don't use GTK_WIDGET_STATE in internal code anymore
Use gtk_widget_get/set_state() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-09 02:40:17 +01:00
Javier Jardón
16a59ad912 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:41:05 +01:00
Javier Jardón
1fe7d3cefd Deprecate widget flag: GTK_WIDGET_MAPPED
Use gtk_widget_get_mapped() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:19:03 +01:00
Javier Jardón
e8e95d4c5e Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_CAN_DEFAULT)
Use new API instead: gtk_widget_set_can_default ()
2010-03-02 07:58:05 +01:00
Javier Jardón
214a023e91 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 07:52:07 +01:00
Javier Jardón
a27d5a2c9e Deprecate widget flag: GTK_WIDGET_IS_SENSITIVE
Use gtk_widget_is_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 05:32:51 +01:00
Javier Jardón
4f78f70b15 Deprecate widget flag: GTK_WIDGET_DRAWABLE
Use gtk_widget_is_drawable() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 04:55:55 +01:00
Christian Persch
59ddde4c37 Implement property editor for GdkColor properties
Bug #606434.
2010-01-11 17:51:41 +01:00
Christian Dywan
bb1824c131 Deprecate flag macros for toplevel, state, no window and composite child
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE,
GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and
GTK_WIDGET_COMPOSITE_CHILD.

Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and
GTK_OBJECT_TYPE which have become redundant.

Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel,
GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD
is replaced with use of the "composite-child" property and uses of
GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window.

Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are
changed to direct flag usage.

Documentation is updated to refer to gtk_widget_set_has_window and
gtk_widget_get_has_window.

Gail and tests are updated as well.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-01-04 07:57:05 +01:00
Hans Breuer
31357a7ab6 Enable big_window bench on win32, dialog for everyone 2009-07-26 19:14:05 +02:00
Benjamin Otte
1a385c50f0 fix compile warnings
Fallout from running make CFLAGS="-Werror"; mostly missing casts and
constness issues.
2009-06-17 10:28:03 +02:00
Matthias Clasen
ae94c371d1 Add a separate keybinding signal for activating links
Keeping the keybinding signal and the regular signal separate is
cleaner and allows us to pass the uri as a parameter to the
activate-link signal.
2009-05-11 02:44:12 -04:00
Matthias Clasen
9dbb30482b Add link support to GtkLabel
This patch is based on SexyUrlLabel, but with significantly enhanced
functionality: keynav, tooltips, context menu, theming.
2009-05-11 01:23:13 -04:00
Michael Natterer
213ecb7a33 add some orientation flipping code to the "flipping" test.
2009-02-19  Michael Natterer  <mitch@imendio.com>

	* tests/testgtk.c: add some orientation flipping code to the
	"flipping" test.


svn path=/trunk/; revision=22376
2009-02-19 15:12:35 +00:00
Michael Natterer
9b59889847 Bug 546285 – Allow GtkEntry to draw progress
2008-12-05  Michael Natterer  <mitch@imendio.com>

	Bug 546285 – Allow GtkEntry to draw progress

	* gtk/gtkentry.[ch]: add new API similar to GtkProgressBar which
	allows to set the entry's progress_fraction, its progress_pulse_step
	and to let the entry's progress pulse.

	* gtk/gtk.symbols: updated.

	* tests/testgtk.c: add progress demo code to the "Entry" window.


svn path=/trunk/; revision=21846
2008-12-05 11:31:30 +00:00
Christian Dywan
46e4d22c89 Bug 561504 – testgtk should load rc file from sub folder
2008-11-26  Christian Dywan  <christian@imendio.com>

	Bug 561504 – testgtk should load rc file from sub folder

	* tests/testgtk.c (main):
        Make testgtk look in subfolder and warn if not found

svn path=/trunk/; revision=21809
2008-11-26 08:36:10 +00:00
Federico Mena Quintero
0278fdcbc2 Don't do funny casts to avoid compiler warnings
2008-07-18  Federico Mena Quintero  <federico@novell.com>

	* demos/gtk-demo/changedisplay.c (find_toplevel_at_pointer): Don't
	do funny casts to avoid compiler warnings.

	* demos/gtk-demo/textview.c (easter_egg_callback): Likewise.

	* gtk/gtkmain.c (rewrite_event_for_grabs, gtk_get_event_widget): Likewise.

	* gtk/gtkmodules.c (load_module): Likewise.

	* gtk/gtkselection.c (gtk_selection_convert): Likewise.

	* gtk/gtktipsquery.c (gtk_tips_query_event): Likewise.

	* gtk/queryimmodules.c (query_module): Likewise.

	* tests/testgtk.c (create_gridded_geometry, create_key_lookup)
	(find_widget_at_pointer): Likewise.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=20862
2008-07-18 18:27:30 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Johan Dahlin
1a30e12586 Use g_object_new instead of gtk_widget_new
2008-06-19  Johan Dahlin  <jdahlin@async.com.br>

    * demos/testpixbuf.c (new_testrgb_window):
    * gtk/gtkctree.c (gtk_ctree_new_with_titles):
    * gtk/gtkitemfactory.c (gtk_item_factory_construct),
    (gtk_item_factory_create_item):
    * gtk/gtkmenu.c (gtk_menu_set_tearoff_state):
    * gtk/gtkprogressbar.c (gtk_progress_bar_new),
    (gtk_progress_bar_new_with_adjustment):
    * gtk/gtkscrolledwindow.c (gtk_scrolled_window_new):
    * gtk/gtktext.c (gtk_text_new):
    * gtk/gtkviewport.c (gtk_viewport_new):
    * tests/simple.c (main):
    * tests/testgtk.c (create_statusbar), (create_get_image),
    (create_saved_position), (create_tooltips), (create_cursors),
    (create_display_screen), (create_progress_bar), (create_idle_test):
    * tests/testmultidisplay.c (make_selection_dialog), (main):
    * tests/testmultiscreen.c (main):
    * tests/testrgb.c (new_testrgb_window):
    Use g_object_new instead of gtk_widget_new


svn path=/trunk/; revision=20462
2008-06-19 12:25:19 +00:00
Michael Natterer
060948a43b some more undeprecation.
2008-06-18  Michael Natterer  <mitch@imendio.com>

	* tests/testgtk.c: some more undeprecation.


svn path=/trunk/; revision=20447
2008-06-18 08:51:55 +00:00
Michael Natterer
73800758fd deprecate gtk_type_class().
2008-06-18  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktypeutils.[ch]: deprecate gtk_type_class().

	* gtk/gtk.symbols: changed accordingly.

	* gtk/gtksettings.c (gtk_settings_install_property)
	(gtk_settings_install_property_parser): get rid of using
	gtk_type_class() by keeping a static reference to GtkSettingsClass
	around in both functions and passing that pointer on to
	settings_install_property_parser().

	* tests/testgtk.c: use g_type_class_ref()/unref() instead of
	gtk_type_class().

	* gtk/gtkobject.c: #undef GTK_DISABLE_DEPRECATED around including
	gtktypeutils.h.


svn path=/trunk/; revision=20444
2008-06-18 07:00:46 +00:00
Björn Lindqvist
6eb51d28e3 tests/pixbuf-lowmem.c tests/pixbuf-random.c
2008-05-25  Björn Lindqvist  <bjourne@gmail.com>

	* tests/pixbuf-lowmem.c
	* tests/pixbuf-random.c
	* tests/pixbuf-randomly-modified.c
	* tests/pixbuf-read.c
	* tests/pixbuf-threads.c
	* tests/testgtk.c
	* tests/testtreeview.c: Fix remaining compiler warnings in these
	files (#523751).

svn path=/trunk/; revision=20144
2008-05-25 08:41:15 +00:00
21:10:15 Tim Janik
b3d160ced5 added GdkRectangle *clip_rect to gtk_widget_get_snapshot().
2008-05-21 21:10:15  Tim Janik  <timj@imendio.com>

        * gtk/gtkwidget.h: added GdkRectangle *clip_rect to gtk_widget_get_snapshot().

        * gtk/gtkwidget.c: clip the returned snapshot pixmap to clip_rect.
        return snapshot pixmap coordinates widget relative in *clip_rect.

        * tests/testgtk.c: fixed bogus NULL pointer unref.


svn path=/trunk/; revision=20124
2008-05-21 19:15:12 +00:00
10:49:20 Tim Janik
4111cf2065 Bug 318807 – Offscreen windows and window redirection.
2008-03-18 10:49:20  Tim Janik  <timj@imendio.com>

	* Applied pixmap redirection patch by Alexander Larsson with
	various updates from:
	Bug 318807 – Offscreen windows and window redirection.


	Updates:

	* updated docs to mention "Since 2.16".

	* tests/testgtk.c: fixed snapshooting pixmap leak.
	convert pixmap to pixbuf after snapshooting, to compensate for different
	bit depths (occurs when snapshooting ARGB visuals and displaying the
	pixmap in an RGB visual).

	* gdk/gdkwindow.[hc]: made GdkWindowRedirect private.

	* gdk/gdkwindow.c: removed damage idle handler, there's no aparent
	need for it. enqueue damage notification as GDK_DAMAGE events
	for each painting redirection at the start of the event queue.
	consider windows with a redirection fully visible when invalidating,
	and when updating from backing store. cleaned up stale variables.

	* gdk/gdkevents.c: added _gdk_event_queue_prepend().

	* gtk/gtkwidget.c: fixed coordinates for !NO_WINDOW widgets in
	gtk_widget_get_snapshot; this fixes garbage snap offsets for gammacurve,
	tree, drawingarea, text, handlebox, etc.
	clip the redirected window hierarchy to window sizes, the visible
	rectangles don't need to be taken into account here.
	extended snapshooting docs to recommend gdk_pixbuf_get_from_drawable()
	in case pixmap visuals could mismatch.

	* gdk/x11/gdkwindow-x11.c: removed _gdk_windowing_window_get_visible_rect().


	Base patch:

	* tests/testgtk.c: add a "Snapshot" test to demonstrate snapshooting
	of possibly obscured widgets into an offscreen pixmap.

	* gtk/gtkwidget.[hc]: add GtkWidget::damage-event signal, add
	gtk_widget_get_snapshot() to render a widget's contents to a GdkPixmap.

	* gtk/gtkmain.c: dispatch GDK_DAMAGE events.

	* gdk/gdkwindow.c: moved outer gdk_window_new() and gdk_window_reparent()
	implementations here, adapted them to propagate redirects to child windows.
	gdk_window_end_paint(): copy repainted window contents to redirection pixmap,
	clipped to visible region. queue GDK_DAMAGE event delivery.
	gdk_window_redirect_to_drawable(): install window painting redirection.
	gdk_window_remove_redirection(): remove previously installed redirection.

	* gdk/x11/gdkwindow-x11.c: added _gdk_windowing_window_get_visible_rect(),
	renamed _gdk_window_new() and _gdk_window_reparent().

	* gdk/gdkwindow.h: added GdkWindowRedirect* to GdkWindowObject, export
	gdk_window_redirect_to_drawable() and gdk_window_remove_redirection().

	* gdk/gdkevents.h: added GDK_DAMAGE event type.

	* gdk/gdkevents.c: extract time and state from GDK_DAMAGE events.

	* gdk/gdkinternals.h: added internal prototypes.



svn path=/trunk/; revision=20122
2008-05-21 19:04:24 +00:00
Emmanuele Bassi
2e73e9b4bb Revert back to r19454.
2008-02-27  Emmanuele Bassi  <ebassi@gnome.org>

	* tests/testgtk.c: Revert back to r19454.

svn path=/trunk/; revision=19665
2008-02-27 10:31:24 +00:00
Matthias Clasen
7dbb99c297 2.13.0
svn path=/trunk/; revision=19628
2008-02-21 18:03:04 +00:00
Michael Natterer
2a9c3e80e7 initialize GdkColor structs to fix warning about uninitialized "pixel"
2008-02-01  Michael Natterer  <mitch@imendio.com>

	* tests/testgtk.c: initialize GdkColor structs to fix warning
	about uninitialized "pixel" member.

	* tests/testactions.c: connect the toolbar_style() callback so it
	does something useful and doesn't warn about being defined but not
	used.


svn path=/trunk/; revision=19454
2008-02-01 11:20:47 +00:00
Ryan Lortie
e8e5af2d8c Connect the "destroy" signal so that the 'window' pointer is set back to
2007-06-29  Ryan Lortie  <desrt@desrt.ca>

        * tests/testgtk.c (create_composited_window): Connect the "destroy" 
        signal so that the 'window' pointer is set back to NULL (like for the 
        other examples).

        * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_finalize): Don't 
        destroy the Damage here.  By finalize() XDestroyWindow has already 
        been called (and took the Damage with it).

        Bug #452046.


svn path=/trunk/; revision=18290
2007-06-29 16:02:24 +00:00
Yevgen Muntyan
2cbaeadf43 new method, gtk_widget_modify_cursor() (#89314).
2007-06-06  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtkwidget.c:
	* gtk/gtkwidget.h: new method, gtk_widget_modify_cursor() (#89314).

	* gtkrc.c:
	* gtkrc.h: new functions _gtk_rc_style_set_rc_property() and
	_gtk_rc_style_unset_rc_property().

	* gtk/gtk.symbols: added gtk_widget_modify_cursor.

	* tests/testtext.c (do_cursor_visible_changed):
	* tests/testgtk.c (create_styles): test it.


svn path=/trunk/; revision=18066
2007-06-06 19:43:31 +00:00
Emmanuele Bassi
9191e01b70 Revert previous commit; the API is not yet finalized - see bug #166995.
2007-06-04  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkradiobutton.[ch]:
	* gtk/gtk.symbols:
	* tests/testgtk.c: Revert previous commit; the API is not yet
	finalized - see bug #166995.

svn path=/trunk/; revision=18023
2007-06-04 14:37:17 +00:00
Emmanuele Bassi
1fff6b4fbd Add gtk_radio_button_set_value(), gtk_radio_button_get_current_value() and
2007-06-04  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkradiobutton.h:
	* gtk/gtkradiobutton.c:
	* gtk/gtk.symbols: Add gtk_radio_button_set_value(),
	gtk_radio_button_get_current_value() and gtk_radio_button_get_value().
	Use these functions to set and get an arbitrary integer associated to
	a GtkRadioButton in a group, like the value associated to a
	GtkRadioAction.

	* tests/testgtk.c:
	(create_radio_buttons), (radio_toggled_cb): Exercise the new API.

svn path=/trunk/; revision=18019
2007-06-03 23:39:43 +00:00
Matthias Clasen
885ba04648 Add support for composited child windows. (#412882, Ryan Lortie)
2007-06-01  Matthias Clasen  <mclasen@redhat.com>

        Add support for composited child windows.  (#412882, Ryan Lortie)

        * gdk/gdk.symbols:
        * gdk/gdkdisplay.h:
        * gdk/gdkinternals.h:
        * gdk/gdkwindow.[hc]: Add gdk_display_supports_composite() and
        gdk_window_set_composited().

        * gdk/x11/gdkevents-x11.c:
        * gdk/x11/gdkdisplay-x11.[hc]:
        * gdk/x11/gdkwindow-x11.[hc]: X11 implementation.

        * gdk/win32/gdkdisplay-win32.c:
        * gdk/win32/gdkwindow-win32.c: Dummy win32 implementration.

        * gdk/quartz/gdkdisplay-quartz.c:
        * gdk/quartz/gdkwindow-quartz.c: Dummy Quartz implementation.

        * gdk/directfb/gdkdisplay-directfb.c:
        * gdk/directfb/gdkwindow-directfb.c: Dummy DirectFB implementation.

        * tests/testgtk.c: Add a "composited window" test.


svn path=/trunk/; revision=18004
2007-06-01 12:16:12 +00:00
Tim Janik
4b93b282aa made handle box test non-modal, so other test can interact with handle
Thu May  3 16:27:34 2007  Tim Janik  <timj@imendio.com>

        * tests/testgtk.c (create_handle_box): made handle box test non-modal,
        so other test can interact with handle boxes.



svn path=/trunk/; revision=17785
2007-05-03 14:33:17 +00:00
Tim Janik
8a8202ce13 applied patch from Xan Lopez which adds GTK_BUTTONBOX_CENTER to
Thu Feb  8 13:07:08 2007  Tim Janik  <timj@imendio.com>

        * applied patch from Xan Lopez which adds GTK_BUTTONBOX_CENTER to
        GtkButtonBox (bug #336159).

        * gtk/gtkenums.h:
        * gtk/gtkvbbox.c, gtk/gtkhbbox.c, gtk/gtkbbox.c:
        support GTK_BUTTONBOX_CENTER.

        * tests/testbbox.c: new button box test, which allows testing of 
        the various button box properties.

        * tests/testgtk.c: added GTK_BUTTONBOX_CENTER. to button box test.



svn path=/trunk/; revision=17276
2007-02-08 12:11:02 +00:00
Tim Janik
fb12bbcebb added GtkArrow::arrow-scaling style property to control the arrow/border
Tue Sep 19 17:00:04 2006  Tim Janik  <timj@imendio.com>

        * gtk/gtkarrow.c: added GtkArrow::arrow-scaling style property to
        control the arrow/border ratio within the allocation.

        * tests/testgtk.c: added a GtkArrow to handle box test.

        * tests/testgtkrc: test ::arrow-scaling property.
2006-09-19 15:51:19 +00:00
Tim Janik
2c0d76bfa2 fixed compiler warnings.
Mon Sep 11 14:22:39 2006  Tim Janik  <timj@imendio.com>

        * tests/testgtk.c: fixed compiler warnings.
2006-09-11 12:24:32 +00:00
Tim Janik
219dc5bdee allow (most) windows to be resizable. added ellipsization settings to
Tue Aug 29 11:57:40 2006  Tim Janik  <timj@imendio.com>

        * tests/testgtk.c: allow (most) windows to be resizable.
        added ellipsization settings to progress bars.
2006-08-29 10:01:02 +00:00
Søren Sandmann
b9d1a03440 Create 'composited' label.
Tue Apr 25 10:25:28 2006  Søren Sandmann  <sandmann@redhat.com>

	* tests/testgtk.c (create_alpha_window): Create 'composited' label.

	* tests/testgtk.c (on_composited_changed): New function, change
	the label to say whether the screen is composited or not.

	* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
	composited status change, invalidate the window and propagate the signal;.

	* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
	if reset_type_hint is TRUE.

	* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
	the old hints, store a shadow copy in the public window->type_hint
	bitfield, otherwise set this field to normal. Set the private
	field to the type hint.

	* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.

	* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
	"reset_type_hint" indicating whether the type hint needs to be
	reset. New field type_hint containing a GdkWindowTypeHint.

	* gtk/gtkwidget.c (propagate_composited_changed): New function to
	propagate changes in composited status.
	(gtk_widget_class_init): Add composited_changed signal.

	* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.

	* gtk/gtkwidget.c (gtk_widget_is_composited): New function.

	* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.

	* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
	the item belongs to a menubar. Set the type_hint appropriately
	depending on the outcome.

	* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.

	* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
	changed on the attach widget.

	* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
	set the transient_for property for menus.

	* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.

	* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
	transient for the toplevel.

	* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
	transient-for, for the popup window.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
	new window types.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
	for new window types.

	* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
	New function called whenever the compositing manager comes and goes.

	* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.

	* gdk/x11/gdkscreen-x11.c
	(_gdk_x11_screen_request_cm_notification, make_cm_atom,
	check_is_composited): New functions

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
	_gdk_x11_screen_process_owner_change when an
	XFixesSelectionNotifyEvent is received.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
	_gdk_x11_screen_request_cm_notification() on all screens.

	* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
	implementation.

	* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
	'composited-changed'.

	* gdk/gdkwindow.h: Add new EWMH window types.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-04-25 14:27:32 +00:00
Matthias Clasen
a469257a23 Add an expander example.
2006-01-10  Matthias Clasen  <mclasen@redhat.com>

	* tests/testgtk.c: Add an expander example.
2006-01-11 04:18:19 +00:00
Matthias Clasen
10bde14d06 Fix the build 2005-09-09 18:19:48 +00:00
Matthias Clasen
244d41b94a Add tests for extra virtual modifiers.
2005-09-06  Matthias Clasen  <mclasen@redhat.com>

	* tests/testgtk.c (create_key_lookup): Add tests for extra virtual
	modifiers.

	* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Try to match both against
	Mod2 - Mod5 and against Super, Hyper, Meta.

	* gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label):
	* gtk/gtkaccelgroup.c (gtk_accelerator_parse)
	(gtk_accelerator_name): Support Super, Hyper Meta and Mod2 - Mod5.
2005-09-06 18:13:56 +00:00
Matthias Clasen
df517cb1d5 Add two new settings, gtk-cursor-theme-name and gtk-cursor-theme-size to
2005-06-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtksettings.c: Add two new settings,
	gtk-cursor-theme-name and gtk-cursor-theme-size to
	control the cursor theme.

	* gdk/x11/gdkevents-x11.c: Add two new X settings,
	Gtk/CursorThemeName and Gtk/CursorThemeSize, and map
	these to the gtk settings.

	* tests/testgtk.c (create_cursors): Add a cursor theme
	testcase.
2005-06-15 19:25:49 +00:00
Owen Taylor
aada841db8 Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to
2005-05-11  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
        to draw the swatch in to avoid having an extraneous window.
2005-05-12 01:12:19 +00:00