* src/pixmaps: add gnucash_long.png graphic

* src/gnome/top-level.c (gnucash_ui_init): show splash screen

	* src/gnome/gnc-splash.{ch}: splash screen functionality

	* src/gnome/dialog-utils.{ch} (gnc_get_pixmap): new function

	* src/gnc-dir.h.in: add header file with directory info

	* src/guile/Makefile.am: use BUILT_SOURCES for *.in sources


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3746 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-03-04 11:14:17 +00:00
parent 867de1644b
commit a913dfc5cf
11 changed files with 207 additions and 3 deletions

View File

@ -1,3 +1,17 @@
2001-03-04 Dave Peticolas <dave@krondo.com>
* src/pixmaps: add gnucash_long.png graphic
* src/gnome/top-level.c (gnucash_ui_init): show splash screen
* src/gnome/gnc-splash.{ch}: splash screen functionality
* src/gnome/dialog-utils.{ch} (gnc_get_pixmap): new function
* src/gnc-dir.h.in: add header file with directory info
* src/guile/Makefile.am: use BUILT_SOURCES for *.in sources
2001-03-04 Christian Stimming <stimming@tuhh.de>
* src/scm/html-utilities.scm: Added different printing of stock

View File

@ -62,6 +62,7 @@ noinst_HEADERS = \
SplitLedger.h \
file-history.h \
gnc-component-manager.h \
gnc-dir.h \
gnc-exp-parser.h \
gnc-ui.h \
gnc-ui-common.h \
@ -69,7 +70,8 @@ noinst_HEADERS = \
messages.h
EXTRA_DIST = \
.cvsignore
.cvsignore \
gnc-dir.h.in
CFLAGS = @CFLAGS@ ${GNOME_INCLUDEDIR} ${GUILE_INCS}
@ -78,3 +80,20 @@ INCLUDES = \
-I./engine \
-I./guile \
-I./register
## We borrow guile's convention and use @-...-@ as the substitution
## brackets here, instead of the usual @...@. This prevents autoconf
## from substituting the values directly into the left-hand sides of
## the sed substitutions.
gnc-dir.h: gnc-dir.h.in
rm -f $@.tmp
sed < $@.in > $@.tmp \
-e 's:@-GNC_SHAREDIR-@:${GNC_SHAREDIR}:g'
mv $@.tmp $@
BUILT_SOURCES += gnc-dir.h
# We have to do this because otherwise automake insists on putting
# these files into the dist tarfile. If there's a a better way,
# by all means, let us know...
dist-hook:
rm ${distdir}/gnc-dir.h

28
src/gnc-dir.h.in Normal file
View File

@ -0,0 +1,28 @@
/**-*- c -*-*********************************************************\
* gnc-dir.h -- directories for GnuCash *
* Copyright (C) 2001 Gnumatic, Inc. *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
\********************************************************************/
#ifndef __GNC_DIR_H__
#define __GNC_DIR_H__
#define GNC_SHAREDIR "@-GNC_SHAREDIR-@"
#endif

View File

@ -37,6 +37,7 @@ libgncgnome_a_SOURCES = \
gnc-html-embedded.c \
gnc-html-history.c \
gnc-html.c \
gnc-splash.c \
gtkselect.c \
mainwindow-account-tree.c \
new-user-callbacks.c \
@ -91,6 +92,7 @@ noinst_HEADERS = \
gnc-html-embedded.h \
gnc-html-history.h \
gnc-html.h \
gnc-splash.h \
gtkselect.h \
mainwindow-account-tree.h \
new-user-callbacks.h \

View File

@ -31,6 +31,7 @@
#include "messages.h"
#include "EuroUtils.h"
#include "Group.h"
#include "gnc-dir.h"
#include "gnc-engine-util.h"
#include "gnc-ui-util.h"
#include "gnc-ui.h"
@ -172,6 +173,29 @@ gnc_build_option_menu(GNCOptionInfo *option_info, gint num_options)
}
/********************************************************************\
* gnc_get_pixmap *
* returns a GnomePixmap widget given a pixmap filename *
* *
* Args: none *
* Returns: GnomePixmap widget or NULL if there was a problem *
\*******************************************************************/
GtkWidget *
gnc_get_pixmap (const char *name)
{
GtkWidget *pixmap;
char *fullname;
g_return_val_if_fail (name != NULL, NULL);
fullname = g_strconcat (GNC_SHAREDIR, "/", name, NULL);
pixmap = gnome_pixmap_new_from_file (fullname);
g_free (fullname);
return pixmap;
}
/********************************************************************\
* gnc_get_toolbar_style *
* returns the current toolbar style for gnucash toolbars *

View File

@ -51,6 +51,8 @@ GtkWidget * gnc_ui_source_menu_create (Account *account);
GtkWidget * gnc_build_option_menu (GNCOptionInfo *option_info,
gint num_options);
GtkWidget * gnc_get_pixmap (const char *name);
GtkToolbarStyle gnc_get_toolbar_style (void);
void gnc_get_deficit_color (GdkColor *color);

71
src/gnome/gnc-splash.c Normal file
View File

@ -0,0 +1,71 @@
/********************************************************************\
* gnc-splash.c -- splash screen for GnuCash *
* Copyright (C) 2001 Gnumatic, Inc. *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
\********************************************************************/
#include "config.h"
#include <gnome.h>
#include "dialog-utils.h"
#include "gnc-splash.h"
static GtkWidget * splash = NULL;
static gint
splash_timeout (gpointer not_used)
{
if (splash)
{
gtk_widget_destroy (splash);
splash = NULL;
}
return FALSE;
}
void
gnc_show_splash_screen (void)
{
GtkWidget *pixmap;
if (splash) return;
splash = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_position (GTK_WINDOW (splash), GTK_WIN_POS_CENTER);
pixmap = gnc_get_pixmap ("gnucash_long.png");
if (!pixmap)
{
g_warning ("can't find splash pixmap");
gtk_widget_destroy (splash);
return;
}
gtk_container_add (GTK_CONTAINER (splash), pixmap);
gtk_widget_show_all (splash);
gtk_timeout_add (4000, splash_timeout, NULL); /* 4 seconds */
}

28
src/gnome/gnc-splash.h Normal file
View File

@ -0,0 +1,28 @@
/********************************************************************\
* gnc-splash.h -- splash screen for GnuCash *
* Copyright (C) 2001 Gnumatic, Inc. *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
\********************************************************************/
#ifndef __GNC_SPLASH_H__
#define __GNC_SPLASH_H__
void gnc_show_splash_screen (void);
#endif

View File

@ -49,6 +49,7 @@
#include "global-options.h"
#include "gnc-component-manager.h"
#include "gnc-engine-util.h"
#include "gnc-splash.h"
#include "gnc-ui.h"
#include "gnc.h"
#include "gnucash-color.h"
@ -91,6 +92,7 @@ static void gnc_configure_register_font(void);
static void gnc_configure_register_hint_font_cb(gpointer);
static void gnc_configure_register_hint_font(void);
/** GLOBALS *********************************************************/
/* This static indicates the debugging module that this .o belongs to. */
static short module = MOD_GUI;
@ -113,6 +115,7 @@ static SCM auto_decimal_places_callback_id = SCM_UNDEFINED;
static SCM register_font_callback_id = SCM_UNDEFINED;
static SCM register_hint_font_callback_id = SCM_UNDEFINED;
/* ============================================================== */
int
@ -214,6 +217,13 @@ gnucash_ui_init(void)
guppi_tank_init();
#endif
/* put up splash screen */
gnc_show_splash_screen ();
/* make sure splash is up */
while (gtk_events_pending ())
gtk_main_iteration ();
app = gnome_app_new("GnuCash", "GnuCash");
gnc_configure_date_format();
@ -292,7 +302,8 @@ gnucash_ui_init(void)
}
static gboolean hasstarted = FALSE;
void gnc_default_ui_start(void)
void
gnc_default_ui_start(void)
{
if(!hasstarted)
{

View File

@ -1,3 +1,8 @@
gncpixmapdir = ${GNC_SHAREDIR}
gncpixmap_DATA = \
gnucash_long.png
EXTRA_DIST = \
.cvsignore
.cvsignore \
${gncpixmap_DATA}

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB