Desensitize the Resolution combo when the output is off
Signed-off-by: Federico Mena Quintero <federico@novell.com> svn path=/trunk/; revision=9189
This commit is contained in:
parent
53f721544d
commit
ea6b78e870
2 changed files with 9 additions and 15 deletions
|
@ -21,6 +21,8 @@
|
|||
buttons based on the "on" state of the current output.
|
||||
(monitor_on_off_toggled_cb): New callback; we toggle the current
|
||||
output's on/off state.
|
||||
(rebuild_resolution_combo): Desensitize the resolution combo when
|
||||
the output is off. Don't add an "Off" item to it, either.
|
||||
|
||||
2008-12-18 Federico Mena Quintero <federico@novell.com>
|
||||
|
||||
|
|
|
@ -513,12 +513,15 @@ rebuild_resolution_combo (App *app)
|
|||
|
||||
clear_combo (app->resolution_combo);
|
||||
|
||||
if (!(modes = get_current_modes (app)))
|
||||
if (!(modes = get_current_modes (app))
|
||||
|| !app->current_output->on)
|
||||
{
|
||||
gtk_widget_set_sensitive (app->resolution_combo, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
g_assert (app->current_output != NULL);
|
||||
|
||||
gtk_widget_set_sensitive (app->resolution_combo, TRUE);
|
||||
|
||||
best_w = 0;
|
||||
|
@ -541,20 +544,9 @@ rebuild_resolution_combo (App *app)
|
|||
}
|
||||
}
|
||||
|
||||
if (count_active_outputs (app) > 1 || !app->current_output->on)
|
||||
add_key (app->resolution_combo, _("Off"), 0, 0, 0, 0);
|
||||
|
||||
if (!app->current_output->on)
|
||||
{
|
||||
current = "Off";
|
||||
}
|
||||
else
|
||||
{
|
||||
current = idle_free (g_strdup_printf (_("%d x %d"),
|
||||
app->current_output->width,
|
||||
app->current_output->height));
|
||||
}
|
||||
|
||||
current = idle_free (g_strdup_printf (_("%d x %d"),
|
||||
app->current_output->width,
|
||||
app->current_output->height));
|
||||
|
||||
if (!combo_select (app->resolution_combo, current))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue