[Xfce4-commits] r24069 - xfce4-appfinder/trunk/src
Jasper Huijsmans
jasper at xfce.org
Sat Dec 9 10:59:42 CET 2006
Author: jasper
Date: 2006-12-09 09:59:41 +0000 (Sat, 09 Dec 2006)
New Revision: 24069
Removed:
xfce4-appfinder/trunk/src/inline-icon.h
Modified:
xfce4-appfinder/trunk/src/main.c
xfce4-appfinder/trunk/src/xfce4-appfinder.c
Log:
Patch for themed icon support by Zenwalk (bug #2651). Seems like a nice improvement.
Deleted: xfce4-appfinder/trunk/src/inline-icon.h
Modified: xfce4-appfinder/trunk/src/main.c
===================================================================
--- xfce4-appfinder/trunk/src/main.c 2006-12-08 23:39:24 UTC (rev 24068)
+++ xfce4-appfinder/trunk/src/main.c 2006-12-09 09:59:41 UTC (rev 24069)
@@ -34,8 +34,6 @@
#include "main.h"
#include "appfinder.h"
#include "xfce4-appfinder.h"
-#include "inline-icon.h"
-
#define BORDER 8
void callbackExecuteApplication (GtkWidget *widget,
@@ -206,11 +204,10 @@
GTK_DIALOG_NO_SEPARATOR,
GTK_STOCK_CLOSE, GTK_RESPONSE_OK,
NULL);
+ icon = xfce_themed_icon_load("xfce4-appfinder", 48);
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), "xfce4-appfinder");
+ gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
- icon = xfce_inline_icon_at_size (default_icon_data_48_48, 32, 32);
- gtk_window_set_icon (GTK_WINDOW (dialog), icon);
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
-
vbox = GTK_DIALOG (dialog)->vbox;
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
@@ -238,7 +235,7 @@
icon = xfce_themed_icon_load(iconpath, 48);
if (!icon)
{
- icon = xfce_inline_icon_at_size (default_icon_data_48_48, 48, 48);
+ icon = xfce_themed_icon_load("xfce4-appfinder", 48);
icon2 = gdk_pixbuf_copy (icon);
gdk_pixbuf_saturate_and_pixelate(icon, icon2, 0.0, TRUE);
g_object_unref(icon);
@@ -248,7 +245,7 @@
}
else
{
- icon = xfce_inline_icon_at_size (default_icon_data_48_48, 48, 48);
+ xfce_themed_icon_load("xfce4-appfinder", 48);
}
img = gtk_image_new_from_pixbuf (icon);
@@ -439,7 +436,8 @@
afWnd = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (G_OBJECT(afWnd), "delete_event", G_CALLBACK(gtk_main_quit), NULL);
gtk_window_set_title (GTK_WINDOW(afWnd), "Xfce4 Appfinder");
- gtk_window_set_icon (GTK_WINDOW(afWnd), xfce_inline_icon_at_size (default_icon_data_48_48, 48, 48));
+ gtk_window_set_icon_name (GTK_WINDOW (afWnd), "xfce4-appfinder");
+ //gtk_window_set_icon (GTK_WINDOW(afWnd), xfce_inline_icon_at_size (default_icon_data_48_48, 48, 48));
gtk_window_set_position (GTK_WINDOW(afWnd), GTK_WIN_POS_CENTER_ALWAYS);
gtk_window_set_default_size (GTK_WINDOW(afWnd), gdk_screen_width ()/2, gdk_screen_height()/2);
Modified: xfce4-appfinder/trunk/src/xfce4-appfinder.c
===================================================================
--- xfce4-appfinder/trunk/src/xfce4-appfinder.c 2006-12-08 23:39:24 UTC (rev 24068)
+++ xfce4-appfinder/trunk/src/xfce4-appfinder.c 2006-12-09 09:59:41 UTC (rev 24069)
@@ -27,8 +27,6 @@
#include <libxfce4util/libxfce4util.h>
#include <libxfcegui4/libxfcegui4.h>
#include <string.h>
-
-#include "inline-icon.h"
#include "xfce4-appfinder.h"
enum {
@@ -582,7 +580,7 @@
{
gtk_list_store_append(GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(af->appsTree))), &iter);
gtk_list_store_set(GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(af->appsTree))),
- &iter, APPLICATION_TREE_ICON, xfce_inline_icon_at_size (default_icon_data_48_48, 24, 24),
+ &iter, APPLICATION_TREE_ICON, xfce_themed_icon_load("xfce4-appfinder", 24),
APPLICATION_TREE_TEXT, _("No items available"), -1);
gtk_widget_set_sensitive(af->appsTree, FALSE);
}
@@ -622,7 +620,7 @@
{
gtk_list_store_append(GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(appfinder->appsTree))), &iter);
gtk_list_store_set(GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(appfinder->appsTree))),
- &iter, APPLICATION_TREE_ICON, xfce_inline_icon_at_size (default_icon_data_48_48, 24, 24),
+ &iter, APPLICATION_TREE_ICON, xfce_themed_icon_load("xfce4-appfinder", 24),
APPLICATION_TREE_TEXT, _("Sorry, no match for searched text."), -1);
gtk_widget_set_sensitive(appfinder->appsTree, FALSE);
}
More information about the Xfce4-commits
mailing list