GNOME Bugzilla – Bug 324125
gnome-display-properties doesn't support rotation
Last modified: 2006-07-07 15:10:37 UTC
I only can rotate display on the fly in tabletpc's with xrandr -o right To enable rotation on the fly add option XranRRotation "true" in xorg.conf and the graphic card and the driver card must support it.
Created attachment 56002 [details] [review] Add rotation support in gnome-display-properties This attachment add rotation support. When there's no rotations avaliable it show normal value.
Created attachment 56003 [details] [review] Add rotation support in gnome-display-properties with option hidden if it doesn't support it Add rotation support in gnome-display-properties and hides the value when there are no rotations avalaible.
Created attachment 62552 [details] [review] display-properties-rotation.patch I made a patch to add rotation support too :). After a quick look the two patches seem quite the same and both of them don't support reflections (but should be easy to add support also for this feature, just add two entry in an array). I attach it just because "I have it here" :). btw, my video card doesn't support rotations, so my patch isn't tested yet.
Created attachment 62958 [details] [review] display-properties-rotation-2.patch The patch should now work :)
*** Bug 338348 has been marked as a duplicate of this bug. ***
Created attachment 63393 [details] Screenshot Screenshot of the dialog with my patch (will post an updated version in a minute).
Created attachment 63394 [details] [review] New patch This patch is tested, doesn't use the deprecated GtkOptionMenu and makes the menu insensitive if there's no supported rotation (or only one). I'd prefer to use sensitivity to indicate whether something's available or not. Sorry for having two patches now, I just wanted to get the display rotation running reliable before submitting my patch.
I found that also my video card supports rotation after having added an option to xorg.conf, so my patch took some testing too :)
Sven, using a GtkComboBox instead of the old and deprecated GtkOptionMenu will introduce a user interface inconsistency, since both 'Resolution' and 'Refresh rate' use a different widget, which, once opened, renders in a different way the popup menu. Better to keep the GtkOptionMenu for now and then file another bug to migrate to GtkComboBox, isn't it?
Not it is not. Because this way we migrate two widgets only, not three. BTW, I'm almost done with the patch for the other two.
Depend on bug 338468 for the GtkComboBox API
Comment on attachment 63394 [details] [review] New patch >+ gchar* text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (screen_info->rotate_widget)); >+ Rotation rot = display_rotation_from_text (text); Same comment as your other patch, declaration and init should better not be done on the same line :) >- new_res = get_current_resolution (screen_info); >+ new_res = get_current_resolution (screen_info); Is that a spacing change? ;) >+ /* it makes no sense to support only selection one element */ >+ gtk_widget_set_sensitive (optionmenu, >+ gtk_tree_model_iter_n_children (gtk_combo_box_get_model (combo), NULL) > 1); What optionmenu is that? Out of those small notes it looks fine, feel free to commit after doing the required small changes for that :)
2006-07-07 Sven Herzberg <herzi@gnome-de.org> * capplets/display/main.c: added rotation support; Closes: #324125