Commit 4514eebd authored by Sébastien Blin's avatar Sébastien Blin

currentcallview: fix smartinfo display

smartinfo should be correctly shown or hidden according to the state of
"display-smartinfo".

Change-Id: Ib1b7877a689c14f49ce3108b962a834f8b638cbc
Reviewed-by: Philippe Gorley's avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent fd356d0c
......@@ -566,6 +566,14 @@ insert_controls(CurrentCallView *view)
/* Auto-quality is off by default */
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->checkbutton_autoquality), FALSE);
}
// Get if the user wants to show the smartInfo box
auto display_smartinfo = g_action_map_lookup_action(G_ACTION_MAP(g_application_get_default()), "display-smartinfo");
if (g_variant_get_boolean(g_action_get_state(G_ACTION(display_smartinfo)))) {
gtk_widget_show(priv->vbox_call_smartInfo);
} else {
gtk_widget_hide(priv->vbox_call_smartInfo);
}
}
static void
......
......@@ -75,51 +75,49 @@
</packing>
</child>
<child>
<!-- horizontal box which contains smartInfo -->
<object class="GtkBox" id="hbox_call_smartInfo">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="spacing">10</property>
<property name="border-width">10</property>
<child>
<object class="GtkLabel" id="label_smartinfo_description">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selectable">True</property>
<property name="ellipsize">end</property>
<property name="halign">start</property>
<attributes>
<attribute name="scale" value="1"/>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_smartinfo_value">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selectable">True</property>
<property name="ellipsize">end</property>
<property name="halign">start</property>
<attributes>
<attribute name="scale" value="1"/>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</object>
</child>
<!-- end of horizontal box which contains smartInfo -->
<!-- horizontal box which contains smartInfo -->
<object class="GtkBox" id="hbox_call_smartInfo">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="spacing">10</property>
<property name="border-width">10</property>
<child>
<object class="GtkLabel" id="label_smartinfo_description">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selectable">True</property>
<property name="ellipsize">end</property>
<property name="halign">start</property>
<attributes>
<attribute name="scale" value="1"/>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_smartinfo_value">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selectable">True</property>
<property name="ellipsize">end</property>
<property name="halign">start</property>
<attributes>
<attribute name="scale" value="1"/>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</object>
<!-- end of horizontal box which contains smartInfo -->
</child>
</object>
<!-- end of the vertical box which contains smartInfo -->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment