| 138 | } |
| 139 | |
| 140 | static void |
| 141 | live_preview_set_state (int state) |
| 142 | { |
| 143 | signal_user_data_t *ud = ghb_ud(); |
| 144 | |
| 145 | if (!ud || !ud->preview) |
| 146 | return; |
| 147 | |
| 148 | const char *icon_name, *tooltip; |
| 149 | |
| 150 | switch (state) |
| 151 | { |
| 152 | case PREVIEW_STATE_PLAYING: |
| 153 | icon_name = "media-playback-pause-symbolic"; |
| 154 | tooltip = _("Pause Preview"); |
| 155 | break; |
| 156 | case PREVIEW_STATE_ENCODING: |
| 157 | icon_name = "media-playback-stop-symbolic"; |
| 158 | tooltip = _("Stop Encoding Preview"); |
| 159 | break; |
| 160 | case PREVIEW_STATE_PAUSED: |
| 161 | icon_name = "media-playback-start-symbolic"; |
| 162 | tooltip = _("Play Preview"); |
| 163 | break; |
| 164 | case PREVIEW_STATE_STOPPED: |
| 165 | default: |
| 166 | icon_name = "media-playback-start-symbolic"; |
| 167 | tooltip = _("Encode and play a short sequence of video starting from the current preview position."); |
| 168 | break; |
| 169 | } |
| 170 | |
| 171 | GtkWidget *play_button = ghb_builder_widget("live_preview_play"); |
| 172 | gtk_widget_set_tooltip_text(play_button, tooltip); |
| 173 | gtk_button_set_icon_name(GTK_BUTTON(play_button), icon_name); |
| 174 | |
| 175 | ud->preview->state = state; |
| 176 | } |
| 177 | |
| 178 | static void |
| 179 | preview_set_render_size(signal_user_data_t *ud, int width, int height) |
no test coverage detected