Permalink
Browse files

Pho 0.9.5-pre1, 2004-07-13:

  Rewrote the image list handling to use a linked list. Lots of
  associated code cleanup.
  Port to gtk2, and build under either gtk1 or gtk2.
  Add new "fullscreen mode" (e.g. for presentations, or for difficult
  window managers).
  Various futile attempts to hang on to window focus in various window
  managers.
  • Loading branch information...
1 parent 4b15e37 commit 181041ddf1512dd076f1211ccb1d0e4917d1c0cc @akkana committed Jan 12, 2010
Showing with 1,190 additions and 458 deletions.
  1. +0 −4 INSTALL
  2. +15 −10 Makefile
  3. +16 −0 dialogs.h
  4. +438 −0 gdialogs.c
  5. +277 −171 gmain.c
  6. +36 −112 imagenote.c
  7. +25 −8 pho.1
  8. +312 −104 pho.c
  9. +68 −49 pho.h
  10. +3 −0 pho.html
View
@@ -11,10 +11,6 @@ BUILDING:
To build pho, type: make
To install the binary and manual page, type (as root): make install
-(BSD users: the pho Makefiles assume that "make" is GNU make.
-If your make is actually BSD make, you'll need to type gmake,
-and edit the Makefile to change (cd exif; make) to use gmake instead.)
-
Make will build two binaries: in addition to pho (a gtk app),
xpho is the first and simplest version of pho, which uses only
xlib to display, and can't put up any dialogs.
View
@@ -1,13 +1,16 @@
# Makefile for pho
-VERSION = 0.9.2
+VERSION = 0.9.5
# Locate the gtk/gdk libraries (thanks to nev for this!)
CFLAGS = -g -O2 -Wall -DVERSION='"$(VERSION)"'
-CFLAGS := $(CFLAGS) $(shell gdk-pixbuf-config --cflags)
+G1FLAGS := $(shell gdk-pixbuf-config --cflags 2> /dev/null)
+G2FLAGS := $(shell pkg-config --cflags gdk-pixbuf-2.0 gtk+-2.0 gdk-2.0 2> /dev/null)
+CFLAGS := $(CFLAGS) $(shell if test -n "${G2FLAGS}"; then echo "${G2FLAGS}"; else echo "${G1FLAGS}"; fi)
-XLIBS := $(shell gdk-pixbuf-config --libs) -lgdk_pixbuf_xlib -lX11
-GLIBS := $(shell gdk-pixbuf-config --libs)
+XLIBS := $(shell pkg-config --libs gdk-pixbuf-xlib-2.0 2> /dev/null)
+# GLIBS := $(shell gdk-pixbuf-config --libs)
+GLIBS := $(shell if test "${G2FLAGS}"; then pkg-config --libs gdk-pixbuf-2.0 gtk+-2.0 gdk-2.0; else gdk-pixbuf-config --libs; fi)
CWD = $(shell pwd)
CWDBASE = $(shell basename `pwd`)
@@ -20,15 +23,17 @@ TARFILE = pho-$(VERSION).tar.gz
EXIFLIB = exif/libphoexif.a
-SRCS = pho.c imagenote.c gmain.c dialogs.c
+SRCS = pho.c gmain.c imagenote.c gdialogs.c
OBJS = $(subst .c,.o,$(SRCS))
-all: pho xpho
-
pho: $(EXIFLIB) $(OBJS)
- $(CC) -o pho pho.o imagenote.o gmain.o dialogs.o \
- $(EXIFLIB) $(GLIBS) $(LDFLAGS)
+ $(CC) -o pho $(OBJS) $(EXIFLIB) $(GLIBS) $(LDFLAGS)
+
+cflags:
+ echo $(CFLAGS)
+
+all: pho xpho
$(EXIFLIB): exif/*.c
(cd exif; make)
@@ -60,7 +65,7 @@ install: pho
$(INSTALL) pho.1 $(INSTALLPREFIX)/man/man1/pho.1
clean:
- rm -f *.[oas] *.ld core* pho xpho pho-*.tar.gz *.rpm *-stamp
+ rm -f *.[oas] *.ld core* pho xpho pho-*.tar.gz *.rpm
rm -rf debian/pho
cd exif; make clean
View
@@ -0,0 +1,16 @@
+/*
+ * dialogs.h: dialogs/user interactions used in pho, an image viewer.
+ *
+ * Copyright 2004 by Akkana Peck.
+ * You are free to use or modify this code under the Gnu Public License.
+ */
+
+/* Prompt for an answer. */
+extern int Prompt(char* msg, char* yesStr, char* noStr,
+ char* yesChars, char* noChars);
+
+/* Show or hide the info dialog. */
+extern void ToggleInfo();
+
+/* Update the info dialog, e.g. when the image changes */
+void UpdateInfoDialog(PhoImage* img);
Oops, something went wrong.

0 comments on commit 181041d

Please sign in to comment.