changeset 3034:f7613eafe9f0

Don't use deprecated gdk functions
author Tomasz Mon <desowin@gmail.com>
date Fri, 10 Apr 2009 12:28:44 +0200
parents 70eb8b174e15
children 13a0e4377c20
files src/skins/ui_dock.c src/skins/util.c src/skins/util.h
diffstat 3 files changed, 8 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/skins/ui_dock.c	Fri Apr 10 11:07:00 2009 +0200
+++ b/src/skins/ui_dock.c	Fri Apr 10 12:28:44 2009 +0200
@@ -320,12 +320,15 @@
 void
 dock_window_resize(GtkWindow * widget, gint new_w, gint new_h, gint w, gint h)
 {
-    gdk_window_set_hints(GTK_WIDGET(widget)->window, 0, 0, MIN(w, new_w),
-                         MIN(h, new_h), MAX(w, new_w), MAX(h, new_h),
-                         GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
+    GdkGeometry hints;
+    hints.min_width = new_w;
+    hints.min_height = new_h;
+    hints.max_width = new_w;
+    hints.max_height = new_h;
+
     gdk_window_resize(GTK_WIDGET(widget)->window, new_w, new_h);
-    gdk_window_set_hints(GTK_WIDGET(widget)->window, 0, 0, new_w, new_h,
-                         new_w, new_h, GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
+    gdk_window_set_geometry_hints(GTK_WIDGET(widget)->window, &hints,
+                                  GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
 }
 
 void
--- a/src/skins/util.c	Fri Apr 10 11:07:00 2009 +0200
+++ b/src/skins/util.c	Fri Apr 10 12:28:44 2009 +0200
@@ -835,18 +835,6 @@
     }
 }
 
-GdkFont *
-util_font_load(const gchar * name)
-{
-    GdkFont *font;
-    PangoFontDescription *desc;
-
-    desc = pango_font_description_from_string(name);
-    font = gdk_font_from_description(desc);
-
-    return font;
-}
-
 /* text_get_extents() taken from The GIMP (C) Spencer Kimball, Peter
  * Mattis et al */
 gboolean
--- a/src/skins/util.h	Fri Apr 10 11:07:00 2009 +0200
+++ b/src/skins/util.h	Fri Apr 10 12:28:44 2009 +0200
@@ -66,7 +66,6 @@
 void glist_movedown(GList * list);
 void glist_moveup(GList * list);
 
-GdkFont *util_font_load(const gchar * name);
 void util_set_cursor(GtkWidget * window);
 gboolean text_get_extents(const gchar * fontname, const gchar * text,
                           gint * width, gint * height, gint * ascent,