~ubuntu-branches/ubuntu/gutsy/gmanedit/gutsy

« back to all changes in this revision

Viewing changes to src/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach
  • Date: 2001-07-11 18:55:16 UTC
  • Revision ID: james.westby@ubuntu.com-20010711185516-xv17prucwqrjlhf3
Tags: upstream-0.3.3
ImportĀ upstreamĀ versionĀ 0.3.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  This program is free software; you can redistribute it and/or modify
 
3
 *  it under the terms of the GNU General Public License as published by
 
4
 *  the Free Software Foundation; either version 2 of the License, or
 
5
 *  (at your option) any later version.
 
6
 *
 
7
 *  This program is distributed in the hope that it will be useful,
 
8
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
 *  GNU Library General Public License for more details.
 
11
 *
 
12
 *  You should have received a copy of the GNU Library General Public License
 
13
 *  along with this program; if not, write to the Free Software
 
14
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
15
 */
 
16
 
 
17
#ifdef HAVE_CONFIG_H
 
18
#  include <config.h>
 
19
#endif
 
20
 
 
21
#include <gnome.h>
 
22
#include <gtk/gtk.h>
 
23
#include <gdk/gdk.h>
 
24
 
 
25
#include "interface.h"
 
26
#include "support.h"
 
27
#define cuantos (sizeof(tabla)/sizeof(GtkTargetEntry))
 
28
 
 
29
enum {
 
30
          TARGET_STRING,
 
31
          TARGET_URL,
 
32
          TARGET_MAN
 
33
};
 
34
 
 
35
static GtkTargetEntry tabla[]={
 
36
        { "STRING", 0, TARGET_STRING },
 
37
        { "text/plain", 0, TARGET_STRING },
 
38
        { "text/uri-list", 0, TARGET_URL },
 
39
        { "application/x-troff-man", 0, TARGET_MAN }
 
40
};
 
41
 
 
42
 
 
43
int
 
44
main (int argc, char *argv[])
 
45
{
 
46
  GtkWidget *wprincipal;
 
47
  GtkWidget *text;
 
48
 
 
49
#ifdef ENABLE_NLS
 
50
  bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
 
51
  textdomain (PACKAGE);
 
52
#endif
 
53
 
 
54
  gtk_set_locale ();
 
55
  gtk_init (&argc, &argv);
 
56
  gnome_init("gmanedit",VERSION,argc,argv);
 
57
 
 
58
  /*
 
59
   * The following code was added by Glade to create one of each component
 
60
   * (except popup menus), just so that you see something after building
 
61
   * the project. Delete any components that you don't want shown initially.
 
62
   */
 
63
  wprincipal = create_wprincipal ();
 
64
  gtk_widget_show (wprincipal);
 
65
  
 
66
  text=lookup_widget(GTK_WIDGET(wprincipal),"text");
 
67
 
 
68
  gtk_drag_dest_set(text, GTK_DEST_DEFAULT_ALL, tabla, cuantos-1, 
 
69
                  GDK_ACTION_COPY|GDK_ACTION_MOVE);
 
70
 
 
71
  gtk_main ();  
 
72
  return 0;
 
73
}
 
74