gnome-control-center r8778 - trunk/capplets/display
- From: ssp svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r8778 - trunk/capplets/display
- Date: Thu, 10 Jul 2008 18:49:59 +0000 (UTC)
Author: ssp
Date: Thu Jul 10 18:49:58 2008
New Revision: 8778
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=8778&view=rev
Log:
Thu Jul 10 14:46:37 2008 SÃren Sandmann <sandmann redhat com>
* main.c: Remove this obsolete file.
* xrandr-capplet.c: Remove debug spew; add translation.
* TODO: Various updates.
Removed:
trunk/capplets/display/main.c
Modified:
trunk/capplets/display/ChangeLog
trunk/capplets/display/TODO
trunk/capplets/display/xrandr-capplet.c
Modified: trunk/capplets/display/TODO
==============================================================================
--- trunk/capplets/display/TODO (original)
+++ trunk/capplets/display/TODO Thu Jul 10 18:49:58 2008
@@ -1,5 +1,24 @@
Highlevel overview:
+Tablet rotation things
+only when there is a tablet attached.
+
+Here is the OS X Display menu:
+
+ Detect Displays
+ Turn on mirroring
+ --------------------------
+ SyncMaster
+ - 1280 x 1024, 60 Hz, Millions
+ - 1344 x ...
+ --------------------------------
+ Color LCD
+ - 1024 x 1024 ...
+ --------------------------
+ Displays Preferences
+
+ Color LCD means "laptop panel".
+
- GTK+ work.
Allow applications to be notified whenever monitors are added
@@ -216,6 +235,7 @@
- They should be set to the correct mode on login.
Note that this involves setting the right position in the
framebuffer too.
+
What if someone swaps two monitors? Users are going to expect
that the images will switch position.
@@ -403,15 +423,17 @@
- Given a list of modes, pick the one closest to a given mode.
- (a possibility here is: pick an exact match, if that's impossible, then
- pick the best one with the same width/height, if that's impossible, then
- just pick the best mode on the list).
-
- - For a configuation, fix the mode for a subset of the outputs, then list the
- combinations for the rest of the outputs.
-
- An obvious possibility here is to simply list all possibilities, then
- weed out those that don't work. Is this too expensive? It might be.
+ (a possibility here is: pick an exact match, if that's
+ impossible, then pick the best one with the same
+ width/height, if that's impossible, then just pick the
+ best mode on the list).
+
+ - For a configuation, fix the mode for a subset of the outputs, then
+ list the combinations for the rest of the outputs.
+
+ An obvious possibility here is to simply list all possibilities,
+ then weed out those that don't work. Is this too expensive?
+ It might be.
Structure of login time program:
Modified: trunk/capplets/display/xrandr-capplet.c
==============================================================================
--- trunk/capplets/display/xrandr-capplet.c (original)
+++ trunk/capplets/display/xrandr-capplet.c Thu Jul 10 18:49:58 2008
@@ -19,6 +19,7 @@
* Author: Soren Sandmann <sandmann redhat com>
*/
+#include <config.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <string.h>
@@ -29,6 +30,7 @@
#include <libgnomeui/gnome-rr-config.h>
#include <gdk/gdkx.h>
#include <X11/Xlib.h>
+#include <glib/gi18n.h>
typedef struct App App;
typedef struct GrabInfo GrabInfo;
@@ -115,14 +117,18 @@
app->current_configuration = current;
+#if 0
for (i = 0; app->current_configuration->outputs[i] != NULL; ++i)
{
GnomeOutputInfo *o = app->current_configuration->outputs[i];
g_print (" output %s %s: %d %d %d %d\n", o->name, o->on? "on" : "off", o->x, o->y, o->width, o->height);
}
+#endif
+#if 0
g_print ("sorting\n");
+#endif
/* Sort outputs according to X coordinate */
for (i = 0; app->current_configuration->outputs[i] != NULL; ++i)
;
@@ -391,10 +397,10 @@
const char * name;
} RotationInfo;
static const RotationInfo rotations[] = {
- { GNOME_RR_ROTATION_0, "Normal" },
- { GNOME_RR_ROTATION_90, "Left" },
- { GNOME_RR_ROTATION_270, "Right" },
- { GNOME_RR_ROTATION_180, "Upside Down" },
+ { GNOME_RR_ROTATION_0, N_("Normal") },
+ { GNOME_RR_ROTATION_90, N_("Left") },
+ { GNOME_RR_ROTATION_270, N_("Right") },
+ { GNOME_RR_ROTATION_180, N_("Upside Down") },
};
const char *selection;
GnomeRRRotation current;
@@ -429,7 +435,7 @@
app->current_output->rotation = current;
if (!(selection && combo_select (app->rotation_combo, selection)))
- combo_select (app->rotation_combo, "Normal");
+ combo_select (app->rotation_combo, N_("Normal"));
}
#define idle_free_printf(x) idle_free (g_strdup_printf (x))
@@ -467,7 +473,7 @@
height == app->current_output->height)
{
add_key (app->refresh_combo,
- idle_free (g_strdup_printf ("%d Hz", rate)),
+ idle_free (g_strdup_printf (_("%d Hz"), rate)),
0, 0, rate, -1);
if (rate > best)
@@ -475,8 +481,8 @@
}
}
- if (!combo_select (app->refresh_combo, idle_free (g_strdup_printf ("%d Hz", app->current_output->rate))))
- combo_select (app->refresh_combo, idle_free (g_strdup_printf ("%d Hz", best)));
+ if (!combo_select (app->refresh_combo, idle_free (g_strdup_printf (_("%d Hz"), app->current_output->rate))))
+ combo_select (app->refresh_combo, idle_free (g_strdup_printf (_("%d Hz"), best)));
}
static int
@@ -528,7 +534,7 @@
height = gnome_rr_mode_get_height (modes[i]);
add_key (app->resolution_combo,
- idle_free (g_strdup_printf ("%d x %d", width, height)),
+ idle_free (g_strdup_printf (_("%d x %d"), width, height)),
width, height, 0, -1);
if (width * height > best_w * best_h)
@@ -539,7 +545,7 @@
}
if (count_active_outputs (app) > 1 || !app->current_output->on)
- add_key (app->resolution_combo, "Off", 0, 0, 0, 0);
+ add_key (app->resolution_combo, _("Off"), 0, 0, 0, 0);
if (!app->current_output->on)
{
@@ -547,7 +553,7 @@
}
else
{
- current = idle_free (g_strdup_printf ("%d x %d",
+ current = idle_free (g_strdup_printf (_("%d x %d"),
app->current_output->width,
app->current_output->height));
}
@@ -557,7 +563,7 @@
{
combo_select (app->resolution_combo,
idle_free (
- g_strdup_printf ("%d x %d", best_w, best_h)));
+ g_strdup_printf (_("%d x %d"), best_w, best_h)));
}
}
@@ -1241,7 +1247,9 @@
g_free (output->user_data);
output->user_data = NULL;
+#if 0
g_print ("new position: %d %d %d %d\n", output->x, output->y, output->width, output->height);
+#endif
}
foo_scroll_area_invalidate (area);
@@ -1275,7 +1283,7 @@
const char *text;
if (app->current_configuration->clone)
- text = "Cloned Output";
+ text = _("Cloned Output");
else
text = output->display_name;
@@ -1514,17 +1522,21 @@
gnome_rr_screen_get_ranges (app->screen, &min_width, &max_width, &min_height, &max_height);
+#if 0
g_print ("X Server supports:\n");
g_print ("min_width = %d, max_width = %d\n", min_width, max_width);
g_print ("min_height = %d, max_height = %d\n", min_height, max_height);
g_print ("Requesting size of %dx%d\n", req_width, req_height);
+#endif
if (!(min_width <= req_width && req_width <= max_width
&& min_height <= req_height && req_height <= max_height))
{
/* FIXME: present a useful dialog, maybe even before the user tries to Apply */
+#if 0
g_print ("Your X server needs a larger Virtual size!\n");
+#endif
}
}
@@ -1547,7 +1559,9 @@
message.xclient.message_type = gnome_randr_atom();
message.xclient.format = 8;
+#if 0
g_print ("Sending client message\n");
+#endif
XSendEvent (gdk_x11_get_default_xdisplay(),
gdk_x11_get_default_root_xwindow(),
@@ -1666,7 +1680,6 @@
switch (gtk_dialog_run (GTK_DIALOG (app->dialog)))
{
default:
- g_print ("Unknown response\n");
/* Fall Through */
case GTK_RESPONSE_DELETE_EVENT:
case GTK_RESPONSE_CLOSE:
@@ -1692,11 +1705,9 @@
{
App *app;
-#if 0
- bindtextdomain (GETTEXT_PACKAGE, DESKTOPEFFECTSLOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
-#endif
gtk_init (&argc, &argv);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]