Commit Graph

660 Commits

Author SHA1 Message Date
Timm Bäder
feb8975a4b gtkmain: Remove deprecated key snooper API 2016-10-18 00:29:17 +02:00
Emmanuele Bassi
fc9826fb41 Remove declarations for getresuid()/getresgid()
Back in 2001, their prototypes were missing from system headers, but
since glibc 2.3.2 they are defined in unistd.h if _GNU_SOURCE is
defined.
2016-10-17 11:44:11 +01:00
Benjamin Otte
e76ba9a3c3 gdk: Remove gdk_window_set_debug_updates()
The update tracking code was ugly and using deprecated drawing APIs. It
was also in the wrong place.

So instead of trying to keep it working, I'll remove it. We need to find
a better way to put it and make it work there.
2016-10-16 18:18:58 +02:00
Matthias Clasen
8a7d0ab481 Make gtk_init_with_args behave as documented
This docs say it should return FALSE if the display can't be opened,
but it was failing.

https://bugzilla.gnome.org/show_bug.cgi?id=771959
2016-09-27 15:12:47 -04:00
Carlos Garnacho
3a6d0ff2ab gtk: Add minimal handling of pad events
No real handling is yet performed, to be done through a GdkEventController

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:44 +02:00
Emmanuele Bassi
2c7b21718f Simplify the widget rendering entry point
Now that GDK has the appropriate API, we can simplify the widget drawing
code into a single function.

https://bugzilla.gnome.org/show_bug.cgi?id=766675
2016-06-09 17:45:40 +01:00
Matthias Clasen
cca894b912 Use a cheaper way to store debug flags
This was the most frequent use of qdata *by far*.
2016-05-06 06:44:28 -04:00
Matthias Clasen
c50e774b29 Fix a typo 2016-05-06 06:44:28 -04:00
Matthias Clasen
37b70a9733 Use qdata for debug flags
This avoids some overhead.
2016-04-19 23:26:57 -04:00
Matt Watson
f2979323bf progresstracker: add GTK_SLOWDOWN environment variable
As we consolidate widgets to use progress tracker, this will allow
us to control the speed of all animations in a centralized place
2016-04-08 16:09:29 -07:00
Matthias Clasen
cb738bc201 Remove private clipboard api from public headers 2016-03-26 23:17:53 -04:00
Matthias Clasen
02742d5332 Make debug flags per-display
Tihs lets us toggle debug flags in the inspector without affecting
the inspector itself.
2016-03-11 00:22:36 -05:00
Matthias Clasen
f82e4ff362 Trivial formatting fix 2016-03-11 00:22:36 -05:00
Matthias Clasen
33d7196dc8 Add a layout debug option
This will be used to show box model borders.
2016-03-10 23:21:22 -05:00
Matthias Clasen
bbd94b5a9f gtk: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Matthias Clasen
dd322f715f Document gtk_parse_args limitations
Mention that some things won't work without a display
connection.
2016-01-30 16:11:03 -05:00
Alberto Ruiz
496f0892fc introspection: This patch fixes nullable return values fixes for the following symbols in gtk
gtk_accel_group_query
  gtk_accel_group_from_accel_closure
  gtk_accel_label_get_accel_widget
  gtk_accessible_get_widget
  gtk_actionable_get_action_name
  gtk_app_chooser_get_app_info
  gtk_app_chooser_button_get_heading
  gtk_app_chooser_dialog_get_heading
  gtk_application_get_window_by_id
  gtk_assistant_get_nth_page
  gtk_binding_set_find
  gtk_builder_get_object
  gtk_builder_lookup_callback_symbol
  gtk_builder_get_application
  gtk_button_get_image
  gtk_cell_area_get_focus_from_sibling
  gtk_cell_renderer_start_editing
  gtk_cell_view_get_model
  gtk_cell_view_get_displayed_row
  gtk_clipboard_get_owner
  gtk_container_get_focus_child
  gtk_container_get_focus_vadjustment
  gtk_container_get_focus_hadjustment
  gtk_dialog_get_widget_for_response
  gtk_drag_get_source_widget
  gtk_drag_dest_get_target_list
  gtk_drag_source_get_target_list
  gtk_entry_completion_get_model
  gtk_entry_completion_compute_prefix
  gtk_expander_get_label_widget
  gtk_file_chooser_get_filename
  gtk_file_chooser_get_current_folder
  gtk_file_chooser_get_uri
  gtk_file_chooser_get_current_folder_uri
  gtk_file_chooser_get_preview_widget
  gtk_file_chooser_get_preview_file
  gtk_file_chooser_get_preview_filename
  gtk_file_chooser_get_preview_uri
  gtk_file_chooser_get_extra_widget
  gtk_file_chooser_get_filter
  gtk_file_chooser_native_get_accept_label
  gtk_file_chooser_native_get_cancel_label
  gtk_file_filter_get_name
  gtk_font_chooser_get_font_family
  gtk_font_chooser_get_font_face
  gtk_font_chooser_get_font
  gtk_font_chooser_get_font_desc
  gtk_font_chooser_get_font_map
  gtk_frame_get_label
  gtk_gesture_get_device
  gtk_gesture_get_window
  gtk_gl_area_get_error
  gtk_header_bar_get_title
  gtk_header_bar_get_subtitle
  gtk_header_bar_get_custom_title
  gtk_icon_info_get_filename
  gtk_icon_view_get_path_at_pos
  gtk_icon_view_get_model
  gtk_image_get_pixbuf
  gtk_image_get_animation
  gtk_label_get_mnemonic_widget
  gtk_label_get_attributes
  gtk_check_version
  gtk_menu_button_get_popup
  gtk_menu_button_get_menu_model
  gtk_menu_button_get_align_widget
  gtk_menu_button_get_popover
  gtk_menu_item_get_submenu
  gtk_menu_item_get_accel_path
  gtk_native_dialog_get_title
  gtk_native_dialog_get_transient_for
  gtk_notebook_get_nth_page
  gtk_notebook_get_tab_label_text
  gtk_notebook_get_menu_label
  gtk_notebook_get_menu_label_text
  gtk_notebook_get_group_name
  gtk_notebook_get_action_widget
  gtk_offscreen_window_get_surface
  gtk_offscreen_window_get_pixbuf
  gtk_paned_get_child1
  gtk_paned_get_child2
  gtk_places_sidebar_get_location
  gtk_places_sidebar_get_nth_bookmark
  gtk_plug_get_socket_window
  gtk_popover_get_default_widget
  gtk_progress_bar_get_text
  gtk_recent_filter_get_name
  gtk_recent_manager_lookup_item
  gtk_settings_get_default
  gtk_socket_get_plug_window
  gtk_stack_sidebar_get_stack
  gtk_stack_switcher_get_stack
  gtk_style_context_get_section
  gtk_style_context_get_parent
  gtk_style_context_get_frame_clock
  gtk_test_find_widget
  gtk_text_buffer_get_mark
  gtk_text_tag_table_lookup
  gtk_text_view_get_tabs
  gtk_text_view_toggle_cursor_visible
  gtk_text_view_get_window
  gtk_toolbar_get_nth_item
  gtk_tool_button_get_label
  gtk_tool_button_get_icon_name
  gtk_tool_button_get_label_widget
  gtk_tool_button_get_icon_widget
  gtk_tool_palette_get_drop_item
  gtk_tool_palette_get_drop_group
  gtk_tree_model_filter_convert_child_path_to_path
  gtk_tree_model_filter_convert_path_to_child_path
  gtk_tree_model_sort_convert_child_path_to_path
  gtk_tree_model_sort_convert_path_to_child_path
  gtk_tree_view_get_column
  gtk_tree_view_get_bin_window
  gtk_tree_view_column_get_widget
  gtk_tree_view_column_get_tree_view
  gtk_widget_get_frame_clock
  gtk_window_group_get_current_device_grab
  GtkTextBufferSerializeFunc
2016-01-08 12:18:23 +00:00
Timm Bäder
e8aa9b0440 Add a way to highlight resizing widgets
https://bugzilla.gnome.org/show_bug.cgi?id=759586
2015-12-18 16:20:19 +01:00
Matthias Clasen
ea91670c11 Don't use g_list_next in gtkmain.c
We generally access ->next directly.
2015-10-20 06:14:57 -04:00
Christoph Reiter
263cbd90a0 Fix accessibility not getting initialized in gtk_init() if a default display is already set
_gtk_accessibility_init() only gets called if the default
display changes, but in case gdk_init() is called before gtk_init()
the default display is already set and no property notification occurs.

This can happen quite easily in pygobject where
"from gi.repository import Gdk, Gtk"
will call gdk_init() followed by gtk_init() in the Python overrides.

This fixes it by checking for a default display in all cases.
2015-10-07 00:19:32 +02:00
Timm Bäder
5167f525a3 gtkmain: Add nullable annotations
https://bugzilla.gnome.org/show_bug.cgi?id=755038
2015-09-23 23:24:09 -04:00
Matthias Clasen
a5e2256770 Fix a startup ordering problem
Defer a11y initialization until we have a display. A11y initialization
causes widget classes to be initalized, which in turn needs some
backend-specific information about modifier masks that can't be
obtained before we have a display.

https://bugzilla.gnome.org/show_bug.cgi?id=736125
2015-08-25 15:54:58 -04:00
Carlos Garnacho
6cd45af8b0 gtkmain: Handle rewriting of event fields during grabs for touchpad events
The window/coordinates will need translation in the case of touchpad gesture
events, same than with other pointer events.
2015-08-12 23:20:24 +02:00
Carlos Garnacho
a6ca56969e gtkmain: Don't process WM events if there's a grab on another toplevel
This is implicitly done for us in the case of grabs on windows from other
groups, but we must perform this check explicitly for grabs with
owner_events=True on windows from the same group, in that case the window
would handle the events as if there was no grab.

https://bugzilla.gnome.org/show_bug.cgi?id=752327
2015-08-04 17:58:39 +02:00
Matthias Clasen
98121aa302 Add a private function to determine if we simulate
These same two or three tests are currently duplicated
in several places, with separate static variables. Lets
do this in one place.
2015-07-31 13:46:34 -04:00
Carlos Garnacho
77d429bc4d gtkmain: Ignore grab for events in child popovers
Popovers may be spawn when there's GTK+ grabs somewhere else (eg.
text selection popover/handles in an entry in a modal popover). When
this happens, events go to the grab widget (in this case the modal
popover) and are effectively ignored by the event widget, even though
it's can be conceptually a child of the grab widget.

To get away with this, tweak a bit gtk_main_do_event(), so events going
to popovers that are related to grab_widget or a child of it are received,
as it would happen with regular children of grab_widget.

https://bugzilla.gnome.org/show_bug.cgi?id=750993
2015-06-17 15:56:42 +02:00
Rui Matos
ef93257db7 main: Push the current event on the stack before we start needing it
The changes in commit 13e22e2030 made
_gtk_window_check_handle_wm_event() indirectly depend on
gtk_get_current_event_time() which relies on the current event being
available on the current_events stack.

Since the current event is only pushed on the stack afterwards we get
an invalid timestamp which breaks ewmh window moving.

This fixes the issue by pushing the current event before we start
relying on it being there in gtk_main_do_event() and, as a byproduct,
also fixes a potential memory leak when we have a rewritten event and
return early due to _gtk_window_check_handle_wm_event() being TRUE.

https://bugzilla.gnome.org/show_bug.cgi?id=750384
2015-06-08 14:23:19 +02:00
Matthias Clasen
0a5e216d42 DND: Move private api to a private header 2015-05-16 17:54:01 -04:00
Carlos Garnacho
13e22e2030 gtkwindow: Move window dragging to a standalone drag gesture
The gesture is hooked to the capture phase, so it works for buttons in
header bars and whatnot. In order to be friendly to the widget it is
capturing events from, an ugly hack is in place to avoid capturing
events when the target widget has a gesture that would consume motion
events.
2015-03-02 12:03:39 +01:00
Bastien Nocera
973060deb5 main: Make gtk_get_option_group() available to bindings
Now that GOptionGroup is registered as a boxed type [1], don't skip it
in gobject-introspection.

[1]: See https://bugzilla.gnome.org/show_bug.cgi?id=743349

https://bugzilla.gnome.org/show_bug.cgi?id=743350
2015-02-12 11:53:26 +01:00
Lars Uebernickel
3e81653bd3 Add support for loading gtk3-only modules
Introduce GTK3_MODULES environment variable for modules that don't work
in gtk3. The list of modules is now $GTK3_MODULES:$GTK_MODULES.

https://bugzilla.gnome.org/show_bug.cgi?id=743917
2015-02-04 13:42:39 +01:00
Emmanuele Bassi
eedbec2066 Make global GDK libgtk_only functions more private
The current way of exposing GDK API that should be considered internal
to GTK+ is to append a 'libgtk_only' suffix to the function name; this
is not really safe.

GLib has been using a slightly different approach: a private table of
function pointers, and a macro that allows accessing the desired symbol
inside that vtable.

We can copy the approach, and deprecate the 'libgtk_only' symbols in
lieu of outright removal.

https://bugzilla.gnome.org/show_bug.cgi?id=739781
2014-11-08 00:20:15 -05:00
Matthias Clasen
e3ef5d6fd2 GtkTooltip: Move nonexported API to a private header
This is our standard practice nowadays.
2014-10-19 22:51:21 -04:00
Matthias Clasen
3214122fbd Remove some redundant code
No need to check the same widget twice in a row for being a window.
2014-09-26 09:50:33 -04:00
Rico Tzschichholz
a3a6ce1b42 gtk: Fix return-annotation of gtk_get_default_language to "transfer none" 2014-08-21 23:10:32 +02:00
Ryan Lortie
16e02850c1 GtkActionHelper: add some debugging output
Introduce a new debug category "actions" and write some messages from
GtkActionHelper about if we can find the actions or not.

We will probably soon want to add some similar messages to
GtkMenuTrackerItem.

https://bugzilla.gnome.org/show_bug.cgi?id=733965
2014-08-03 00:18:44 +02:00
Matthias Clasen
34245515e5 Add a 'touchscreen' debug flag
This has the same effect as the GTK_TEST_TOUCHSCREEN environment
variable, but can be toggled at runtime.
2014-07-10 10:12:02 -04:00
Jasper St. Pierre
3d53e5d9c7 gtkmain: One more combine 2014-06-29 19:10:42 -04:00
Jasper St. Pierre
e95efbfc42 gtkmain: Combine two switch cases that are the same 2014-06-29 19:10:42 -04:00
Jasper St. Pierre
e76f41b788 gtkmain: Rearrange code
Prevent a segfault in unknown circumstances, and break the ignore
deprecations wrapper out from the if statement so that we don't
cover too much ground by accident.
2014-06-23 17:55:55 -04:00
Jasper St. Pierre
f4c2c4c667 gtkwidget: Actually mark set_double_buffered as deprecated 2014-06-23 17:53:48 -04:00
Jasper St. Pierre
24b9e91f47 Revert "gtkwidget: Widgets are now always double-buffered"
This reverts commit b875572f2a.

Apps like Abiword, gnumeric and gnome-chess, and toolkits like
ClutterGTK were all using this for various purposes, and this made them
break. Bring back this feature for now.

It still won't work under Wayland.
2014-06-23 17:50:01 -04:00
Jasper St. Pierre
b875572f2a gtkwidget: Widgets are now always double-buffered
gtk_widget_set_double_buffered is now deprecated, and we don't support
non-double-buffered widgets. This means that under normal circumstances,
paints are never outside of a begin_paint / end_paint sequence, which
natively-double-buffered backends like Wayland can't possibly support.
2014-06-20 20:41:54 -04:00
Jasper St. Pierre
a85f7028d4 gdkwindow: Deprecate gdk_window_flush
The function does nothing.
2014-06-20 20:41:53 -04:00
Matthias Clasen
872fbfacd3 Split GtkWindowGroup into its own file
gtkwindow.c is too big and too messy. This is a small step
towards making it better.
2014-06-04 06:24:05 -04:00
Evan Nemerson
a77765f172 gtk: add missing ownership annotations ported from Vala
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:33 -07:00
Evan Nemerson
e568903360 gtk: fix many callback annotations to include closure information
Without this information introspection-based consumers don't realize
they can include context information, but instead think that they
receive an extra gpointer argument (which they don't know how to
handle).

https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:32 -07:00
Matthias Clasen
807f0aa747 Minor documentation edit 2014-05-12 22:58:47 -04:00
Matthias Clasen
7a56404e7b Make the inspector available via GTK_DEBUG
Change things around so GTK_DEBUG=interactive also brings
up the inspector window.
2014-05-10 22:04:36 -04:00
Owen W. Taylor
40b6d907bf Use GDK's current window tracking when synthesizing events in GTK+
Add gdk_device_get_last_event_window(), and use to implement the window
tracking we need for synthesizing crossing events for sensitivity changes
and gtk grabs, rather than keeping the information in qdata and updating
it based when GTK+ gets events.

https://bugzilla.gnome.org/show_bug.cgi?id=726187
2014-03-12 23:03:53 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
c779b42476 Docs: use // for comments in examples
Without sgml mode, we can't escape /* as /* anymore,
so just switch to // for comments in examples.
2014-02-14 23:34:22 -05:00
William Jon McCann
37a8ee6e95 docs: fully break lines in examples
Try to do a better job of keeping example content
from being too wide. It is often rendered as <pre>
text so the only time we can wrap it is in the source.

It is best to full break lines at all punctuation and
to try to keep the width under 70 chars or so.
2014-02-12 18:42:50 -05:00
William Jon McCann
fa3f1e1488 docs: use apostrophe in *'ve 2014-02-07 13:38:26 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
8ad75bdfff docs: don't use <replaceable> 2014-02-04 19:20:16 -05:00
William Jon McCann
d81e4edbd1 docs: don't use <parameter> tags 2014-02-04 18:30:46 -05:00
William Jon McCann
a22358c0c0 docs: use ` instead of <literal> 2014-02-04 18:24:29 -05:00
William Jon McCann
76447c3512 docs: use quotes instead of <firstterm> 2014-02-04 18:10:11 -05:00
William Jon McCann
a3bad427c7 docs: don't use <application> tags 2014-02-04 18:01:24 -05:00
William Jon McCann
2dcbe27a06 docs: don't use <option> 2014-02-04 17:48:33 -05:00
William Jon McCann
63e887e165 docs: replace all <examples> with markdown headings 2014-02-04 16:58:54 -05:00
Matthias Clasen
245c385ae7 Docs: Don't use note elements
In most cases, the text itself makes the message clear enough.
2014-02-02 01:22:14 -05:00
Matthias Clasen
30cc1512e6 Docs: Use markdown for lists
This greatly reduces the amount of xml in the docs.
2014-02-02 01:07:39 -05:00
William Jon McCann
f5db0e7c75 docs: remove spurious para 2014-02-01 05:35:44 -05:00
William Jon McCann
e31ebda1d7 docs: don't escape entities in example code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
768bc44081 docs: use |[ ]| instead of <programlisting></programlisting>
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
2d003553e8 docs: don't use <emphasis>
It is a little heavy handed. The text can speak for itself.
2014-01-28 02:02:05 -05:00
William Jon McCann
bf35c77f14 docs: use () instead of <function> tags 2014-01-27 23:08:08 -05:00
Carlos Garnacho
36abb4b829 gtkmain: Let windows handle WM-related events before delivering to the grab_widget
This makes it possible to move/resize client-side decorated windows that are
otherwise obscured by a GTK+ grab somewhere else, either a popover within the
window itself or a modal dialog above the window.
2014-01-22 17:10:05 +01:00
Volker Sobek
a4d69e7f14 docs/comments: Fix spelling of 'explicitly'
This replaces all occurrences of 'explicitely' with 'explicitly'. Only
code comments and gtk-doc statements are affected.

https://bugzilla.gnome.org/show_bug.cgi?id=722429
2014-01-18 03:47:46 +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
73bd03c9ed Add a function to determine the text direction
This function can be used in the rare cases where the locale
has to be changed after gtk_init(). Based on a patch
by Jehan <jehan@girinstud.io>.

https://bugzilla.gnome.org/show_bug.cgi?id=720096
2013-12-10 17:34:23 -05:00
Mario Sanchez Prada
8d83d989bb a11y: don't shutdown accessibility, so the atk bridge is always valid
This will fix issues in applications that for some reason make
several and not nested calls to gtk_main() during their lifetime,
effectively initializing a11y when the first, top most, main loop
is being run and shutting it down then that loop is quit.

https://bugzilla.gnome.org/show_bug.cgi?id=708024

https://bugzilla.gnome.org/show_bug.cgi?id=684076
2013-09-25 20:14:04 -04:00
Alexander Larsson
92edb76500 Pixel cache: Add no-pixel-cache debug flag
This is useful for benchmarking comparisons, and to verify if bugs
happend with or without the pixel cache.
2013-09-09 11:07:50 +02:00
William Jon McCann
c9bfd12d2f Deprecate and hardcode the value of visible-focus setting
Just use the default value of AUTOMATIC and make it just work.
2013-07-08 15:01:33 -04:00
William Jon McCann
7e3a494fac Deprecate and ignore gtk-enable-mnemonics and gtk-auto-mnemonics" properties
They are both enabled by default.
2013-06-26 11:16:12 -04:00
Alexander Larsson
dde714386d GtkPixelCache: Add debug feature to track redraws
Each time we redraw we tint it in a different color so that
you can see which regions are redrawn.
2013-05-07 16:34:05 +02:00
Alexander Larsson
d22fd7223c Only handle exposes on native window, propagate to children via draw()
We now consider non-native windows non-opaque, which means any invalid
area in a subwindow will also be invalid all the way up to the nearest
native windows. We take advantage of this by ignoring all expose events
on non-native windows (which typically means just the toplevel) and instead
propagating down the draw() calls to children directly via
gtk_container_propagate_draw.

This is nice as it means we always draw widgets the same way, and it
will let us do some interesting ways in the future.

We also clean up the GtkWidget opacity handling as we can now always
rely on the draing happening via cairo.

We can't really just draw by walking down the widget hierarchy, as
this doesn't get the clipping right (so e.g. widgets doing cairo_paint
may draw outside the expected gdkwindow subarea) nor does it let
us paint window backgrounds.

So, we now do multiple draws for each widget, once for each GdkWindow,
although we still do it on the same base cairo_t that we get for the
toplevel native window. The difference is only the clipping, the rendering
order, and which other widgets we propagate into.

We also collect all the windows of a widget so we can expose them inside
the same opacity group if needed.

NOTE: This change neuters gtk_widget_set_double_buffered for
widgets without native windows. Its impossible to disable
the double buffering in this model.
2013-05-07 16:33:01 +02:00
Alexander Larsson
77e0f18eda Add GTK_DEBUG=baselines support
This draws red lines to show where the baselines are
2013-04-23 05:50:37 +02:00
Tristan Van Berkom
4ec6d6006e Work around access to global resources without calling gtk_init()
Some utilities such as GIR and gtk-doc, initialize class vtables without
initializing GTK+, with composite templates accessing resources this
causes a hand full of unneeded warnings.

The workaround for now is the use a private function _gtk_ensure_resources()
which is both called while initializing GTK+, and at the beginning of
gtk_widget_class_set_template_from_resource() (the private function
ensures that the resource will only ever be registered GOnce).
2013-04-08 21:19:27 +09:00
Cosimo Cecchi
58209e1138 window: rename functions dealing with mnemonic delayed display
Don't mention "auto mnemonics", since those methods are purely about
scheduling a delayed display, and that makes understanding the code a
bit harder.

https://bugzilla.gnome.org/show_bug.cgi?id=697144
2013-04-02 17:39:42 -04:00
Christian Persch
953253f685 gtk: gtk_init_with_args allows NULL for parameter_string 2013-03-18 14:12:12 +01:00
Federico Mena Quintero
8a17cad2e5 Don't mention gtk_set_locale() in docs; this function does not exist 2013-03-07 20:45:57 -06:00
Matthias Clasen
4cd806ff0c Rename and clean up gailutil 2012-12-27 11:27:45 -05:00
Matthias Clasen
651241b685 Some renaming
Move gail.h to gtkaccessibility.h, and libgail to libgtka11y.
2012-12-27 11:27:45 -05:00
Michael Natterer
343f1706bd gtk: fix scrolling in modal dialogs when event_widget is insensitive
When checking for modal grabs in gtk_main_do_event(), forward
GDK_SCROLL events to event_widget, even if it is insensitive.
2012-12-14 15:53:29 +01:00
Michael Natterer
2d9454363f gtk: don't let insensitive children eat scroll events when bubbling down
When event capturing is enabled, stop propagating scroll events
at insensitive widgets, but don't handle them (don't return TRUE),
so they can bubble up again and reach their handling widgets.
2012-11-22 13:53:33 +01:00
Matthias Clasen
9ebeb4e68a Bump GLib dependency to 2.35
And drop deprecated g_type_init() calls.
2012-11-04 13:01:38 -05:00
Benjamin Otte
9e486139ca a11y: Fix for -Wmissing-declarations
I'll add a bunch of fixes for gcc complaining about
-Wmissing-declarations after finding a bunch of cases today where I had
forgotten to make functions static in the CSS code.

A thorn in those patches is G_DEFINE_TYPE() which doesn't allow making
the get_type() function static, so I added definitions for that function
above the G_DEFINE_TYPE().

After those patches, GTK should compile without warnings when this flag
is enabled.
2012-10-02 19:32:38 +02:00
William Jon McCann
5debed5ae2 Shut down a11y when an app shuts down
https://bugzilla.gnome.org/show_bug.cgi?id=684076
2012-09-16 19:31:23 -04:00
Rui Matos
ed7a417dcb window: Add a delay before automatically showing mnemonics
Showing mnemonics immediately on modifier press can be annoying and
distracting when the user is just trying to Alt+Tab into another
application/window since the mnemonic will show up and quickly vanish
again when we receive the focus out event.

https://bugzilla.gnome.org/show_bug.cgi?id=672431
2012-08-31 22:53:23 -04:00
Matthias Clasen
8d0e88bac7 gtk: Don't use GDK_THREADS_ENTER/LEAVE macros internally
These are just wrappers for the functions, and we want to
deprecate them. Stopping to use them internally is a good
first step.
2012-07-30 18:01:47 +02:00
Cosimo Cecchi
f70fc49ebc docs: fix a number of typos and obsolete references 2012-07-02 10:41:11 -04:00
Benjamin Otte
793748eadd debug: Add GTK_DEBUG=no-css-cache
See inline comments for what it does. Its main use is figuring out if
something has been caused by GTK's caching of CSS properties or if it's
a different problem.
2012-05-02 02:00:11 +02:00
Carlos Garnacho
c72a77b04c gdk: handle implicit touch grabs
If the touch sequence happens on a window with GDK_TOUCH_MASK set,
a GdkTouchGrabInfo is created to back it up. Else a device grab is
only created if the sequence emulates the pointer.

If both a device and a touch grab are present on a window, the later
of them both is obeyed, Any grab on the device happening after a
touch grab generates grab-broken on all the windows an implicit
touch grab was going on.
2012-03-01 16:25:25 -05:00
Carlos Garcia Campos
9f4bfff1b0 gtk: Add a way to do event capture
This patch adds a capture phase to GTK+'s event propagation
model. Events are first propagated from the toplevel (or the
grab widget, if a grab is in place) down to the target widget
 and then back up. The second phase is using the existing
::event signal, the new capture phase is using a private
API instead of a public signal for now.

This mechanism can be used in many places where we currently
have to prevent child widgets from getting events by putting
an input-only window over them. It will also be used to implement
kinetic scrolling in subsequent patches.

http://bugzilla.gnome.org/show_bug.cgi?id=641836

We automatically request more motion events in behalf of
the original widget if it listens to motion hints. So
the capturing widget doesn't need to handle such
implementation details.

We are not making event capture part of the public API for 3.4,
which is why there is no ::captured-event signal.
2012-03-01 16:25:21 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Carlos Garnacho
18e4a3a4a1 gtk: Only set widget under device on non-virtual crossing events
_gtk_widget_set_device_window() is suppose to make accounting of
the topmost widget under the device at each time, so avoid setting
it on virtual crossing events as the device is already in another
window.
2012-02-23 22:02:28 -05:00
Benjamin Otte
c0ee68b7fe gtkmain: Invoke keysnoopers unconditionally
Now that ATK no longer uses a key snooper but is invoked directly,
checking in advance for existing snoopers is wrong and stops ATK from
working.

Also: code reduction without performance loss == good thing.

https://bugzilla.gnome.org/show_bug.cgi?id=669176
2012-02-01 15:45:49 +01:00
Cosimo Cecchi
4b7ec2be82 main: fix a compilation warning 2012-01-19 13:51:32 -05:00
Benjamin Otte
dbabff0846 a11y: Invoke key snooper directly
Gets around the deprecated function warnings.
2012-01-19 10:32:21 +01:00
Alexander Larsson
4f0cc6572b Add Gtk resource file with the default CSS file 2012-01-16 14:19:16 +01:00
Benjamin Otte
fc37e2749c API: Deprecate key snooping
You really shouldn't be doing this. If you have to, you can use
gdk_window_add_filter() or listen to raw events on XI2.
2012-01-06 05:23:42 +01:00
Matthias Clasen
2398d7e900 Introduce gtkaccelmapprivate.h
Move internal accel map API there and update all users.
Also, add an internal function to create an accel path for
an action and parameter, and use it in gtkapplication.c and
gtkmodelmenuitem.c instead of duplicating that code.
2011-12-19 12:51:11 -05:00
Michael Natterer
5c4f2ef0c1 gtk: move _gtk_modules_has_mixed_deps() to gtkmodlesprivate.h
and remove gtkmainprivate.h completely.
2011-10-23 13:57:07 +02:00
Michael Natterer
2688ccdbc4 gtk: clean up the private horror
- add gtkmodulesprivate.h and move stuff there from gtkprivate.h
- add gtkprivate.c and move stuff there from gtkmain.c
- add gtkwin32.c and move stuff there from gtkmain.c
- don't redefine GTK_DATADIR and friends in gtkprivate.h
- have _gtk_get_datadir() and friends on all platforms
- remove the horrid hacks where gtkprivate.h can't be included,
  or must be included later due to redefinition of the compile-time
  directories
2011-10-22 23:53:55 +02:00
Michael Natterer
5327034c31 gtk: remove the private GTK_DEFAULT_ACCEL_MOD_MASK define
and finish the port to using the new modifier abstraction API.
This commit has some evilness, it uses the default display for
the lack of a widget context, and the change to gtkstock.c
is very ugly, but I can't think of anything better given
GtkStockItem needs an accel mask instead of a proper accel
string.
2011-10-07 20:58:58 +02:00
Tristan Van Berkom
2677a7d5b9 GtkComboBox: Add the format-entry-text signal.
This provides more control over how the selected item is shown in
the entry.
Bug #631167
2011-10-06 11:14:38 +02:00
Michael Natterer
2d3db3421f Bug 659406 - Abstract what triggers a context menu
Add gdk_event_triggers_context_menu(), using the new modifier
abstraction API. Remove _gtk_button_event_triggers_context_menu()
and port all callers.
2011-09-27 15:45:18 +02:00
Michael Natterer
b663f3a00b Bug 659406 - Abstract what triggers a context menu
Add _gtk_button_event_triggers_context_menu() and use it instead
of checking for event->button == 3, so context menus are invoked
correctly on the Mac.
2011-09-26 16:01:50 +02:00
Matthias Clasen
2ba9c4b4a7 Make focus rectangles optional
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.

'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.

'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.

'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.

https://bugzilla.gnome.org/show_bug.cgi?id=649567
2011-08-10 16:34:20 +02:00
Matthias Clasen
3846a59bab Drop a few more unwanted exports
Remaining now are just cell accessibles.
2011-07-09 16:43:39 -04:00
Matthias Clasen
f1bf642c98 We're not a module anymore
So no need to implement module entry points; and libgnome is
dead too, so no need to export functions for it either.
2011-07-05 16:07:57 -04:00
Benjamin Otte
773df067e8 gtk: Include gail by default, don't build it as a module
It is now no longer possible to disable it.
This doesn't matter though because GTK will not instantiate a11y
objects until you actually use it. So nothing changes in practice.
2011-07-05 16:07:56 -04:00
Matthias Clasen
f1a9c3efff Remove unused includes
Nothing is using gtkrc.h functionality any more.
2011-06-16 23:33:43 -04:00
Matthias Clasen
73bf1740e9 Some additional auto-mnemonic fixes
Previously, we would also show mnemonics if the user hits
Ctrl+Alt, even though Ctrl+Alt+<x> does not actually trigger.
2011-05-06 14:10:23 -04:00
Murray Cumming
5b347db1af gtk_init*(): Document that argc/argv can be 0,NULL.
* gtk/gtkmain.c: (gtk_init): Mention that argc and argv can be 0,
  using the new text from the g_applicatoin_run() documentation.
  There was already introspection annotation about that.
  (gtk_init_check, gtk_init_with_args): Use the same text here.
  See bug #643649 comment 2.
2011-03-05 14:57:32 +01:00
Matthias Clasen
d2bdd50a0b Extend the mixed-dependency check to modules as well
This helps prevent accidents with GTK_PATH.
2011-02-08 13:49:16 -05:00
Laszlo Pandy
395b13bbce [GI] Add method annotation for gtk_grab_add and gtk_grab_remove. 2011-02-03 15:20:51 +01:00
Pavel Holejsovsky
374e76a19d [GI] Mark unintrospectable constructs as (skip)
Also adds 'Rename to:' annotation to some constructs replacing the
skipped ones.
2011-01-20 13:57:21 +01:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Pavel Holejsovsky
2f0d40335b [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
Pavel Holejsovsky
3c8fc21e9b [GI] Fixes of existing incorrect annotations 2011-01-20 13:56:06 +01:00
Matthias Clasen
abc8ac1a8b Move GtkSelection docs inline
At the same time, move private selection API to gtkselectionprivate.h
2011-01-14 19:20:56 -05:00
Fridrich Štrba
a606ea62a1 Fix win32 build 2011-01-11 17:28:37 +01:00
Matthias Clasen
6cdb6255af More documentation fixes 2011-01-06 09:44:08 -05:00
Matthias Clasen
80a11b7483 Documentation polishing 2011-01-06 01:13:50 -05:00
Matthias Clasen
b123bc41fd Move docs for gtkmain inline
At the same time, introduce a gtkmainprivate.h header
and various other cleanups.

Based on a patch by Tadej Borovšak.
https://bugzilla.gnome.org/show_bug.cgi?id=617471
2011-01-04 17:32:12 -05:00
Javier Jardón
7e7d8c4ccc Remove deprecated gtk_quit_* API 2011-01-04 13:39:35 -05:00
Matthias Clasen
ee89c605cf Some documentation improvements for gtk_init/gtk_parse_args
https://bugzilla.gnome.org/show_bug.cgi?id=562182
2011-01-04 11:18:42 -05:00
Matthias Clasen
7ff572dfd3 Add some missing includes 2010-12-23 22:11:28 -05:00
Matthias Clasen
fdabc9585d Drop g[dt]k_set_locale
These functions were essentially just calling setlocale anyway.
The X11 version was also setting a gdk_use_mb variable that
is not used anywhere.
2010-12-21 12:07:02 -05:00
Matthias Clasen
07d49ee56a Merge libgdk and libgtk
This commit does a number of things:
- remove some dead wchar configury from configure.ac and gdkconfig.h
- repurpose gdkconfig.h as header that contains GDK_WINDOWING_foo
  macros for each included backend, include it in gdk.h and install
  it in $includedir instead of below $libdir
- drop the backend from the library names
- build libgdk-3.0.la as a convenience lib and include it in libgtk-3.0.la
It does not yet enable building multiple backends at the same time.
2010-12-21 12:06:55 -05:00
Matthias Clasen
7b665316cf Hide GtkWindowGroup members
In the process of removing all sealed members from headers.
At the same time, add a gtkwindowprivate.h header and move
all internal functions from gtkwindow.h there.
2010-12-17 20:41:16 -05:00
Matthias Clasen
55ffebe505 Avoid a gtk-doc warning 2010-12-17 14:27:48 -05:00
Carlos Garnacho
64e798e190 Do not initialize RC subsystem. 2010-12-04 15:39:06 +01:00
Benjamin Otte
a6b407cf4a gtk: Fix typos in comment 2010-12-02 20:21:05 +01:00
Benjamin Otte
f5be938840 gtk: Don't include private GDK headers
Use the function that exists for this purpose instead.
2010-12-02 20:21:05 +01:00
Benjamin Otte
3494f87a10 API: Remove GdkNoExposeEvent
It's not used by anyone and not supported by any backend but X11.
2010-12-02 20:21:04 +01:00
Javier Jardón
70d95f04e7 gtkmain: Remove deprecated gtk_init_add() function
https://bugzilla.gnome.org/show_bug.cgi?id=629955
2010-11-16 06:54:01 +01:00
Emmanuele Bassi
2cc059a0e7 Split off gtkprivate.h
The gtkprivate.h header contains GtkWidget-specific private symbols that
are not useful except in a handful of cases. Basically everything
includes gtkprivate.h for the GTK_PARAM_* macros.

https://bugzilla.gnome.org/show_bug.cgi?id=632539
2010-10-20 10:34:26 +01:00
Matthias Clasen
921fc8807c Deprecate gtk_init_add, gtk_remove_add and friends
This functions are going to be removed in GTK+ 3.

https://bugzilla.gnome.org/show_bug.cgi?id=629955
2010-10-15 14:13:32 -04:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Benjamin Otte
2ee8fdb79b gtk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Matthias Clasen
6e9349d858 Fix a trivial typo in a doc comment
https://bugzilla.gnome.org/show_bug.cgi?id=629733
2010-09-17 10:30:37 -04:00
Javier Jardón
ab248d7ca3 Revert "gtk/gtkmain.c: Use accessor functions to access GtkWindowGroup"
This reverts commit 65b9fc3e5b.
2010-09-11 04:24:54 +02:00
Javier Jardón
65b9fc3e5b gtk/gtkmain.c: Use accessor functions to access GtkWindowGroup 2010-09-11 03:34:01 +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
801875b805 Replace gtk_debug_flags with getter and setter functions
Preferrably should be made just into a local variable for libgtk like
_gdk_debug_flags for libgdk. But for now used by
gtk/tests/textbuffer.c and modules/printbackends/cups/gtkprintbackendcups.c.
2010-09-08 21:31:34 +03: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
Javier Jardón
1783b227e8 gtk/gtkmain.c: use accessor functions to access GtkWidget 2010-08-22 22:56:09 +02:00
Gabor Kelemen
e3bd926c1e Set translation domain for parameter_string in gtk_init_with_args
This was requested in bug 554926.
2010-08-10 00:11:40 -04:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Tristan Van Berkom
55f8b4742f Fixing debug build (s/extended layout/size request/ in GTK_NOTE flags). 2010-06-23 18:09:29 -04:00
Matthias Clasen
2a2843c041 Prevent concurrent use of GTK+ 2 and 3
If we detect a gtk2-only symbol, error out early.
2010-06-18 22:27:26 -04:00
Carlos Garnacho
b238c0124a 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.
2010-06-15 19:39:59 +02:00
Javier Jardón
785027751a constify gtk_init_with_args()'s GOptionEntry argument
Reported by Nick Schermer in bug
https://bugzilla.gnome.org/show_bug.cgi?id=621111
2010-06-10 03:51:51 +02:00
Javier Jardón
258f9e814a gtkmain: remove some unused code 2010-05-27 05:54:18 +02:00
Javier Jardón
485bbadc0a gtkmain: Remove unused GtkClosure struct 2010-05-27 05:45:27 +02:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04: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
Michael Natterer
f7813125bb Remove all deprecated stuff from gtkmain 2010-05-03 01:51:18 +02:00
Javier Jardón
e031c4f54a Remove GtkSignal completely 2010-05-03 01:51:17 +02:00
Matthias Clasen
db76c77b81 Merge branch 'native-layout-incubator'
Conflicts:
	configure.in
	docs/reference/gtk/tmpl/gtkaction.sgml
	docs/reference/gtk/tmpl/gtkbuilder.sgml
	gdk/directfb/gdkkeys-directfb.c
	gdk/gdk.symbols
	gdk/x11/gdkwindow-x11.c
	gtk/gtkalignment.c
	gtk/gtkbox.c
	gtk/gtkbutton.c
	gtk/gtkcelleditable.c
	gtk/gtkfilechooser.c
	gtk/gtkframe.c
	gtk/gtkinvisible.c
	gtk/gtklabel.c
	gtk/gtkscrolledwindow.c
	gtk/gtksearchenginetracker.c
	gtk/gtktextview.c
	gtk/gtktoolbutton.c
	gtk/gtktooltip.c
	gtk/gtkviewport.c
	gtk/gtkwidget.c
	gtk/gtkwindow.c
	po-properties/ca@valencia.po
	po-properties/es.po
	po-properties/kn.po
	po-properties/mr.po
	po/ca.po
	po/ca@valencia.po
	po/el.po
	po/es.po
	po/gl.po
	po/id.po
	po/kn.po
	po/lv.po
	po/mr.po
	po/th.po
2010-04-30 17:56:50 -04:00
Javier Jardón
560e426f16 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_HAS_GRAB)
Introduce internal _gtk_widget_set_has_grab() for this

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=614513
2010-04-26 21:04:51 +02:00
Tristan Van Berkom
e997ac37a7 Added GTK_DEBUG_EXTENDED_LAYOUT flag and use that for debuggin in gtkextendedlayout.c 2010-04-18 20:14:13 -04:00
Javier Jardón
ee0bf98769 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:59 -04:00
Javier Jardón
ec20658b51 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_CAN_DEFAULT)
Use new API instead: gtk_widget_set_can_default ()
2010-04-03 20:58:22 -04:00
Javier Jardón
edc65ce1d2 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:20 -04:00
Javier Jardón
e7127daf84 Deprecate widget flag: GTK_WIDGET_IS_SENSITIVE
Use gtk_widget_is_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:29 -04:00
Javier Jardón
69de358b38 Deprecate some widget flags
Deprecate the following:
GTK_WIDGET_APP_PAINTABLE
GTK_WIDGET_CAN_DEFAULT
GTK_WIDGET_DOUBLE_BUFFERED
GTK_WIDGET_HAS_DEFAULT
GTK_WIDGET_HAS_GRAB
GTK_WIDGET_RECEIVES_DEFAULT

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:55:10 -04:00
Matthias Clasen
779d3d58ea Some improvements to the auto-mnemonics code 2010-04-03 20:53:36 -04:00
Matthias Clasen
d68d78de81 Only show the mnemonic underline when pressing Alt
...and show them in menus when navigating the menu with the keyboard.
This is similar to what other platforms do, and reduces visual clutter.
There is a setting to control this. Most of the work on this patch was
done by Thomas Wood. See bug 588554.
2010-04-03 20:53:35 -04:00
Colin Walters
fcbbd763cd [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2010-04-03 20:51:53 -04: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
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
51e0dd9a82 Deprecate some widget flags
Deprecate the following:
GTK_WIDGET_APP_PAINTABLE
GTK_WIDGET_CAN_DEFAULT
GTK_WIDGET_DOUBLE_BUFFERED
GTK_WIDGET_HAS_DEFAULT
GTK_WIDGET_HAS_GRAB
GTK_WIDGET_RECEIVES_DEFAULT

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-01-07 10:04:55 +01:00
Matthias Clasen
6f421d1450 Some improvements to the auto-mnemonics code 2009-12-20 19:17:24 -05:00
Matthias Clasen
c59f76fda2 Only show the mnemonic underline when pressing Alt
...and show them in menus when navigating the menu with the keyboard.
This is similar to what other platforms do, and reduces visual clutter.
There is a setting to control this. Most of the work on this patch was
done by Thomas Wood. See bug 588554.
2009-12-20 03:11:05 -05:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Javier Jardón
07236ee745 Remove statement with no effect 2009-10-30 04:19:10 +01:00
Nick Schermer
92a68f4cf9 gtk_init_with_args() arguments should be const gchar*
The translation_domain argument should be const gchar * to allow compilation
with -Wwrite-strings. It only passes the argument to
g_option_context_add_main_entries() which is already const gchar*.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=583305
2009-10-26 22:29:33 +01:00
Tor Lillqvist
425b652003 Don't ignore SIGPIPE unless it exists 2009-10-06 14:53:22 +03:00
Matthias Clasen
97d15954ad Move SIGPIPE suppression to gtk_init and document it
Some people were unhappy with doing it deep inside the lpr print
backend at an unpredictable time, and SIGPIPE is almost never
wanted anyway.
2009-10-01 11:45:28 -04:00
Alexander Larsson
7ab7ffa542 Automatically flush window when doing non-double-buffered expose
Applications using non-double-buffered drawing using cairo (e.g. Abiword)
can draw directly to the window using cairo and thus manage to avoid
the automatic flushing of outstanding moves. This can cause redraw
inconsistencies like bug 593507.

We fix this by always flushing when exposing non-double-buffered widgets.
2009-09-14 16:07:43 +02:00
Tor Lillqvist
e46ff83f30 Bug 164002 - query scripts don't work uninstalled on windows
2009-01-13  Tor Lillqvist  <tml@iki.fi>

	Bug 164002 - query scripts don't work uninstalled on windows

	* gtk/gtkmain.c (_gtk_get_libdir): If the gtk DLL is in a ".libs"
	folder, assume we are running uninstalled, and use the
	configure-time GTK_LIBDIR.


svn path=/trunk/; revision=22110
2009-01-13 14:04:27 +00:00
Michael Natterer
1dc24ea3a5 gtk/gtksignal.[ch] gtk/gtkclist.c gtk/gtklist.c gtk/gtkmain.c
2008-09-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtksignal.[ch]
	* gtk/gtkclist.c
	* gtk/gtklist.c
	* gtk/gtkmain.c
	* gtk/gtktext.c
	* gtk/gtktreeitem.c: use G_CALLBACK and GCallback instead of
	GTK_SIGNAL_FUNC and GtkSignalFunc also in deprecated code.


svn path=/trunk/; revision=21488
2008-09-22 10:35:44 +00:00
Tor Lillqvist
4125df1d8e gdk-pixbuf/gdk-pixbuf-io.c Don't use the deprectated
2008-09-13  Tor Lillqvist  <tml@novell.com>

	* gdk-pixbuf/gdk-pixbuf-io.c
	* gtk/gtkmain.c: Don't use the deprectated
	g_win32_get_package_installation_directory() and
	g_win32_get_package_installation_subdirectory() functions. Use
	g_win32_get_package_installation_directory_of_module()
	instead. Also, don't use the deprecated silly
	G_WIN32_DLLMAIN_FOR_DLL_NAME macro, but an explicit minimal
	DllMain() that just saves the DLL handle.


svn path=/trunk/; revision=21381
2008-09-13 19:31:29 +00:00
Cosimo Cecchi
42ec45e3c2 Bug 552153 – GtkModules loading with XSettings doesn't work if the
2008-09-13  Cosimo Cecchi  <cosimoc@gnome.org>

	Bug 552153 – GtkModules loading with XSettings doesn't work if the
	GTK_MODULES env var isn't set.

	* gtk/gtkmain.c: (do_post_parse_initialization):
	* gtk/gtkmodules.c: (_gtk_modules_init):
	Call _gtk_modules_init () even if gtk_modules_string is NULL, so
	that GtkModules specified with XSettings could be loaded.

svn path=/trunk/; revision=21380
2008-09-13 19:01:13 +00:00
Tor Lillqvist
b2dff511d3 gdk-pixbuf/gdk-pixbuf-io.c Do as the docs for
2008-09-13  Tor Lillqvist  <tml@novell.com>

	* gdk-pixbuf/gdk-pixbuf-io.c
	* gtk/gtkmain.c: Do as the docs for
	g_win32_get_package_installation_directory() say and pass NULL as
	the first parameter.


svn path=/trunk/; revision=21379
2008-09-13 09:19:03 +00:00
Cody Russell
4e3c97b3f2 Bug 56070 – Can't click button after setting it sensitive.
2008-07-31  Cody Russell  <bratsche@gnome.org>

        Bug 56070 – Can't click button after setting it sensitive.

        * gtk/gtkwidget.[ch] 
        * gtk/gtkwindow.c
        * gtk/gtkmain.c
        * gtk/gtkbutton.c
        * gtk/gtkprivate.h
        * gdk/gdkevents.h: Synthesize crossing events events where necessary.

        * gtk/tests/crossingevents.c: Add unit tests for crossing events.

        Big thanks to Ed Catmur, Matthias Clasen, and everyone else who
        has worked on and helped out with this.


svn path=/trunk/; revision=20924
2008-08-01 03:30:50 +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