summaryrefslogtreecommitdiff
path: root/gtk/gtkrecentchooser.c
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2013-07-19 18:38:27 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2013-07-19 18:38:27 +0800
commitd7b68278561f8846fab94c3ef974a89785bce666 (patch)
tree8b235079fcd585dc81665b2e00ca2448f68eaa7a /gtk/gtkrecentchooser.c
parentce30d16da1882e4241c621021fd769e5644b730c (diff)
downloadgtk+-d7b68278561f8846fab94c3ef974a89785bce666.tar.gz
gtk/gtkrecentchooser.c: Avoid C99isms
Declare variables at the top to the block. G_GNUC_BEGIN_IGNORE_DEPRECATIONS and G_GNUC_END_IGNORE_DEPRECATIONS with a ';' at the end is still considered a statement, even if these macros expand to nothing, which C89 compilers don't really like (oddly speaking)- but this is life.
Diffstat (limited to 'gtk/gtkrecentchooser.c')
-rw-r--r--gtk/gtkrecentchooser.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gtk/gtkrecentchooser.c b/gtk/gtkrecentchooser.c
index 32f409d886..af0b4705ad 100644
--- a/gtk/gtkrecentchooser.c
+++ b/gtk/gtkrecentchooser.c
@@ -1027,10 +1027,14 @@ _gtk_recent_chooser_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
+ GtkRecentChooser *recent_chooser;
+ GtkRecentChooser *action_chooser;
+ GtkRecentAction *recent_action;
+
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- GtkRecentChooser *recent_chooser = GTK_RECENT_CHOOSER (activatable);
- GtkRecentChooser *action_chooser = GTK_RECENT_CHOOSER (action);
- GtkRecentAction *recent_action = GTK_RECENT_ACTION (action);
+ recent_chooser = GTK_RECENT_CHOOSER (activatable);
+ action_chooser = GTK_RECENT_CHOOSER (action);
+ recent_action = GTK_RECENT_ACTION (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (strcmp (property_name, "show-numbers") == 0 && recent_chooser_has_show_numbers (recent_chooser))
@@ -1062,9 +1066,12 @@ void
_gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
+ GtkRecentChooser *recent_chooser;
+ GtkRecentChooser *action_chooser;
+
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- GtkRecentChooser *recent_chooser = GTK_RECENT_CHOOSER (activatable);
- GtkRecentChooser *action_chooser = GTK_RECENT_CHOOSER (action);
+ recent_chooser = GTK_RECENT_CHOOSER (activatable);
+ action_chooser = GTK_RECENT_CHOOSER (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!action)