32
32
#include <gdk/gdkx.h>
33
33
#include <string.h>
35
#ifdef LIBAWN_USE_GNOME
35
36
#include <libgnome/libgnome.h>
37
39
#include "xutils.h"
38
40
#include "inlinepixbufs.h"
40
#include <libawn/awn-gconf.h>
42
#include <libawn/awn-settings.h>
43
45
This is a cut-and-paste job at the moment, I still need to bring over
86
AwnSettings *settings = awn_gconf_new ();
88
AwnSettings *settings = awn_settings_new ();
88
90
gtk_window_get_size (window, &width, &height);
89
91
gtk_window_get_position (window, &x, &y);
172
174
if (name->str[i] == ' ')
173
175
name->str[i] = '-';
178
#ifdef LIBAWN_USE_GNOME
176
179
uri = gnome_util_prepend_user_home(name->str);
180
#elif defined(LIBAWN_USE_XFCE)
181
uri = g_string_free (g_string_prepend (name, g_get_home_dir ()), FALSE);
178
icon = gdk_pixbuf_new_from_file_at_scale (uri, width, height, TRUE, NULL);
185
icon = gdk_pixbuf_new_from_file_at_scale (uri, width, height, TRUE, NULL);
188
#ifdef LIBAWN_USE_GNOME
189
/* free error under Xfce */
180
190
g_string_free (name, TRUE);
297
awn_x_get_icon_for_launcher (GnomeDesktopItem *item, gint width, gint height)
308
awn_x_get_icon_for_launcher (AwnDesktopItem *item, gint width, gint height)
299
310
GString *name = NULL;
300
311
gchar *uri = NULL;
301
312
GdkPixbuf *icon = NULL;
303
name = g_string_new ( gnome_desktop_item_get_string (item, GNOME_DESKTOP_ITEM_EXEC));
314
name = g_string_new ( awn_desktop_item_get_exec (item));
304
315
name = g_string_prepend (name, ".config/awn/custom-icons/");
306
317
for (i = 0; i < name->len; i++) {
307
318
if (name->str[i] == ' ')
308
319
name->str[i] = '-';
321
#ifdef LIBAWN_USE_GNOME
310
322
uri = gnome_util_prepend_user_home(name->str);
323
#elif defined(LIBAWN_USE_XFCE)
324
uri = g_string_free (g_string_prepend (name, g_get_home_dir ()), FALSE);
312
327
//g_print ("%s\n", uri);
314
icon = gdk_pixbuf_new_from_file_at_scale (uri, width, height, TRUE, NULL);
330
icon = gdk_pixbuf_new_from_file_at_scale (uri, width, height, TRUE, NULL);
333
#ifndef LIBAWN_USE_XFCE
316
334
g_string_free (name, TRUE);
323
icon_name = gnome_desktop_item_get_icon (item, gtk_icon_theme_get_default());
324
icon = icon_loader_get_icon_spec (icon_name, width, height) ;
342
icon_name = awn_desktop_item_get_icon (item, gtk_icon_theme_get_default());
344
icon = icon_loader_get_icon_spec (icon_name, width, height);