Commit Graph

341 Commits

Author SHA1 Message Date
Matthias Clasen
be22a62160 Cleanups
This commit removes dead code, mostly pointed out by clang.
2009-09-10 13:53:28 -04:00
Matthias Clasen
908b6620bd Remove sincos use
It turns out to be not worth the portability pain. Bug 593877
2009-09-02 22:11:28 -04:00
Matthias Clasen
45d6752a3c Handle geometry change correctly
This makes sure that the button is properly prelighted when rotating it
underneath the pointer by using keynav on the scale.
2009-08-31 19:41:09 -04:00
Matthias Clasen
d22b79f1b6 Add another offscreen demo
This demo shows rendering multiple times, to achieve a reflection effect.
Inspired by an earlier demo by macslow.
2009-08-31 19:38:17 -04:00
Matthias Clasen
953d391a34 Cosmetic fixes 2009-08-31 01:08:31 -04:00
Matthias Clasen
97d4b25d02 Add an offscreen window demo 2009-08-31 00:20:39 -04:00
Javier Jardón
ec7c24d227 Remove some unused variables (GnomeBug:591218) 2009-08-10 11:06:54 +02:00
Marek Kasik
39b960216c Add SVG support to GtkPrintBackendFile
This add support for printing to SVG 1.2 files (#357655).
2009-08-03 11:25:19 +02:00
Marek Kasik
0ef74c936f Add paper size combo and orientation combo to print dialog
Paper size combo and orientation combo can be added by
gtk_print_operation_set_embed_page_setup_dialog() to GtkPrinUnixDialog
now. This function induce calling of
gtk_print_unix_dailog_set_embed_page_setup_dialog() after creation of
dialog. These two functions control embed-page-setup-dialog properties
in GtkPrintOperation and in GtkPrintUnixDialog.
There is also new function gtk_print_unix_dialog_get_page_setup_set()
which says whether page setup was set by user.
Selected page setup is stored as default page setup in
GtkPrintOperation.
New class is added, its name is GtkCustomPaperUnixDialog. The class
manages custom sizes. It is derived from GtkPageSetupUnixDialog's
CustomPaperDialog structure.
Page layout preview is modified, so, it shows dimensions of current
page setup (mm or inch - depends on locale). It also shows the name of
actual paper if page setup dialog is not embedded (paper size combo is
not visible).
gtk-demo is actualized to include this new feature.
2009-07-10 11:28:31 +02:00
Stef Walter
eab02f697a GtkEntryBuffer holds text for GtkEntry
Adds a 'model' type buffer for GtkEntry in which the actual
textual data is stored. GtkEntryBuffer can be subclassed.

Among other things, this allows GtkEntry to be used for secrets
that need to be stored in non-pageable memory. It also allows
buffers to be shared by entries.

See bug #576801.
2009-07-08 20:41:53 -05:00
Matthias Clasen
d78f449deb Improve printing example
Handle Documents folder being NULL, and handle output formats.
2009-06-28 16:58:00 -04:00
David Zeuthen
a92c9ce9a5 Bug 586691 – Better GtkInfoBar defaults
Signed-off-by: David Zeuthen <davidz@redhat.com>
2009-06-25 15:23:40 -04:00
Matthias Clasen
99b42cf006 Demo setting an output name for print to file
It turns out that no application is doing this, since it is not
obvious. Adding a demo here is at least a start.
2009-06-25 01:23:50 -04: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
a85fac7145 Add a message area widget
It is called GtkInfoBar. See bug 555344.
2009-06-05 18:00:26 -04: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
Behdad Esfahbod
a398c840be Add git.mk to generate .gitignore files
Add four new doc templates that were not in repository.
2009-05-04 14:29:21 -04:00
Michael J. Chudobiak
b07c6616f8 Minor file descriptor leak in testgtk
Added a missing fclose. Bug #578366.
2009-04-11 13:42:14 -04:00
Behdad Esfahbod
d21f55fe9a Bug 437533 – Implement draw_shape PangoRenderer method
2009-03-27  Behdad Esfahbod  <behdad@gnome.org>

        Bug 437533 – Implement draw_shape PangoRenderer method

        * gdk/gdkpango.c (gdk_pango_renderer_draw_shape),
        (gdk_pango_renderer_class_init): Implement draw_shape

        * demos/gtk-demo/rotated_text.c (fancy_shape_renderer),
        (create_fancy_attr_list_for_layout), (rotated_text_expose_event),
        (do_rotated_text):
        1) Port to pangocairo
        2) Also show a rotated label
        3) Install a custom shape renderer on both.  The second one goes
        through gdkpango and hence tests the patch above.  It's working.


svn path=/trunk/; revision=22592
2009-03-27 16:54:10 +00:00
Matthias Clasen
f3f4fec8db Set the program-name property of the about dialog.
* demos/gtk-demo/appwindow.c: Set the program-name property
        of the about dialog.

        * docs/tools/widgets.c: Add GtkAboutDialog


svn path=/trunk/; revision=22427
2009-03-01 05:19:42 +00:00
Andre Klapper
aa22f6c538 Fix deprecated glib call.
2009-02-17  Andre Klapper  <a9016009@gmx.de>

	* demos/gtk-demo/main.c:
	Fix deprecated glib call.


svn path=/trunk/; revision=22349
2009-02-17 18:57:05 +00:00
Matthias Clasen
ade90af533 End the search if the window is closed.
* demos/gtk-demo/search_entry.c: End the search if the window
        is closed.

        * demos/gtk-demo/search_entry.c:
        * demos/gtk-demo/entry_completion.c: Group the entry examples
        under "Entry".


svn path=/trunk/; revision=22132
2009-01-18 15:50:29 +00:00
Matthias Clasen
e31eb99c9d Rename GtkEntry icon-related signals
svn path=/trunk/; revision=22023
2008-12-31 07:29:23 +00:00
Matthias Clasen
6a43b63b35 Add a "Search entry" demo for icons and progress in an entry
svn path=/trunk/; revision=21937
2008-12-26 21:57:55 +00:00
Michael Natterer
e0d30ee141 define -DGDK_PIXBUF_DISABLE_DEPRECATED in the global CFLAGS.
2008-08-12  Michael Natterer  <mitch@imendio.com>

	* configure.in: define -DGDK_PIXBUF_DISABLE_DEPRECATED in the
	global CFLAGS.

	* gdk-pixbuf/Makefile.am: make the contents gdk-pixbuf-marshal.h
	visible for GDK_PIXBUF_COMPILATION.

	* contrib/gdk-pixbuf-xlib/Makefile.am
	* demos/Makefile.am
	* demos/gtk-demo/Makefile.am
	* gdk-pixbuf/pixops/Makefile.am
	* gdk/Makefile.am
	* gdk/x11/Makefile.am
	* gtk/Makefile.am
	* gtk/tests/Makefile.am
	* gtk/theme-bits/Makefile.am
	* modules/engines/ms-windows/Makefile.am
	* modules/engines/pixbuf/Makefile.am
	* modules/input/Makefile.am
	* perf/Makefile.am
	* tests/Makefile.am: remove -DDGDK_PIXBUF_DISABLE_DEPRECATED here.


svn path=/trunk/; revision=21096
2008-08-12 15:04:55 +00:00
Sven Neumann
092187e99c demos/gtk-demo/changedisplay.c demos/gtk-demo/clipboard.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* demos/gtk-demo/changedisplay.c
	* demos/gtk-demo/clipboard.c
	* demos/gtk-demo/drawingarea.c
	* demos/gtk-demo/iconview.c
	* demos/gtk-demo/images.c
	* demos/gtk-demo/pixbufs.c: use canonical signal names in the 
demos.


svn path=/trunk/; revision=21074
2008-08-11 19:12:58 +00:00
Michael Natterer
36b3bed631 don't use the deprecated gtk_box_pack_start_defaults().
2008-08-11  Michael Natterer  <mitch@imendio.com>

	* demos/gtk-demo/textscroll.c (create_text_view): don't use the
	deprecated gtk_box_pack_start_defaults().


svn path=/trunk/; revision=21062
2008-08-11 11:23:06 +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
Matthias Clasen
75c668dbf2 Fix up highlighting
svn path=/trunk/; revision=20791
2008-07-06 07:24:02 +00:00
Matthias Clasen
5d0421f6c3 One more
svn path=/trunk/; revision=20747
2008-07-03 17:37:07 +00:00
Matthias Clasen
c20433d644 Use monospace as font name, not mono. Patch by Yevgen Muntyan.
* demos/gtk-demo/printing.c: Use monospace as font name,
        not mono. Patch by Yevgen Muntyan.


svn path=/trunk/; revision=20746
2008-07-03 17:35:50 +00:00
Kristian Rietveld
4cceb2f1dc Bug 455268 - Add gtk-enable-tooltips GtkSetting
2008-07-02  Kristian Rietveld  <kris@imendio.com>

	Bug 455268 - Add gtk-enable-tooltips GtkSetting

	* gtk/gtk.symbols:
	* gtk/gtktoolbar.[ch] (gtk_toolbar_[gs]et_tooltips): deprecated.

	* gtk/gtksettings.c: introduce gtk-enable-tooltips XSetting.

	* gtk/gtktooltip.c (_gtk_tooltip_handle_event): take the newly
	introduced XSetting into account.

	* demos/gtk-demo/appwindow.c: don't use the now deprecated
	gtk_toolbar_set_tooltips().


svn path=/trunk/; revision=20730
2008-07-02 09:32:14 +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
Mikael Hallendal
df11b00dae Replaced use of gtk_signal_connect with the g_signal_connect equivalents.
2008-06-20  Mikael Hallendal  <micke@imendio.com>

	* tests/testthreads.c: Use g_signal_connect instead of
	gtk_signal_connect.

	* demos/testgtk/main.c: switched to use GSignal instead of GtkSignal.
	While the code is not built, people may still look at it.

svn path=/trunk/; revision=20654
2008-06-20 19:26:50 +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
0130bc33fd include <gdk-pixbuf/gdk-pixbuf.h> instead of individual files.
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* demos/testpixbuf.c: include <gdk-pixbuf/gdk-pixbuf.h> instead of
	individual files.


svn path=/trunk/; revision=20209
2008-05-28 12:47:37 +00:00
Tor Lillqvist
54706dddf8 Mark these functions with G_MODULE_EXPORT.
2008-04-08  Tor Lillqvist  <tml@novell.com>

	* demos/gtk-demo/builder.c (quit_activate, about_activate): Mark
	these functions with G_MODULE_EXPORT.


svn path=/trunk/; revision=19985
2008-04-08 14:06:17 +00:00
Cody Russell
d4a3e5a6e4 Move down each line in units of text_height rather than in units of
2008-03-31  Cody Russell  <bratsche@gnome.org>

        * demos/gtk-demo/printing.c (draw_page): Move down each line in
        units of text_height rather than in units of data->font_size.
        (totally awesome catch by Dom Lachowicz)


svn path=/trunk/; revision=19952
2008-03-31 21:45:22 +00:00
Johan Dahlin
e2534d54e1 Add translatable/context and comment attributes on <col> tags under a
2008-02-29  Johan Dahlin  <johan@gnome.org>

	* demos/gtk-demo/demo.ui:
	* gtk/gtkbuilderparser.c:
	* gtk/gtkbuilderprivate.h:
	* gtk/gtkliststore.c:
	* tests/buildertest.c:
	Add translatable/context and comment attributes on
	<col> tags under a GtkListStore. Refactor parts of the
	translation api and make it available inside gtk+ itself.
	Update tests and example.
	Fixes a part of #518642


svn path=/trunk/; revision=19685
2008-03-02 01:14:48 +00:00
Dominic Lachowicz
4c399695f9 gtk-demo printing gives wrong results on win32 because it doesn't set the
2008-02-22  Dominic Lachowicz  <domlachowicz@gmail.com>

        * demos/gtk-demo/printing.c (do_printing): gtk-demo printing 
gives
        wrong results on win32 because it doesn't set the printing 
units,
        which affect the transformation of the cairo context
        (#347125, Erik van Pienbroek)


svn path=/trunk/; revision=19635
2008-02-22 22:38:47 +00:00
Johan Dahlin
12b46f84bf Move the about dialog to the glade file, add accessible tags examples to
2008-01-29  Johan Dahlin  <johan@gnome.org>

	* demos/gtk-demo/builder.c: (quit_activate), (about_activate),
	(do_builder):
	* demos/gtk-demo/demo.ui:
	Move the about dialog to the glade file, add accessible tags
	examples to the markup file.


svn path=/trunk/; revision=19426
2008-01-29 14:12:08 +00:00
Michael Natterer
26f205e20e use gtk_about_dialog_set_program_name() instead of the deprecated
2008-01-28  Michael Natterer  <mitch@imendio.com>

	* demos/gtk-demo/builder.c (about_activate): use
	gtk_about_dialog_set_program_name() instead of the deprecated
	set_name().


svn path=/trunk/; revision=19417
2008-01-28 13:05:15 +00:00
Michael Natterer
64c73a61b7 Remove all .cvsignore files.
svn path=/trunk/; revision=19169
2007-12-13 11:18:45 +00:00
15:39:40 Tim Janik
2dc08ada49 call g_test_init() from gtk_test_init().
2007-11-22 15:39:40  Tim Janik  <timj@imendio.com>

        * gtk/gtktestutils.c: call g_test_init() from gtk_test_init().

        * gtk/tests/testing.c: use g_test_add_func() to register tests and use
	g_test_run() to run the tests to integrate with the testing framework.

        * gtk/tests/Makefile.am: removed exemplary testing rules.

        * Makefile.am, gtk/tests/Makefile.am, gtk/Makefile.am:
        * gtk/xdgmime/Makefile.am, gtk/theme-bits/Makefile.am:
        * tests/Makefile.am, docs/reference/gdk-pixbuf/Makefile.am:
        * docs/reference/gdk/Makefile.am, docs/reference/gtk/Makefile.am:
        * docs/reference/Makefile.am, docs/tools/Makefile.am:
        * docs/tutorial/Makefile.am, docs/faq/Makefile.am, docs/Makefile.am:
        * gdk-pixbuf/pixops/Makefile.am, gdk-pixbuf/Makefile.am:
        * demos/gtk-demo/Makefile.am, demos/Makefile.am:
        * modules/input/Makefile.am, modules/printbackends/file/Makefile.am:
        * modules/printbackends/test/Makefile.am, modules/printbackends/Makefile.am:
        * modules/printbackends/cups/Makefile.am, modules/printbackends/lpr/Makefile.am:
        * modules/engines/ms-windows/Theme/gtk-2.0/Makefile.am:
        * modules/engines/ms-windows/Theme/Makefile.am:
        * modules/engines/ms-windows/Makefile.am:
        * modules/engines/Makefile.am,  modules/engines/pixbuf/Makefile.am:
        * modules/Makefile.am, m4macros/Makefile.am, perf/Makefile.am:
        * contrib/Makefile.am, contrib/gdk-pixbuf-xlib/Makefile.am:
        * gdk/directfb/Makefile.am, gdk/linux-fb/Makefile.am:
        * gdk/quartz/Makefile.am, gdk/win32/rc/Makefile.am:
        * gdk/win32/Makefile.am, gdk/x11/Makefile.am, gdk/Makefile.am:
	include $(top_srcdir)/Makefile.decl, adapted EXTRA_DIST assignments.



svn path=/trunk/; revision=19033
2007-11-22 14:38:26 +00:00
Michael Natterer
62f46c86d7 s/gtk_widget_[un]ref/g_object_[un]ref/g
2007-09-06  Michael Natterer  <mitch@imendio.com>

	* demos/gtk-demo/panes.c: s/gtk_widget_[un]ref/g_object_[un]ref/g


svn path=/trunk/; revision=18729
2007-09-06 10:46:54 +00:00
Kristian Rietveld
b1ec5f7556 add more convenience API.
2007-07-19  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtk.symbols:
	* gtk/gtktreeprivate.h:
	* gtk/gtktreeview.[ch] (gtk_tree_view_get_tooltip_context),
	(gtk_tree_view_[sg]et_tooltip_column): add more convenience API.

	* tests/testtooltip.c (query_tooltip_tree_view_cb): use
	gtk_tree_view_get_tooltip_context().

	* demos/gtk-demo/demo.ui: add a tooltip column to the list store,
	set tooltip-column on the tree view.


svn path=/trunk/; revision=18496
2007-07-19 13:21:09 +00:00
Johan Dahlin
83b5d32aef |___* demos/gtk-demo/demo.ui: |___* gtk/gtk-builder-convert: |___*
2007-07-09  Johan Dahlin,,,  <jdahlin@lozenge>

|___* demos/gtk-demo/demo.ui:
|___* gtk/gtk-builder-convert:
|___* gtk/gtkactiongroup.c: (gtk_action_group_buildable_init),
|___(gtk_action_group_buildable_add_child),
|___(accelerator_start_element),
|___(gtk_action_group_buildable_custom_tag_start),
|___(gtk_action_group_buildable_custom_tag_end):
|___* gtk/gtkuimanager.c: (child_hierarchy_changed_cb),
|___(gtk_ui_manager_buildable_construct_child):
|___* tests/buildertest.c: (test_uimanager_simple):

|___Add actiongroup/action accelerator support for builder. #454654


svn path=/trunk/; revision=18408
2007-07-09 13:40:10 +00:00
Johan Dahlin
4110c04860 Set name of Help menu to HelpMenu
2007-06-27  Johan Dahlin  <jdahlin@async.com.br>

    * demos/gtk-demo/demo.ui: Set name of Help menu
    to HelpMenu


svn path=/trunk/; revision=18271
2007-06-28 01:56:55 +00:00
Johan Dahlin
1d2955bcaf Connect the destroy signal in the example instead of the ui file. Also set
* demos/gtk-demo/builder.c (do_builder): Connect the
    destroy signal in the example instead of the ui file.
    Also set the screen and title of the window.
    (#451345, Thomas Rydzynski)


svn path=/trunk/; revision=18251
2007-06-27 00:23:56 +00:00