|
|
a9d5c3e |
--- gnome-control-center-2.28.0/capplets/display/xrandr-capplet.c 2009-08-24 06:54:41.000000000 -0400
|
|
|
a9d5c3e |
+++ hacked/capplets/display/xrandr-capplet.c 2009-09-30 09:29:05.160839814 -0400
|
|
|
a9d5c3e |
@@ -516,6 +516,7 @@
|
|
|
a9d5c3e |
{
|
|
|
a9d5c3e |
int i;
|
|
|
a9d5c3e |
GnomeRRMode **modes;
|
|
|
a9d5c3e |
+ int best_w, best_h;
|
|
|
a9d5c3e |
const char *current;
|
|
|
a9d5c3e |
|
|
|
a9d5c3e |
clear_combo (app->resolution_combo);
|
|
|
a9d5c3e |
@@ -533,6 +534,8 @@
|
|
|
a9d5c3e |
|
|
|
a9d5c3e |
gtk_widget_set_sensitive (app->resolution_combo, TRUE);
|
|
|
a9d5c3e |
|
|
|
a9d5c3e |
+ best_w = 0;
|
|
|
a9d5c3e |
+ best_h = 0;
|
|
|
a9d5c3e |
for (i = 0; modes[i] != NULL; ++i)
|
|
|
a9d5c3e |
{
|
|
|
a9d5c3e |
int width, height;
|
|
|
a9d5c3e |
@@ -543,12 +546,21 @@
|
|
|
a9d5c3e |
add_key (app->resolution_combo,
|
|
|
a9d5c3e |
idle_free (make_resolution_string (width, height)),
|
|
|
a9d5c3e |
width, height, 0, -1);
|
|
|
a9d5c3e |
+
|
|
|
a9d5c3e |
+ if (width * height > best_w * best_h)
|
|
|
a9d5c3e |
+ {
|
|
|
a9d5c3e |
+ best_w = width;
|
|
|
a9d5c3e |
+ best_h = height;
|
|
|
a9d5c3e |
+ }
|
|
|
a9d5c3e |
}
|
|
|
a9d5c3e |
|
|
|
a9d5c3e |
current = idle_free (make_resolution_string (app->current_output->width, app->current_output->height));
|
|
|
a9d5c3e |
|
|
|
a9d5c3e |
if (!combo_select (app->resolution_combo, current))
|
|
|
a9d5c3e |
- g_assert_not_reached ();
|
|
|
a9d5c3e |
+ {
|
|
|
a9d5c3e |
+ combo_select (app->resolution_combo,
|
|
|
a9d5c3e |
+ idle_free (make_resolution_string (best_w, best_h)));
|
|
|
a9d5c3e |
+ }
|
|
|
a9d5c3e |
}
|
|
|
a9d5c3e |
|
|
|
a9d5c3e |
static void
|