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

Commits:

3 changed files:

Changes:

  • gajim/data/gui/chat_list_row.ui
    ... ... @@ -95,13 +95,11 @@
    95 95
                       </packing>
    
    96 96
                     </child>
    
    97 97
                     <child>
    
    98
    -                  <object class="GtkLabel" id="timestamp_label">
    
    99
    -                    <property name="visible">True</property>
    
    98
    +                  <object class="GtkLabel" id="unread_label">
    
    100 99
                         <property name="can-focus">False</property>
    
    101
    -                    <property name="valign">end</property>
    
    100
    +                    <property name="no-show-all">True</property>
    
    102 101
                         <style>
    
    103
    -                      <class name="small-label"/>
    
    104
    -                      <class name="dim-label"/>
    
    102
    +                      <class name="unread-counter"/>
    
    105 103
                         </style>
    
    106 104
                       </object>
    
    107 105
                       <packing>
    
    ... ... @@ -112,11 +110,13 @@
    112 110
                       </packing>
    
    113 111
                     </child>
    
    114 112
                     <child>
    
    115
    -                  <object class="GtkLabel" id="unread_label">
    
    113
    +                  <object class="GtkLabel" id="timestamp_label">
    
    114
    +                    <property name="visible">True</property>
    
    116 115
                         <property name="can-focus">False</property>
    
    117
    -                    <property name="no-show-all">True</property>
    
    116
    +                    <property name="valign">end</property>
    
    118 117
                         <style>
    
    119
    -                      <class name="unread-counter"/>
    
    118
    +                      <class name="small-label"/>
    
    119
    +                      <class name="dim-label"/>
    
    120 120
                         </style>
    
    121 121
                       </object>
    
    122 122
                       <packing>
    
    ... ... @@ -204,8 +204,8 @@
    204 204
                 <property name="visible">True</property>
    
    205 205
                 <property name="can-focus">True</property>
    
    206 206
                 <property name="receives-default">True</property>
    
    207
    -            <property name="tooltip-text" translatable="yes">Close</property>
    
    208 207
                 <property name="valign">center</property>
    
    208
    +            <property name="margin-end">3</property>
    
    209 209
                 <child>
    
    210 210
                   <object class="GtkImage">
    
    211 211
                     <property name="visible">True</property>
    
    ... ... @@ -213,10 +213,6 @@
    213 213
                     <property name="icon-name">window-close-symbolic</property>
    
    214 214
                   </object>
    
    215 215
                 </child>
    
    216
    -            <style>
    
    217
    -              <class name="revealer-close-button"/>
    
    218
    -              <class name="flat"/>
    
    219
    -            </style>
    
    220 216
               </object>
    
    221 217
             </child>
    
    222 218
           </object>
    

  • gajim/data/style/gajim.css
    ... ... @@ -152,10 +152,11 @@
    152 152
     .chatlist-row:selected label:not(.unread-counter){
    
    153 153
         color: @theme_text_color;
    
    154 154
     }
    
    155
    +.chatlist-row button {
    
    156
    +    padding: 3px;
    
    157
    +}
    
    155 158
     .chatlist-row:selected button {
    
    156 159
     	color: @theme_fg_color;
    
    157
    -}
    
    158
    -.chatlist-row:selected button:hover {
    
    159 160
         border-color: @insensitive_fg_color;
    
    160 161
     }
    
    161 162
     .chatlist-row:selected image {
    
    ... ... @@ -164,10 +165,7 @@
    164 165
     .chatlist-row overlay > box {
    
    165 166
     	padding: 6px;
    
    166 167
     }
    
    167
    -.revealer-close-button {
    
    168
    -    padding: 0px;
    
    169
    -    margin-right: 6px;
    
    170
    -}
    
    168
    +
    
    171 169
     .unread-counter {
    
    172 170
         background-color: rgb(22, 100, 169);
    
    173 171
         color: rgb(242, 242, 242);
    

  • gajim/gtk/chat_list.py
    ... ... @@ -162,6 +162,7 @@ def _on_message_received(self, event):
    162 162
             row = self._chats.get((event.account, event.jid))
    
    163 163
             nick = self._get_nick_for_received_message(event)
    
    164 164
             row.set_last_message_text(nick, event.msgtxt)
    
    165
    +        row.set_timestamp(event.properties.timestamp)
    
    165 166
     
    
    166 167
             self._add_unread(row, event.properties)
    
    167 168
     
    
    ... ... @@ -179,6 +180,7 @@ def _on_message_sent(self, event):
    179 180
             else:
    
    180 181
                 nick = _('Me: ')
    
    181 182
             row.set_last_message_text(nick, msgtext)
    
    183
    +        row.set_timestamp(event.timestamp)
    
    182 184
     
    
    183 185
         @staticmethod
    
    184 186
         def _get_nick_for_received_message(event):
    
    ... ... @@ -358,6 +360,10 @@ def _on_state_flags_changed(self, _listboxrow, *args):
    358 360
         def _on_close_button_clicked(self, _button):
    
    359 361
             app.window.remove_chat(self.workspace_id, self.account, self.jid)
    
    360 362
     
    
    363
    +    def set_timestamp(self, timestamp):
    
    364
    +        self._timestamp = timestamp
    
    365
    +        self.update_time()
    
    366
    +
    
    361 367
         def update_time(self):
    
    362 368
             if self._timestamp is not None:
    
    363 369
                 self._ui.timestamp_label.set_text(