* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
- * License along with the Gnome Library; see the file COPYING.LIB. If not,
- * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
/**
* GtkToggleAction:active:
*
- * If the toggle action should be active in or not.
+ * Whether the toggle action should be active.
*
* Since: 2.10
*/
PROP_ACTIVE,
g_param_spec_boolean ("active",
P_("Active"),
- P_("If the toggle action should be active in or not"),
+ P_("Whether the toggle action should be active"),
FALSE,
GTK_PARAM_READWRITE));
/**
/**
* gtk_toggle_action_new:
* @name: A unique name for the action
- * @label: (allow-none): The label displayed in menu items and on buttons, or %NULL
+ * @label: (allow-none): The label displayed in menu items and on buttons,
+ * or %NULL
* @tooltip: (allow-none): A tooltip for the action, or %NULL
- * @stock_id: The stock icon to display in widgets representing the
- * action, or %NULL
+ * @stock_id: (allow-none): The stock icon to display in widgets representing
+ * the action, or %NULL
*
* Creates a new #GtkToggleAction object. To add the action to
* a #GtkActionGroup and set the accelerator for the action,
"draw-as-radio", toggle_action->private_data->draw_as_radio,
NULL);
}
+
+
+/* Private */
+
+/*
+ * _gtk_toggle_action_set_active:
+ * @toggle_action: a #GtkToggleAction
+ * @is_active: whether the action is active or not
+ *
+ * Sets the #GtkToggleAction:active property directly. This function does
+ * not emit signals or notifications: it is left to the caller to do so.
+ */
+void
+_gtk_toggle_action_set_active (GtkToggleAction *toggle_action,
+ gboolean is_active)
+{
+ GtkToggleActionPrivate *priv = toggle_action->private_data;
+
+ priv->active = is_active;
+}