2b311d0c1388f9e41dac37ccb2bc5caed9f9b386
[synfig.git] / synfig-studio / trunk / src / gtkmm / onemoment.cpp
1 /* === S Y N F I G ========================================================= */
2 /*!     \file onemoment.cpp
3 **      \brief writeme
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **
10 **      This package is free software; you can redistribute it and/or
11 **      modify it under the terms of the GNU General Public License as
12 **      published by the Free Software Foundation; either version 2 of
13 **      the License, or (at your option) any later version.
14 **
15 **      This package is distributed in the hope that it will be useful,
16 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
17 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 **      General Public License for more details.
19 **      \endlegal
20 **
21 ** === N O T E S ===========================================================
22 **
23 ** ========================================================================= */
24
25 /* === H E A D E R S ======================================================= */
26
27 #ifdef USING_PCH
28 #       include "pch.h"
29 #else
30 #ifdef HAVE_CONFIG_H
31 #       include <config.h>
32 #endif
33
34 #include <iostream>
35 #include <string>
36
37 #include <ETL/stringf>
38
39 #include <gtkmm/image.h>
40 #include <gdkmm/pixbufloader.h>
41 #include <gtkmm/button.h>
42 #include <gtkmm/label.h>
43 #include <gtkmm/fixed.h>
44
45 #include <synfig/general.h>
46
47 #include "onemoment.h"
48 #include "app.h"
49
50 #endif
51
52 using namespace std;
53 using namespace etl;
54 using namespace studio;
55
56 /* === M A C R O S ========================================================= */
57
58 #ifndef VERSION
59 #define VERSION "unknown"
60 #define PACKAGE "synfigstudio"
61 #endif
62
63 #ifdef WIN32
64 #       ifdef IMAGE_DIR
65 #               undef IMAGE_DIR
66 #               define IMAGE_DIR "share\\pixmaps"
67 #       endif
68 #endif
69
70 #ifndef IMAGE_DIR
71 #       define IMAGE_DIR "/usr/local/share/pixmaps"
72 #endif
73
74 #ifndef IMAGE_EXT
75 #       define IMAGE_EXT        "png"
76 #endif
77
78 /* === G L O B A L S ======================================================= */
79
80 /* === P R O C E D U R E S ================================================= */
81
82 /* === M E T H O D S ======================================================= */
83
84 OneMoment::OneMoment():
85         Gtk::Window(getenv("SYNFIG_DISABLE_POPUP_WINDOWS") ? Gtk::WINDOW_TOPLEVEL : Gtk::WINDOW_POPUP)
86 {
87         // Create the Copyright Label
88         Gtk::Label *label = manage(new class Gtk::Label(_("One Moment, Please...")));
89
90         set_title(_("One Moment, Please..."));
91         set_modal(false);
92         property_window_position().set_value(Gtk::WIN_POS_CENTER);
93         set_resizable(false);
94         add(*label);
95
96         Pango::AttrList attr_list;
97         Pango::AttrInt pango_size(Pango::Attribute::create_attr_size(Pango::SCALE*16));
98         pango_size.set_start_index(0);
99         pango_size.set_end_index(64);
100         attr_list.change(pango_size);
101
102         label->set_attributes(attr_list);
103
104         label->set_size_request(400,60);
105
106         get_root_window()->set_decorations(Gdk::DECOR_BORDER);
107
108         // show everything off
109         show_all();
110
111         present();
112         while(studio::App::events_pending())studio::App::iteration(false);
113 }
114
115 OneMoment::~OneMoment()
116 {
117         hide();
118 }