~ubuntu-branches/ubuntu/vivid/gimp/vivid

« back to all changes in this revision

Viewing changes to app/actions/text-editor-commands.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-08 18:50:03 UTC
  • mto: (1.1.26) (0.5.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 71.
  • Revision ID: package-import@ubuntu.com-20120508185003-tltkvbaysf8d2426
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* GIMP - The GNU Image Manipulation Program
2
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
3
 *
4
 
 * This program is free software; you can redistribute it and/or modify
 
4
 * This program is free software: you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
6
 
 * the Free Software Foundation; either version 2 of the License, or
 
6
 * the Free Software Foundation; either version 3 of the License, or
7
7
 * (at your option) any later version.
8
8
 *
9
9
 * This program is distributed in the hope that it will be useful,
12
12
 * GNU General Public License for more details.
13
13
 *
14
14
 * You should have received a copy of the GNU General Public License
15
 
 * along with this program; if not, write to the Free Software
16
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
16
 */
18
17
 
19
18
#include "config.h"
27
26
 
28
27
#include "core/gimp.h"
29
28
 
 
29
#include "widgets/gimphelp-ids.h"
 
30
#include "widgets/gimptextbuffer.h"
30
31
#include "widgets/gimptexteditor.h"
31
 
#include "widgets/gimphelp-ids.h"
32
32
#include "widgets/gimpuimanager.h"
33
 
#include "widgets/gimpwidgets-utils.h"
34
33
 
35
34
#include "text-editor-commands.h"
36
35
 
137
136
      buffer   = gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->view));
138
137
      filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
139
138
 
140
 
      if (! gimp_text_buffer_load (buffer, filename, &error))
 
139
      if (! gimp_text_buffer_load (GIMP_TEXT_BUFFER (buffer), filename, &error))
141
140
        {
142
141
          gimp_message (editor->ui_manager->gimp, G_OBJECT (dialog),
143
142
                        GIMP_MESSAGE_ERROR,
152
151
      g_free (filename);
153
152
    }
154
153
 
155
 
  gtk_widget_destroy (dialog);
 
154
  gtk_widget_hide (dialog);
156
155
}