Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk-youtube-viewer: add option mainw_centered (default 0) to set the … #152

Merged
merged 1 commit into from
May 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bin/gtk-youtube-viewer
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ my %CONFIG = (
mainw_size => '700x400',
mainw_maximized => 0,
mainw_fullscreen => 0,
mainw_centered => 0,

# Youtube options
dash_support => 1,
Expand Down Expand Up @@ -825,8 +826,11 @@ sub apply_configuration {
$resolution_combobox->set_active($CONFIG{active_resolution_combobox});
$safesearch_combobox->set_active($CONFIG{active_safeSearch_combobox});

# Resize the main window
# Resize (and possibly center) the main window
$mainw->set_default_size(split(/x/i, $CONFIG{mainw_size}, 2));
if ($CONFIG{mainw_centered}) {
$mainw->set_position("center");
}
$mainw->reshow_with_initial_size;

if ($CONFIG{mainw_maximized}) {
Expand Down