mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 15:01:23 +00:00
Merge branch 'media-controls' into 'main'
mediacontrols: Add tooltip text to play button See merge request GNOME/gtk!5794
This commit is contained in:
commit
e0dbc6a0ee
@ -399,6 +399,7 @@ update_playing (GtkMediaControls *controls)
|
|||||||
{
|
{
|
||||||
gboolean playing;
|
gboolean playing;
|
||||||
const char *icon_name;
|
const char *icon_name;
|
||||||
|
const char *tooltip_text;
|
||||||
|
|
||||||
if (controls->stream)
|
if (controls->stream)
|
||||||
playing = gtk_media_stream_get_playing (controls->stream);
|
playing = gtk_media_stream_get_playing (controls->stream);
|
||||||
@ -406,11 +407,18 @@ update_playing (GtkMediaControls *controls)
|
|||||||
playing = FALSE;
|
playing = FALSE;
|
||||||
|
|
||||||
if (playing)
|
if (playing)
|
||||||
|
{
|
||||||
icon_name = "media-playback-pause-symbolic";
|
icon_name = "media-playback-pause-symbolic";
|
||||||
|
tooltip_text = C_("media controls tooltip", "Stop");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
icon_name = "media-playback-start-symbolic";
|
icon_name = "media-playback-start-symbolic";
|
||||||
|
tooltip_text = C_("media controls tooltip", "Play");
|
||||||
|
}
|
||||||
|
|
||||||
gtk_button_set_icon_name (GTK_BUTTON (controls->play_button), icon_name);
|
gtk_button_set_icon_name (GTK_BUTTON (controls->play_button), icon_name);
|
||||||
|
gtk_widget_set_tooltip_text (controls->play_button, tooltip_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
<property name="valign">3</property>
|
<property name="valign">3</property>
|
||||||
<property name="has-frame">0</property>
|
<property name="has-frame">0</property>
|
||||||
<property name="icon-name">media-playback-start-symbolic</property>
|
<property name="icon-name">media-playback-start-symbolic</property>
|
||||||
|
<property name="tooltip-text" context="media controls tooltip" translatable="yes">Play</property>
|
||||||
<signal name="clicked" handler="play_button_clicked" object="GtkMediaControls" swapped="no"/>
|
<signal name="clicked" handler="play_button_clicked" object="GtkMediaControls" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
@ -399,6 +399,7 @@ gtk/ui/gtkfilechooserwidget.ui
|
|||||||
gtk/ui/gtkfontchooserdialog.ui
|
gtk/ui/gtkfontchooserdialog.ui
|
||||||
gtk/ui/gtkfontchooserwidget.ui
|
gtk/ui/gtkfontchooserwidget.ui
|
||||||
gtk/ui/gtklockbutton.ui
|
gtk/ui/gtklockbutton.ui
|
||||||
|
gtk/ui/gtkmediacontrols.ui
|
||||||
gtk/ui/gtkmessagedialog.ui
|
gtk/ui/gtkmessagedialog.ui
|
||||||
gtk/ui/gtkpagesetupunixdialog.ui
|
gtk/ui/gtkpagesetupunixdialog.ui
|
||||||
gtk/ui/gtkplacesviewrow.ui
|
gtk/ui/gtkplacesviewrow.ui
|
||||||
|
Loading…
Reference in New Issue
Block a user