Replacing some of the icons. Fixes #7445
This commit is contained in:
parent
064200f07e
commit
4d0005a9ab
|
@ -1496,9 +1496,10 @@ class ChatControl(ChatControlBase):
|
||||||
|
|
||||||
self._send_file_button = self.xml.get_object('send_file_button')
|
self._send_file_button = self.xml.get_object('send_file_button')
|
||||||
# add a special img for send file button
|
# add a special img for send file button
|
||||||
path_to_upload_img = gtkgui_helpers.get_icon_path('gajim-upload')
|
pixbuf = gtkgui_helpers.get_icon_pixmap('document-send', quiet=True)
|
||||||
img = gtk.Image()
|
if not pixbuf:
|
||||||
img.set_from_file(path_to_upload_img)
|
pixbuf = gtkgui_helpers.get_icon_pixmap('gajim-upload')
|
||||||
|
img = gtk.image_new_from_pixbuf(pixbuf)
|
||||||
self._send_file_button.set_image(img)
|
self._send_file_button.set_image(img)
|
||||||
id_ = self._send_file_button.connect('clicked',
|
id_ = self._send_file_button.connect('clicked',
|
||||||
self._on_send_file_menuitem_activate)
|
self._on_send_file_menuitem_activate)
|
||||||
|
|
|
@ -171,12 +171,21 @@ class ConversationTextview(gobject.GObject):
|
||||||
|
|
||||||
FOCUS_OUT_LINE_PIXBUF = gtkgui_helpers.get_icon_pixmap(
|
FOCUS_OUT_LINE_PIXBUF = gtkgui_helpers.get_icon_pixmap(
|
||||||
'gajim-muc_separator')
|
'gajim-muc_separator')
|
||||||
XEP0184_WARNING_PIXBUF = gtkgui_helpers.get_icon_pixmap(
|
XEP0184_WARNING_PIXBUF = gtkgui_helpers.get_icon_pixmap('gtk-no',
|
||||||
'gajim-receipt_missing')
|
quiet=True)
|
||||||
XEP0184_RECEIVED_PIXBUF = gtkgui_helpers.get_icon_pixmap(
|
if not XEP0184_WARNING_PIXBUF:
|
||||||
'gajim-receipt_received')
|
MESSAGE_CORRECTED_PIXBUF = gtkgui_helpers.get_icon_pixmap(
|
||||||
|
'gajim-receipt_missing')
|
||||||
|
XEP0184_RECEIVED_PIXBUF = gtkgui_helpers.get_icon_pixmap('gtk-yes',
|
||||||
|
quiet=True)
|
||||||
|
if not XEP0184_RECEIVED_PIXBUF:
|
||||||
|
MESSAGE_CORRECTED_PIXBUF = gtkgui_helpers.get_icon_pixmap(
|
||||||
|
'gajim-receipt_received')
|
||||||
MESSAGE_CORRECTED_PIXBUF = gtkgui_helpers.get_icon_pixmap(
|
MESSAGE_CORRECTED_PIXBUF = gtkgui_helpers.get_icon_pixmap(
|
||||||
'gajim-message_corrected')
|
'gtk-spell-check', quiet=True)
|
||||||
|
if not MESSAGE_CORRECTED_PIXBUF:
|
||||||
|
MESSAGE_CORRECTED_PIXBUF = gtkgui_helpers.get_icon_pixmap(
|
||||||
|
'gajim-message_corrected')
|
||||||
|
|
||||||
# smooth scroll constants
|
# smooth scroll constants
|
||||||
MAX_SCROLL_TIME = 0.4 # seconds
|
MAX_SCROLL_TIME = 0.4 # seconds
|
||||||
|
|
|
@ -2540,9 +2540,10 @@ class GroupchatControl(ChatControlBase):
|
||||||
|
|
||||||
item = xml.get_object('send_file_menuitem')
|
item = xml.get_object('send_file_menuitem')
|
||||||
# add a special img for send file menuitem
|
# add a special img for send file menuitem
|
||||||
path_to_upload_img = gtkgui_helpers.get_icon_path('gajim-upload')
|
pixbuf = gtkgui_helpers.get_icon_pixmap('document-send', quiet=True)
|
||||||
img = gtk.Image()
|
if not pixbuf:
|
||||||
img.set_from_file(path_to_upload_img)
|
pixbuf = gtkgui_helpers.get_icon_pixmap('gajim-upload')
|
||||||
|
img = gtk.image_new_from_pixbuf(pixbuf)
|
||||||
item.set_image(img)
|
item.set_image(img)
|
||||||
|
|
||||||
if not c.resource:
|
if not c.resource:
|
||||||
|
|
|
@ -44,11 +44,12 @@ from common import gajim
|
||||||
gtk_icon_theme = gtk.icon_theme_get_default()
|
gtk_icon_theme = gtk.icon_theme_get_default()
|
||||||
gtk_icon_theme.append_search_path(gajim.ICONS_DIR)
|
gtk_icon_theme.append_search_path(gajim.ICONS_DIR)
|
||||||
|
|
||||||
def get_icon_pixmap(icon_name, size=16):
|
def get_icon_pixmap(icon_name, size=16, quiet=False):
|
||||||
try:
|
try:
|
||||||
return gtk_icon_theme.load_icon(icon_name, size, 0)
|
return gtk_icon_theme.load_icon(icon_name, size, 0)
|
||||||
except gobject.GError, e:
|
except gobject.GError, e:
|
||||||
log.error('Unable to load icon %s: %s' % (icon_name, str(e)))
|
if not quiet:
|
||||||
|
log.error('Unable to load icon %s: %s' % (icon_name, str(e)))
|
||||||
|
|
||||||
def get_icon_path(icon_name, size=16):
|
def get_icon_path(icon_name, size=16):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -2629,8 +2629,11 @@ class Interface:
|
||||||
else:
|
else:
|
||||||
return gtkgui_helpers.load_activity_icon('unknown').get_pixbuf()
|
return gtkgui_helpers.load_activity_icon('unknown').get_pixbuf()
|
||||||
elif isinstance(pep_obj, pep.UserLocationPEP):
|
elif isinstance(pep_obj, pep.UserLocationPEP):
|
||||||
path = gtkgui_helpers.get_icon_path('gajim-earth')
|
icon = gtkgui_helpers.get_icon_pixmap('applications-internet',
|
||||||
return gtk.gdk.pixbuf_new_from_file(path)
|
quiet=True)
|
||||||
|
if not icon:
|
||||||
|
icon = gtkgui_helpers.get_icon_pixmap('gajim-earth')
|
||||||
|
return icon
|
||||||
|
|
||||||
def create_ipython_window(self):
|
def create_ipython_window(self):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -205,9 +205,10 @@ control=None, gc_contact=None, is_anonymous=True):
|
||||||
items_to_hide = []
|
items_to_hide = []
|
||||||
|
|
||||||
# add a special img for send file menuitem
|
# add a special img for send file menuitem
|
||||||
path_to_upload_img = gtkgui_helpers.get_icon_path('gajim-upload')
|
pixbuf = gtkgui_helpers.get_icon_pixmap('document-send', quiet=True)
|
||||||
img = gtk.Image()
|
if not pixbuf:
|
||||||
img.set_from_file(path_to_upload_img)
|
pixbuf = gtkgui_helpers.get_icon_pixmap('gajim-upload')
|
||||||
|
img = gtk.image_new_from_pixbuf(pixbuf)
|
||||||
send_file_menuitem.set_image(img)
|
send_file_menuitem.set_image(img)
|
||||||
|
|
||||||
if not our_jid:
|
if not our_jid:
|
||||||
|
|
Loading…
Reference in New Issue