Hi, On Fri, Feb 03, 2017 at 10:18:03AM -0500, Frediano Ziglio wrote: > > > > On Tue, 2017-01-31 at 12:08 +0100, Victor Toso wrote: > > > From: Victor Toso <me@xxxxxxxxxxxxxx> > > > > > > Similar to preferred video compression, a radio button showing > > > mjpeg, > > > vp8 and h264 in case server has the proper [0] capability > > > > Please update for the recently added vp9 > > > > Would be worth also reusing the array you introduced with > the list of all codecs instead of adding them here and there. > For instance the menu list should/could be generated from > it. We might try to export it to spicy using some internal function. But let's avoid doing that in this series. > > > @@ -970,6 +1002,30 @@ static SpiceWindow > > > *create_spice_window(spice_connection *conn, SpiceChannel *ch > > > GtkAction *compression_menu_action = > > > gtk_action_group_get_action(win->ag, "CompressionMenu"); > > > gtk_action_set_sensitive(compression_menu_action, FALSE); > > > } > > > + gtk_action_group_add_radio_actions(win->ag, > > OT: > > "gtk_action_group_add_radio_actions has been deprecated since version > > 3.10 and should not be used in newly-written code." > > > > Can we do something about it ? Well, sure we can. Not sure how yet. IIRC you started porting some of this xml to use newer gtk API? Let's try to play with that later on. > > > > > video_codec_type_entries, > > > + G_N_ELEMENTS(video_codec_typ > > > e_entries), -1, > > > + G_CALLBACK(video_codec_type_ > > > cb), win->display_channel); > > > + if (!spice_channel_test_capability(win->display_channel, > > > + SPICE_DISPLAY_CAP_PREF_VIDEO > > > _CODEC_TYPE)) { > > > + GtkAction *video_codec_type_menu_action = > > > + gtk_action_group_get_action(win->ag, > > > "VideoCodecTypeMenu"); > > > + gtk_action_set_sensitive(video_codec_type_menu_action, > > > FALSE); > > > + } else { > > > + GtkAction *submenu_action; > > > + if (!spice_channel_test_capability(win->display_channel, > > > SPICE_DISPLAY_CAP_CODEC_MJPEG)) { > > > + submenu_action = gtk_action_group_get_action(win->ag, > > > "mjpeg"); > > > + gtk_action_set_sensitive(submenu_action, TRUE); > > > + } > > > + if (!spice_channel_test_capability(win->display_channel, > > > SPICE_DISPLAY_CAP_CODEC_VP8)) { > > > + submenu_action = gtk_action_group_get_action(win->ag, > > > "vp8"); > > > + gtk_action_set_sensitive(submenu_action, TRUE); > > > + } > > > + if (!spice_channel_test_capability(win->display_channel, > > > SPICE_DISPLAY_CAP_CODEC_H264)) { > > > + submenu_action = gtk_action_group_get_action(win->ag, > > > "h264"); > > > + gtk_action_set_sensitive(submenu_action, TRUE); > > > + } > > > > Please avoid c&p > > > > > + } > > > + > > > gtk_ui_manager_insert_action_group(win->ui, win->ag, 0); > > > gtk_window_add_accel_group(GTK_WINDOW(win->toplevel), > > > gtk_ui_manager_get_accel_group(win- > > > >ui)); > > > > Looks good otherwise, > > Pavel > > > > Frediano Thanks,
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel