Philipp Hörist pushed to branch master at gajim / gajim

Commits:

5 changed files:

Changes:

  • gajim/chat_control.py
    ... ... @@ -667,11 +667,11 @@ class ChatControl(ChatControlBase):
    667 667
             """
    
    668 668
             Just moved the mouse so show the cursor
    
    669 669
             """
    
    670
    -        cursor = get_cursor('LEFT_PTR')
    
    670
    +        cursor = get_cursor('default')
    
    671 671
             self.parent_win.window.get_window().set_cursor(cursor)
    
    672 672
     
    
    673 673
         def on_location_eventbox_enter_notify_event(self, widget, event):
    
    674
    -        cursor = get_cursor('HAND2')
    
    674
    +        cursor = get_cursor('pointer')
    
    675 675
             self.parent_win.window.get_window().set_cursor(cursor)
    
    676 676
     
    
    677 677
         def update_ui(self):
    

  • gajim/conversation_textview.py
    ... ... @@ -332,11 +332,11 @@ class ConversationTextview(GObject.GObject):
    332 332
                         if len(text) > 50:
    
    333 333
                             text = text[:47] + '…'
    
    334 334
                         tooltip.set_text(text)
    
    335
    -                    window.set_cursor(get_cursor('HAND2'))
    
    335
    +                    window.set_cursor(get_cursor('pointer'))
    
    336 336
                         self._cursor_changed = True
    
    337 337
                         return True
    
    338 338
                 if tag_name in ('url', 'mail', 'xmpp', 'sth_at_sth'):
    
    339
    -                window.set_cursor(get_cursor('HAND2'))
    
    339
    +                window.set_cursor(get_cursor('pointer'))
    
    340 340
                     self._cursor_changed = True
    
    341 341
                     return False
    
    342 342
                 try:
    
    ... ... @@ -346,7 +346,7 @@ class ConversationTextview(GObject.GObject):
    346 346
                 except KeyError:
    
    347 347
                     pass
    
    348 348
             if self._cursor_changed:
    
    349
    -            window.set_cursor(get_cursor('XTERM'))
    
    349
    +            window.set_cursor(get_cursor('text'))
    
    350 350
                 self._cursor_changed = False
    
    351 351
             return False
    
    352 352
     
    

  • gajim/gtk/htmltextview.py
    ... ... @@ -881,18 +881,18 @@ class HtmlTextView(Gtk.TextView):
    881 881
                         if len(text) > 50:
    
    882 882
                             text = text[:47] + '…'
    
    883 883
                         tooltip.set_text(text)
    
    884
    -                    window.set_cursor(get_cursor('HAND2'))
    
    884
    +                    window.set_cursor(get_cursor('pointer'))
    
    885 885
                         self._cursor_changed = True
    
    886 886
                         return True
    
    887 887
     
    
    888 888
                 tag_name = tag.get_property('name')
    
    889 889
                 if tag_name in ('url', 'mail', 'xmpp', 'sth_at_sth'):
    
    890
    -                window.set_cursor(get_cursor('HAND2'))
    
    890
    +                window.set_cursor(get_cursor('pointer'))
    
    891 891
                     self._cursor_changed = True
    
    892 892
                     return False
    
    893 893
     
    
    894 894
             if self._cursor_changed:
    
    895
    -            window.set_cursor(get_cursor('XTERM'))
    
    895
    +            window.set_cursor(get_cursor('text'))
    
    896 896
                 self._cursor_changed = False
    
    897 897
             return False
    
    898 898
     
    

  • gajim/gtk/util.py
    ... ... @@ -356,10 +356,12 @@ def get_completion_liststore(entry: Gtk.Entry) -> Gtk.ListStore:
    356 356
         return liststore
    
    357 357
     
    
    358 358
     
    
    359
    -def get_cursor(attr: str) -> Gdk.Cursor:
    
    359
    +def get_cursor(name: str) -> Gdk.Cursor:
    
    360 360
         display = Gdk.Display.get_default()
    
    361
    -    cursor = getattr(Gdk.CursorType, attr)
    
    362
    -    return Gdk.Cursor.new_for_display(display, cursor)
    
    361
    +    cursor = Gdk.Cursor.new_from_name(display, name)
    
    362
    +    if cursor is not None:
    
    363
    +        return cursor
    
    364
    +    return Gdk.Cursor.new_from_name(display, 'default')
    
    363 365
     
    
    364 366
     
    
    365 367
     def scroll_to_end(widget: Gtk.ScrolledWindow) -> bool:
    

  • gajim/privatechat_control.py
    ... ... @@ -24,8 +24,6 @@
    24 24
     # You should have received a copy of the GNU General Public License
    
    25 25
     # along with Gajim. If not, see <http://www.gnu.org/licenses/>.
    
    26 26
     
    
    27
    -from gi.repository import Gtk
    
    28
    -
    
    29 27
     from gajim import message_control
    
    30 28
     
    
    31 29
     from gajim.common import app