Skip to content

Commit d2574a0

Browse files
committed
Initial autotools support.
1 parent 1a9f075 commit d2574a0

11 files changed

+740
-13
lines changed

AUTHORS

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Developers
2+
----------
3+
The OpenSplash Project http://www.opensplash-project.org/
4+
5+
- Youchen Lee <[email protected]>
6+

COPYING

+674
Large diffs are not rendered by default.

ChangeLog

Whitespace-only changes.

Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SUBDIRS = src

NEWS

Whitespace-only changes.

autogen.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
aclocal
3+
autoheader
4+
automake --add-missing
5+
autoconf

configure.ac

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# -*- Autoconf -*-
2+
# Process this file with autoconf to produce a configure script.
3+
4+
AC_PREREQ(2.61)
5+
AC_INIT(splashbox-bot-frontend-gtk, 0.0.1, http://www.opensplash-project.org/)
6+
AC_CONFIG_SRCDIR([src])
7+
AC_CONFIG_HEADER([config.h])
8+
AM_INIT_AUTOMAKE
9+
10+
# Checks for programs.
11+
AC_PROG_CC
12+
13+
# Checks for libraries.
14+
AM_PATH_GLIB_2_0([2.4.0], [
15+
GUI_CFLAGS="$GUI_CFLAGS $GLIB_CFLAGS"
16+
GUI_LIBS="$GUI_LIBS $GLIB_LIBS"
17+
], [AC_MSG_ERROR([Cannot find Glib 2.4 (or above version)!])], [gthread])
18+
19+
20+
AM_PATH_GTK_2_0([2.4.0], [
21+
GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS"
22+
GUI_LIBS="$GUI_LIBS $GTK_LIBS"
23+
], [AC_MSG_ERROR([Cannot find GTK+/X11 2.4 (or above version)!])])
24+
25+
# Checks for header files.
26+
27+
# Checks for typedefs, structures, and compiler characteristics.
28+
29+
# Checks for library functions.
30+
31+
AC_SUBST(GUI_LIBS)
32+
AC_CONFIG_FILES([Makefile src/Makefile])
33+
AC_OUTPUT

src/Makefile

-10
This file was deleted.

src/Makefile.am

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
bin_PROGRAMS = splashbox-bot-frontend-gtk
2+
3+
INCLUDES = $(GTK_CFLAGS) -DDATADIR=\"$(datadir)\"
4+
5+
splashbox_bot_frontend_gtk_LDADD = $(GTK_LIBS)
6+
splashbox_bot_frontend_gtk_SOURCES = main.c
7+
8+
EXTRA_DIST = splashbox.xpm

src/main.c

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
#include <gtk/gtk.h>
2+
#include <gdk/gdk.h>
3+
#include <string.h>
4+
#define DATADIR_XPM DATADIR
5+
6+
#include "splashbox.xpm"
27

38
int main( int argc, char *argv[] )
49
{
510
GtkWidget *window;
611
GtkWidget *vbox;
712
GtkWidget *entry;
8-
GtkStatusIcon *status_icon;
13+
GtkStatusIcon *tray_icon;
14+
GdkPixbuf *main_icon;
915

1016
gtk_init (&argc, &argv);
17+
18+
main_icon = gdk_pixbuf_new_from_xpm_data((const char**)splashbox_xpm);
1119

1220
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
1321
gtk_window_set_wmclass (GTK_WINDOW(window), "splashbox-bot-frontend-gtk", "splashbox-bot-frontend-gtk");
@@ -25,7 +33,9 @@ int main( int argc, char *argv[] )
2533
entry = gtk_entry_new();
2634
gtk_box_pack_start(GTK_BOX(vbox), entry, TRUE, TRUE, 0);
2735

28-
status_icon = gtk_status_icon_new_from_file ("../data/splashbox.xpm");
36+
tray_icon = gtk_status_icon_new ();
37+
gtk_status_icon_set_from_pixbuf(tray_icon, main_icon);
38+
2939

3040

3141
gtk_widget_hide_all (window);

data/splashbox.xpm src/splashbox.xpm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* XPM */
2-
static char * splashbox[] = {
2+
static char * splashbox_xpm[] = {
33
"32 32 2 1",
44
" c white",
55
". c black",

0 commit comments

Comments
 (0)