summaryrefslogtreecommitdiff
path: root/gtk2_ardour/utils.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-09-10 21:27:39 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-09-10 21:27:39 +0000
commitc86210a9d5bdb7b36ad58552a1f99f53d48781b3 (patch)
tree6ab06935a1e2bc4ef6a4448dd01b09f5b2628c66 /gtk2_ardour/utils.cc
parent68e943265edf04e63a8e8b8f62bab20f99d9c637 (diff)
merge 2.0-ongoing into 3.0 @ 3581 - 3710
git-svn-id: svn://localhost/ardour2/branches/3.0@3712 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r--gtk2_ardour/utils.cc28
1 files changed, 11 insertions, 17 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc
index 9008f8b8cd..f09ef1b27f 100644
--- a/gtk2_ardour/utils.cc
+++ b/gtk2_ardour/utils.cc
@@ -571,23 +571,21 @@ get_xpm (std::string name)
sys::path data_file_path;
- if (!find_file_in_search_path (spath, name, data_file_path)) {
+ if(!find_file_in_search_path (spath, name, data_file_path)) {
fatal << string_compose (_("cannot find XPM file for %1"), name) << endmsg;
- /*NOTREACHED*/
}
-
+
try {
- xpm_map[name] = Gdk::Pixbuf::create_from_file (data_file_path.to_string());
- }
-
- catch(const Glib::Error& e) {
+ xpm_map[name] = Gdk::Pixbuf::create_from_file (data_file_path.to_string());
+ } catch(const Glib::Error& e) {
warning << "Caught Glib::Error: " << e.what() << endmsg;
- }
+ }
}
return xpm_map[name];
}
+
Glib::RefPtr<Gdk::Pixbuf>
get_icon (const char* cname)
{
@@ -608,15 +606,11 @@ get_icon (const char* cname)
Glib::RefPtr<Gdk::Pixbuf> img;
try {
img = Gdk::Pixbuf::create_from_file (data_file_path.to_string());
+ } catch (const Gdk::PixbufError &e) {
+ cerr << "Caught PixbufError: " << e.what() << endl;
+ } catch (...) {
+ g_message("Caught ... ");
}
- catch (const Gdk::PixbufError &e)
- {
- cerr << "Caught PixbufError: " << e.what() << endl;
- }
- catch (...)
- {
- g_message("Caught ... ");
- }
return img;
}
@@ -701,7 +695,7 @@ set_pango_fontsize ()
{
long val = ARDOUR::Config->get_font_scale();
- /* FT2 rendering */
+ /* FT2 rendering - used by GnomeCanvas, sigh */
pango_ft2_font_map_set_resolution ((PangoFT2FontMap*) pango_ft2_font_map_for_display(), val/1024, val/1024);