Daniel Brötzmann pushed to branch master at gajim / gajim

Commits:

6 changed files:

Changes:

  • gajim/data/gui/chat_list_row.ui
    ... ... @@ -92,12 +92,10 @@
    92 92
                           </packing>
    
    93 93
                         </child>
    
    94 94
                         <child>
    
    95
    -                      <object class="GtkSpinner" id="spinner">
    
    95
    +                      <object class="GtkImage" id="connection_icon">
    
    96 96
                             <property name="can-focus">False</property>
    
    97 97
                             <property name="no-show-all">True</property>
    
    98
    -                        <property name="tooltip-text" translatable="yes">Joining Group Chat…</property>
    
    99
    -                        <property name="opacity">0.60</property>
    
    100
    -                        <property name="active">True</property>
    
    98
    +                        <property name="icon_size">1</property>
    
    101 99
                           </object>
    
    102 100
                           <packing>
    
    103 101
                             <property name="expand">False</property>
    

  • gajim/data/icons/hicolor/scalable/devices/feather-refresh-cw-symbolic.svg
    1
    +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    
    2
    +<svg
    
    3
    +   width="24"
    
    4
    +   height="24"
    
    5
    +   viewBox="0 0 24 24"
    
    6
    +   fill="none"
    
    7
    +   stroke="currentColor"
    
    8
    +   stroke-width="2"
    
    9
    +   stroke-linecap="round"
    
    10
    +   stroke-linejoin="round"
    
    11
    +   class="feather feather-refresh-cw"
    
    12
    +   version="1.1"
    
    13
    +   id="svg8"
    
    14
    +   sodipodi:docname="feather-refresh-cw-symbolic-a.svg"
    
    15
    +   inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
    
    16
    +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    
    17
    +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    
    18
    +   xmlns="http://www.w3.org/2000/svg"
    
    19
    +   xmlns:svg="http://www.w3.org/2000/svg">
    
    20
    +  <defs
    
    21
    +     id="defs12" />
    
    22
    +  <sodipodi:namedview
    
    23
    +     id="namedview10"
    
    24
    +     pagecolor="#ffffff"
    
    25
    +     bordercolor="#666666"
    
    26
    +     borderopacity="1.0"
    
    27
    +     inkscape:showpageshadow="2"
    
    28
    +     inkscape:pageopacity="0.0"
    
    29
    +     inkscape:pagecheckerboard="0"
    
    30
    +     inkscape:deskcolor="#d1d1d1"
    
    31
    +     showgrid="false"
    
    32
    +     inkscape:zoom="33.791667"
    
    33
    +     inkscape:cx="11.644883"
    
    34
    +     inkscape:cy="12.014797"
    
    35
    +     inkscape:window-width="1920"
    
    36
    +     inkscape:window-height="998"
    
    37
    +     inkscape:window-x="0"
    
    38
    +     inkscape:window-y="0"
    
    39
    +     inkscape:window-maximized="1"
    
    40
    +     inkscape:current-layer="svg8" />
    
    41
    +  <path
    
    42
    +     style="color:#000000;fill:#000000;stroke-width:0;stroke-dasharray:none"
    
    43
    +     d="m 23,3 a 1,1 0 0 0 -1,1 v 5 h -5 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 6 a 1.0001,1.0001 0 0 0 1,-1 V 4 A 1,1 0 0 0 23,3 Z"
    
    44
    +     id="polyline2" />
    
    45
    +  <path
    
    46
    +     style="color:#000000;fill:#000000;stroke-width:0;stroke-dasharray:none"
    
    47
    +     d="m 1,13 a 1.0001,1.0001 0 0 0 -1,1 v 6 a 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 V 15 H 7 A 1,1 0 0 0 8,14 1,1 0 0 0 7,13 Z"
    
    48
    +     id="polyline4" />
    
    49
    +  <path
    
    50
    +     style="color:#000000;fill:#000000;stroke-width:0;stroke-dasharray:none"
    
    51
    +     d="M 12.216797,2.0234375 C 8.1357426,1.9556272 4.0915312,4.3561355 2.5664063,8.6660156 A 1,1 0 0 0 3.1757813,9.9433594 1,1 0 0 0 4.453125,9.3339844 C 6.4293215,3.7494125 13.464552,2.1577647 17.652344,6.3476562 a 1.0001,1.0001 0 0 0 0.02344,0.021484 l 4.638672,4.3593754 a 1,1 0 0 0 1.414063,-0.04297 1,1 0 0 0 -0.04297,-1.4140626 L 19.066406,4.9335937 C 17.127255,2.9934704 14.665429,2.0641237 12.216797,2.0234375 Z M 0.96875,13 a 1,1 0 0 0 -0.69726562,0.314453 1,1 0 0 0 0.0429687,1.414063 l 4.61914057,4.33789 c 5.1710703,5.173663 14.0598003,3.163387 16.5000003,-3.732422 a 1,1 0 0 0 -0.609375,-1.277343 1,1 0 0 0 -1.277344,0.609375 c -1.976196,5.584571 -9.011427,7.176219 -13.1992188,2.986328 a 1.0001,1.0001 0 0 0 -0.023437,-0.02148 L 1.6855469,13.271484 A 1,1 0 0 0 0.96875,13 Z"
    
    52
    +     id="path6" />
    
    53
    +</svg>

  • gajim/data/icons/hicolor/scalable/devices/feather-zap-symbolic.svg
    1
    +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    
    2
    +<svg
    
    3
    +   width="24"
    
    4
    +   height="24"
    
    5
    +   viewBox="0 0 24 24"
    
    6
    +   fill="none"
    
    7
    +   stroke="currentColor"
    
    8
    +   stroke-width="2"
    
    9
    +   stroke-linecap="round"
    
    10
    +   stroke-linejoin="round"
    
    11
    +   class="feather feather-zap"
    
    12
    +   version="1.1"
    
    13
    +   id="svg4"
    
    14
    +   sodipodi:docname="feather-zap-symbolic.svg"
    
    15
    +   inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
    
    16
    +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    
    17
    +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    
    18
    +   xmlns="http://www.w3.org/2000/svg"
    
    19
    +   xmlns:svg="http://www.w3.org/2000/svg">
    
    20
    +  <defs
    
    21
    +     id="defs8" />
    
    22
    +  <sodipodi:namedview
    
    23
    +     id="namedview6"
    
    24
    +     pagecolor="#ffffff"
    
    25
    +     bordercolor="#666666"
    
    26
    +     borderopacity="1.0"
    
    27
    +     inkscape:showpageshadow="2"
    
    28
    +     inkscape:pageopacity="0.0"
    
    29
    +     inkscape:pagecheckerboard="0"
    
    30
    +     inkscape:deskcolor="#d1d1d1"
    
    31
    +     showgrid="false"
    
    32
    +     inkscape:zoom="33.791667"
    
    33
    +     inkscape:cx="12.014797"
    
    34
    +     inkscape:cy="12.014797"
    
    35
    +     inkscape:window-width="1920"
    
    36
    +     inkscape:window-height="998"
    
    37
    +     inkscape:window-x="0"
    
    38
    +     inkscape:window-y="0"
    
    39
    +     inkscape:window-maximized="1"
    
    40
    +     inkscape:current-layer="svg4" />
    
    41
    +  <path
    
    42
    +     style="color:#000000;fill:#000000;stroke-width:0;stroke-dasharray:none"
    
    43
    +     d="m 12.980469,1 a 1.0001,1.0001 0 0 0 -0.748047,0.359375 l -10.0000001,12 A 1.0001,1.0001 0 0 0 3,15 h 7.867188 l -0.859375,6.875 a 1.0001,1.0001 0 0 0 1.759765,0.765625 l 10,-12 A 1.0001,1.0001 0 0 0 21,9 H 13.132813 L 13.992188,2.125 A 1.0001,1.0001 0 0 0 12.980469,1 Z M 11.583984,5.2597656 11.007813,9.875 A 1.0001,1.0001 0 0 0 12,11 h 6.865234 L 12.416016,18.740234 12.992188,14.125 A 1.0001,1.0001 0 0 0 12,13 H 5.1347656 Z"
    
    44
    +     id="polygon2" />
    
    45
    +</svg>

  • gajim/data/style/gajim.css
    ... ... @@ -130,6 +130,15 @@ .pulse-transform {
    130 130
         animation-timing-function: ease-in-out;
    
    131 131
         animation-iteration-count: infinite;
    
    132 132
     }
    
    133
    +@keyframes spin {
    
    134
    +    to { -gtk-icon-transform: rotate(1turn); }
    
    135
    +}
    
    136
    +.spin {
    
    137
    +    animation-name: spin;
    
    138
    +    animation-duration: 1s;
    
    139
    +    animation-timing-function: linear;
    
    140
    +    animation-iteration-count: infinite;
    
    141
    +}
    
    133 142
     
    
    134 143
     /* General purpose classes ================================================= */
    
    135 144
     .dialog-margin > box { margin: 18px;}
    

  • gajim/gtk/builder.pyi
    ... ... @@ -218,7 +218,7 @@ class ChatListRowBuilder(Builder):
    218 218
         avatar_image: Gtk.Image
    
    219 219
         group_chat_indicator: Gtk.Image
    
    220 220
         name_label: Gtk.Label
    
    221
    -    spinner: Gtk.Spinner
    
    221
    +    connection_icon: Gtk.Image
    
    222 222
         chatstate_image: Gtk.Image
    
    223 223
         mute_image: Gtk.Image
    
    224 224
         timestamp_label: Gtk.Label
    

  • gajim/gtk/chat_list_row.py
    ... ... @@ -546,8 +546,26 @@ def _on_muc_state_changed(self, *args: Any) -> None:
    546 546
             self._update_joined_state()
    
    547 547
     
    
    548 548
         def _update_joined_state(self) -> None:
    
    549
    -        self._ui.spinner.set_visible(
    
    550
    -            self.contact.is_joining and self._client.state.is_available)
    
    549
    +        self._ui.connection_icon.get_style_context().remove_class('spin')
    
    550
    +        self._ui.connection_icon.get_style_context().remove_class(
    
    551
    +            'warning-color')
    
    552
    +
    
    553
    +        if self.contact.is_joining:
    
    554
    +            self._ui.connection_icon.set_from_icon_name(
    
    555
    +                'feather-refresh-cw-symbolic', Gtk.IconSize.MENU)
    
    556
    +            self._ui.connection_icon.get_style_context().add_class('spin')
    
    557
    +            self._ui.connection_icon.set_tooltip_text(_('Joining Group Chat…'))
    
    558
    +            self._ui.connection_icon.show()
    
    559
    +        elif (self.contact.is_not_joined or
    
    560
    +                not self._client.state.is_available):
    
    561
    +            self._ui.connection_icon.set_from_icon_name(
    
    562
    +                'feather-zap-symbolic', Gtk.IconSize.MENU)
    
    563
    +            self._ui.connection_icon.get_style_context().add_class(
    
    564
    +                'warning-color')
    
    565
    +            self._ui.connection_icon.set_tooltip_text(_('Not connected'))
    
    566
    +            self._ui.connection_icon.show()
    
    567
    +        else:
    
    568
    +            self._ui.connection_icon.hide()
    
    551 569
     
    
    552 570
         def _on_muc_user_update(self,
    
    553 571
                                 _contact: GroupchatParticipant,