Commit Graph

9615 Commits

Author SHA1 Message Date
Kristian Rietveld
dd511e825a Bug 480065 - wrong tree collapsed (or expanded) after having scrolled
Store (x, y) of last motion event.  From
gtk_tree_view_adjustment_changed(), call prelight_or_select() so that
the prelight is recalculated.  We do the same from
gtk_tree_view_size_allocate() for the case that clicking on an expander
shows new rows that resize the column(s) left of the expander.  This
means that the expander is moved horizontally, in such a case the
prelight also has to be reconsidered.
2009-11-27 13:48:16 +01:00
Kristian Rietveld
d3592dc22c Logically re-group fields in GtkTreePrivate structure
This should now cause much less of a headache than before.  Fields have
been properly reordered, each group has been given a comment.  Since the
GtkTreePrivate structure is private (as the name says), this should not
have any effect on ABI.
2009-11-27 13:48:16 +01:00
Matthias Clasen
0567ea1c18 Add customary args to gtk_style_paint_spinner()
...and adjust all callers.
2009-11-27 01:23:55 -05:00
Matthias Clasen
14fb7dfb7e Fix a doc comment 2009-11-27 00:46:18 -05:00
Matthias Clasen
111dd859ba Fix a doc comment 2009-11-27 00:45:22 -05:00
Matthias Clasen
6255df0982 Fix a doc comment 2009-11-27 00:43:51 -05:00
Matthias Clasen
927aaa43f9 Remove duplicate doc comments.
These can only serve to confuse gtk-doc.
2009-11-27 00:42:54 -05:00
Matthias Clasen
3faf7d0214 Fix a doc comment 2009-11-27 00:39:26 -05:00
Matthias Clasen
7ad6bb3eb6 Un-doc-commentify a comment 2009-11-27 00:37:20 -05:00
Matthias Clasen
13d5d37bc7 Fix a doc comment 2009-11-27 00:37:03 -05:00
Matthias Clasen
1f8d468123 Adjust default value for GtkToolItemGroup::label 2009-11-27 00:14:37 -05:00
Matthias Clasen
4362400018 Exclude GtkToolItemGroup::label-widget from default value test 2009-11-27 00:11:59 -05:00
Matthias Clasen
37255486d4 Merge branch 'master' into toolpalette 2009-11-26 23:54:55 -05:00
Matthias Clasen
837775af7b Fix up docs, and set up the aliasing machinery 2009-11-26 23:52:20 -05:00
Matthias Clasen
7aa1d6fcaf Fix another doc typo 2009-11-26 18:56:25 -05:00
Christian Persch
ba218a7789 Make setting the icon-size property on GTK_IMAGE_GICON images work
Bug #602725.
2009-11-23 17:03:55 +01:00
Johannes Schmid
bffd43bd8f toolpalette: Don't call gdk_window_process_updates() in the animation callback
That does not seem to make any difference.
2009-11-18 10:38:45 +01:00
Alberto Garcia
087348a55d Bug 601512 - Remove unnecessary check in GtkTreeModelFilter
gtk_tree_model_filter_set_visible_func() is checking for
priv->visible_func, but that is always going to be NULL since there's
no way to call this function twice.

Besides that the code itself is wrong, since it tries to call
priv->visible_destroy without making sure that it's not NULL
2009-11-15 13:42:36 +01:00
Christian Dywan
0bc6680564 Implement gtk_statusbar_get_message_area and "message_area" child
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=594535
2009-11-12 18:57:37 +01:00
Christian Dywan
00d87c2563 [gtk/gtkwindow] Added accessor for GTK_WINDOW ()->type
There already is the "type" property, but an accessor
function for it would be intuitive: gtk_window_get_window_type()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=595498
2009-11-11 20:07:39 +01:00
Marek Kasik
c32c2882b2 Rotate figures on landscape icons in page setup dialog
Rotate figures on landscape and reverse landscape icons
to match output of print (#599402).
2009-11-11 14:21:11 +01:00
Johannes Schmid
ffce5223fc toolpalette: Fixed inconsistent spacing 2009-11-11 10:02:36 +01:00
Johannes Schmid
0e2a5509f6 toolpalette: fixed trailing whitespaces 2009-11-11 09:42:49 +01:00
Johannes Schmid
0886416f26 toolpalette: Fixed documentation 2009-11-11 09:38:32 +01:00
Johannes Schmid
fe216c9367 toolpalette: allow to reset same adjustment 2009-11-11 09:33:49 +01:00
Johannes Schmid
3b2ae9dc3e toolpalettte: Fixed some style issues 2009-11-11 09:32:15 +01:00
Johannes Schmid
e8b640104e toolpalette: Always show text horizontally 2009-11-11 09:27:00 +01:00
Javier Jardón
c366d5c89e Fix incorrect GtkMovementStep description
Reported by James Campos here:
https://bugzilla.gnome.org/show_bug.cgi?id=601432
2009-11-10 20:42:13 +01:00
Javier Jardón
e8e82802a4 Fix compilation warning: Use GDK_GPOINTER_TO_NATIVE_WINDOW() macro 2009-11-10 20:26:59 +01:00
Tor Lillqvist
0e87c90539 Revert "Fix compilation warning: Use G_POINTER_TO_UINT"
GPOINTER_TO_UINT() *does* drop the upper 32 bits on 64-bit
Windows. After all, it by definition produces a (32-bit) unsigned int.

The GLib commit mentioned in the reverted commit's log message just
means that it does this without any compiler warning about casting
from pointer to integer of smaller size, as it first casts to a 64-bit
integer, then casts that to a (32-bit) int.

We must use the GdkNativeWindow cast here so that on 64-bit Windows
the gpointer data in embedded_list is converted to a (64-bit) native
window handle without going through 32-bit truncation. If ifdefs are
required to avoid compiler warnings on X11, so be it then. Probably it
would be best to introduce a GDK_GPOINTER_TO_NATIVE_WINDOW() macro in
gdktypes.h.

This reverts commit 78151dc7d4.
2009-11-10 16:17:33 +02:00
Javier Jardón
cb301e6dbb Fix compilation warning: Use a variable to store the return value 2009-11-09 22:39:54 +01:00
Johannes Schmid
1de2a55eaf Ported gtktoolpalette from a custom array to GPtrArray.
...and some mixed fixes of things mentioned in the bug report
2009-11-09 22:16:15 +01:00
Javier Jardón
21f6e1841a Fix compilation warning: Use G_GNUC_UNUSED macro
add_builtin_module() is only used into #define block of code
2009-11-09 21:49:47 +01:00
Javier Jardón
78151dc7d4 Fix compilation warning: Use G_POINTER_TO_UINT
GPOINTER_TO_UINT() doesn't drops the upper 32 bits on Win64 anymore.
The Glib commit e4194cb055e44f8a1bd2ab666ead9fa040bcdb89 solved this
problem.
2009-11-09 21:18:22 +01:00
Javier Jardón
3143a344a7 Fix compilation warning: Disable unused function
Use #if 0 to disable unused gtk_text_btree_node_invalidate_downward()
2009-11-09 20:56:54 +01:00
Christian Dywan
148ffd2cc9 Clarify documentation of gtk_notebook_set_action_widget 2009-11-09 16:36:17 +01:00
Javier Jardón
f1f6d76078 Fix some compilation warnings
Use the proper G*_TO_POINTER macro
2009-11-09 10:27:30 +01:00
Javier Jardón
1919f55647 Fix compilation warning: initialize variable to NO_MATCH 2009-11-09 09:41:51 +01:00
Javier Jardón
8831a44902 Fix warning: Use parentheses around '&&' within '||' 2009-11-09 09:36:41 +01:00
Javier Jardón
e70a46c7e3 Fix compilation warning: initialize the variable 2009-11-09 09:36:15 +01:00
Matthias Clasen
c605474fa9 Add GtkBuilder support for notebook action area.
Allow to place children into the notebooks action areas by using
"action-start" or "action-end" as the type.
2009-11-08 21:34:29 -05:00
Matthias Clasen
c7e4a1a012 Add an 'action area' to GtkNotebook
Add support for putting widgets in the tab area, before or after
the tabs. This was requested a long time ago in bug 116650. The
implementation is the work of Johannes Schmid.
2009-11-08 21:28:17 -05:00
Robin Stocker
26e2c7f398 Example for setting default action in gtk_drag_dest_set 2009-11-08 01:35:42 +01:00
Paul Pogonyshev
bb036097c3 Trivial typo fix. 2009-11-08 01:10:45 +02:00
Johannes Schmid
02a9d9afd8 Remove G_GNUC_UNUSED 2009-11-07 10:56:59 +01:00
Javier Jardón
8082aad271 Use "Deprecated:" gtk-doc symbol corrently
Also, added some suggestion about replacements for deprecated functions
2009-11-06 03:03:40 +01:00
Nicola Fontana
1e1131c959 Do not use static GTypeInfo and GInterfaceInfo
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.

https://bugzilla.gnome.org/show_bug.cgi?id=600158
2009-11-06 01:21:09 +01:00
Christian Dywan
e41f4e85cf Improve accessibility context and description of the spinner
https://bugzilla.gnome.org/show_bug.cgi?id=598758
2009-11-06 00:56:30 +01:00
Bruce Cowan
2f9bd297bb Fix tooltips in GtkColorSelection
Tooltips made reference to palette, even though it may not have been
visible. Bug #600150.
2009-11-05 23:22:32 +00:00
Javier Jardón
1a02671437 Fix compilation warning: Use gpointer variables 2009-11-02 23:49:00 +01:00
Benjamin Otte
ba9f53397f Don't keep the filesystem model alive while querying files
This allows disposing of the filesystemmodel while the file enumeration
is still happening.
As the filechooser does not disconnect its signals because it assumes it
is the only owner of the model, this also prevents a SEGV when emitting
the "load-finished" signal in that case.
2009-11-02 20:11:09 +01:00
Benjamin Otte
8632d8763d Simplify cleanup code
The patch ensures that the file browse model can only get removed in one
place, so it's easier to clean up.
2009-11-02 20:11:03 +01:00
Matthias Clasen
80de4ab0d9 Another property formatting fix 2009-11-01 18:53:51 -05:00
Matthias Clasen
0a9a1bec93 Work around a gtk-doc formatting problem 2009-11-01 16:41:48 -05:00
Matthias Clasen
097b254e4b Documentation and stylistic fixups 2009-11-01 16:12:43 -05:00
Javier Jardón
550796d897 Fix some compilation warnings
Use proper gint8 array variable instead a string
2009-10-30 18:36:03 +01:00
Javier Jardón
8763551b6b Fix warning: cast to gint* 2009-10-30 18:34:35 +01:00
Javier Jardón
3388a1b146 Use "Since: 2.x" instead "Since 2.x" 2009-10-30 18:11:44 +01:00
Javier Jardón
0a9843c1b9 Fix warning: some casts to gchar* 2009-10-30 04:27:32 +01:00
Javier Jardón
07236ee745 Remove statement with no effect 2009-10-30 04:19:10 +01:00
Javier Jardón
cbba733b47 Fix warning: cast to gchar* 2009-10-30 04:17:29 +01:00
Matthias Clasen
0f78a6c89a Allow setting type hints on unmapped windows
We set the hint on map, so it makes sense to check for GTK_WIDGET_MAPPED,
not GTK_WIDGET_VISIBLE as the code currently does.
2009-10-28 12:13:58 -04:00
Johannes Schmid
ed41fa8b50 Fixed GtkToolPalette API docs to mention 2.20 instead of 2.18 2009-10-28 13:17:13 +01:00
Johannes Schmid
e83013c066 Fix custom label handling in gtktoolitemgroup 2009-10-28 13:11:37 +01:00
Johannes Schmid
c229306a18 Merge branch 'master' into toolpalette 2009-10-28 10:57:46 +01:00
Yevgen Muntyan
4ff709c24b Use standard mac shortcuts: add gtk/gtkrc.key.mac
This completes commit 3c510f028f

https://bugzilla.gnome.org/show_bug.cgi?id=530351
2009-10-28 00:54:28 +01:00
Christian Dywan
da8dde446d Deprecate functions according to deprecated GtkButton signals
https://bugzilla.gnome.org/show_bug.cgi?id=599218
2009-10-27 22:42:25 +01:00
Christian Dywan
6271cb9672 Don't use deprecated button signal functions in clist and combo 2009-10-27 22:42:24 +01:00
Christian Dywan
4f0b0d0775 Don't use structure fields of GtkAccelMap in GtkSocket
https://bugzilla.gnome.org/show_bug.cgi?id=599403
2009-10-27 21:27:28 +01:00
Christian Dywan
f4d5ed5397 Allow removing all closures with gtk_accel_group_disconnect
https://bugzilla.gnome.org/show_bug.cgi?id=599403
2009-10-27 21:25:56 +01:00
Marek Kasik
33ec0ecf05 Don't assign a GtkPageOrientation to a boolean value
GtkPrintOperationPrivate->orientation is a boolean value.
2009-10-27 17:35:37 +01:00
Adrian Johnson
9f2c5e3b3a Take printer margins into account on Windows
Fixes bug #381371.
2009-10-27 12:30:50 +02:00
Christian Dywan
57af1cdb8c Only set the accesible label if it is non-empty
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=599446
2009-10-27 00:34:49 +01:00
Javier Jardón
d0f2cd73b0 Use G_STRLOC instead __FILE__ and __LINE__ 2009-10-27 00:21:51 +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
Javier Jardón
12061507b4 Use G_STRFUNC and G_STRLOC instead __FUNCTION__ and __FILE__ 2009-10-26 18:46:19 +01:00
Javier Jardón
42aebf51a2 Use G_STRFUNC instead __FUNCTION__ 2009-10-26 18:46:14 +01:00
Marek Kasik
6b5912a213 Show correct print preview
Modify print preview according to settings from print dialog.
Similar approach as during real print is applied to the preview
process (#592582).
2009-10-26 17:47:37 +01:00
Matthias Clasen
d3e6cffff7 Fix issues with symbolic colors in rc file parsing
Don't recreate the settings color hash every time, repopulate it
instead. This avoids invalidating the references held by RcContexts.
2009-10-25 23:47:59 -04:00
Matthias Clasen
16482f20db Fixes for the compose-parse.py script
Several fixes by Ray Strode and Peter Hutterer to make compose-parse.py
work with the current X.org Compose file.
2009-10-25 23:46:27 -04:00
Matthias Clasen
4c26d99d3e Update compose sequences
This patch includes additions to the X.org Compose file from the
last year. Patch by Peter Hutterer
2009-10-25 23:42:58 -04:00
Yevgen Muntyan
3c510f028f Use standard mac shortcuts
This changes Ctrl-X, Ctrl-C, etc. to Cmd-X, Cmd-C, etc. Also,
Alt-Left and Alt-Right in text widgets bound to Ctrl-Left and
Ctrl-Right actions

https://bugzilla.gnome.org/show_bug.cgi?id=530351
2009-10-26 00:03:05 +01:00
Matthew Barnes
13d968adbe Bug 581150 - GtkIconView tries to paint items with invalid sizes
Run gtk_icon_view_layout() if necessary before attempting to paint the
icon view items during an expose event.  This ensures all the items have
valid sizes, as some themes don't take kindly to negative dimensions.
2009-10-23 19:32:25 -04:00
Luca Ferretti
af6f5c1349 Add translators comments for tab labels (closes 599118) 2009-10-21 22:06:31 +02:00
Michael Natterer
34b4b4d9c3 Add single-include guard and reduce includes to what's needed 2009-10-21 20:21:20 +02:00
Michael Natterer
8c34831e42 Don't allow to include this new header individually 2009-10-21 20:20:54 +02:00
Javier Jardón
c43a3acac3 Fix a compilation warning: use NULL instead "" 2009-10-21 19:41:50 +02:00
Javier Jardón
d020cb4aa3 Remove unused function 2009-10-21 19:39:46 +02:00
Federico Mena Quintero
48f1b89eae bgo#563010 - Fix clearing the selection in GtkFileChooserButton
Previously the filename would get re-set on the button if one cleared the selection,
as an async cancellable was not getting canceled in that case.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-21 12:29:03 -05:00
Cody Russell
0f33ad4ee1 Added editing_canceled property to GtkCellEditable
GTK_ENTRY()->editing_canceled should really have been a parameter of the
GtkCellEditable::editing-done signal, it should be a property on the cell
editable interface

https://bugzilla.gnome.org/show_bug.cgi?id=594962
2009-10-21 18:55:24 +02:00
Christian Dywan
272e0b5b76 Deprecated GtkNotebook tab packing
https://bugzilla.gnome.org/show_bug.cgi?id=596083
2009-10-21 18:25:02 +02:00
Christian Dywan
7c6823373a Deprecate GtkCurve and GtkGammaCurve
https://bugzilla.gnome.org/show_bug.cgi?id=556263
2009-10-21 18:17:32 +02:00
Christian Dywan
f5df4e05e2 Added accesor for GTK_VIEWPORT (widget)->bin_window
Although, you can use:
gtk_widget_get_parent_window (gtk_bin_get_child (GTK_BIN (widget)))
there already are gtk_tree_view_get_bin_window() and
gtk_layout_get_bin_window() in GTK+ api.

https://bugzilla.gnome.org/show_bug.cgi?id=594960
2009-10-21 18:14:31 +02:00
Javier Jardón
6f6746389c Fix a compilation warning
Use switch instead if's to get a default value
2009-10-21 02:57:19 +02:00
Javier Jardón
69773763ee Fix a compilation warning
Reorder the function so the "lookup_context" variable can't be
used uninitialized
2009-10-21 02:45:05 +02:00
Javier Jardón
13ff557587 Fix some compilation warning
Complete the previous patch: set lower to 0 too
2009-10-21 02:37:05 +02:00
Javier Jardón
670e141b3a Fix some compilation warning
Added some default cases and assert if reached
2009-10-21 02:08:18 +02:00
Javier Jardón
d3155bb1ea Remove some unnused variables 2009-10-20 20:37:46 +02:00
Marek Kasik
cf8c4a6a80 A small correction of previous commit
Correct of a typo.
2009-10-19 11:44:09 +02:00
Matthias Clasen
52ef2f2a3e Correct a small oversight
When changing themes, we also need to update the box spacing of
tooltips.
2009-10-18 20:38:28 -04:00
Matthias Clasen
9f11bb0ff6 Don't omit GTK_ICON_SIZE_DIALOG 2009-10-18 02:07:58 -04:00
Matthias Clasen
1dbfcf484b Fix a problem in GtkImage size allocation
When GtkMisc padding is set on an image, the optimization for only
recalculating size after a clear() breaks, since the requisition is
not (0, 0). We need a separate 'need_calc' flag.
2009-10-18 01:38:44 -04:00
Christian Dywan
8e6dbff2b0 Deprecate GtkInputDialog
Deprecate the widget and adjust the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=594903
2009-10-16 16:05:13 +02:00
Tor Lillqvist
6d62e4fafe Fix build on Windows 2009-10-16 13:29:54 +03:00
Debarshi Ray
34f6b9518c Use G_BEGIN/END_DECLS in gtkcellrendererspinner.h 2009-10-16 00:22:20 +03:00
Federico Mena Quintero
f0e2d7d88b Fix thinkos in which fields get used
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:20 +02:00
Federico Mena Quintero
02d96465f4 Oops, it's gsize, not GSize
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:19 +02:00
Federico Mena Quintero
1d283145bf Fix a g_strdup_printf()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:19 +02:00
Federico Mena Quintero
c39e8af7f4 Put the list of column types in a macro
Every call to _gtk_file_system_model_new*() gets the same list of column types,
so we now keep the list in a macro instead of having duplicated copies all around.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:19 +02:00
Federico Mena Quintero
4c242317b0 Clarify the arguments of g_file_query_info_async()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:19 +02:00
Federico Mena Quintero
2f3367fbf8 Make copy_attribute() a function instead of a macro
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:19 +02:00
Federico Mena Quintero
442484a280 Don't leak a treepath if the treeview is not populated yet
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:18 +02:00
Federico Mena Quintero
35028b9f05 Factor out function to set a fixed size for the icon cell renderers
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:18 +02:00
Federico Mena Quintero
90647c1a13 Comment that the column order needs to be kept in sync across two functions
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:18 +02:00
Federico Mena Quintero
0144521438 Fix typo in a comment
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:18 +02:00
Federico Mena Quintero
6e3a6ba12f Make get_selected_file() return a ref'ed file
The old semantics was to return a GFile* owned by the file system model; the new
semantics is to hand out new references whenever possible.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:18 +02:00
Federico Mena Quintero
7e9fbd16e4 In set_filter(), handle the case where the new filter is the same as the old filter
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:17 +02:00
Federico Mena Quintero
fb1a72fcb0 s/get_is_visible/iter_is_visible for clarity
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:17 +02:00
Federico Mena Quintero
9efa64fba5 Remove obsolete comment
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:17 +02:00
Federico Mena Quintero
55a04b1da0 Make the code match the docs in _gtk_file_system_model_clear_cache()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:17 +02:00
Federico Mena Quintero
112d2430be Free some missing fields in ::finalize()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:17 +02:00
Federico Mena Quintero
5ea265ca61 Clarify variable names in gtk_file_system_model_sort()
To comply with the i -> indexes; r -> rows convention.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:17 +02:00
Federico Mena Quintero
7ecc87ed59 Nothing to do for ref/unref_node
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:17 +02:00
Federico Mena Quintero
8bf24cdd9d Clarify a couple of spots with comments
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:16 +02:00
Federico Mena Quintero
14cc3e17f5 Clarify array indexes vs. row numbers
There was some confusion between "index" as used for the model->files[] array,
and node->index as used for our 1-based row numbers.  Now we use "index" only
for indices in the model->files[] array, and node->row for row numbers.  Functions
and variables are renamed to clarify whether they refer to indexes or rows.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:16 +02:00
Federico Mena Quintero
d0468ee7e1 Big comment on how GtkFileSystemModel works
Let's have some documentation on the idea behind this beast...

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:16 +02:00
Federico Mena Quintero
04c78019fb Remove obsolete code to use a cached mime-type
The non-standard "filechooser::mime-type" was a remnant of the recent-files code using
a hand-built GFileInfo; now we just query the file info ourselves.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:16 +02:00
Federico Mena Quintero
6166fccf30 Fix thinko in node_should_be_visible()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:16 +02:00
Federico Mena Quintero
908911d6db Factory out functions to emit row_inserted, row_changed, row_deleted
This is to avoid temporary variables for the path/iter and to avoid duplicated code.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:16 +02:00
Federico Mena Quintero
ad2e6ff52c When updating a file, handle the case where the old file info is the same as the new one
This prevents us from inadvertently losing the last ref to the info.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:16 +02:00
Federico Mena Quintero
688917cdbb When removing a file, also remove it from the file_lookup hash table
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:15 +02:00
Federico Mena Quintero
385fa71ec0 Comment on how the file_lookup hash table gets rebuilt on demand
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:15 +02:00
Federico Mena Quintero
6820dee988 Clarify the arguments to g_file_query_info_async()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:15 +02:00
Federico Mena Quintero
ccee7ef4fb Show an error dialog when we can't read the folder's contents
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:15 +02:00
Federico Mena Quintero
3b86973075 Clarify the code flow in gtk_file_system_model_got_files()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:15 +02:00
Federico Mena Quintero
3f7c144605 Remove the dir_thaw_source while disposing the model
Otherwise that timeout may trigger after the model has died.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:15 +02:00
Federico Mena Quintero
30016185be Make _gtk_file_system_model_remove_file() static
It was only used internally by the model.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:14 +02:00
Federico Mena Quintero
2e0382cf02 Make _gtk_file_system_model_add_file() static
It was only used internally by the model, anyway.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:14 +02:00
Federico Mena Quintero
93588c6d5c Clarify the comments that some fields in GtkFileSystemModel can be NULL
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:14 +02:00
Federico Mena Quintero
88bb9342ab Clarify the arguments to g_file_monitor_directory()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:14 +02:00
Federico Mena Quintero
d2d997a021 Clarify an argument to g_file_enumerate_children_async()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:14 +02:00
Federico Mena Quintero
d5d9601852 Fix and tighten an assertion
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:14 +02:00
Federico Mena Quintero
86c32c2502 Complete the documentation string for _gtk_file_system_model_new()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:14 +02:00
Federico Mena Quintero
3232c469fc Start with a file array with a resonable preallocated size
g_array_new() doesn't reserve any size by default, so during the initial population
of the file array, we'll do more reallocs than strictly needed.  We'll start with
a reasonable preallocated size, in this case the number of files which we can
get in a single chunk out of GIO.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:13 +02:00
Federico Mena Quintero
5110415684 Compute the node size only once to avoid the scary macro
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:13 +02:00
Federico Mena Quintero
dfe20ea1a8 g_error() as soon as we catch an invalid column type
There's no point in running a GtkFileSystemModel with invalid column types.
This way we can also avoid clearing the memory of the column_types array.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-10-15 22:06:13 +02:00
Benjamin Otte
836c3ab043 Improve show_and_select_files() function
The previous function enumerated the whole directory and used a lot of
outdated API to decide how to show files.
The new code queries the filesystem model to decide about this.
The now unused old functions were removed.
2009-10-15 22:01:40 +02:00
Benjamin Otte
6bdaaea3a4 Remove unused error argument from show_and_select_files() 2009-10-15 22:01:40 +02:00
Benjamin Otte
682a3c8c75 Enable the size column in recent files/search
Previously information about file sizes was not available for search
results and recent files, so the column was always hidden. As this
information is now available, we can stop the special handling and use
the same setting as in browse mode.
2009-10-15 22:01:40 +02:00
Benjamin Otte
d68bca1771 Use the faster accessor function in the sort functions
Use the faster _gtk_file_system_model_get_value() function instead of
gtk_tree_model_get() inside the sort functions. This gives a significant
speed-up when sorting large lists.
In a test case with 40.000 files, the sorting time went from ~5 seconds
to less than 0.5 seconds for my test case. There is 2 significant
problems with gtk_tree_model_get() that cause this:
1) The value is copied, which takes quite a bit of time for strings.
   ~25% of excessive time or ~1 second in my test
2) The tree model functions need to lookup the interface vfunc. And
   gtk_tree_model_get() doesn't do that only once, but multiple times
   (verifying column id, getting the actual value, ...)
   ~75% of excessive time or ~3 seconds in my test
2009-10-15 22:01:39 +02:00
Benjamin Otte
53a00e3cc3 Convert recent files to a GtkFileSystemModel
This does to the recent files what the last commit did to the search. It
uses a GtkFileSystemModel and its API niceties to show the recent files.
2009-10-15 22:01:39 +02:00
Benjamin Otte
5a31dfd66b Convert search to use a GtkFileSystemModel
Replace the list model code with the file system model and use all the
file system model API niceties we get from that.
Also adds the function _gtk_file_system_model_add_and_query_file() which
g_file_query_info()'s the file before adding it, so it gets added with
the right information.
2009-10-15 22:01:09 +02:00
Benjamin Otte
390a3910f5 Don't count the "enter directory name" line as a selected file 2009-10-15 22:00:09 +02:00
Benjamin Otte
affa8c8459 Add a constructor to filesystem model that does not monitor a directory
This is in preparation for switching search and recent models to use
GtkFileSystemModel
2009-10-15 22:00:09 +02:00
Benjamin Otte
10e8d6abca Make the filesystem model filter API use a GtkFileFilter
This gets rid of the vfunc API and does exactly what the file chooser
wants.
2009-10-15 22:00:09 +02:00
Benjamin Otte
cd337e2a95 Only query the absolutely necessary attributes
Since the time taken by g_file_enumerate_children() depends a lot on the
attributes that are queried, we query the minimum attributes that need
to be queired to display the file chooser.

In particular, the attributes for loading the icon are ignored, as icons
are loaded on demand (see previous commit).
2009-10-15 22:00:08 +02:00
Benjamin Otte
4a1ff32325 Load icons on-demand
Because loading icons takes a noticable performance, this code loads the
pixbuf on demand and only loads icons for rows that are visible. There
is a few caveats to this:
- The pixbuf cell renderer must report the proer size even if the icon
  is not yet loaded. This is achieved by setting a fixed size.
- On theme changes the cahced pixbufs and the cell renderer must be
  updated to conform to the new theme.
2009-10-15 22:00:08 +02:00
Benjamin Otte
105e6fbc11 Use the GtkTreeSortable of the filesystem model
Previously, there was a GtkTreeSortModel wrapped around the filesystem
model to make it sortable. As the new implementation implements the
GtkTreeSortable interface, we can use this instead.
2009-10-15 22:00:08 +02:00
Benjamin Otte
3e385ffd07 Clean up code to use the model directly
A lot of code special cases accesses to the tree view for the different
browse modes, which was previously necessary, because the models were
different. Now that they are identical in the first columns, there is no
such need anymore, and the functions don't need to be special cased.
2009-10-15 22:00:08 +02:00
Benjamin Otte
30c1a1ee2c Replace the cell data computations
Previously custom functions were used to compute the data passed to the
cell renderers. Now that all this data is saved by the tree models with
compatible nodes, the usual default attribute-to-column mapping can be
used.
With this, caching of the values can happen in the tree model, which
avoids costly lookups of icons or computation of strings. Last but not
least it avoids spurious bugs that could happen when strings changed
without anyone noticing, like the mtime when a new day begins.
2009-10-15 22:00:08 +02:00
Benjamin Otte
a5390ad49e Consolidate tree models for different browse modes
All tree models in browse mode now share the first 10 column types
containing all the necessary information to display the model on screen.
Therefor it is now easy to just operate on the tree model associated
with the file tree view and in most cases it isn't necessary anymore to
special case the browse modes.
2009-10-15 22:00:07 +02:00
Benjamin Otte
d6f3d0e7eb Simplify gtk_file_chooser_default_unselect_file() 2009-10-15 22:00:07 +02:00
Benjamin Otte
0ccb2f2427 Creating the model no longer fails
So remove the code that checked for failure, as it's not needed anymore.
2009-10-15 22:00:07 +02:00
Benjamin Otte
18b56b9970 Implement new GtkFileSystemModel
The new model is mostly API-compatible with the old model (minimal
changes were required), but is a lot faster and has a lot of very
desirable features.
- the model does no longer support a tree, just a list of files in a
  given directory
- the storage has been moved to a GArray as opposed to a tree
- no more dependency on GtkFileSystem
- columns are managed by the creator of the model, so any number of
  nodes can be added as needed. This also makes the API more similar
  to GtkListStore.
- Values are filled on demand using a function given when creating the
  model.
- The function can decide to let the model cache returned values or
  decide to be called again the next time the value is queried.
- implements GtkTreeSortable
- _gtk_file_system_model_get_value() was added to significantly speed
  up value access, which is necessary when sorting large models.
2009-10-15 22:00:06 +02:00
Benjamin Otte
3c9a34dba3 move GtkFileSystemModel private stuff out of the private header 2009-10-15 22:00:06 +02:00
Xan Lopez
009f160709 Do not assign the parent class twice
G_DEFINE_TYPE already does this for us, no need to do it again in
class_init

https://bugzilla.gnome.org/show_bug.cgi?id=598515
2009-10-15 15:28:54 +02:00
Paolo Borelli
10a53ff12e Notify the "active" property of the spinner only when needed
Notify spinner::active only if it really changed an other cosmetic fixes
2009-10-15 15:23:30 +02:00
Javier Jardón
df5ee2fa10 Move documentation to inline comments: GtkToolShell
https://bugzilla.gnome.org/show_bug.cgi?id=597865
2009-10-15 03:49:08 +02:00
Javier Jardón
fbae115b03 Move documentation from templates to inline comments: GtkAccesible
https://bugzilla.gnome.org/show_bug.cgi?id=597865
2009-10-15 03:13:22 +02:00
Javier Jardón
bd2dd7dc9e Move documentation from templates to inline comments: GtkActivatable
https://bugzilla.gnome.org/show_bug.cgi?id=597865
2009-10-15 03:12:42 +02:00
Javier Jardón
ff76366652 Move documentation from templates to inline comments: GtkAccelGroup
https://bugzilla.gnome.org/show_bug.cgi?id=597865
2009-10-15 03:11:39 +02:00
Bastien Nocera
7fd79f42ab Fix GtkSpinner using style before it's set
Fix a possible division by zero when the spinner
is started before it's realized (eg. before it has a style
set).

https://bugzilla.gnome.org/show_bug.cgi?id=598496
2009-10-15 01:43:26 +01:00
Bastien Nocera
6f44b00935 Fix property links in GtkSpinner 2009-10-14 22:38:57 +01:00
Bastien Nocera
e9a240cd52 Add GtkSpinner::animation-duration style property 2009-10-14 19:06:26 +01:00
Matthias Clasen
d1ee8e2d4b Documentation and stylistic fixups 2009-10-14 13:26:10 -04:00
Bastien Nocera
aa663e08f7 Fix "active" property not being notified
And setting it FALSE starting the spinning when it should
stop it.
2009-10-14 17:47:02 +01:00
Matthias Clasen
2cd44fa5f3 Fix doc build
There was an escaping problem in the newly inlined documentation.
2009-10-14 12:30:40 -04:00
Bastien Nocera
a480cae524 Capitalise a11y description for GtkSpinner 2009-10-14 16:01:24 +01:00
Bastien Nocera
d21700f510 Bug 319607 – Add a throbber (activity widget) to GTK+
Add GtkSpinner activity throbber, as well as a cell renderer.
2009-10-14 14:58:30 +01:00
Bastien Nocera
df53e6ad8b Add ability to set a tooltip's image from a GIcon
Makes it easier to implement fallbacks whilst following
theme changes.

https://bugzilla.gnome.org/show_bug.cgi?id=598261
2009-10-14 13:22:14 +01:00
Javier Jardón
588bec9121 Move documentation from templates to inline comments: GtkAboutDialog
https://bugzilla.gnome.org/show_bug.cgi?id=597865
2009-10-14 03:33:09 +02:00
Javier Jardón
df9e1c3294 Substitute gtk_widget_ref/unref with g_object_ref/unref
Substitute the use of gtk_widget_ref/unref in documentation examples
and in internal gtk+ code

https://bugzilla.gnome.org/show_bug.cgi?id=598218
2009-10-14 03:30:57 +02:00
Javier Jardón
127033f83d Bug 596019 - No accessors for GtkDialog buttons
Add API for GtkDialog to return widgets by response ID.
Added gtk_dialog_get_widget_for_response() to access to all kinds
of buttons with all kinds of responses.
2009-10-12 17:20:02 +02:00
Eitan Isaacson
76997ab57d Explicitly set the accessible name of GtkToolButton.
GAIL is not able to retrieve the correct button name alone, so it must be set in gtktoolbutton.c

https://bugzilla.gnome.org/show_bug.cgi?id=597596
2009-10-10 18:11:00 -07:00
Michael Natterer
59f2a62e9c Revert "Remove deprecated GtkContainer function and macros"
This reverts commit 0e3a46915e.
2009-10-10 18:26:07 +02:00
Javier Jardón
0e3a46915e Remove deprecated GtkContainer function and macros 2009-10-10 16:58:33 +02:00
Tor Lillqvist
f562138ef0 Create and install gtk-update-icon-cache.exe.manifest to avoid UAC 2009-10-09 15:13:39 +03:00
Matthias Clasen
088baaec31 Make selecting the last character work again
This broke when I added link support. git bisect helped to track it
down.
2009-10-09 07:08:54 +02:00
Tor Lillqvist
425b652003 Don't ignore SIGPIPE unless it exists 2009-10-06 14:53:22 +03:00
Alexander Larsson
c5d0861179 Don't request window sizes with zero width or height
Zero width/height is unsupported and will magically be turned into one.
For instance, gtk_widget_size_allocate() will eventually do this magic
on the value stored in widget->allocation.

However, if we don't do this magic conversion early, then the value
returned from gtk_window_compute_configure_request() will not be
comparable with whats stored in widget->allocation. (I.E. they will
differ if width or height are zero).

This is dangerous, as we do such a comparison in gtk_window_move_resize().
Currently a change from e.g. 10x1 (current allocation) to 10x0 (new size)
will be expected to produce a ConfigureNotify, when it actually won't,
thus never thawing the frozen toplevel.

Fixes bug #588059
2009-10-05 22:07:06 +02: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
Adrian Johnson
7c3e8130c4 Correct the orientation of landscape pages
The convention for landscape pages, and required by PostScript
Language Reference Manual, is for landscape printing to rotate user
space 90 degrees counterclockwise. Part of bug 596423
2009-09-30 12:47:55 -04:00
Adrian Johnson
4261efda2b Emit PageOrientation DSC comment into PostScript print output
The PageOrientation DSC comment tells PostScript viewers such as gv or
evince the orientation to use when displaying the page. Part of bug 596423
2009-09-30 12:46:58 -04:00
Kristian Rietveld
a4145bfeef Bug 588449 - DnD doesn't work on GDK/Quartz
Patch from Paul Davis.  This gets the basics of drag and drop properly
working on Mac OS X.
2009-09-30 15:07:37 +02:00
Christian Dywan
31771cc640 Add a note about tooltip theming
This should help to reduce the amount of confusion about how to
make a tooltip window appear like a tooltip. Bug 596080.
2009-09-30 08:45:30 -04:00
Kristian Rietveld
2518fbdc02 Fix compile warning in defaultvalue test 2009-09-30 13:09:22 +02:00
Kristian Rietveld
dc04e012cf Ignore certain GtkSettings in defaultvalues unit test
Like the other GtkSettings already registered, these are influenced from
the outside and cannot be properly tested.  The defaultvalues test
passes again now.
2009-09-30 13:05:33 +02:00
Kristian Rietveld
77fc6e3539 Bug 596580 - Blank rows in entry autocompletion
gtk_tree_model_build_level() always needs to emit row-inserted when
requested, this should not depend on whether the level has a parent
level or a virtual root, which is a check whether or not we need to
reference the node in the child model.  Furthermore, we also need
to emit row-has-child-toggled after row-inserted when appropriate.

When gtk_tree_model_filter_row_changed() pulls in the root level, it
must request build_level() to emit signals for this.  The refilter
function uses row_changed to process the changes, so build_level() in
the first call to row_changed() might pull in multiple new nodes in this
scenario, for all of these signals need to be emitted.  Of course,
build_level() will then also emit the signals for the node row_changed()
is processing, we should not emit a duplicate signal, this is now
accounted for.

Add a unit test for this.  For this small functionality to block the
row-changed signal has been implemented, so that we can simulate calls
to the refilter function using the current visible column setup.
2009-09-30 10:25:48 +02:00
Kristian Rietveld
3a69f6772b Pretty print non-matching signals in filter model test suite 2009-09-30 10:25:48 +02:00
Jürg Billeter
ee25051f96 Support tracker 0.7
Make GtkSearchEngineTracker work with libtracker 0.6 and 0.7.
See bug 596081.
2009-09-30 00:43:51 -04:00