Commit 7298881c authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz

Lots of "remove deprecated API usage" and single include fun.

2008-12-09  Vincent Untz  <vuntz@gnome.org>

	Lots of "remove deprecated API usage" and single include fun.

	* panel-compatibility.c: (copy_gconf_dir):
	s/gconf_entry_free/gconf_entry_unref
	* panel-applet-frame.c: add missing include for glib/gi18n.h
	(panel_applet_frame_activated): fix buglet where gtk_object_sink() was
	used but we really wanted g_object_unref
	* applet.c: (panel_applet_recreate_menu):
	s/gtk_widget_unref/g_object_unref
	(panel_applet_create_menu): use g_object_ref_sink
	* panel-bindings.c: (panel_binding_clear_entry):
	s/gtk_binding_entry_clear/gtk_binding_entry_remove/
	* menu.c: (panel_load_menu_image_deferred): use g_object_ref_sink
	* panel-background.c:
	(panel_background_set_no_background_on_widget):
	s/gtk_rc_style_unref/g_object_unref
	* panel-widget.c: (remove_tab_bindings), (remove_move_bindings),
	(remove_all_move_bindings):
	s/gtk_binding_entry_clear/gtk_binding_entry_remove/
	(panel_widget_cremove): s/gtk_widget_(un)ref/g_object_(un)ref/
	* panel-gconf.c: (panel_gconf_copy_dir),
	(panel_gconf_associate_schemas_in_dir):
	s/gconf_entry_free/gconf_entry_unref
	* panel-config-global.c: (panel_global_config_load):
	s/gconf_entry_free/gconf_entry_unref
	* panel-addto.c: add missing glib/gi18n.h
	* applet.h:
	* panel-action-button.h:
	* panel-action-protocol.h:
	* panel-applet-frame.h:
	* panel-bindings.h:
	* panel-compatibility.h:
	* panel-enums.h:
	* panel-menu-bar.h:
	* panel-menu-items.h:
	* panel-profile.h:
	* panel-stock-icons.[ch]:
	* panel-struts.h:
	* panel-types.h:
	* panel-xutils.h:
	* xstuff.h: single include!

svn path=/trunk/; revision=11388
parent d22c9241
2008-12-09 Vincent Untz <vuntz@gnome.org>
Lots of "remove deprecated API usage" and single include fun.
* panel-compatibility.c: (copy_gconf_dir):
s/gconf_entry_free/gconf_entry_unref
* panel-applet-frame.c: add missing include for glib/gi18n.h
(panel_applet_frame_activated): fix buglet where gtk_object_sink() was
used but we really wanted g_object_unref
* applet.c: (panel_applet_recreate_menu):
s/gtk_widget_unref/g_object_unref
(panel_applet_create_menu): use g_object_ref_sink
* panel-bindings.c: (panel_binding_clear_entry):
s/gtk_binding_entry_clear/gtk_binding_entry_remove/
* menu.c: (panel_load_menu_image_deferred): use g_object_ref_sink
* panel-background.c:
(panel_background_set_no_background_on_widget):
s/gtk_rc_style_unref/g_object_unref
* panel-widget.c: (remove_tab_bindings), (remove_move_bindings),
(remove_all_move_bindings):
s/gtk_binding_entry_clear/gtk_binding_entry_remove/
(panel_widget_cremove): s/gtk_widget_(un)ref/g_object_(un)ref/
* panel-gconf.c: (panel_gconf_copy_dir),
(panel_gconf_associate_schemas_in_dir):
s/gconf_entry_free/gconf_entry_unref
* panel-config-global.c: (panel_global_config_load):
s/gconf_entry_free/gconf_entry_unref
* panel-addto.c: add missing glib/gi18n.h
* applet.h:
* panel-action-button.h:
* panel-action-protocol.h:
* panel-applet-frame.h:
* panel-bindings.h:
* panel-compatibility.h:
* panel-enums.h:
* panel-menu-bar.h:
* panel-menu-items.h:
* panel-profile.h:
* panel-stock-icons.[ch]:
* panel-struts.h:
* panel-types.h:
* panel-xutils.h:
* xstuff.h: single include!
2008-12-09 Vincent Untz <vuntz@gnome.org>
* panel-context-menu.c: (panel_context_menu_show_about_dialog): use
......
......@@ -154,7 +154,7 @@ panel_applet_recreate_menu (AppletInfo *info)
menu->submenu =NULL;
}
gtk_widget_unref (info->menu);
g_object_unref (info->menu);
info->menu = panel_applet_create_menu (info);
}
......@@ -469,8 +469,7 @@ panel_applet_create_menu (AppletInfo *info)
panel_widget = PANEL_WIDGET (info->widget->parent);
menu = g_object_ref (gtk_menu_new ());
gtk_object_sink (GTK_OBJECT (menu));
menu = g_object_ref_sink (gtk_menu_new ());
/* connect the show & deactivate signal, so that we can "disallow" and
* "re-allow" autohide when the menu is shown/deactivated.
......
......@@ -2,7 +2,7 @@
#define APPLET_H
#include <glib.h>
#include <gdk/gdktypes.h>
#include <gdk/gdk.h>
#include "panel-widget.h"
#include "panel-gconf.h"
#include "panel-enums.h"
......
......@@ -1916,8 +1916,7 @@ panel_load_menu_image_deferred (GtkWidget *image_menu_item,
image->requisition.height = icon_height;
/* this takes over the floating ref */
icon->pixmap = g_object_ref (G_OBJECT (image));
gtk_object_sink (GTK_OBJECT (image));
icon->pixmap = g_object_ref_sink (G_OBJECT (image));
icon->stock_id = stock_id;
if (gicon)
......
......@@ -26,7 +26,7 @@
#ifndef __PANEL_ACTION_BUTTON_H__
#define __PANEL_ACTION_BUTTON_H__
#include <gtk/gtkbutton.h>
#include <gtk/gtk.h>
#include "button-widget.h"
#include "panel-widget.h"
#include "panel-enums.h"
......
......@@ -25,7 +25,7 @@
#ifndef __PANEL_ACTION_PROTOCOL_H__
#define __PANEL_ACTION_PROTOCOL_H__
#include <glib/gmacros.h>
#include <glib.h>
G_BEGIN_DECLS
......
......@@ -27,6 +27,8 @@
#include <libbonobo.h>
#include <glib/gi18n.h>
#include <gmenu-tree.h>
#include <libpanel-util/panel-glib.h>
......
......@@ -26,6 +26,8 @@
#include <config.h>
#include <string.h>
#include <glib/gi18n.h>
#include <libbonoboui.h>
#include <gconf/gconf.h>
#include <gdk/gdk.h>
......@@ -1337,7 +1339,7 @@ panel_applet_frame_activated (CORBA_Object object,
g_warning (G_STRLOC ": failed to load applet %s "
"(cannot get control frame)", frame->priv->iid);
panel_applet_frame_loading_failed (frame, frame_act->id);
gtk_object_sink (GTK_OBJECT (widget));
g_object_unref (widget);
g_free (frame_act->id);
g_free (frame_act);
return;
......@@ -1353,7 +1355,7 @@ panel_applet_frame_activated (CORBA_Object object,
"(cannot get property bag):\n%s",
frame->priv->iid, error);
panel_applet_frame_loading_failed (frame, frame_act->id);
gtk_object_sink (GTK_OBJECT (widget));
g_object_unref (widget);
g_free (frame_act->id);
g_free (frame_act);
g_free (error);
......@@ -1376,7 +1378,7 @@ panel_applet_frame_activated (CORBA_Object object,
"(cannot get popup component):\n%s",
frame->priv->iid, error);
panel_applet_frame_loading_failed (frame, frame_act->id);
gtk_object_sink (GTK_OBJECT (widget));
g_object_unref (widget);
g_free (frame_act->id);
g_free (frame_act);
g_free (error);
......@@ -1400,7 +1402,7 @@ panel_applet_frame_activated (CORBA_Object object,
g_warning (G_STRLOC ": failed to load applet %s "
"(cannot get control)", frame->priv->iid);
panel_applet_frame_loading_failed (frame, frame_act->id);
gtk_object_sink (GTK_OBJECT (widget));
g_object_unref (widget);
g_free (frame_act->id);
g_free (frame_act);
return;
......@@ -1412,7 +1414,7 @@ panel_applet_frame_activated (CORBA_Object object,
g_warning (G_STRLOC ": failed to load applet %s "
"(cannot get applet shell)", frame->priv->iid);
panel_applet_frame_loading_failed (frame, frame_act->id);
gtk_object_sink (GTK_OBJECT (widget));
g_object_unref (widget);
g_free (frame_act->id);
g_free (frame_act);
return;
......
......@@ -25,7 +25,7 @@
#ifndef __PANEL_APPLET_FRAME_H__
#define __PANEL_APPLET_FRAME_H__
#include <gtk/gtkeventbox.h>
#include <gtk/gtk.h>
#include "panel-widget.h"
#include "applet.h"
......
......@@ -1065,7 +1065,7 @@ panel_background_set_no_background_on_widget (PanelBackground *background,
gtk_widget_set_style (widget, NULL);
rc_style = gtk_rc_style_new ();
gtk_widget_modify_style (widget, rc_style);
gtk_rc_style_unref (rc_style);
g_object_unref (rc_style);
}
static void
......
......@@ -97,7 +97,7 @@ panel_binding_clear_entry (PanelBinding *binding,
{
binding_set = get_binding_set (binding_set);
gtk_binding_entry_clear (binding_set, binding->keyval, binding->modifiers);
gtk_binding_entry_remove (binding_set, binding->keyval, binding->modifiers);
}
static void
......
......@@ -25,7 +25,7 @@
#ifndef __PANEL_BINDINGS_H__
#define __PANEL_BINDINGS_H__
#include <glib/gmacros.h>
#include <glib.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
......
......@@ -978,7 +978,7 @@ copy_gconf_dir (GConfClient *client,
if (entry->value)
gconf_client_set (client, key, entry->value, NULL);
gconf_entry_free (entry);
gconf_entry_unref (entry);
}
g_slist_free (list);
......
......@@ -25,7 +25,7 @@
#ifndef __PANEL_COMPATIBILITY_H__
#define __PANEL_COMPATIBILITY_H__
#include <glib/gmacros.h>
#include <glib.h>
#include <gconf/gconf-client.h>
G_BEGIN_DECLS
......
......@@ -143,7 +143,7 @@ panel_global_config_load (void)
for (l = entries; l; l = l->next) {
panel_global_config_set_entry (l->data);
gconf_entry_free (l->data);
gconf_entry_unref (l->data);
}
g_slist_free (entries);
......
......@@ -25,7 +25,7 @@
#ifndef __PANEL_ENUMS_H__
#define __PANEL_ENUMS_H__
#include <glib/gmacros.h>
#include <glib.h>
G_BEGIN_DECLS
......
......@@ -253,7 +253,7 @@ panel_gconf_copy_dir (GConfClient *client,
if (!gconf_entry_get_is_default (entry) && entry->value)
gconf_client_set (client, key, entry->value, NULL);
gconf_entry_free (entry);
gconf_entry_unref (entry);
}
g_slist_free (list);
......@@ -305,7 +305,7 @@ panel_gconf_associate_schemas_in_dir (GConfClient *client,
gconf_engine_associate_schema (
client->engine, key, gconf_entry_get_key (entry), NULL);
gconf_entry_free (entry);
gconf_entry_unref (entry);
}
g_slist_free (list);
......
......@@ -25,7 +25,7 @@
#ifndef __PANEL_MENU_BAR_H__
#define __PANEL_MENU_BAR_H__
#include <gtk/gtkmenubar.h>
#include <gtk/gtk.h>
#include "panel-widget.h"
G_BEGIN_DECLS
......
......@@ -24,7 +24,7 @@
#ifndef __PANEL_MENU_ITEMS_H__
#define __PANEL_MENU_ITEMS_H__
#include <gtk/gtkmenuitem.h>
#include <gtk/gtk.h>
#include "panel-widget.h"
G_BEGIN_DECLS
......
......@@ -25,7 +25,7 @@
#ifndef __PANEL_PROFILE_H__
#define __PANEL_PROFILE_H__
#include <glib/gmacros.h>
#include <glib.h>
#include <gdk/gdk.h>
#include <gconf/gconf-client.h>
......
......@@ -26,9 +26,8 @@
#include "panel-stock-icons.h"
#include <gtk/gtkstock.h>
#include <gtk/gtkiconfactory.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "panel-icon-names.h"
......
......@@ -25,8 +25,8 @@
#ifndef __PANEL_STOCK_ICONS_H__
#define __PANEL_STOCK_ICONS_H__
#include <glib/gmacros.h>
#include <gtk/gtkenums.h>
#include <glib.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
......
......@@ -23,7 +23,7 @@
#ifndef __PANEL_STRUTS_H__
#define __PANEL_STRUTS_H__
#include <glib/gmacros.h>
#include <glib.h>
#include "panel-toplevel.h"
G_BEGIN_DECLS
......
......@@ -2,8 +2,8 @@
#ifndef PANEL_TYPES_H
#define PANEL_TYPES_H
#include <gdk/gdkcolor.h>
#include <gtk/gtktypeutils.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include "GNOME_Panel.h"
typedef enum {
......
......@@ -229,18 +229,18 @@ remove_tab_bindings (GtkBindingSet *binding_set,
GdkModifierType modifiers,
gboolean next)
{
gtk_binding_entry_clear (binding_set, GDK_Tab, modifiers);
gtk_binding_entry_clear (binding_set, GDK_KP_Tab, modifiers);
gtk_binding_entry_remove (binding_set, GDK_Tab, modifiers);
gtk_binding_entry_remove (binding_set, GDK_KP_Tab, modifiers);
}
static void
remove_move_bindings (GtkBindingSet *binding_set,
GdkModifierType modifiers)
{
gtk_binding_entry_clear (binding_set, GDK_Up, modifiers);
gtk_binding_entry_clear (binding_set, GDK_Down, modifiers);
gtk_binding_entry_clear (binding_set, GDK_Left, modifiers);
gtk_binding_entry_clear (binding_set, GDK_Right, modifiers);
gtk_binding_entry_remove (binding_set, GDK_Up, modifiers);
gtk_binding_entry_remove (binding_set, GDK_Down, modifiers);
gtk_binding_entry_remove (binding_set, GDK_Left, modifiers);
gtk_binding_entry_remove (binding_set, GDK_Right, modifiers);
}
static void
......@@ -262,11 +262,11 @@ remove_all_move_bindings (PanelWidget *panel)
remove_tab_bindings (binding_set, 0, TRUE);
remove_tab_bindings (binding_set, GDK_SHIFT_MASK, FALSE);
gtk_binding_entry_clear (binding_set, GDK_Escape, 0);
gtk_binding_entry_clear (binding_set, GDK_KP_Enter, 0);
gtk_binding_entry_clear (binding_set, GDK_Return, 0);
gtk_binding_entry_clear (binding_set, GDK_KP_Space, 0);
gtk_binding_entry_clear (binding_set, GDK_space, 0);
gtk_binding_entry_remove (binding_set, GDK_Escape, 0);
gtk_binding_entry_remove (binding_set, GDK_KP_Enter, 0);
gtk_binding_entry_remove (binding_set, GDK_Return, 0);
gtk_binding_entry_remove (binding_set, GDK_KP_Space, 0);
gtk_binding_entry_remove (binding_set, GDK_space, 0);
}
static void
......@@ -578,7 +578,7 @@ panel_widget_cremove (GtkContainer *container, GtkWidget *widget)
if(panel->currently_dragged_applet == ad)
panel_widget_applet_drag_end(panel);
gtk_widget_ref(widget);
g_object_ref (widget);
if (GTK_CONTAINER_CLASS (panel_widget_parent_class)->remove)
(* GTK_CONTAINER_CLASS (panel_widget_parent_class)->remove) (container,
widget);
......@@ -588,7 +588,7 @@ panel_widget_cremove (GtkContainer *container, GtkWidget *widget)
g_signal_emit (G_OBJECT (container),
panel_widget_signals[APPLET_REMOVED_SIGNAL],
0, widget);
gtk_widget_unref(widget);
g_object_unref (widget);
}
......
......@@ -25,8 +25,7 @@
#ifndef __PANEL_XUTILS_H__
#define __PANEL_XUTILS_H__
#include <glib/gmacros.h>
#include <glib/gtypes.h>
#include <glib.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
......
......@@ -2,7 +2,7 @@
#define __XSTUFF_H__
#include <gdk/gdk.h>
#include <gtk/gtkwidget.h>
#include <gtk/gtk.h>
void xstuff_delete_property (GdkWindow *window,
const char *name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment