Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 258054 Details for
Bug 349708
[media-gfx/inkscape] crashes when opening document properties
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A proper fix for dock item mising icon problem
9745_9744.diff (text/plain), 2.01 KB, created by
Martin Gysel (bearsh)
on 2010-12-25 20:47:29 UTC
(
hide
)
Description:
A proper fix for dock item mising icon problem
Filename:
MIME Type:
Creator:
Martin Gysel (bearsh)
Created:
2010-12-25 20:47:29 UTC
Size:
2.01 KB
patch
obsolete
>=== modified file 'src/ui/widget/dock-item.cpp' >--- src/ui/widget/dock-item.cpp 2010-11-25 23:04:48 +0000 >+++ src/ui/widget/dock-item.cpp 2010-12-06 00:22:58 +0000 >@@ -42,21 +42,27 @@ > GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER); > > if (!icon_name.empty()) { >- int width = 0, height = 0; >- Gtk::IconSize::lookup(Gtk::ICON_SIZE_MENU, width, height); >- try { >- _icon_pixbuf = Gtk::IconTheme::get_default()->load_icon(icon_name, width, (Gtk::IconLookupFlags) 0); >- _gdl_dock_item = >- gdl_dock_item_new_with_pixbuf_icon(name.c_str(), long_name.c_str(), >- _icon_pixbuf->gobj(), gdl_dock_behavior); >- } catch (Gtk::IconThemeError) { >- // ignore - create the dock item without an icon below >+ Glib::RefPtr<Gtk::IconTheme> iconTheme = Gtk::IconTheme::get_default(); >+ // Icon might be in the icon theme, or might be a stock item. Check the proper source: >+ if ( iconTheme->has_icon(icon_name) ) { >+ int width = 0; >+ int height = 0; >+ Gtk::IconSize::lookup(Gtk::ICON_SIZE_MENU, width, height); >+ _icon_pixbuf = iconTheme->load_icon(icon_name, width); >+ } else { >+ Gtk::StockItem item; >+ Gtk::StockID stockId(icon_name); >+ if ( Gtk::StockItem::lookup(stockId, item) ) { >+ _icon_pixbuf = _dock.getWidget().render_icon( stockId, Gtk::ICON_SIZE_MENU ); >+ } > } > } > >- if (!_gdl_dock_item) { >- _gdl_dock_item = >- gdl_dock_item_new(name.c_str(), long_name.c_str(), gdl_dock_behavior); >+ if ( _icon_pixbuf ) { >+ _gdl_dock_item = gdl_dock_item_new_with_pixbuf_icon( name.c_str(), long_name.c_str(), >+ _icon_pixbuf->gobj(), gdl_dock_behavior ); >+ } else { >+ _gdl_dock_item = gdl_dock_item_new(name.c_str(), long_name.c_str(), gdl_dock_behavior); > } > > _frame.set_shadow_type(Gtk::SHADOW_IN); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 349708
:
258054
|
258056