71 lines
2.6 KiB
Vala
71 lines
2.6 KiB
Vala
/*
|
|
* pdf-presenter - advanced pdf presentation util
|
|
*
|
|
* Copyright (C) 2010 Sebastian Reichel <sre@ring0.de>
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
* THE SOFTWARE.
|
|
*/
|
|
|
|
using Gtk;
|
|
|
|
class ConfigWindow : Dialog {
|
|
Gtk.CheckButton fullscreen_control_window;
|
|
Gtk.CheckButton auto_transition;
|
|
|
|
public ConfigWindow() {
|
|
title = "PDF Presentator (Config)";
|
|
position = WindowPosition.CENTER;
|
|
|
|
var table = new Gtk.Table(1,4,false);
|
|
var content = this.get_content_area () as Gtk.Box;
|
|
content.pack_start(table, false, true, 10);
|
|
|
|
fullscreen_control_window = new Gtk.CheckButton.with_label("Fullscreen Configuration Window");
|
|
table.attach(fullscreen_control_window, 0, 2, 0, 1, Gtk.AttachOptions.FILL, 0, 0, 0);
|
|
|
|
auto_transition = new Gtk.CheckButton.with_label("Auto Transition");
|
|
table.attach(auto_transition, 0, 2, 1, 2, Gtk.AttachOptions.FILL, 0, 0, 0);
|
|
|
|
table.attach(new Gtk.Label("Control Monitor"), 0, 1, 2, 3, Gtk.AttachOptions.FILL, 0, 0, 0);
|
|
table.attach(new Gtk.ComboBox(), 1, 2, 2, 3, 0, 0, 0, 0);
|
|
|
|
table.attach(new Gtk.Label("Presentation Monitor"), 0, 1, 3, 4, Gtk.AttachOptions.FILL, 0, 0, 0);
|
|
table.attach(new Gtk.ComboBox(), 1, 2, 3, 4, 0, 0, 0, 0);
|
|
|
|
// FIXME: add keybindings
|
|
|
|
add_button(Stock.OK, ResponseType.OK);
|
|
add_button(Stock.CANCEL, ResponseType.CANCEL);
|
|
|
|
response.connect(response_handler);
|
|
show_all();
|
|
return;
|
|
}
|
|
|
|
void response_handler(int id) {
|
|
if(id == ResponseType.OK) {
|
|
message("SAVE...");
|
|
message("Fullscreen: %s", fullscreen_control_window.get_active() ? "true" : "false");
|
|
message("Transition: %s", auto_transition.get_active() ? "true" : "false");
|
|
}
|
|
|
|
destroy();
|
|
}
|
|
}
|