Commit 93bf20c1 authored by Guido Gunther's avatar Guido Gunther
Browse files

Style cleanups

parent db02cdc4
......@@ -216,9 +216,9 @@ on_player_state_changed (GstPlayer *player, GstPlayerState state, gpointer user_
if (state == GST_PLAYER_STATE_PLAYING) {
icon = "media-playback-pause-symbolic";
self->cookie = gtk_application_inhibit (GTK_APPLICATION (app),
GTK_WINDOW (self),
GTK_APPLICATION_INHIBIT_SUSPEND | GTK_APPLICATION_INHIBIT_IDLE,
"Playing video");
GTK_WINDOW (self),
GTK_APPLICATION_INHIBIT_SUSPEND | GTK_APPLICATION_INHIBIT_IDLE,
"Playing video");
check_pipeline (self, player);
} else {
icon = "media-playback-start-symbolic";
......@@ -281,8 +281,8 @@ on_player_position_updated (GstPlayer *player, guint64 position, gpointer user_d
return;
text = g_strdup_printf ("%.2ld:%.2ld / %.2ld:%.2ld",
pos / 60, pos % 60,
dur / 60, dur % 60);
pos / 60, pos % 60,
dur / 60, dur % 60);
gtk_label_set_text (self->lbl_time, text);
}
......@@ -318,16 +318,16 @@ on_realize (LiviWindow *self)
if (!self->player) {
self->player = gst_player_new (GST_PLAYER_VIDEO_RENDERER (g_object_ref (self->paintable)),
gst_player_g_main_context_signal_dispatcher_new (NULL));
gst_player_g_main_context_signal_dispatcher_new (NULL));
g_object_connect (self->player,
"signal::error", G_CALLBACK (on_player_error), self,
"signal::buffering", G_CALLBACK (on_player_buffering), self,
"signal::state-changed", G_CALLBACK (on_player_state_changed), self,
"signal::mute-changed", G_CALLBACK (on_player_mute_changed), self,
"signal::duration-changed", G_CALLBACK (on_player_duration_changed), self,
"signal::position-updated", G_CALLBACK (on_player_position_updated), self,
"signal::media-info-updated", G_CALLBACK (on_media_info_updated), self,
NULL);
"signal::error", G_CALLBACK (on_player_error), self,
"signal::buffering", G_CALLBACK (on_player_buffering), self,
"signal::state-changed", G_CALLBACK (on_player_state_changed), self,
"signal::mute-changed", G_CALLBACK (on_player_mute_changed), self,
"signal::duration-changed", G_CALLBACK (on_player_duration_changed), self,
"signal::position-updated", G_CALLBACK (on_player_position_updated), self,
"signal::media-info-updated", G_CALLBACK (on_media_info_updated), self,
NULL);
}
}
......@@ -409,9 +409,9 @@ livi_window_init (LiviWindow *self)
gesture = gtk_gesture_click_new ();
g_signal_connect_swapped (gesture, "pressed",
G_CALLBACK (on_img_clicked), self);
G_CALLBACK (on_img_clicked), self);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_TARGET);
GTK_PHASE_TARGET);
gtk_widget_add_controller (GTK_WIDGET (self->picture_video), GTK_EVENT_CONTROLLER (gesture));
}
......
......@@ -58,10 +58,10 @@ on_startup (GApplication *app)
window = gtk_application_get_active_window (GTK_APPLICATION (app));
if (window == NULL)
window = g_object_new (LIVI_TYPE_WINDOW,
"application", app,
"default-width", 600,
"default-height", 300,
NULL);
"application", app,
"default-width", 600,
"default-height", 300,
NULL);
}
......@@ -146,7 +146,7 @@ fix_broken_cache (void)
path = g_strdup_printf (".var/app/" APP_ID "/cache/gstreamer-1.0/registry.%s.bin", arches[i]);
if (unlink(path) == 0)
g_debug ("Unlinked %s", path);
g_debug ("Unlinked %s", path);
}
return FALSE;
}
......@@ -179,10 +179,10 @@ main (int argc,
return 1;
app = GTK_APPLICATION (g_object_new (GTK_TYPE_APPLICATION,
"application-id", APP_ID,
"flags", G_APPLICATION_HANDLES_COMMAND_LINE,
"register-session", TRUE,
NULL));
"application-id", APP_ID,
"flags", G_APPLICATION_HANDLES_COMMAND_LINE,
"register-session", TRUE,
NULL));
g_application_add_main_option_entries (G_APPLICATION (app), options);
......
.livi-controls {
background-color: rgba(80, 80, 80, 0.8);
margin: 16px;
border-radius: 8px;
color: #e6e5e5;
font-feature-settings: "tnum";
background-color: rgba(80, 80, 80, 0.8);
margin: 16px;
border-radius: 8px;
color: #e6e5e5;
font-feature-settings: "tnum";
}
.livi-controls button {
margin: 6px;
color: #e6e5e5;
margin: 6px;
color: #e6e5e5;
}
.livi-info {
background-color: rgba(80, 80, 80, 0.8);
color: #e6e5e5;
font-feature-settings: "tnum";
margin: 4px 16px 4px 16px;
border-radius: 4px;
background-color: rgba(80, 80, 80, 0.8);
color: #e6e5e5;
font-feature-settings: "tnum";
margin: 4px 16px 4px 16px;
border-radius: 4px;
}
.livi-error {
background-color: rgba(80, 80, 80, 0.8);
color: @warning_color;
margin: 4px 16px 4px 16px;
border-radius: 4px;
background-color: rgba(80, 80, 80, 0.8);
color: @warning_color;
margin: 4px 16px 4px 16px;
border-radius: 4px;
}
.livi-info label {
margin: 6px;
border-radius: 4px;
margin: 6px;
border-radius: 4px;
}
.livi-info image {
margin: 6px;
margin: 6px;
}
.livi-info image.no-accel {
color: red;
color: red;
}
.livi-info image.accel {
color: green;
color: green;
}
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