gnome-panel r11387 - trunk/applets/clock
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11387 - trunk/applets/clock
- Date: Tue, 9 Dec 2008 02:48:00 +0000 (UTC)
Author: vuntz
Date: Tue Dec 9 02:48:00 2008
New Revision: 11387
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11387&view=rev
Log:
2008-12-09 Vincent Untz <vuntz gnome org>
* clock-face.c: (draw):
s/gdk_pixbuf_render_to_drawable/gdk_draw_pixbuf/ (no deprecated API)
* clock-location-tile.h: single include for gtk+
* clock-map.c: (clock_map_finalize), (clock_map_refresh),
(clock_map_mark), (clock_map_place_locations),
(clock_map_render_shadow): s/gdk_pixbuf_unref/g_object_unref/ (no
deprecated API)
* clock-utils.h: single include for gtk+
* clock.c: add missing include for glib/gi18n.h
* obox.[ch]: single include for gtk+
(get_class): s/gtk_type_class/g_type_class_peek/ (no deprecated API)
Modified:
trunk/applets/clock/ChangeLog
trunk/applets/clock/clock-face.c
trunk/applets/clock/clock-location-tile.h
trunk/applets/clock/clock-map.c
trunk/applets/clock/clock-utils.h
trunk/applets/clock/clock.c
trunk/applets/clock/obox.c
trunk/applets/clock/obox.h
Modified: trunk/applets/clock/clock-face.c
==============================================================================
--- trunk/applets/clock/clock-face.c (original)
+++ trunk/applets/clock/clock-face.c Tue Dec 9 02:48:00 2008
@@ -128,13 +128,15 @@
/* clock back */
if (priv->face_pixbuf) {
GdkWindow *window = this->window;
- gdk_pixbuf_render_to_drawable (priv->face_pixbuf,
- GDK_DRAWABLE (window),
- NULL, 0, 0, this->allocation.x,
- this->allocation.y,
- this->allocation.width,
- this->allocation.height,
- GDK_RGB_DITHER_NONE, 0, 0);
+ gdk_draw_pixbuf (GDK_DRAWABLE (window),
+ NULL,
+ priv->face_pixbuf,
+ 0, 0,
+ this->allocation.x,
+ this->allocation.y,
+ this->allocation.width,
+ this->allocation.height,
+ GDK_RGB_DITHER_NONE, 0, 0);
}
cairo_restore (cr);
Modified: trunk/applets/clock/clock-location-tile.h
==============================================================================
--- trunk/applets/clock/clock-location-tile.h (original)
+++ trunk/applets/clock/clock-location-tile.h Tue Dec 9 02:48:00 2008
@@ -1,7 +1,7 @@
#ifndef __CLOCK_LOCATION_TILE_H__
#define __CLOCK_LOCATION_TILE_H__
-#include <gtk/gtkalignment.h>
+#include <gtk/gtk.h>
#include "clock.h"
#include "clock-face.h"
Modified: trunk/applets/clock/clock-map.c
==============================================================================
--- trunk/applets/clock/clock-map.c (original)
+++ trunk/applets/clock/clock-map.c Tue Dec 9 02:48:00 2008
@@ -148,29 +148,29 @@
}
if (priv->stock_map_pixbuf) {
- gdk_pixbuf_unref (priv->stock_map_pixbuf);
+ g_object_unref (priv->stock_map_pixbuf);
priv->stock_map_pixbuf = NULL;
}
for (i = 0; i < MARKER_NB; i++) {
if (priv->location_marker_pixbuf[i]) {
- gdk_pixbuf_unref (priv->location_marker_pixbuf[i]);
+ g_object_unref (priv->location_marker_pixbuf[i]);
priv->location_marker_pixbuf[i] = NULL;
}
}
if (priv->location_map_pixbuf) {
- gdk_pixbuf_unref (priv->location_map_pixbuf);
+ g_object_unref (priv->location_map_pixbuf);
priv->location_map_pixbuf = NULL;
}
if (priv->shadow_pixbuf) {
- gdk_pixbuf_unref (priv->shadow_pixbuf);
+ g_object_unref (priv->shadow_pixbuf);
priv->shadow_pixbuf = NULL;
}
if (priv->shadow_map_pixbuf) {
- gdk_pixbuf_unref (priv->shadow_map_pixbuf);
+ g_object_unref (priv->shadow_map_pixbuf);
priv->shadow_map_pixbuf = NULL;
}
@@ -192,7 +192,7 @@
if (priv->width != widget->allocation.width ||
priv->height != widget->allocation.height) {
if (priv->stock_map_pixbuf) {
- gdk_pixbuf_unref (priv->stock_map_pixbuf);
+ g_object_unref (priv->stock_map_pixbuf);
priv->stock_map_pixbuf = NULL;
}
@@ -361,8 +361,8 @@
dest_y,
1.0, 1.0, GDK_INTERP_NEAREST, 0xFF);
- gdk_pixbuf_unref (lhs);
- gdk_pixbuf_unref (rhs);
+ g_object_unref (lhs);
+ g_object_unref (rhs);
} else if (dest_x + dest_width > width) {
/* split into our two pixbufs for the left and right edges */
GdkPixbuf *lhs = NULL;
@@ -390,8 +390,8 @@
dest_y,
1.0, 1.0, GDK_INTERP_NEAREST, 0xFF);
- gdk_pixbuf_unref (lhs);
- gdk_pixbuf_unref (rhs);
+ g_object_unref (lhs);
+ g_object_unref (rhs);
} else {
gdk_pixbuf_composite (marker, priv->location_map_pixbuf,
dest_x, dest_y,
@@ -402,7 +402,7 @@
}
if (partial != NULL) {
- gdk_pixbuf_unref (partial);
+ g_object_unref (partial);
}
}
@@ -432,7 +432,7 @@
ClockLocation *loc;
if (priv->location_map_pixbuf) {
- gdk_pixbuf_unref (priv->location_map_pixbuf);
+ g_object_unref (priv->location_map_pixbuf);
priv->location_map_pixbuf = NULL;
}
@@ -557,7 +557,7 @@
ClockMapPrivate *priv = PRIVATE (this);
if (priv->shadow_pixbuf) {
- gdk_pixbuf_unref (priv->shadow_pixbuf);
+ g_object_unref (priv->shadow_pixbuf);
}
priv->shadow_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
@@ -569,7 +569,7 @@
clock_map_render_shadow_pixbuf (priv->shadow_pixbuf);
if (priv->shadow_map_pixbuf) {
- gdk_pixbuf_unref (priv->shadow_map_pixbuf);
+ g_object_unref (priv->shadow_map_pixbuf);
}
priv->shadow_map_pixbuf = gdk_pixbuf_copy (priv->location_map_pixbuf);
Modified: trunk/applets/clock/clock-utils.h
==============================================================================
--- trunk/applets/clock/clock-utils.h (original)
+++ trunk/applets/clock/clock-utils.h Tue Dec 9 02:48:00 2008
@@ -27,7 +27,7 @@
#ifndef __CLOCK_UTILS_H__
#define __CLOCK_UTILS_H__
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
G_BEGIN_DECLS
Modified: trunk/applets/clock/clock.c
==============================================================================
--- trunk/applets/clock/clock.c (original)
+++ trunk/applets/clock/clock.c Tue Dec 9 02:48:00 2008
@@ -44,6 +44,8 @@
#include <panel-applet.h>
#include <panel-applet-gconf.h>
+#include <glib/gi18n.h>
+
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkx.h>
Modified: trunk/applets/clock/obox.c
==============================================================================
--- trunk/applets/clock/obox.c (original)
+++ trunk/applets/clock/obox.c Tue Dec 9 02:48:00 2008
@@ -27,8 +27,7 @@
#include "obox.h"
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
static void clock_obox_size_request (GtkWidget *widget,
GtkRequisition *requisition);
@@ -74,10 +73,10 @@
switch (obox->orientation)
{
case GTK_ORIENTATION_HORIZONTAL:
- klass = GTK_WIDGET_CLASS (gtk_type_class (GTK_TYPE_HBOX));
+ klass = GTK_WIDGET_CLASS (g_type_class_peek (GTK_TYPE_HBOX));
break;
case GTK_ORIENTATION_VERTICAL:
- klass = GTK_WIDGET_CLASS (gtk_type_class (GTK_TYPE_VBOX));
+ klass = GTK_WIDGET_CLASS (g_type_class_peek (GTK_TYPE_VBOX));
break;
default:
g_assert_not_reached ();
Modified: trunk/applets/clock/obox.h
==============================================================================
--- trunk/applets/clock/obox.h (original)
+++ trunk/applets/clock/obox.h Tue Dec 9 02:48:00 2008
@@ -28,7 +28,7 @@
#ifndef __CLOCK_OBOX_H__
#define __CLOCK_OBOX_H__
-#include <gtk/gtkbox.h>
+#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]