X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fsplash.cpp;h=fe87f015604086954359173619151f2ee0bca892;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=c3d1c85c0467d9f07d138f549ad6db3344bc6381;hpb=9db81fd96de9f351babbd93a5e693492c1eb274c;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/splash.cpp b/synfig-studio/trunk/src/gtkmm/splash.cpp index c3d1c85..fe87f01 100644 --- a/synfig-studio/trunk/src/gtkmm/splash.cpp +++ b/synfig-studio/trunk/src/gtkmm/splash.cpp @@ -7,7 +7,7 @@ ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** Copyright (c) 2007 Chris Moore -** Copyright 2008 Paul Wise +** Copyright (c) 2008 Paul Wise ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -171,6 +171,8 @@ Splash::Splash(): imagepath+="share"; imagepath+=ETL_DIRECTORY_SEPARATOR; imagepath+="pixmaps"; + imagepath+=ETL_DIRECTORY_SEPARATOR; + imagepath+="synfigstudio"; } imagepath+=ETL_DIRECTORY_SEPARATOR; @@ -181,8 +183,12 @@ Splash::Splash(): splash_image->set_padding(0,0); // Get the image size - int image_w = splash_image->get_pixbuf()->get_width(); - int image_h = splash_image->get_pixbuf()->get_height(); + int image_w = 350; int image_h = 0; + Glib::RefPtr pixbuf = splash_image->get_pixbuf(); + if( pixbuf ){ + image_w = pixbuf->get_width(); + image_h = pixbuf->get_height(); + } // Create the progress bar progressbar = manage(new class Gtk::ProgressBar()); @@ -195,7 +201,7 @@ Splash::Splash(): // Create the Gtk::Fixed container and put all of the widgets into it Gtk::Fixed* fixed = manage(new class Gtk::Fixed()); - fixed->put(*splash_image, 0, 0); + if( pixbuf ) fixed->put(*splash_image, 0, 0); fixed->put(*progressbar, 0, image_h+24); fixed->put(*tasklabel, 0, image_h); @@ -211,11 +217,15 @@ Splash::Splash(): set_resizable(false); set_type_hint(Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN); set_auto_startup_notification(false); - set_icon_from_file(imagepath+"synfig_icon."+IMAGE_EXT); + try { + set_icon_from_file(imagepath+"synfig_icon."+IMAGE_EXT); + } catch(...) { + synfig::warning("Unable to open "+imagepath+"synfig_icon."+IMAGE_EXT); + } add(*frame); // show everything off - splash_image->show(); + if( pixbuf ) splash_image->show(); fixed->show(); frame->show();