~ubuntu-branches/ubuntu/trusty/eiciel/trusty

« back to all changes in this revision

Viewing changes to src/eiciel_container.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2006-10-19 19:54:16 UTC
  • mfrom: (2.1.5 edgy)
  • Revision ID: james.westby@ubuntu.com-20061019195416-aq4hgu02gy7euwx0
Update maintainer email address to biebl@debian.org.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
        set_title("Eiciel");
31
31
        set_border_width(4);
 
32
        
 
33
        // set_icon_from_file(PKGDATADIR "/img/icona_eiciel.png");
 
34
        std::vector<Glib::RefPtr<Gdk::Pixbuf> > llista;
 
35
        Glib::RefPtr<Gdk::Pixbuf> icona;
 
36
 
 
37
        icona = Gdk::Pixbuf::create_from_file(PKGDATADIR "/img/icona_eiciel_16.png");
 
38
        llista.push_back(icona);
 
39
        icona = Gdk::Pixbuf::create_from_file(PKGDATADIR "/img/icona_eiciel_24.png");
 
40
        llista.push_back(icona);
 
41
        icona = Gdk::Pixbuf::create_from_file(PKGDATADIR "/img/icona_eiciel_32.png");
 
42
        llista.push_back(icona);
 
43
        icona = Gdk::Pixbuf::create_from_file(PKGDATADIR "/img/icona_eiciel_48.png");
 
44
        llista.push_back(icona);
 
45
        icona = Gdk::Pixbuf::create_from_file(PKGDATADIR "/img/icona_eiciel_64.png");
 
46
        llista.push_back(icona);
 
47
 
 
48
        set_icon_list(llista);
32
49
 
33
50
        add(principal);
34
51
 
39
56
        superior.pack_start(escollirFitxer, Gtk::PACK_SHRINK, 4);
40
57
        superior.set_homogeneous(false);
41
58
 
 
59
        principal.add(paginador);
 
60
        paginador.append_page(paginaACL, _("Access Control List"));
 
61
 
42
62
        controlador_widget = new EicielMainControler();
43
63
        widget_principal = new EicielWindow(controlador_widget);
44
64
 
45
 
        principal.pack_start(*widget_principal, Gtk::PACK_EXPAND_WIDGET, 0);
 
65
        paginaACL.pack_start(*widget_principal, Gtk::PACK_EXPAND_WIDGET, 0);
 
66
 
 
67
#ifdef ENABLE_USER_XATTR
 
68
        paginador.append_page(paginaXAttr, _("Extended user attributes"));
 
69
 
 
70
        controlador_xattr = new EicielXAttrControler();
 
71
        widget_xattr = new EicielXAttrWindow(controlador_xattr);
 
72
 
 
73
        paginaXAttr.pack_start(*widget_xattr, Gtk::PACK_EXPAND_WIDGET, 0);
 
74
#endif  
46
75
 
47
76
        principal.pack_start(inferior, Gtk::PACK_SHRINK, 2);
48
77
        inferior.set_spacing(2);
144
173
        {
145
174
                case(Gtk::RESPONSE_NONE):
146
175
                        {
147
 
                                if (this->obrirFitxer(dialog.get_filename()))
148
 
                                {
149
 
                                        nomFitxer.set_text(dialog.get_filename());
150
 
                                }
151
 
                                else
 
176
                                if (!this->obrirFitxer(dialog.get_filename()))
152
177
                                {
153
178
                                        Gtk::MessageDialog missatge(_("Could not open the file \"") 
154
179
                                                        + Glib::locale_to_utf8(dialog.get_filename()) + Glib::ustring("\" ") 
155
180
                                                        + Glib::ustring("(") + controlador_widget->ultimError() + Glib::ustring(")"),
156
181
                                                        false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
157
182
                                        missatge.run();
158
 
                                        nomFitxer.set_text(_("No file opened"));
159
183
                                }
160
184
                                break;
161
185
                        }
172
196
 
173
197
bool EicielContainer::obrirFitxer(Glib::ustring nom)
174
198
{
 
199
        bool resultat;
175
200
        controlador_widget->obreFitxer(nom);
176
 
        return controlador_widget->fitxerObert();
 
201
 
 
202
        resultat = controlador_widget->fitxerObert();
 
203
 
 
204
#ifdef ENABLE_USER_XATTR
 
205
        controlador_xattr->obrirFitxer(nom);
 
206
 
 
207
        resultat |= controlador_xattr->fitxerObert();
 
208
#endif
 
209
 
 
210
        if (resultat)
 
211
        {
 
212
                nomFitxer.set_text(nom);
 
213
        }
 
214
        else
 
215
        {
 
216
                nomFitxer.set_text(_("No file opened"));
 
217
        }
 
218
 
 
219
        return resultat;
177
220
}
178
221
 
179
222
/* About box */