mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Splash screen: minor code cleanup
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19831 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c3effeb228
commit
29414038fe
@ -622,8 +622,7 @@ gnc_gui_init(void)
|
||||
|
||||
g_set_application_name(PACKAGE_NAME);
|
||||
|
||||
if (gnc_gconf_get_bool(GCONF_GENERAL, "show_splash_screen", NULL))
|
||||
gnc_gui_init_splash();
|
||||
gnc_show_splash_screen();
|
||||
|
||||
gnome_is_initialized = TRUE;
|
||||
|
||||
|
@ -143,7 +143,6 @@ GdkPixbuf * gnc_gnome_get_gdkpixbuf (const char *name);
|
||||
*/
|
||||
void gnc_shutdown (int exit_status);
|
||||
|
||||
void gnc_gui_init_splash (void);
|
||||
GncMainWindow *gnc_gui_init (void);
|
||||
int gnc_ui_start_event_loop (void);
|
||||
gboolean gnucash_ui_is_running (void);
|
||||
|
@ -28,13 +28,13 @@
|
||||
#include "gnc-gnome-utils.h"
|
||||
#include "gnc-splash.h"
|
||||
#include "gnc-version.h"
|
||||
#include "gnc-gconf-utils.h"
|
||||
|
||||
#define MARKUP_STRING "<span size='small'>%s</span>"
|
||||
|
||||
static GtkWidget * splash = NULL;
|
||||
static GtkWidget * progress = NULL;
|
||||
static GtkWidget * progress_bar = NULL;
|
||||
static int splash_is_initialized = FALSE;
|
||||
|
||||
static void
|
||||
splash_destroy_cb (GtkObject *object, gpointer user_data)
|
||||
@ -42,16 +42,6 @@ splash_destroy_cb (GtkObject *object, gpointer user_data)
|
||||
splash = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
gnc_gui_init_splash (void)
|
||||
{
|
||||
if (!splash_is_initialized)
|
||||
{
|
||||
splash_is_initialized = TRUE;
|
||||
gnc_show_splash_screen ();
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
button_press_cb(GtkWidget *widget, GdkEventButton *event, gpointer unused)
|
||||
{
|
||||
@ -71,6 +61,7 @@ gnc_show_splash_screen (void)
|
||||
gchar *ver_string, *markup;
|
||||
|
||||
if (splash) return;
|
||||
if (!gnc_gconf_get_bool(GCONF_GENERAL, "show_splash_screen", NULL)) return;
|
||||
|
||||
splash = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_type_hint (GTK_WINDOW (splash), GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);
|
||||
|
@ -26,7 +26,6 @@
|
||||
void gnc_show_splash_screen (void);
|
||||
void gnc_destroy_splash_screen (void);
|
||||
void gnc_update_splash_screen (const gchar *string, double percentage);
|
||||
void gnc_gui_init_splash (void);
|
||||
|
||||
#define GNC_SPLASH_PERCENTAGE_UNKNOWN 101
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user