Skip to content

Commit

Permalink
Messaging UI: add (initial) placeholder for conversation list
Browse files Browse the repository at this point in the history
Most devices will sync conversations very quickly and will only see this
for a brief period, however devices that don't support SMS history will
see the 'action-unavailable' icon with a link pointing pointing to #320

In future this should have two lines of text, eg. "No conversations" as
well as the "Help" link. We're too close to release to add new
translatable strings and a proper section should be added to the wiki
help page also.
  • Loading branch information
andyholmes committed Nov 24, 2018
1 parent 84b01e0 commit 57e834d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
40 changes: 40 additions & 0 deletions data/messaging.ui
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">12</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
Expand Down Expand Up @@ -217,5 +218,44 @@
</object>
</child>
</template>
<object class="GtkGrid" id="conversation-list-placeholder">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">end</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="pixel_size">96</property>
<property name="icon_name">action-unavailable-symbolic</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLinkButton">
<property name="label" translatable="yes">Help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="valign">start</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="relief">none</property>
<property name="uri">https://github.com/andyholmes/gnome-shell-extension-gsconnect/issues/320</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
</interface>

5 changes: 4 additions & 1 deletion src/service/ui/messaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ var Window = GObject.registerClass({
Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/messaging.ui',
Children: [
'headerbar', 'infobar',
'conversation-list', 'conversation-stack'
'conversation-list', 'conversation-list-placeholder', 'conversation-stack'
]
}, class Window extends Gtk.ApplicationWindow {

Expand Down Expand Up @@ -738,6 +738,9 @@ var Window = GObject.registerClass({
this._populateConversations.bind(this)
);

// Conversations Placeholder
this.conversation_list.set_placeholder(this.conversation_list_placeholder);

// Cleanup on ::destroy
this.connect('destroy', this._onDestroy);

Expand Down

0 comments on commit 57e834d

Please sign in to comment.