Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Gtk;
- namespace GraniteHello {
- public class GraniteHello : Granite.Application {
- public Window m_window;
- construct {
- program_name = "GraniteHello";
- exec_name = "granitehello";
- app_years = "2013";
- app_icon = "application-default-icon";
- app_launcher = "granite_hello.desktop";
- application_id = "org.elementary.granitehello";
- main_url = "http://www.ejweb.com.br/";
- bug_url = "http://www.ejweb.com.br/bugs/";
- help_url = "http://www.ejweb.com.br/help/";
- translate_url = "http://www.ejweb.com.br/translate/";
- /* about_authors = {"Your Girl <em>"};
- about_documenters = {"Your <em>"};
- about_artists = {"eu <em@e>"};
- about_comments = {"Edu translator!"};
- about_translators = {"tetss de tra."};
- */
- //also License.GPL_2_0 and License.GPL_3_0
- about_license_type = License.GPL_3_0;
- }
- public GraniteHello(){
- // For example if we wanted to use a dark theme.
- // Gtk.Settings.get_default ().gtk_application_prefer_dark_theme = true;
- }
- public override void activate (){
- this.m_window = new Window();
- this.m_window.set_default_size(800, 600);
- this.m_window.set_application(this);
- var button = new Button.with_label ("Oh Boy!");
- button.clicked.connect(() => {
- button.label = "Thank you!";
- });
- this.m_window.add(button);
- this.m_window.show_all();
- }
- }
- }
- public static int main(string[] args){
- Gtk.init(ref args);
- var GraniteHello = new GraniteHello.GraniteHello();
- return GraniteHello.run(args);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement