GtkRecentChooser: Use G_PARAM_EXPLICIT_NOTIFY

This commit is contained in:
Matthias Clasen
2014-06-09 08:53:12 -04:00
parent 92e30dadc2
commit f6e5f88454
2 changed files with 102 additions and 63 deletions

View File

@ -521,28 +521,60 @@ gtk_recent_action_set_property (GObject *gobject,
switch (prop_id)
{
case PROP_SHOW_NUMBERS:
if (priv->show_numbers != g_value_get_boolean (value))
{
priv->show_numbers = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_SHOW_PRIVATE:
if (priv->show_private != g_value_get_boolean (value))
{
priv->show_private = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_SHOW_NOT_FOUND:
if (priv->show_not_found != g_value_get_boolean (value))
{
priv->show_not_found = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_SHOW_TIPS:
if (priv->show_tips != g_value_get_boolean (value))
{
priv->show_tips = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_SHOW_ICONS:
if (priv->show_icons != g_value_get_boolean (value))
{
priv->show_icons = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_LIMIT:
if (priv->limit != g_value_get_int (value))
{
priv->limit = g_value_get_int (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_LOCAL_ONLY:
if (priv->local_only != g_value_get_boolean (value))
{
priv->local_only = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_SORT_TYPE:
if (priv->sort_type != g_value_get_enum (value))
{
priv->sort_type = g_value_get_enum (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_FILTER:
set_current_filter (action, g_value_get_object (value));
@ -645,7 +677,7 @@ gtk_recent_action_class_init (GtkRecentActionClass *klass)
P_("Show Numbers"),
P_("Whether the items should be displayed with a number"),
FALSE,
G_PARAM_READWRITE));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
}

View File

@ -131,6 +131,7 @@ gtk_recent_chooser_default_init (GtkRecentChooserInterface *iface)
P_("The RecentManager object to use"),
GTK_TYPE_RECENT_MANAGER,
GTK_PARAM_WRITABLE|G_PARAM_CONSTRUCT_ONLY));
/**
* GtkRecentManager:show-private:
*
@ -145,7 +146,8 @@ gtk_recent_chooser_default_init (GtkRecentChooserInterface *iface)
P_("Show Private"),
P_("Whether the private items should be displayed"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkRecentChooser:show-tips:
*
@ -159,7 +161,8 @@ gtk_recent_chooser_default_init (GtkRecentChooserInterface *iface)
P_("Show Tooltips"),
P_("Whether there should be a tooltip on the item"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkRecentChooser:show-icons:
*
@ -172,7 +175,8 @@ gtk_recent_chooser_default_init (GtkRecentChooserInterface *iface)
P_("Show Icons"),
P_("Whether there should be an icon near the item"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkRecentChooser:show-not-found:
*
@ -188,7 +192,8 @@ gtk_recent_chooser_default_init (GtkRecentChooserInterface *iface)
P_("Show Not Found"),
P_("Whether the items pointing to unavailable resources should be displayed"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkRecentChooser:select-multiple:
*
@ -201,7 +206,8 @@ gtk_recent_chooser_default_init (GtkRecentChooserInterface *iface)
P_("Select Multiple"),
P_("Whether to allow multiple items to be selected"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkRecentChooser:local-only:
*
@ -215,7 +221,8 @@ gtk_recent_chooser_default_init (GtkRecentChooserInterface *iface)
P_("Local only"),
P_("Whether the selected resource(s) should be limited to local file: URIs"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkRecentChooser:limit:
*
@ -228,10 +235,9 @@ gtk_recent_chooser_default_init (GtkRecentChooserInterface *iface)
g_param_spec_int ("limit",
P_("Limit"),
P_("The maximum number of items to be displayed"),
-1,
G_MAXINT,
50,
GTK_PARAM_READWRITE));
-1, G_MAXINT, 50,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkRecentChooser:sort-type:
*
@ -245,7 +251,8 @@ gtk_recent_chooser_default_init (GtkRecentChooserInterface *iface)
P_("The sorting order of the items displayed"),
GTK_TYPE_RECENT_SORT_TYPE,
GTK_RECENT_SORT_NONE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkRecentChooser:filter:
*