gnome-panel r11388 - trunk/gnome-panel
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11388 - trunk/gnome-panel
- Date: Tue, 9 Dec 2008 03:12:26 +0000 (UTC)
Author: vuntz
Date: Tue Dec 9 03:12:26 2008
New Revision: 11388
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11388&view=rev
Log:
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!
Modified:
trunk/gnome-panel/ChangeLog
trunk/gnome-panel/applet.c
trunk/gnome-panel/applet.h
trunk/gnome-panel/menu.c
trunk/gnome-panel/panel-action-button.h
trunk/gnome-panel/panel-action-protocol.h
trunk/gnome-panel/panel-addto.c
trunk/gnome-panel/panel-applet-frame.c
trunk/gnome-panel/panel-applet-frame.h
trunk/gnome-panel/panel-background.c
trunk/gnome-panel/panel-bindings.c
trunk/gnome-panel/panel-bindings.h
trunk/gnome-panel/panel-compatibility.c
trunk/gnome-panel/panel-compatibility.h
trunk/gnome-panel/panel-config-global.c
trunk/gnome-panel/panel-enums.h
trunk/gnome-panel/panel-gconf.c
trunk/gnome-panel/panel-menu-bar.h
trunk/gnome-panel/panel-menu-items.h
trunk/gnome-panel/panel-profile.h
trunk/gnome-panel/panel-stock-icons.c
trunk/gnome-panel/panel-stock-icons.h
trunk/gnome-panel/panel-struts.h
trunk/gnome-panel/panel-types.h
trunk/gnome-panel/panel-widget.c
trunk/gnome-panel/panel-xutils.h
trunk/gnome-panel/xstuff.h
Modified: trunk/gnome-panel/applet.c
==============================================================================
--- trunk/gnome-panel/applet.c (original)
+++ trunk/gnome-panel/applet.c Tue Dec 9 03:12:26 2008
@@ -154,7 +154,7 @@
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_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.
Modified: trunk/gnome-panel/applet.h
==============================================================================
--- trunk/gnome-panel/applet.h (original)
+++ trunk/gnome-panel/applet.h Tue Dec 9 03:12:26 2008
@@ -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"
Modified: trunk/gnome-panel/menu.c
==============================================================================
--- trunk/gnome-panel/menu.c (original)
+++ trunk/gnome-panel/menu.c Tue Dec 9 03:12:26 2008
@@ -1916,8 +1916,7 @@
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)
Modified: trunk/gnome-panel/panel-action-button.h
==============================================================================
--- trunk/gnome-panel/panel-action-button.h (original)
+++ trunk/gnome-panel/panel-action-button.h Tue Dec 9 03:12:26 2008
@@ -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"
Modified: trunk/gnome-panel/panel-action-protocol.h
==============================================================================
--- trunk/gnome-panel/panel-action-protocol.h (original)
+++ trunk/gnome-panel/panel-action-protocol.h Tue Dec 9 03:12:26 2008
@@ -25,7 +25,7 @@
#ifndef __PANEL_ACTION_PROTOCOL_H__
#define __PANEL_ACTION_PROTOCOL_H__
-#include <glib/gmacros.h>
+#include <glib.h>
G_BEGIN_DECLS
Modified: trunk/gnome-panel/panel-addto.c
==============================================================================
--- trunk/gnome-panel/panel-addto.c (original)
+++ trunk/gnome-panel/panel-addto.c Tue Dec 9 03:12:26 2008
@@ -27,6 +27,8 @@
#include <libbonobo.h>
+#include <glib/gi18n.h>
+
#include <gmenu-tree.h>
#include <libpanel-util/panel-glib.h>
Modified: trunk/gnome-panel/panel-applet-frame.c
==============================================================================
--- trunk/gnome-panel/panel-applet-frame.c (original)
+++ trunk/gnome-panel/panel-applet-frame.c Tue Dec 9 03:12:26 2008
@@ -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 @@
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 @@
"(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 @@
"(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 @@
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 @@
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;
Modified: trunk/gnome-panel/panel-applet-frame.h
==============================================================================
--- trunk/gnome-panel/panel-applet-frame.h (original)
+++ trunk/gnome-panel/panel-applet-frame.h Tue Dec 9 03:12:26 2008
@@ -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"
Modified: trunk/gnome-panel/panel-background.c
==============================================================================
--- trunk/gnome-panel/panel-background.c (original)
+++ trunk/gnome-panel/panel-background.c Tue Dec 9 03:12:26 2008
@@ -1065,7 +1065,7 @@
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
Modified: trunk/gnome-panel/panel-bindings.c
==============================================================================
--- trunk/gnome-panel/panel-bindings.c (original)
+++ trunk/gnome-panel/panel-bindings.c Tue Dec 9 03:12:26 2008
@@ -97,7 +97,7 @@
{
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
Modified: trunk/gnome-panel/panel-bindings.h
==============================================================================
--- trunk/gnome-panel/panel-bindings.h (original)
+++ trunk/gnome-panel/panel-bindings.h Tue Dec 9 03:12:26 2008
@@ -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
Modified: trunk/gnome-panel/panel-compatibility.c
==============================================================================
--- trunk/gnome-panel/panel-compatibility.c (original)
+++ trunk/gnome-panel/panel-compatibility.c Tue Dec 9 03:12:26 2008
@@ -978,7 +978,7 @@
if (entry->value)
gconf_client_set (client, key, entry->value, NULL);
- gconf_entry_free (entry);
+ gconf_entry_unref (entry);
}
g_slist_free (list);
Modified: trunk/gnome-panel/panel-compatibility.h
==============================================================================
--- trunk/gnome-panel/panel-compatibility.h (original)
+++ trunk/gnome-panel/panel-compatibility.h Tue Dec 9 03:12:26 2008
@@ -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
Modified: trunk/gnome-panel/panel-config-global.c
==============================================================================
--- trunk/gnome-panel/panel-config-global.c (original)
+++ trunk/gnome-panel/panel-config-global.c Tue Dec 9 03:12:26 2008
@@ -143,7 +143,7 @@
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);
Modified: trunk/gnome-panel/panel-enums.h
==============================================================================
--- trunk/gnome-panel/panel-enums.h (original)
+++ trunk/gnome-panel/panel-enums.h Tue Dec 9 03:12:26 2008
@@ -25,7 +25,7 @@
#ifndef __PANEL_ENUMS_H__
#define __PANEL_ENUMS_H__
-#include <glib/gmacros.h>
+#include <glib.h>
G_BEGIN_DECLS
Modified: trunk/gnome-panel/panel-gconf.c
==============================================================================
--- trunk/gnome-panel/panel-gconf.c (original)
+++ trunk/gnome-panel/panel-gconf.c Tue Dec 9 03:12:26 2008
@@ -253,7 +253,7 @@
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 @@
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);
Modified: trunk/gnome-panel/panel-menu-bar.h
==============================================================================
--- trunk/gnome-panel/panel-menu-bar.h (original)
+++ trunk/gnome-panel/panel-menu-bar.h Tue Dec 9 03:12:26 2008
@@ -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
Modified: trunk/gnome-panel/panel-menu-items.h
==============================================================================
--- trunk/gnome-panel/panel-menu-items.h (original)
+++ trunk/gnome-panel/panel-menu-items.h Tue Dec 9 03:12:26 2008
@@ -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
Modified: trunk/gnome-panel/panel-profile.h
==============================================================================
--- trunk/gnome-panel/panel-profile.h (original)
+++ trunk/gnome-panel/panel-profile.h Tue Dec 9 03:12:26 2008
@@ -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>
Modified: trunk/gnome-panel/panel-stock-icons.c
==============================================================================
--- trunk/gnome-panel/panel-stock-icons.c (original)
+++ trunk/gnome-panel/panel-stock-icons.c Tue Dec 9 03:12:26 2008
@@ -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"
Modified: trunk/gnome-panel/panel-stock-icons.h
==============================================================================
--- trunk/gnome-panel/panel-stock-icons.h (original)
+++ trunk/gnome-panel/panel-stock-icons.h Tue Dec 9 03:12:26 2008
@@ -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
Modified: trunk/gnome-panel/panel-struts.h
==============================================================================
--- trunk/gnome-panel/panel-struts.h (original)
+++ trunk/gnome-panel/panel-struts.h Tue Dec 9 03:12:26 2008
@@ -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
Modified: trunk/gnome-panel/panel-types.h
==============================================================================
--- trunk/gnome-panel/panel-types.h (original)
+++ trunk/gnome-panel/panel-types.h Tue Dec 9 03:12:26 2008
@@ -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 {
Modified: trunk/gnome-panel/panel-widget.c
==============================================================================
--- trunk/gnome-panel/panel-widget.c (original)
+++ trunk/gnome-panel/panel-widget.c Tue Dec 9 03:12:26 2008
@@ -229,18 +229,18 @@
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_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 @@
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 @@
g_signal_emit (G_OBJECT (container),
panel_widget_signals[APPLET_REMOVED_SIGNAL],
0, widget);
- gtk_widget_unref(widget);
+ g_object_unref (widget);
}
Modified: trunk/gnome-panel/panel-xutils.h
==============================================================================
--- trunk/gnome-panel/panel-xutils.h (original)
+++ trunk/gnome-panel/panel-xutils.h Tue Dec 9 03:12:26 2008
@@ -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>
Modified: trunk/gnome-panel/xstuff.h
==============================================================================
--- trunk/gnome-panel/xstuff.h (original)
+++ trunk/gnome-panel/xstuff.h Tue Dec 9 03:12:26 2008
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]