Commit Graph

108 Commits

Author SHA1 Message Date
Matthias Clasen
0a54ad1187 GtkRecentManager: Formatting fixes 2014-12-23 14:30:10 -05:00
Matthias Clasen
ea36b7bfb0 GtkRecentManager: Survive without a filename
We were asserting priv->filename != NULL in various places,
which leads to apps refusing to work when HOME is set to a
nonexisting or nonwritable value. Since it isn't hard, just
make GtkRecentManager survive without a filename. We won't
save or read any recently used files in this state, but
thats ok.
https://bugzilla.gnome.org/show_bug.cgi?id=739038
2014-12-22 08:24:13 -05:00
Matthias Clasen
4bc3f02d51 GtkRecentManager: Allow instantiating with gtk_init
This apparently used to work, and it doesn't do harm to allow it.

https://bugzilla.gnome.org/show_bug.cgi?id=705582
2014-12-21 23:14:02 -05:00
Matthias Clasen
9603754f7d Fix warning grammar 2014-09-18 21:57:20 -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
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
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
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
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
22586ea7c2 docs: use #*-struct instead of <structname> 2014-01-27 19:59:55 -05: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
Matthias Clasen
2f1fa7cdc3 Drop some unnecessary includes
Drop includes of deprecated headers where they are
no longer needed.
2013-07-19 22:32:23 -04:00
Matthias Clasen
0aa57d26b5 Move wholly deprecated classes to gtk/deprecated/
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.

Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
aakash
fc6e725d2f gtkrecentmanager: Avoid confusion between the meta-data and the actual resource.
Fixed the documentation to clarify that gtk_recent_info_get_visited
and gtk_recent_info_get_modified are actually about the recent info
meta-data rather than the resource itself.

https://bugzilla.gnome.org/show_bug.cgi?id=703827
2013-07-09 06:51:45 -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
Jasper St. Pierre
367364a8e1 Fix deprecations for GtkIconInfo 2013-02-15 19:48:56 -05:00
Cosimo Cecchi
382c5f63b0 recentmanager: follow gtk-recent-files-enabled GtkSetting
https://bugzilla.gnome.org/show_bug.cgi?id=693724
2013-02-13 12:06:43 -05:00
Emmanuele Bassi
3d7a2d7883 Ensure that XDG_DATA_HOME is created before using it
The recently-used.xbel storage for recently used files is located inside
the $XDG_DATA_HOME directory; there's no actual guarantee that the
directory has been created already, even though it's very highly
probable on any modern distribution. We should create it, along with its
intermediate parents, before constructing the file monitor that we use
to get change notifications.

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

https://bugzilla.gnome.org/show_bug.cgi?id=667808
2012-07-12 08:42:33 -04:00
Matthias Clasen
050cba6a31 Fix malformed doc comments
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
2012-04-12 21:12:16 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Siegfried-Angel Gevatter Pujals
1ae4b1ecc1 g_content_type_guess expects a path, not an URI 2012-01-24 19:22:54 +01:00
Siegfried-Angel Gevatter Pujals
0d9d3025c6 Fix mem leak introduced with my previous commit 2012-01-24 19:05:29 +01:00
Siegfried-Angel Gevatter Pujals
080f8740f2 GtkRecentManager: guess mime-type from filename when file doesn't exist 2012-01-24 13:59:12 +01:00
Federico Mena Quintero
e8be9ec01f bgo#662814 - Don't print a g_warning() when GtkRecentManager can't find a file
Also, *do* add the file to the recently-used list, even if the file does not
exist yet.  This is used from the Save dialog, so even shitty apps which don't
add the file to GtkRecentManager, will get the file added from the Save dialog.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-11-23 09:44:26 -06:00
Chun-wei Fan
eb8c2dfae2 Bug 660730: Use GStatBuf for portability
Thanks to Kean Johnston for pointing this out.

There are a few places in GTK that use "struct stat",
and then g_stat(), rather than using GStatBuf.This breaks things on
Windows. Since the size of struct stat can vary depending on other
flags specified, this has the potential to cause overwrites and is
trivial to fix.

Based on patch submitted by Kean Johnston
2011-10-03 23:25:33 +08:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Alexander Larsson
e274dbbdce Ensure we always grab the gdk lock in async callbacks
Async callbacks are delivered in idles, so we need to make sure
we get the gdk lock before calling any gdk/gtk stuff. This was
missing in a few places.
2011-03-28 12:49:17 +02:00
Matthias Clasen
39d4207ab7 Use existing mime type for GTK_FILE stock icon
document-x-generic is not actually a mimetype. Using text-x-generic
instead lets us work out-of-the-box in a11y themes.
2011-03-06 00:31:20 -05:00
Matthias Clasen
d9fcc4c630 Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
Pavel Holejsovsky
2f0d40335b [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
Emmanuele Bassi
ce5a29bc38 recent-manager: Coalesce multiple changes
Since the ::changed implementation of GtkRecentManager implies a
synchronous write operation, when we receive multiple requests to emit a
::changed signal we might end up blocking.

This change coalesces multiple ::changed emission requests using the
following sequence:

  • the first request will install a timeout in 250 ms, which will
    emit the ::changed signal

  • each further request while the timeout has not been emitted
    will increase a counter

      ‣ if the counter reaches 250 before the timeout has been
        emitted, then the RecentManager will remove the timeout
        source and force a signal emission and reset the counter

This sequence should guarantee that frequent ::changed emission requests
are coalesced, and also guarantee that we don't let them dangle for too
long.

https://bugzilla.gnome.org/show_bug.cgi?id=616997
2010-10-22 18:08:48 +01:00
Christian Persch
b0fe3e49bb Add gtk_recent_info_get_gicon()
https://bugzilla.gnome.org/show_bug.cgi?id=617174
2010-10-22 11:58:00 +01:00
Emmanuele Bassi
27b71e0143 recent-manager: Fix the documentation
The default RecentManager is not destroyed at the end of the process.

https://bugzilla.gnome.org/show_bug.cgi?id=602794
2010-10-22 11:54:53 +01:00
Emmanuele Bassi
03fc0dd5ca recent-manager: Add RecentInfo.create_app_info()
A simple wrapper that makes it possible to create a GAppInfo from a
GtkRecentInfo blob.
2010-10-22 11:54:53 +01:00
Emmanuele Bassi
06758f1ab5 recent-manager: Move the file under XDG_USER_DATA
Do not use $HOME/.recently-used.xbel any more. No migration path is
included: we're breaking API anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=524304
2010-10-22 11:53:09 +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
dbdc9c99e5 Make GtkRecentManager use standard icon names for themed icons 2010-10-13 10:18:03 -04:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Christian Persch
ffa07ee21e Use G_DEFINE_BOXED_TYPE
Bug #627214.
2010-08-18 15:34:47 +02:00
Javier Jardón
133f0744b9 docs: gitignore GtkRecentManager .sgml template
THis completes commit 8eeeb97de6
2010-07-15 15:43:48 +02:00
Emmanuele Bassi
8eeeb97de6 docs: Inline GtkRecentManager documentation 2010-07-15 09:10:55 +01:00
Javier Jardón
cfa241a891 Remove GtkRecenManager:limit deprecated property 2010-07-15 03:12:12 +02:00
Javier Jardón
678e738f8d Deprecate GtkRecenManager::limit property
The :limit property of GtkRecentManager does not serve any useful
purpose: the length of the list should be managed by the view
(implementing GtkRecentChooser), and not by the model (the recent
manager).

https://bugzilla.gnome.org/show_bug.cgi?id=624333
2010-07-15 02:40:28 +02:00
Javier Jardón
f17a345998 gtkrecentmanager: unseal private pointer 2010-07-13 19:40:49 +02: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
Christian Dywan
032b38ccfd Remove deprecated GtkRecentManager functions 2010-05-03 01:40:41 +02:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00