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