- added kde flag icons
- new splash screen and desktop icons - new directory layout git-svn-id: http://svn.code.sf.net/p/xqf/code/trunk@533 d2ac09be-c843-0410-8b1f-f8a84130e0ec
This commit is contained in:
parent
1f90bfaee1
commit
1987c7a4d5
@ -1,3 +1,8 @@
|
||||
Oct 26, 2003: Ludwig Nussel <l-n@users.sourceforge.net>
|
||||
- added kde flag icons
|
||||
- new splash screen and desktop icons
|
||||
- new directory layout
|
||||
|
||||
Oct 25, 2003: Ludwig Nussel <l-n@users.sourceforge.net>
|
||||
- remove gettext stuff from repository. Instead autogen.sh will run gettextize
|
||||
to create the necessary files
|
||||
|
@ -1,4 +1,4 @@
|
||||
man_MANS = xqf.6
|
||||
EXTRA_DIST = BUGS autogen.sh clean.sh $(man_MANS) xqf.spec
|
||||
|
||||
SUBDIRS = intl po src docs
|
||||
SUBDIRS = intl po src docs pixmaps
|
||||
|
@ -17,6 +17,10 @@ test -z "$srcdir" && srcdir=.
|
||||
(
|
||||
cd $srcdir
|
||||
|
||||
# extract flag icons
|
||||
rm pixmaps/flags/*.png
|
||||
tar -C pixmaps -xzf pixmaps/flags.tar.gz
|
||||
|
||||
# The autoconf cache (version after 2.52) is not reliable yet.
|
||||
rm -rf autom4te.cache
|
||||
|
||||
|
@ -24,6 +24,8 @@ src/gnuconfig.h \
|
||||
src/gnuconfig.h.in \
|
||||
src/xpm/Makefile.in \
|
||||
src/xpm/Makefile \
|
||||
pixmaps/Makefile.in \
|
||||
pixmaps/flags/Makefile.in \
|
||||
po/Makefile.in \
|
||||
po/POTFILES \
|
||||
po/*.gmo
|
||||
@ -46,3 +48,6 @@ po/remove-potcdate.sin \
|
||||
intl/*.* \
|
||||
intl/ChangeLog \
|
||||
intl/VERSION
|
||||
|
||||
rm -rf \
|
||||
pixmaps/flags/*.png
|
||||
|
@ -43,7 +43,6 @@ AC_MSG_RESULT([$USE_GTK2])
|
||||
if test "x$USE_GTK2" != "xno"; then
|
||||
|
||||
AC_DEFINE_UNQUOTED(USE_GTK2,1,Define if we should use GTK2)
|
||||
AC_MSG_RESULT([$USE_GTK2])
|
||||
|
||||
OLD_GTK_SUPPORT="-DGTK_ENABLE_BROKEN=1"
|
||||
AC_SUBST(OLD_GTK_SUPPORT)
|
||||
@ -196,6 +195,8 @@ AC_CONFIG_FILES([
|
||||
src/xpm/Makefile
|
||||
src/zip/Makefile
|
||||
docs/Makefile
|
||||
pixmaps/Makefile
|
||||
pixmaps/flags/Makefile
|
||||
xqf.spec
|
||||
intl/Makefile
|
||||
po/Makefile.in
|
||||
|
2
xqf/pixmaps/.cvsignore
Normal file
2
xqf/pixmaps/.cvsignore
Normal file
@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
9
xqf/pixmaps/Makefile.am
Normal file
9
xqf/pixmaps/Makefile.am
Normal file
@ -0,0 +1,9 @@
|
||||
SUBDIRS = flags
|
||||
|
||||
EXTRA_DIST = $(splash_DATA) $(icon_DATA)
|
||||
|
||||
splashdir = $(pkgdatadir)/default
|
||||
splash_DATA = splash.png
|
||||
|
||||
icondir = $(datadir)/pixmaps
|
||||
icon_DATA = $(wildcard xqf_*.png)
|
BIN
xqf/pixmaps/flags.tar.gz
Normal file
BIN
xqf/pixmaps/flags.tar.gz
Normal file
Binary file not shown.
3
xqf/pixmaps/flags/.cvsignore
Normal file
3
xqf/pixmaps/flags/.cvsignore
Normal file
@ -0,0 +1,3 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
??.png
|
4
xqf/pixmaps/flags/Makefile.am
Normal file
4
xqf/pixmaps/flags/Makefile.am
Normal file
@ -0,0 +1,4 @@
|
||||
EXTRA_DIST = $(flag_DATA)
|
||||
|
||||
flagdir = $(pkgdatadir)/default/flags
|
||||
flag_DATA = $(wildcard *.png)
|
BIN
xqf/pixmaps/splash.png
Normal file
BIN
xqf/pixmaps/splash.png
Normal file
Binary file not shown.
BIN
xqf/pixmaps/xqf_22x22.png
Normal file
BIN
xqf/pixmaps/xqf_22x22.png
Normal file
Binary file not shown.
BIN
xqf/pixmaps/xqf_32x32.png
Normal file
BIN
xqf/pixmaps/xqf_32x32.png
Normal file
Binary file not shown.
BIN
xqf/pixmaps/xqf_48x48.png
Normal file
BIN
xqf/pixmaps/xqf_48x48.png
Normal file
Binary file not shown.
BIN
xqf/pixmaps/xqf_48x48_2.png
Normal file
BIN
xqf/pixmaps/xqf_48x48_2.png
Normal file
Binary file not shown.
@ -147,45 +147,45 @@ int geoip_id_by_ip(struct in_addr in)
|
||||
return GeoIP_country_id_by_addr(gi, inet_ntoa (in));
|
||||
}
|
||||
|
||||
// TODO: create gui to make "default" part configurable
|
||||
static char flagpath[]=PACKAGE_DATA_DIR "/flags/default/%2s.png";
|
||||
static char* find_flag_file(int id)
|
||||
{
|
||||
char file[] = "flags/lan.png";
|
||||
char* filename;
|
||||
|
||||
if (id != LAN_GeoIPid)
|
||||
{
|
||||
const char* code = geoip_code_by_id(id);
|
||||
if(!code) return NULL;
|
||||
strncpy(file+strlen("flags/"),code,2);
|
||||
strcpy(file+strlen("flags/")+2,".png");
|
||||
g_strdown(file);
|
||||
}
|
||||
|
||||
filename = find_pixmap_directory(file);
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
struct pixmap* get_pixmap_for_country(int id)
|
||||
{
|
||||
GdkPixbuf* pixbuf = NULL;
|
||||
struct pixmap* pix = NULL;
|
||||
|
||||
#ifdef USE_GTK2
|
||||
GError *err=NULL;
|
||||
#endif
|
||||
|
||||
char* filename = NULL;
|
||||
|
||||
char* code = NULL;
|
||||
|
||||
|
||||
if(!flags) return NULL;
|
||||
if(id < 1) return NULL; // no flag for N/A
|
||||
|
||||
code = (char*)geoip_code_by_id(id);
|
||||
if(!code) return NULL;
|
||||
|
||||
pix = &flags[id];
|
||||
|
||||
if(pix->pix == GINT_TO_POINTER(-1)) return NULL;
|
||||
if(pix->pix) return pix;
|
||||
|
||||
code = g_strdup(code);
|
||||
g_strdown(code);
|
||||
|
||||
if(id==LAN_GeoIPid)
|
||||
filename = find_pixmap_directory("lan.png");
|
||||
else
|
||||
filename = g_strdup_printf(flagpath,code);
|
||||
filename = find_flag_file(id);
|
||||
|
||||
if(!filename || access(filename,R_OK))
|
||||
{
|
||||
g_free(code);
|
||||
g_free(filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ struct pixmap* get_pixmap_for_country(int id)
|
||||
|
||||
/*FIXME_GTK2: need GError*/
|
||||
#ifdef USE_GTK2
|
||||
pixbuf = gdk_pixbuf_new_from_file(filename, &err);
|
||||
pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
|
||||
#else
|
||||
pixbuf = gdk_pixbuf_new_from_file(filename);
|
||||
#endif
|
||||
@ -203,14 +203,12 @@ struct pixmap* get_pixmap_for_country(int id)
|
||||
pix->pix=GINT_TO_POINTER(-1);
|
||||
g_warning (_("Error loading pixmap file: %s"), filename);
|
||||
g_free (filename);
|
||||
g_free(code);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gdk_pixbuf_render_pixmap_and_mask(pixbuf,&pix->pix,&pix->mask,255);
|
||||
|
||||
gdk_pixbuf_unref(pixbuf);
|
||||
g_free(code);
|
||||
g_free (filename);
|
||||
|
||||
return pix;
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <sys/wait.h> /* waitpid */
|
||||
#include <errno.h> /* errno */
|
||||
#include <signal.h> /* kill, signal... */
|
||||
#include <stdlib.h> /* setenv */
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
@ -106,11 +106,6 @@ load_pixmap (GtkWidget *widget,
|
||||
GdkBitmap *mask;
|
||||
GtkWidget *pixmap;
|
||||
|
||||
#ifdef USE_GTK2
|
||||
GError *err = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
if (!filename || !filename[0])
|
||||
return create_dummy_pixmap (widget);
|
||||
|
||||
@ -141,7 +136,7 @@ load_pixmap (GtkWidget *widget,
|
||||
|
||||
/*FIXME_GTK2: need GError*/
|
||||
#ifdef USE_GTK2
|
||||
GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file(found_filename, &err);
|
||||
GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file(found_filename, NULL);
|
||||
#else
|
||||
GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file(found_filename);
|
||||
#endif
|
||||
|
@ -68,7 +68,7 @@ void create_splashscreen (void)
|
||||
gtk_container_add (GTK_CONTAINER (splashscreen), vbox1);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 3);
|
||||
|
||||
logo = load_pixmap (splashscreen, "xqflogo.png");
|
||||
logo = load_pixmap (splashscreen, "splash.png");
|
||||
gtk_widget_ref (logo);
|
||||
gtk_object_set_data_full (GTK_OBJECT (splashscreen), "logo", logo,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
|
@ -1,4 +1,4 @@
|
||||
EXTRA_DIST=$(wildcard *.xpm) $(pixmaps_DATA)
|
||||
EXTRA_DIST=$(wildcard *.xpm) $(flag_DATA)
|
||||
|
||||
pixmapsdir = $(pkgdatadir)/pixmaps
|
||||
pixmaps_DATA = $(wildcard *.png)
|
||||
flagdir = $(pkgdatadir)/default/flags
|
||||
flag_DATA = lan.png
|
||||
|
@ -3760,7 +3760,7 @@ int main (int argc, char *argv[]) {
|
||||
|
||||
parse_commandline(argc,argv);
|
||||
|
||||
add_pixmap_directory (PACKAGE_DATA_DIR "/pixmaps");
|
||||
add_pixmap_directory (PACKAGE_DATA_DIR "/default");
|
||||
|
||||
dns_gtk_init ();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user