Commit 950fa4eb authored by Guido Gunther's avatar Guido Gunther
Browse files

window: Use action for fullscreening

parent 93bf20c1
...@@ -100,18 +100,6 @@ on_img_clicked (LiviWindow *self) ...@@ -100,18 +100,6 @@ on_img_clicked (LiviWindow *self)
} }
static void
on_btn_fullscreen_clicked (LiviWindow *self)
{
gboolean fullscreen;
g_assert (LIVI_IS_WINDOW (self));
fullscreen = gtk_window_is_fullscreen (GTK_WINDOW (self));
g_object_set (self, "fullscreened", !fullscreen, NULL);
}
static void static void
on_btn_mute_clicked (LiviWindow *self) on_btn_mute_clicked (LiviWindow *self)
{ {
...@@ -377,13 +365,14 @@ livi_window_class_init (LiviWindowClass *klass) ...@@ -377,13 +365,14 @@ livi_window_class_init (LiviWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, LiviWindow, revealer_controls); gtk_widget_class_bind_template_child (widget_class, LiviWindow, revealer_controls);
gtk_widget_class_bind_template_child (widget_class, LiviWindow, revealer_info); gtk_widget_class_bind_template_child (widget_class, LiviWindow, revealer_info);
gtk_widget_class_bind_template_child (widget_class, LiviWindow, stack_content); gtk_widget_class_bind_template_child (widget_class, LiviWindow, stack_content);
gtk_widget_class_bind_template_callback (widget_class, on_btn_fullscreen_clicked);
gtk_widget_class_bind_template_callback (widget_class, on_btn_mute_clicked); gtk_widget_class_bind_template_callback (widget_class, on_btn_mute_clicked);
gtk_widget_class_bind_template_callback (widget_class, on_btn_play_clicked); gtk_widget_class_bind_template_callback (widget_class, on_btn_play_clicked);
gtk_widget_class_bind_template_callback (widget_class, on_fullscreen); gtk_widget_class_bind_template_callback (widget_class, on_fullscreen);
gtk_widget_class_bind_template_callback (widget_class, on_realize); gtk_widget_class_bind_template_callback (widget_class, on_realize);
gtk_widget_class_bind_template_callback (widget_class, on_slider_value_changed); gtk_widget_class_bind_template_callback (widget_class, on_slider_value_changed);
gtk_widget_class_install_property_action (widget_class, "win.fullscreen", "fullscreened");
provider = gtk_css_provider_new (); provider = gtk_css_provider_new ();
gtk_css_provider_load_from_resource (provider, "/org/sigxcpu/Livi/style.css"); gtk_css_provider_load_from_resource (provider, "/org/sigxcpu/Livi/style.css");
gtk_style_context_add_provider_for_display (gdk_display_get_default (), gtk_style_context_add_provider_for_display (gdk_display_get_default (),
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<property name="tooltip-text" translatable="yes">Fullscreen</property> <property name="tooltip-text" translatable="yes">Fullscreen</property>
<property name="halign">end</property> <property name="halign">end</property>
<property name="valign">center</property> <property name="valign">center</property>
<signal name="clicked" handler="on_btn_fullscreen_clicked" swapped="yes"/> <property name="action-name">win.fullscreen</property>
<child> <child>
<object class="GtkImage" id="img_fullscreen"> <object class="GtkImage" id="img_fullscreen">
<property name="icon-name">view-fullscreen-symbolic</property> <property name="icon-name">view-fullscreen-symbolic</property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment