Skip to content

Commit

Permalink
Add version info in prefs dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelRochet committed Sep 10, 2016
1 parent fc09a0d commit f29de85
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
3 changes: 3 additions & 0 deletions prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ function buildPrefsWidget(){
buildable.add_from_file( Me.dir.get_path() + '/prefs.xml' );
let box = buildable.get_object('scrolled_window_built');

let version_label = buildable.get_object('version_info');
version_label.set_text('[Arch-update v' + Me.metadata.version.toString() + ']');

// Bind fields to settings
settings.bind('boot-wait' , buildable.get_object('field_wait') , 'value' , Gio.SettingsBindFlags.DEFAULT);
settings.bind('check-interval' , buildable.get_object('field_interval') , 'value' , Gio.SettingsBindFlags.DEFAULT);
Expand Down
22 changes: 17 additions & 5 deletions prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,23 @@
<property name="orientation">vertical</property>

<child>
<object class="GtkLabel">
<property name="label" translatable="yes">&lt;b&gt;Checking for updates&lt;/b&gt;</property>
<property name="use_markup">true</property>
<property name="hexpand">true</property>
<property name="halign">1</property>
<object class="GtkBox">
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">&lt;b&gt;Checking for updates&lt;/b&gt;</property>
<property name="use_markup">true</property>
<property name="hexpand">true</property>
<property name="halign">1</property>
</object>
</child>
<child>
<object class="GtkLabel" id="version_info">
<property name="label" translatable="yes">Version info placeholder</property>
<property name="hexpand">false</property>
<property name="halign">1</property>
</object>
</child>
</object>
</child>

Expand Down

0 comments on commit f29de85

Please sign in to comment.