wmshutdown: Include xpm icon in source rather than installing into a data directory and loading it from file.
This commit is contained in:
parent
c2271bfeb2
commit
c4bb16479c
|
@ -1,9 +1,8 @@
|
||||||
bin_PROGRAMS = wmshutdown
|
bin_PROGRAMS = wmshutdown
|
||||||
wmshutdown_SOURCES = wmshutdown.c
|
wmshutdown_SOURCES = wmshutdown.c wmshutdown.xpm
|
||||||
|
|
||||||
AM_CFLAGS = $(gtk_CFLAGS) $(x11_CFLAGS)
|
AM_CFLAGS = $(gtk_CFLAGS) $(x11_CFLAGS)
|
||||||
AM_CPPFLAGS = -DDATADIR=\"$(pkgdatadir)\"
|
AM_CPPFLAGS = -DDATADIR=\"$(pkgdatadir)\"
|
||||||
LIBS += $(gtk_LIBS) $(x11_LIBS)
|
LIBS += $(gtk_LIBS) $(x11_LIBS)
|
||||||
|
|
||||||
dist_pkgdata_DATA = wmshutdown.xpm
|
|
||||||
dist_man_MANS = wmshutdown.1
|
dist_man_MANS = wmshutdown.1
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
|
#include "wmshutdown.xpm"
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -234,6 +235,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
GtkWidget *gtkiw;
|
GtkWidget *gtkiw;
|
||||||
GtkWidget *dockArea;
|
GtkWidget *dockArea;
|
||||||
GtkWidget *pixmap;
|
GtkWidget *pixmap;
|
||||||
|
@ -254,7 +256,8 @@ int main(int argc, char *argv[])
|
||||||
gtkiw = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
gtkiw = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
dockArea = cria_dock(gtkiw, 47);
|
dockArea = cria_dock(gtkiw, 47);
|
||||||
|
|
||||||
pixmap = gtk_image_new_from_file(DATADIR"/wmshutdown.xpm");
|
pixbuf = gdk_pixbuf_new_from_xpm_data(image_name);
|
||||||
|
pixmap = gtk_image_new_from_pixbuf(pixbuf);
|
||||||
gtk_widget_show(pixmap);
|
gtk_widget_show(pixmap);
|
||||||
gtk_container_add(GTK_CONTAINER(dockArea), pixmap);
|
gtk_container_add(GTK_CONTAINER(dockArea), pixmap);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue