Benjamin Otte
a89c598617
combobox: Add workaround so evolution doesn't crash
...
Removing the NULL checks in 7f60cab47d
caused evolution to crash. It chains up with NULL and that used to work.
This patch should be reverted for GTK 4.0.
https://bugzilla.gnome.org/show_bug.cgi?id=729496
2014-05-05 15:53:03 +02:00
Cosimo Cecchi
7f60cab47d
combobox: fix a segfault
...
Don't dereference a NULL pointer.
2014-05-01 19:44:12 +02:00
Benjamin Otte
7455ab72f8
combobox: Remove unneeded checks
...
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Bastien Nocera
f71f7215ab
all: Name more idles and timeouts
...
Following up from 438cd857c4
,
name more timeouts and idles.
The original grep was missing checking for gdk_threads_add_*()
functions (at least for some of the files).
https://bugzilla.gnome.org/show_bug.cgi?id=726870
2014-03-26 20:09:30 -04:00
William Jon McCann
469d333aa2
docs: use Returns: consistently
...
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
7f6a964c47
Docs: Remove all entities and turn off sgml mode
...
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
326da2da58
docs: don't use <anchor>
2014-02-07 15:40:52 -05:00
William Jon McCann
13998c55e7
docs: use proper quotations instead of '*'
2014-02-07 14:22:39 -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
0ce016650b
docs: Use markup for links
2014-02-07 09:42:12 -05:00
William Jon McCann
a22358c0c0
docs: use ` instead of <literal>
2014-02-04 18:24:29 -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
Carlos Garnacho
da86918c32
combobox: Set GDK_SCROLL_MASK on the eventbox in appears-as-list mode
...
This is so the scroll wheel works in both modes, and there's no behavioral
change depending on a style property.
https://bugzilla.gnome.org/show_bug.cgi?id=702663
2013-11-20 13:18:37 +01:00
Bastien Nocera
438cd857c4
all: Add names to timeouts
...
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.
https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
David King
4415d087c6
combobox: Add missing Since tags for entry constructors
2013-08-22 20:36:17 +01:00
Matthias Clasen
8383f003f3
Avoid deprecation warnings
2013-08-20 00:15:37 -04:00
William Jon McCann
6f7b0cac94
Deprecate tear off menus
2013-07-18 12:16:02 -04:00
Emmanuele Bassi
0899ef7cc9
gtk: Use new macros for defining private data
...
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Aleksander Morgado
24fa277329
combobox: popdown the combobox when on 'grab-broken-event'
...
And also explicitly remove pointer/keyboard grabs from the display.
Whenever the grab is reported lost, we should popdown the combobox, so that the
GDK_WINDOW_TEMP window is hidden and removed from the toplevel, as done with
the menu for example.
Leaving the GDK_WINDOW_TEMP window open when re-activating the application
triggers several issues in the win32 backend, due to restacking windows of the
non-toplevel group into the toplevel group:
https://bugzilla.gnome.org/show_bug.cgi?id=695200
2013-03-12 07:23:17 -04:00
Cosimo Cecchi
894f84c623
Revert "combobox: Don't special-case RTL child positions anymore"
...
This reverts commit cf712c462d
.
https://bugzilla.gnome.org/show_bug.cgi?id=694451
2013-02-23 14:53:23 -05:00
Benjamin Otte
cf712c462d
combobox: Don't special-case RTL child positions anymore
...
If you want to get rounded corners on an hbox, instead of
:first-child {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
:last-child {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
you now need to write:
:first-child, :last-child:dir(rtl) {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
:last-child, :first-child:dir(rtl)
{
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
2012-12-18 18:25:42 +01:00
Benjamin Otte
7747910b9d
gtk: Use context's font
...
Instead of using gtk_style_context_get_font() in
pango_context_get_metrics(), use pango_context_get_font_description().
The context contains the font description we are about to use after all.
2012-12-06 02:57:18 +01:00
Benjamin Otte
33f111a47c
widget: Don't cache widget paths all the time
...
Add an internal API that allows GtkStyleContext to create a widget path
for the widget and with that bypassing gtk_widget_get_path() and that
function caching the path.
2012-04-17 08:59:21 +02:00
Benjamin Otte
ece9d2fd92
gtk: Make widget only invalidate widget positions
...
Instead of resetting them completely
2012-04-17 08:59:10 +02:00
Matthias Clasen
d7cf9d7b84
combobox: Make scrolling work again
...
Select for scroll events, making it possible to use a scroll
wheel to change the combobox.
2012-03-19 07:08:01 -04:00
Benjamin Otte
461803e407
gtk: Get gtkwidgetpath.h includes out of the public headers
...
and include them in the C files instead.
2012-03-19 02:26:16 +01:00
Benjamin Otte
2353d60b8a
types: Move GtkAdustment declaration to gtktypes.h
...
... and make all the headers to not include gtkadjustment.h anymore. Of
course, also include it in the source files instead.
2012-03-03 19:45:03 +01:00
Javier Jardón
9d0febc9a6
Change FSF Address
2012-02-27 17:06:11 +00:00
Cosimo Cecchi
26ff536069
combobox: fix cell area allocation in menu mode for RTL
...
We were missing a padding to subtract from the child widget here.
2012-01-31 20:30:43 -05:00
Cosimo Cecchi
aa16f469bc
combobox: fix dropdown menu alignment for RTL languages
...
We need to add in the left padding, instead of subtracting it in that
case.
2012-01-31 20:30:43 -05:00
Cosimo Cecchi
65e6248542
combobox: use gtk_container_class_handle_border_width()
...
Avoids us fiddling with the border width manually in our size request
and allocation cycles.
2012-01-31 20:30:43 -05:00
Cosimo Cecchi
cf7f0cb27a
combobox: always trim the allocated area by padding and border for child
...
When we're size allocating the children widgets, always trim the
allocation for padding and border of GtkComboBox, as that's all the area
they have available.
2012-01-31 20:30:42 -05:00
Cosimo Cecchi
ec6b36add5
combobox: cleanup allocation of children in list mode
...
Instead of setting the same values for child allocation in different
places, just do it once.
2012-01-31 20:30:42 -05:00
Cosimo Cecchi
a8211b75b2
combobox: cleanup and comment the allocation code somewhat
2012-01-31 20:30:42 -05:00
Cosimo Cecchi
00325e992b
combobox: make sure to respect the GtkComboBox padding in menu mode
...
When the combobox is in menu mode, we still shouldn't discard the
GtkComboBox padding value; it's wrong to allocate it to the button.
2012-01-31 20:30:42 -05:00
Cosimo Cecchi
c598a9501f
combobox: cleanup GTK_COMBO_BOX_SIZE_ALLOCATE_BUTTON
...
It was using the wrong padding values for RTL, and generally, using the
same variables in a distant macro makes this method even more
complicated than it already is...
2012-01-31 20:30:41 -05:00
Cosimo Cecchi
1bbd2c48c5
combobox: simplify size request code by using the button content box
...
Similar to what we did for size_allocate.
2012-01-31 20:30:41 -05:00
Cosimo Cecchi
821365af15
combobox: move the allocation of the button contents box directly
...
If we're in menu mode with no children, instead of tweaking the
allocation of the arrow and the separator separately, tweak the
allocation of the box that contain both.
2012-01-31 20:30:41 -05:00
Cosimo Cecchi
93523e70a0
combobox: allocate the CSS borders to GtkComboBox
...
Consider borders in the allocation/size-request machinery, like every
widget should do.
2012-01-31 20:30:40 -05:00
Cosimo Cecchi
4675ed27fd
combobox: remove handling of focus-padding and focus-line-width
...
GtkComboBox always handles focus through its children, so there's no
need to request and allocate them again.
In fact, Adwaita was forcing these style properties to zero for
GtkComboBox.
2012-01-31 20:30:40 -05:00
Carlos Garcia Campos
7f2b08c04d
gtkcombobox: Use symbolic names for button numbers
2012-01-27 09:47:43 +01:00
Benjamin Otte
9707d964f7
combobox: Don't allow an individual cell to cheat
...
Make sure we only set sensitive when the cell is sensitive and visible.
Also avoid invalid memory accesses if no cells existed.
2011-12-23 00:15:59 +01:00
Rui Matos
721920e9e9
combobox: Stop setting state flags on the style context for drawing
2011-12-19 19:21:15 +00:00
Matthias Clasen
020c1846b7
Use the workarea when placing popups
...
This uses the new workarea API to avoid placing popups underneath
panels, docks, etc.
2011-12-18 14:29:16 -05:00
Matthias Clasen
068e1f0390
Move wholly deprecated files to a subdirectory
...
Also install their headers to a subdirectory.
2011-11-01 23:51:18 -04: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
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
Benjamin Otte
11e17601b3
combobox: Remove unused define
2011-09-29 04:24:02 +02:00
Cosimo Cecchi
e97ed4374f
combobox: implement get_path_for_child() for GtkComboBox
...
This way we can adjust borders and rounded corners from the theme when
displaying the widget children flipped for RTL locales.
https://bugzilla.gnome.org/show_bug.cgi?id=658507
2011-09-09 11:46:00 -04:00
Matthias Clasen
6f39855c08
More include cleanups
2011-08-28 01:54:55 -04:00
Cosimo Cecchi
7e22b46c1f
combobox: add a "combobox-entry" style class for comboboxes with entries
...
This way themes can use GtkComboBox.combobox-entry to match that
specific case, and GtkComboBox.combobox-entry .button to match the
button/arrow side of the widget.
2011-08-09 16:08:00 +02:00
Matthias Clasen
7371e3f7cf
Convert GailComboBox to GtkComboBoxAccessible
2011-07-05 16:08:56 -04:00
Javier Jardón
bf0d8402f5
gtk: Use const instead G_CONST_RETURN
2011-06-10 13:07:54 +01:00
Matthias Clasen
b9a59c2ad6
Clean up more includes
...
Mainly removing unused h/v includes, but also adding some that
will be necessary as replacements.
2011-06-07 20:54:23 -04:00
Matthias Clasen
4cd9009c57
Trivial NULL vs 0 confusion
2011-06-01 00:05:06 -04:00
Javier Jardón
fb9e4c2c37
all: avoid boxed structs copying where possible (and 2)
...
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
2011-05-31 19:18:11 +02:00
Cosimo Cecchi
c8a59a6f92
all: avoid boxed structs copying where possible
...
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
https://bugzilla.gnome.org/show_bug.cgi?id=650420
2011-05-18 10:27:21 -04:00
Matthew Barnes
7ae4a06d1f
GtkComboBox: Improve gtk_combo_box_set_active_id
...
- Passing a NULL ID string should be equivalent to
gtk_combo_box_set_active (combo_box, -1).
- Use g_strcmp0() instead of strcmp() when comparing
ID strings to avoid a crash when an ID is NULL.
- Return a boolean indicating if the ID was found or not.
https://bugzilla.gnome.org/show_bug.cgi?id=647806
2011-04-26 07:59:53 -04:00
Cosimo Cecchi
1263fdbd67
combobox: always give the full allocation to the button in menu mode
...
The button is what draws the background/frame outline of the combobox,
and padding is defined as the spacing *inside* the widget between the
border and the content.
https://bugzilla.gnome.org/show_bug.cgi?id=646882
2011-04-12 17:14:36 -04:00
Cosimo Cecchi
6116bcb78e
combobox: rename border->padding for code clarity
...
https://bugzilla.gnome.org/show_bug.cgi?id=646882
2011-04-12 17:14:35 -04:00
Cosimo Cecchi
cfb54d81bd
combobox: allocate the right border to the arrow and not to the label
...
When the combobox is in menu mode, the right padding of the togglebutton
inside, should be allocated to its rightmost children, which is the
arrow.
https://bugzilla.gnome.org/show_bug.cgi?id=646882
2011-04-12 17:14:34 -04:00
Cosimo Cecchi
bb038d4dd4
combobox: don't use the border as a padding
...
This causes the combobox to behave badly from the theme.
https://bugzilla.gnome.org/show_bug.cgi?id=646882
2011-04-12 17:14:33 -04:00
Cosimo Cecchi
2613e412d7
combobox: don't add the button style class to the whole widget
...
It already has a toggle button inside, and this way we cannot theme them
separately.
https://bugzilla.gnome.org/show_bug.cgi?id=646882
2011-04-12 17:14:32 -04:00
Benjamin Otte
f2441c08f1
combobox: Don't set the menu's name twice
2011-03-27 00:48:25 +01:00
Cosimo Cecchi
0ff4fdb233
combobox: add an arrow-scaling property to GtkComboBox
2011-03-03 17:48:25 -05:00
Tristan Van Berkom
4164a49b84
Added documentation to "cell-area" construct-only properties.
...
Indicate what kind of area will be used by default if none is
provided by the user.
2011-02-24 16:05:41 +09:00
Matthias Clasen
beb8c290d1
Always chain up in ::style-updated
...
This was not handled consistently, but the default handler
does useful things, so we should always chain up.
2011-02-07 07:30:37 -05:00
Carlos Garnacho
42778894c0
s/state_changed/state_flags_changed/ in GtkComboBox
2011-02-06 11:21:42 +01:00
Matthias Clasen
726b0d8736
Bandaid fix for icon view subclassing
...
I've decided that it is isn't feasible to make cell areas runtime-settable
in the time we have left before 3.0, therefore, I'm going with the
approach to allow init() functions to instantiate the default cell area
and issue a warning if a construct property is ignored.
This is not ideal, but it keeps existing icon view and combo box
subclasses working.
https://bugzilla.gnome.org/show_bug.cgi?id=639139
2011-01-31 17:39:42 -05:00
Matthias Clasen
f941f7b123
Fix keynav issue in menu mode
...
Skipping insensitive and separator rows was broken in menu mode.
https://bugzilla.gnome.org/show_bug.cgi?id=639845
2011-01-20 23:40:14 -05: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
Benjamin Otte
a41402c455
combobox: Update adjustment usage for sealing
2011-01-05 23:50:22 +01:00
Matthias Clasen
98440ad031
Remove gtktypeutils altogether
...
Based on patches by Javier Jardón.
https://bugzilla.gnome.org/show_bug.cgi?id=629955
2011-01-04 14:51:19 -05:00
Matthias Clasen
b5c6904c2f
Drop explicit includes of gdkkeysyms.h
...
These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h
to use the new GDK_KEY_ symbols.
2011-01-04 12:21:41 -05:00
Milan Bouchet-Valat
52e1722f35
GtkComboBox(Text): Add documentation about the entry
2011-01-04 10:36:08 -05:00
Tristan Van Berkom
68aa336f5f
Removed TABs and trailing whitespace from GtkComboBox and GtkTreeMenu
2011-01-05 00:14:25 +09:00
Tristan Van Berkom
4ff893979b
Fixed conflicts after rebasing master into combo-refactor branch.
2011-01-04 23:37:14 +09:00
Tristan Van Berkom
d681aa7977
Fixed GtkComboBox to properly set tearoff state on delegate GtkTreeMenu.
...
This breakage was also the cause of not correctly positioning the child
menu over the selected item.
2011-01-04 23:37:13 +09:00
Tristan Van Berkom
7b2d6e5cdf
Make GtkTreeMenu a private class:
...
- Removed GtkTreeMenu from gtk-docs.sgml
- Removed GtkTreeMenu from gtk3-sections.txt
- Removed GtkTreeMenu from gtk.symbols
- Make GtkTreeMenu apis prefixed with '_' (including _get_type()).
- Updated GtkComboBox sources to use the private apis
- Updated GtkCellView to not mention #GtkTreeMenu in gtk-doc statements
- Updated tests/testtreemenu to not use a GtkTreeMenu but still
show a very fancy GtkComboBox
- Moved gtktreemenu.h to private headers section in the makefile.
- Removed include of gtktreemenu.h from gtk.h
2011-01-04 23:37:13 +09:00
Tristan Van Berkom
57857f13df
Added new constructors gtk_combo_box_new_with_area and gtk_combo_box_new_with_area_and_entry.
2011-01-04 23:37:13 +09:00
Tristan Van Berkom
b3ff60db71
Fixed GtkComboBox to let the cell-layout implementation handle <cell-packing>
2011-01-04 23:37:13 +09:00
Tristan Van Berkom
01981311da
Removed GtkComboBoxPrivate->minimum/natural_width members.
...
And updated gtk_combo_box_list_position() which is still waiting
for GtkTreeView to report natural width in order to properly do
non fixed width dropdown menus.
2011-01-04 23:37:12 +09:00
Tristan Van Berkom
ee02ac5863
Re-refactored GtkComboBox to not reorder the file.
...
Turns out reordering the file the way I did before put
me in an unmergable situation, now re-refactored the
combo and list-mode works again.
2011-01-04 23:37:12 +09:00
Tristan Van Berkom
f3de78a023
Fixing GtkComboBox breakage after merge, completing hand-merge of style-context GtkBorder issues (now it works again).
2011-01-04 23:37:11 +09:00
Tristan Van Berkom
83c69f4cf3
Implementing GtkComboBox using GtkTreeMenu !
...
First iteration at implementing combo box using a delegate
treemenu, almost everything is working. Still need to finalize
sensitivity issues in GtkTreeMenu (and should go ahead and pass
through GtkComboBox code with a fine comb...).
2011-01-04 23:37:08 +09:00
Kristian Rietveld
c659542333
Check for NULL pointer
2010-12-24 14:45:47 +01:00
Matthias Clasen
2ed81aa57c
Remove sealed members from GtkMenuShell
2010-12-23 18:21:53 -05:00
Matthias Clasen
c5b020e628
Remove sealed members from GtkMenu
2010-12-23 15:51:20 -05:00
Javier Jardón
e92da3e166
gtkcombobox.c: Use accessor functions to access GtkTreeSelection
2010-12-19 01:27:41 +00:00
Kristian Rietveld
faf35d708b
Fix size allocation for list mode combo box
2010-12-17 16:53:46 +01:00
Kristian Rietveld
21fc66f120
Set cell_view to NULL immediately after unparenting
...
This way we are sure no invalid pointer will be accessed in between.
2010-12-17 16:53:46 +01:00
Kristian Rietveld
81515f7183
Check if popup_window is mapped, not popup_widget
...
Before hide_all was used on popup_window, which means popup_widget
was also unmapped. This is now no longer the case. This fixes
subsequent pop ups for appears-as-list == 1.
2010-12-17 16:53:46 +01:00
Tristan Van Berkom
4038cd76b3
Removed GtkTreeViewPrivate from gtktreeprivate.h and added a few more accessors.
...
This actually much simplifies interaction with GtkTreeSelection
(at least reduces code size where dealing width the treeview anchor path).
2010-12-05 22:11:37 +09:00
Javier Jardón
d351b40a0b
Add internal accessor for GtkEntry->is_cell_renderer
...
This fixes commit fb3429e507
2010-12-04 22:06:02 -05:00
Carlos Garnacho
cf0bd12e6c
GtkStyleProperties: Turn border-width into a GtkBorder property.
...
All current users of this CSS property have been updated to deal
with a GtkBorder.
Also a 0 border width has been set in the default CSS to ensure
GtkStyleContext and GtkThemingEngine always provide a non-NULL
pointer for this property.
2010-12-04 15:39:52 +01:00
Carlos Garnacho
1d5a6b687e
GtkComboBox: Use style context for rendering
2010-12-04 15:39:40 +01:00
Carlos Garnacho
0e25b19515
GtkComboBox: Set widget state as state flags.
2010-12-04 15:38:30 +01:00
Ryan Lortie
922324553b
Bug 619148 - "active ID" properties (GtkComboBox)
...
Based on a patch by Matthias, add an "active-id" property for
GtkComboBox and add some convenience API for GtkComboBoxText.
Also, add a test case to gtk-demo.
2010-11-30 00:29:16 -05:00
Matthias Clasen
2451e6f690
Small doc fixup
2010-11-29 11:25:10 -05:00