Add a show-memory-in-xbytes checkbox and its corresponding property

This commit is contained in:
Landry Breuil
2014-12-04 20:37:31 +01:00
parent a554ff2e8b
commit 589ea153cf
3 changed files with 18 additions and 0 deletions

View File

@@ -108,6 +108,7 @@ xtm_settings_dialog_init (XtmSettingsDialog *dialog)
builder_bind_toggle_button (builder, "button-monitor-paint-box", dialog->settings, "monitor-paint-box");
builder_bind_toggle_button (builder, "button-prompt-terminate-task", dialog->settings, "prompt-terminate-task");
builder_bind_toggle_button (builder, "button-show-status-icon", dialog->settings, "show-status-icon");
builder_bind_toggle_button (builder, "button-show-memory-in-xbytes", dialog->settings, "show-memory-in-xbytes");
{
guint n;

View File

@@ -186,6 +186,20 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="button-show-memory-in-xbytes">
<property name="label" translatable="yes">Show memory usage in bytes</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>

View File

@@ -36,6 +36,7 @@ enum
PROP_MORE_PRECISION,
PROP_FULL_COMMAND_LINE,
PROP_SHOW_STATUS_ICON,
PROP_SHOW_MEMORY_IN_XBYTES,
PROP_MONITOR_PAINT_BOX,
PROP_SHOW_APPLICATION_ICONS,
PROP_TOOLBAR_STYLE,
@@ -93,6 +94,8 @@ xtm_settings_class_init (XtmSettingsClass *klass)
g_param_spec_boolean ("full-command-line", "FullCommandLine", "Full command line", FALSE, G_PARAM_READWRITE));
g_object_class_install_property (class, PROP_SHOW_STATUS_ICON,
g_param_spec_boolean ("show-status-icon", "ShowStatusIcon", "Show/hide the status icon", FALSE, G_PARAM_READWRITE));
g_object_class_install_property (class, PROP_SHOW_MEMORY_IN_XBYTES,
g_param_spec_boolean ("show-memory-in-xbytes", "ShowMemoryInXBytes", "Show memory usage in bytes", FALSE, G_PARAM_READWRITE));
g_object_class_install_property (class, PROP_MONITOR_PAINT_BOX,
g_param_spec_boolean ("monitor-paint-box", "MonitorPaintBox", "Paint box around monitor", TRUE, G_PARAM_READWRITE));
g_object_class_install_property (class, PROP_SHOW_APPLICATION_ICONS,