Add Insert Image button, action and hander to composer. Bug 712995.

* src/client/composer/composer-widget.vala (ComposerWidget): Add action
  and callback that simply does a normal attachment for now.

* ui/composer-widget.ui: Add insert image button to the composer toobar.
This commit is contained in:
Michael James Gratton 2016-09-28 22:47:40 +10:00
parent 65fed2c04a
commit 8191ed4298
2 changed files with 38 additions and 3 deletions

View file

@ -468,7 +468,7 @@
</object>
</child>
<child>
<object class="GtkBox" id="link_buttons">
<object class="GtkBox" id="insert_buttons">
<property name="visible">True</property>
<property name="can_focus">False</property>
<style>
@ -488,6 +488,33 @@
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="insert_image_button">
<property name="visible" bind-source="insert_image_button" bind-property="sensitive" />
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Image (Ctrl+G)</property>
<property name="action_name">cmp.insert-image</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage">
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">insert-image-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>