parent
2c25091639
commit
c05d522a1d
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
<icon_name>${PROJECT_NAME}-gui</icon_name>
|
||||
<action id="org.${PROJECT_NAME}.access-device">
|
||||
<description>Device access</description>
|
||||
<message>Authentication is required to access the USB device</message>
|
||||
<defaults>
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>auth_admin_keep</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">${CMAKE_INSTALL_FULL_BINDIR}/${PROJECT_NAME}</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
@ -0,0 +1,4 @@
|
||||
file (READ ${input} contents)
|
||||
string (REPLACE "\n" "\\n\"\n\"" contents "${contents}")
|
||||
file (WRITE ${output}
|
||||
"const char ${var_name}[] = \n\"${contents}\";\n")
|
@ -0,0 +1,379 @@
|
||||
/*
|
||||
* sensei-raw-ctl-gui.c: SteelSeries Sensei Raw control utility - GTK+ GUI
|
||||
*
|
||||
* Very tightly coupled with the sensei-raw-ctl utility.
|
||||
*
|
||||
* Copyright (c) 2013, Přemysl Janouch <p.janouch@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/** User interface string for GtkBuilder. */
|
||||
extern const char ui[];
|
||||
|
||||
/* To translate combo box entries into sensei-raw-ctl arguments. */
|
||||
static gchar *pulsation_list[] = { "steady", "slow", "medium", "fast", NULL };
|
||||
static gchar *intensity_list[] = { "off", "low", "medium", "high", NULL };
|
||||
|
||||
/* GtkNotebook pages within the UI. */
|
||||
enum
|
||||
{
|
||||
PAGE_PROBING,
|
||||
PAGE_NO_DEVICE,
|
||||
PAGE_SETTINGS,
|
||||
PAGE_COUNT
|
||||
};
|
||||
|
||||
/* sensei-raw-ctl output values. */
|
||||
enum
|
||||
{
|
||||
OUT_INTENSITY,
|
||||
OUT_PULSATION,
|
||||
OUT_CPI_LED_OFF,
|
||||
OUT_CPI_LED_ON,
|
||||
OUT_POLLING,
|
||||
OUT_COUNT
|
||||
};
|
||||
|
||||
// ----- User interface -------------------------------------------------------
|
||||
|
||||
static void
|
||||
fatal (GtkWidget *parent, const gchar *message)
|
||||
{
|
||||
GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Fatal error"));
|
||||
gtk_message_dialog_format_secondary_text
|
||||
(GTK_MESSAGE_DIALOG (dialog), "%s", message);
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
static void
|
||||
set_page (GtkBuilder *builder, gint page)
|
||||
{
|
||||
GtkNotebook *notebook = GTK_NOTEBOOK
|
||||
(gtk_builder_get_object (builder, "notebook"));
|
||||
gtk_notebook_set_current_page (notebook, page);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
spawn_ctl (gchar **argv, gchar **out, GtkBuilder *builder)
|
||||
{
|
||||
GError *error = NULL;
|
||||
gint status;
|
||||
gchar *err;
|
||||
|
||||
GtkWidget *win = GTK_WIDGET (gtk_builder_get_object (builder, "win"));
|
||||
if (!g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL,
|
||||
out, &err, &status, &error))
|
||||
{
|
||||
fatal (win, error->message);
|
||||
g_error_free (error);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
|
||||
return TRUE;
|
||||
|
||||
if (strstr (err, "no suitable device"))
|
||||
set_page (builder, PAGE_NO_DEVICE);
|
||||
else
|
||||
fatal (win, err);
|
||||
|
||||
g_clear_pointer (out, g_free);
|
||||
g_free (err);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
set_combo (GtkComboBox *combo, gchar *list[], const gchar *word)
|
||||
{
|
||||
gint i;
|
||||
for (i = 0; list[i]; i++)
|
||||
if (!strcmp (word, list[i]))
|
||||
{
|
||||
gtk_combo_box_set_active (combo, i);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
set_scale (GtkRange *scale, const gchar *word, const gchar *follows)
|
||||
{
|
||||
gchar *end;
|
||||
gint64 value = g_ascii_strtoll (word, &end, 10);
|
||||
if (strcmp (end, follows))
|
||||
return FALSE;
|
||||
|
||||
gtk_range_set_value (scale, value);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
load_configuration (GtkBuilder *builder)
|
||||
{
|
||||
gchar *argv[] = { "pkexec",
|
||||
PROJECT_INSTALL_BINDIR "/" PROJECT_NAME, "--show", NULL };
|
||||
|
||||
gchar *out;
|
||||
if (!spawn_ctl (argv, &out, builder))
|
||||
return;
|
||||
|
||||
GRegex *regex = g_regex_new ("(?<=: ).*$", G_REGEX_MULTILINE, 0, NULL);
|
||||
GMatchInfo *info;
|
||||
g_regex_match (regex, out, 0, &info);
|
||||
|
||||
gint line = 0;
|
||||
gchar *word = NULL;
|
||||
|
||||
while (g_match_info_matches (info))
|
||||
{
|
||||
g_free (word);
|
||||
word = g_match_info_fetch (info, 0);
|
||||
switch (line++)
|
||||
{
|
||||
case OUT_INTENSITY:
|
||||
if (!set_combo (GTK_COMBO_BOX (gtk_builder_get_object
|
||||
(builder, "intensity_combo")), intensity_list, word))
|
||||
goto out;
|
||||
break;
|
||||
case OUT_PULSATION:
|
||||
if (!set_combo (GTK_COMBO_BOX (gtk_builder_get_object
|
||||
(builder, "pulsation_combo")), pulsation_list, word))
|
||||
goto out;
|
||||
break;
|
||||
case OUT_CPI_LED_OFF:
|
||||
if (!set_scale (GTK_RANGE (gtk_builder_get_object
|
||||
(builder, "cpi_off_scale")), word, ""))
|
||||
goto out;
|
||||
break;
|
||||
case OUT_CPI_LED_ON:
|
||||
if (!set_scale (GTK_RANGE (gtk_builder_get_object
|
||||
(builder, "cpi_on_scale")), word, ""))
|
||||
goto out;
|
||||
break;
|
||||
case OUT_POLLING:
|
||||
if (!set_scale (GTK_RANGE (gtk_builder_get_object
|
||||
(builder, "polling_scale")), word, "Hz"))
|
||||
goto out;
|
||||
}
|
||||
g_match_info_next (info, NULL);
|
||||
}
|
||||
|
||||
set_page (builder, PAGE_SETTINGS);
|
||||
|
||||
out:
|
||||
g_free (word);
|
||||
g_match_info_free (info);
|
||||
g_regex_unref (regex);
|
||||
g_free (out);
|
||||
|
||||
if (line != OUT_COUNT)
|
||||
fatal (GTK_WIDGET (gtk_builder_get_object (builder, "win")),
|
||||
_("Internal error"));
|
||||
}
|
||||
|
||||
static void
|
||||
retry_load (GtkBuilder *builder)
|
||||
{
|
||||
set_page (builder, PAGE_PROBING);
|
||||
load_configuration (builder);
|
||||
}
|
||||
|
||||
static void
|
||||
save_configuration (GtkBuilder *builder)
|
||||
{
|
||||
gchar *polling = g_strdup_printf ("%.0f", gtk_range_get_value
|
||||
(GTK_RANGE (gtk_builder_get_object (builder, "polling_scale"))));
|
||||
gchar *cpi_on = g_strdup_printf ("%.0f", gtk_range_get_value
|
||||
(GTK_RANGE (gtk_builder_get_object (builder, "cpi_on_scale"))));
|
||||
gchar *cpi_off = g_strdup_printf ("%.0f", gtk_range_get_value
|
||||
(GTK_RANGE (gtk_builder_get_object (builder, "cpi_off_scale"))));
|
||||
|
||||
GtkComboBox *combo;
|
||||
gint active;
|
||||
|
||||
combo = GTK_COMBO_BOX (gtk_builder_get_object (builder, "pulsation_combo"));
|
||||
active = gtk_combo_box_get_active (combo);
|
||||
g_assert (active >= 0 && active < G_N_ELEMENTS (pulsation_list) - 1);
|
||||
gchar *pulsation = pulsation_list[active];
|
||||
|
||||
combo = GTK_COMBO_BOX (gtk_builder_get_object (builder, "intensity_combo"));
|
||||
active = gtk_combo_box_get_active (combo);
|
||||
g_assert (active >= 0 && active < G_N_ELEMENTS (intensity_list) - 1);
|
||||
gchar *intensity = intensity_list[active];
|
||||
|
||||
gchar *argv[] = { "pkexec", PROJECT_INSTALL_BINDIR "/" PROJECT_NAME,
|
||||
"--polling", polling, "--cpi-on", cpi_on, "--cpi-off", cpi_off,
|
||||
"--pulsation", pulsation, "--intensity", intensity, "--save", NULL };
|
||||
|
||||
gchar *out;
|
||||
if (spawn_ctl (argv, &out, builder))
|
||||
g_free (out);
|
||||
|
||||
g_free (polling);
|
||||
g_free (cpi_on);
|
||||
g_free (cpi_off);
|
||||
}
|
||||
|
||||
static void
|
||||
on_set_mode_normal (GtkBuilder *builder)
|
||||
{
|
||||
gchar *out, *argv[] = { "pkexec",
|
||||
PROJECT_INSTALL_BINDIR "/" PROJECT_NAME, "--mode", "normal", NULL };
|
||||
if (spawn_ctl (argv, &out, builder))
|
||||
g_free (out);
|
||||
}
|
||||
|
||||
static void
|
||||
on_set_mode_legacy (GtkBuilder *builder)
|
||||
{
|
||||
gchar *out, *argv[] = { "pkexec",
|
||||
PROJECT_INSTALL_BINDIR "/" PROJECT_NAME, "--mode", "compat", NULL };
|
||||
if (spawn_ctl (argv, &out, builder))
|
||||
g_free (out);
|
||||
}
|
||||
|
||||
// ----- User interface -------------------------------------------------------
|
||||
|
||||
static gboolean
|
||||
on_change_value (GtkRange *range, GtkScrollType scroll, gdouble value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkAdjustment *adjustment = gtk_range_get_adjustment (range);
|
||||
static const gint steps[] = { 125, 250, 500, 1000 };
|
||||
|
||||
switch (scroll)
|
||||
{
|
||||
gint i;
|
||||
case GTK_SCROLL_NONE:
|
||||
case GTK_SCROLL_JUMP:
|
||||
for (i = 0; i < G_N_ELEMENTS (steps); i++)
|
||||
if (i == G_N_ELEMENTS (steps) - 1 ||
|
||||
value < (steps[i] + steps[i + 1]) / 2)
|
||||
{
|
||||
value = steps[i];
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GTK_SCROLL_STEP_BACKWARD:
|
||||
case GTK_SCROLL_PAGE_BACKWARD:
|
||||
value = gtk_adjustment_get_value (adjustment);
|
||||
for (i = 0; i < G_N_ELEMENTS (steps) - 1; i++)
|
||||
if (steps[i + 1] >= value)
|
||||
{
|
||||
value = steps[i];
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GTK_SCROLL_STEP_FORWARD:
|
||||
case GTK_SCROLL_PAGE_FORWARD:
|
||||
value = gtk_adjustment_get_value (adjustment);
|
||||
for (i = 0; i < G_N_ELEMENTS (steps); i++)
|
||||
if (steps[i] > value)
|
||||
{
|
||||
value = steps[i];
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GTK_SCROLL_START:
|
||||
value = steps[0];
|
||||
break;
|
||||
case GTK_SCROLL_END:
|
||||
value = steps[G_N_ELEMENTS (steps) - 1];
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
gtk_adjustment_set_value (adjustment, value);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
on_change_value_steps (GtkRange *range, GtkScrollType scroll, gdouble value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkAdjustment *adjustment = gtk_range_get_adjustment (range);
|
||||
gdouble lower = gtk_adjustment_get_lower (adjustment);
|
||||
gdouble step = gtk_adjustment_get_step_increment (adjustment);
|
||||
value = lower + (int) ((value - lower) / step + 0.5) * step;
|
||||
gtk_adjustment_set_value (adjustment, value);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
on_format_value (GtkScale *scale, gdouble value)
|
||||
{
|
||||
return g_strdup_printf (_("%gHz"), value);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_window_set_default_icon_name (PROJECT_NAME "-gui");
|
||||
|
||||
GError *error = NULL;
|
||||
GtkBuilder *builder = gtk_builder_new ();
|
||||
if (!gtk_builder_add_from_string (builder, ui, -1, &error))
|
||||
{
|
||||
g_printerr ("%s: %s\n", _("Error"), error->message);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
GtkWidget *win = GTK_WIDGET (gtk_builder_get_object (builder, "win"));
|
||||
g_signal_connect (win, "destroy", G_CALLBACK (gtk_main_quit), NULL);
|
||||
g_signal_connect_swapped (win, "map-event",
|
||||
G_CALLBACK (load_configuration), builder);
|
||||
gtk_widget_show_all (win);
|
||||
|
||||
g_signal_connect (gtk_builder_get_object (builder, "polling_scale"),
|
||||
"change-value", G_CALLBACK (on_change_value), NULL);
|
||||
g_signal_connect (gtk_builder_get_object (builder, "polling_scale"),
|
||||
"format-value", G_CALLBACK (on_format_value), NULL);
|
||||
|
||||
g_signal_connect (gtk_builder_get_object (builder, "cpi_off_scale"),
|
||||
"change-value", G_CALLBACK (on_change_value_steps), NULL);
|
||||
g_signal_connect (gtk_builder_get_object (builder, "cpi_on_scale"),
|
||||
"change-value", G_CALLBACK (on_change_value_steps), NULL);
|
||||
|
||||
g_signal_connect_swapped (gtk_builder_get_object (builder, "retry_button"),
|
||||
"clicked", G_CALLBACK (retry_load), builder);
|
||||
|
||||
g_signal_connect_swapped (gtk_builder_get_object (builder, "normal_button"),
|
||||
"clicked", G_CALLBACK (on_set_mode_normal), builder);
|
||||
g_signal_connect_swapped (gtk_builder_get_object (builder, "legacy_button"),
|
||||
"clicked", G_CALLBACK (on_set_mode_legacy), builder);
|
||||
g_signal_connect_swapped (gtk_builder_get_object (builder, "apply_button"),
|
||||
"clicked", G_CALLBACK (save_configuration), builder);
|
||||
|
||||
gtk_main ();
|
||||
g_object_unref (builder);
|
||||
return 0;
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=${CMAKE_PROJECT_NAME}-gui
|
||||
GenericName=SteelSeries Sensei Raw control utility
|
||||
Icon=${CMAKE_PROJECT_NAME}-gui
|
||||
Exec=${CMAKE_PROJECT_NAME}-gui
|
||||
StartupNotify=true
|
||||
Categories=Settings;System;Utility;GTK;
|
After Width: | Height: | Size: 4.8 KiB |
@ -0,0 +1,199 @@
|
||||
<interface>
|
||||
<object class='GtkAdjustment' id='polling_adj'>
|
||||
<property name='lower'>125</property>
|
||||
<property name='upper'>1000</property>
|
||||
</object>
|
||||
<object class='GtkAdjustment' id='cpi_on_adj'>
|
||||
<property name='lower'>90</property>
|
||||
<property name='upper'>5670</property>
|
||||
<property name='step-increment'>90</property>
|
||||
<property name='page-increment'>90</property>
|
||||
</object>
|
||||
<object class='GtkAdjustment' id='cpi_off_adj'>
|
||||
<property name='lower'>90</property>
|
||||
<property name='upper'>5670</property>
|
||||
<property name='step-increment'>90</property>
|
||||
<property name='page-increment'>90</property>
|
||||
</object>
|
||||
<object class='GtkSizeGroup' id='label_size_group'>
|
||||
<property name='mode'>GTK_SIZE_GROUP_HORIZONTAL</property>
|
||||
<widgets>
|
||||
<widget name='polling_label' />
|
||||
<widget name='cpi_off_label' />
|
||||
<widget name='cpi_on_label' />
|
||||
<widget name='pulsation_label' />
|
||||
<widget name='intensity_label' />
|
||||
</widgets>
|
||||
</object>
|
||||
<object class='GtkWindow' id='win'>
|
||||
<property name='window-position'>GTK_WIN_POS_CENTER</property>
|
||||
<property name='title' translatable='TRUE'>SteelSeries Sensei Raw control utility</property>
|
||||
<property name='border-width'>10</property>
|
||||
<child><object class='GtkNotebook' id='notebook'>
|
||||
<property name='show-tabs'>FALSE</property>
|
||||
<child><object class='GtkHBox' id='probing_box'>
|
||||
<property name='halign'>GTK_ALIGN_CENTER</property>
|
||||
<property name='valign'>GTK_ALIGN_CENTER</property>
|
||||
<property name='spacing'>10</property>
|
||||
<child><object class='GtkSpinner' id='probing_spinner'>
|
||||
<property name='halign'>GTK_ALIGN_CENTER</property>
|
||||
<property name='valign'>GTK_ALIGN_CENTER</property>
|
||||
<property name='active'>TRUE</property>
|
||||
</object></child>
|
||||
<child><object class='GtkLabel' id='probing_label'>
|
||||
<property name='label' translatable='TRUE'>Probing the device...</property>
|
||||
</object></child>
|
||||
</object></child>
|
||||
<child><object class='GtkVBox' id='no_device_box'>
|
||||
<property name='spacing'>10</property>
|
||||
<property name='halign'>GTK_ALIGN_CENTER</property>
|
||||
<property name='valign'>GTK_ALIGN_CENTER</property>
|
||||
<child><object class='GtkLabel' id='no_device_label'>
|
||||
<property name='label' translatable='TRUE'>No suitable device found.</property>
|
||||
</object></child>
|
||||
<child><object class='GtkButton' id='retry_button'>
|
||||
<property name='label' translatable='TRUE'>Retry</property>
|
||||
<property name='halign'>GTK_ALIGN_CENTER</property>
|
||||
</object></child>
|
||||
</object></child>
|
||||
<child><object class='GtkVBox' id='vbox'>
|
||||
<property name='spacing'>10</property>
|
||||
<child><object class='GtkHBox' id='hbox'>
|
||||
<property name='spacing'>10</property>
|
||||
<child>
|
||||
<object class='GtkLabel' id='polling_label'>
|
||||
<property name='label' translatable='TRUE'>Polling</property>
|
||||
</object>
|
||||
</child><child>
|
||||
<object class='GtkScale' id='polling_scale'>
|
||||
<property name='width-request'>200</property>
|
||||
<property name='digits'>0</property>
|
||||
<property name='adjustment'>polling_adj</property>
|
||||
<marks>
|
||||
<mark value='125' />
|
||||
<mark value='250' />
|
||||
<mark value='500' />
|
||||
<mark value='1000' />
|
||||
</marks>
|
||||
</object>
|
||||
</child>
|
||||
</object></child>
|
||||
<child><object class='GtkFrame' id='cpi_frame'>
|
||||
<property name='label' translatable='TRUE'>CPI</property>
|
||||
<property name='label-xalign'>0.5</property>
|
||||
<child><object class='GtkVBox' id='cpi_vbox'>
|
||||
<property name='border-width'>5</property>
|
||||
<child><object class='GtkHBox' id='cpi_off_hbox'>
|
||||
<property name='spacing'>10</property>
|
||||
<child>
|
||||
<object class='GtkLabel' id='cpi_off_label'>
|
||||
<property name='label' translatable='TRUE'>LED off</property>
|
||||
</object><packing>
|
||||
<property name='expand'>FALSE</property>
|
||||
<property name='fill'>FALSE</property>
|
||||
</packing>
|
||||
</child><child>
|
||||
<object class='GtkScale' id='cpi_off_scale'>
|
||||
<property name='width-request'>200</property>
|
||||
<property name='digits'>0</property>
|
||||
<property name='adjustment'>cpi_off_adj</property>
|
||||
</object><packing>
|
||||
<property name='expand'>TRUE</property>
|
||||
<property name='fill'>TRUE</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object></child>
|
||||
<child><object class='GtkHBox' id='cpi_on_hbox'>
|
||||
<property name='spacing'>10</property>
|
||||
<child>
|
||||
<object class='GtkLabel' id='cpi_on_label'>
|
||||
<property name='label' translatable='TRUE'>LED on</property>
|
||||
</object><packing>
|
||||
<property name='expand'>FALSE</property>
|
||||
<property name='fill'>FALSE</property>
|
||||
</packing>
|
||||
</child><child>
|
||||
<object class='GtkScale' id='cpi_on_scale'>
|
||||
<property name='width-request'>200</property>
|
||||
<property name='digits'>0</property>
|
||||
<property name='adjustment'>cpi_on_adj</property>
|
||||
</object><packing>
|
||||
<property name='expand'>TRUE</property>
|
||||
<property name='fill'>TRUE</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object></child>
|
||||
</object></child>
|
||||
</object></child>
|
||||
<child><object class='GtkFrame' id='backlight_frame'>
|
||||
<property name='label' translatable='TRUE'>Backlight</property>
|
||||
<property name='label-xalign'>0.5</property>
|
||||
<child><object class='GtkVBox' id='backlight_box'>
|
||||
<property name='border-width'>5</property>
|
||||
<child><object class='GtkHBox' id='pulsation_box'>
|
||||
<property name='spacing'>10</property>
|
||||
<child>
|
||||
<object class='GtkLabel' id='pulsation_label'>
|
||||
<property name='label' translatable='TRUE'>Pulsation</property>
|
||||
</object><packing>
|
||||
<property name='expand'>FALSE</property>
|
||||
<property name='fill'>FALSE</property>
|
||||
</packing>
|
||||
</child><child>
|
||||
<object class='GtkComboBoxText' id='pulsation_combo'>
|
||||
<items>
|
||||
<item translatable='TRUE'>Steady</item>
|
||||
<item translatable='TRUE'>Slow</item>
|
||||
<item translatable='TRUE'>Medium</item>
|
||||
<item translatable='TRUE'>Fast</item>
|
||||
</items>
|
||||
</object><packing>
|
||||
<property name='expand'>TRUE</property>
|
||||
<property name='fill'>TRUE</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object></child>
|
||||
<child><object class='GtkHBox' id='intensity_box'>
|
||||
<property name='spacing'>10</property>
|
||||
<child>
|
||||
<object class='GtkLabel' id='intensity_label'>
|
||||
<property name='label' translatable='TRUE'>Intensity</property>
|
||||
</object><packing>
|
||||
<property name='expand'>FALSE</property>
|
||||
<property name='fill'>FALSE</property>
|
||||
</packing>
|
||||
</child><child>
|
||||
<object class='GtkComboBoxText' id='intensity_combo'>
|
||||
<items>
|
||||
<item translatable='TRUE'>Off</item>
|
||||
<item translatable='TRUE'>Low</item>
|
||||
<item translatable='TRUE'>Medium</item>
|
||||
<item translatable='TRUE'>High</item>
|
||||
</items>
|
||||
</object><packing>
|
||||
<property name='expand'>TRUE</property>
|
||||
<property name='fill'>TRUE</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object></child>
|
||||
</object></child>
|
||||
</object></child>
|
||||
<child><object class='GtkHBox' id='buttons_box'>
|
||||
<child><object class='GtkButton' id='normal_button'>
|
||||
<property name='label' translatable='TRUE'>Normal mode</property>
|
||||
</object></child>
|
||||
<child><object class='GtkButton' id='legacy_button'>
|
||||
<property name='label' translatable='TRUE'>Legacy mode</property>
|
||||
</object></child>
|
||||
<child><object class='GtkButton' id='apply_button'>
|
||||
<property name='label'>gtk-apply</property>
|
||||
<property name='use-stock'>TRUE</property>
|
||||
<property name='margin-left'>15</property>
|
||||
<property name='can-default'>TRUE</property>
|
||||
</object></child>
|
||||
</object></child>
|
||||
</object></child>
|
||||
</object></child>
|
||||
</object>
|
||||
</interface>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
Loading…
Reference in new issue