gnome-control-center r9210 - trunk/capplets/display
- From: jensg svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r9210 - trunk/capplets/display
- Date: Mon, 26 Jan 2009 21:37:27 +0000 (UTC)
Author: jensg
Date: Mon Jan 26 21:37:27 2009
New Revision: 9210
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=9210&view=rev
Log:
2009-01-26 Jens Granseuer <jensgr gmx net>
* xrandr-capplet.c: (rebuild_rate_combo),
(rebuild_resolution_combo): don't crash if we don't have an output
(bug #569218)
Modified:
trunk/capplets/display/ChangeLog
trunk/capplets/display/xrandr-capplet.c
Modified: trunk/capplets/display/xrandr-capplet.c
==============================================================================
--- trunk/capplets/display/xrandr-capplet.c (original)
+++ trunk/capplets/display/xrandr-capplet.c Mon Jan 26 21:37:27 2009
@@ -373,11 +373,12 @@
gtk_widget_set_sensitive (
app->refresh_combo, app->current_output && app->current_output->on);
- if (!(modes = get_current_modes (app)))
+ if (!app->current_output
+ || !(modes = get_current_modes (app)))
return;
rates = g_hash_table_new_full (
- g_str_hash, g_str_equal, (GFreeFunc)g_free, NULL);
+ g_str_hash, g_str_equal, (GFreeFunc) g_free, NULL);
best = -1;
for (i = 0; modes[i] != NULL; ++i)
@@ -514,6 +515,7 @@
clear_combo (app->resolution_combo);
if (!(modes = get_current_modes (app))
+ || !app->current_output
|| !app->current_output->on)
{
gtk_widget_set_sensitive (app->resolution_combo, FALSE);
@@ -568,7 +570,7 @@
app->ignore_gui_changes = TRUE;
- sensitive = app->current_output? TRUE : FALSE;
+ sensitive = app->current_output ? TRUE : FALSE;
#if 0
g_debug ("rebuild gui, is on: %d", app->current_output->on);
@@ -769,7 +771,7 @@
x += output->width;
}
-
+
}
static void
@@ -1812,7 +1814,7 @@
return configuration->outputs[nearest_index];
else
return NULL;
-
+
}
/* Gets the output that contains the largest intersection with the window.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]