* 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/>.
*/
/*
#include "gtkmarshalers.h"
#include "gtkmenuitem.h"
#include "gtkstock.h"
-#include "gtktearoffmenuitem.h"
+#include "deprecated/gtktearoffmenuitem.h"
#include "gtktoolbutton.h"
#include "gtktoolbar.h"
#include "gtkprivate.h"
remove_proxy (GtkAction *action,
GtkWidget *proxy)
{
+ g_object_unref (proxy);
action->private_data->proxies = g_slist_remove (action->private_data->proxies, proxy);
}
{
action->private_data->proxies = g_slist_prepend (action->private_data->proxies, proxy);
+ g_object_ref_sink (proxy);
+
if (action->private_data->action_group)
_gtk_action_group_emit_connect_proxy (action->private_data->action_group, action, proxy);
{
GtkActionGroup *group = action->private_data->action_group;
- if (group != NULL)
+ if (group != NULL)
{
+ g_object_ref (action);
g_object_ref (group);
_gtk_action_group_emit_pre_activate (group, action);
}
- g_signal_emit (action, action_signals[ACTIVATE], 0);
+ g_signal_emit (action, action_signals[ACTIVATE], 0);
- if (group != NULL)
+ if (group != NULL)
{
_gtk_action_group_emit_post_activate (group, action);
g_object_unref (group);
+ g_object_unref (action);
}
}
*
* Since: 2.4
**/
-G_CONST_RETURN gchar *
+const gchar *
gtk_action_get_name (GtkAction *action)
{
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
*
* Since: 2.16
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_action_get_label (GtkAction *action)
{
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
*
* Since: 2.16
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_action_get_short_label (GtkAction *action)
{
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
*
* Since: 2.16
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_action_get_tooltip (GtkAction *action)
{
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
*
* Since: 2.16
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_action_get_stock_id (GtkAction *action)
{
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
*
* Since: 2.16
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_action_get_icon_name (GtkAction *action)
{
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
* if none is set. The returned string is owned by GTK+
* and must not be freed or modified.
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_action_get_accel_path (GtkAction *action)
{
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);