~ubuntu-branches/ubuntu/karmic/gedit/karmic

« back to all changes in this revision

Viewing changes to gedit/gedit.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Moog
  • Date: 2009-05-27 14:00:44 UTC
  • mfrom: (1.1.62 upstream)
  • Revision ID: james.westby@ubuntu.com-20090527140044-4h5ypu02i3s4zi0q
Tags: 2.27.1-0ubuntu1
* New upstream release: (LP: #380924)
  - Remove the mmap document loader (Paolo Borelli)
  - Remove open location dialog and sample plugin (Paolo Borelli)
  - Added public API for document saving (Jesse van den Kieboom)
  - Put external tools in a submenu (Jesse van den Kieboom)
  - Added language support for external tools (Jesse van den Kieboom)
  - Implemented asynchronous reading and writing on external tools (Jesse van den Kieboom)
  - Add Quick Open plugin (Jesse van den Kieboom)
  - Misc bugfixes
  - New and updated translations
* debian/patches/90_autoconf.patch
  - updated for new version
* Launchpad bugs fixed:
  - various crasher bugs (LP: #348536, LP: #368262, LP: #368495)
  - fix modeline scanning (LP: #367160)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 * list of people on the gedit Team.  
26
26
 * See the ChangeLog files for a list of changes. 
27
27
 *
28
 
 * $Id: gedit.c 6912 2009-02-22 17:00:21Z pborelli $
 
28
 * $Id$
29
29
 */
30
30
 
31
31
#ifdef HAVE_CONFIG_H
76
76
static BaconMessageConnection *connection;
77
77
#endif
78
78
 
79
 
static void
80
 
show_version_and_quit (void)
81
 
{
82
 
        g_print ("%s - Version %s\n", g_get_application_name (), VERSION);
83
 
 
84
 
        exit (0);
85
 
}
86
 
 
87
79
/* command line */
88
80
static gint line_position = 0;
89
81
static gchar *encoding_charset = NULL;
93
85
static gchar **remaining_args = NULL;
94
86
static GSList *file_list = NULL;
95
87
 
 
88
static void
 
89
show_version_and_quit (void)
 
90
{
 
91
        g_print ("%s - Version %s\n", g_get_application_name (), VERSION);
 
92
 
 
93
        exit (0);
 
94
}
 
95
 
 
96
static void
 
97
list_encodings_and_quit (void)
 
98
{
 
99
        gint i = 0;
 
100
        const GeditEncoding *enc;
 
101
 
 
102
        while ((enc = gedit_encoding_get_from_index (i)) != NULL) 
 
103
        {
 
104
                g_print ("%s\n", gedit_encoding_get_charset (enc));
 
105
 
 
106
                ++i;
 
107
        }
 
108
 
 
109
        exit (0);
 
110
}
 
111
 
96
112
static const GOptionEntry options [] =
97
113
{
98
114
        { "version", 'V', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
101
117
        { "encoding", '\0', 0, G_OPTION_ARG_STRING, &encoding_charset,
102
118
          N_("Set the character encoding to be used to open the files listed on the command line"), N_("ENCODING")},
103
119
 
 
120
        { "list-encodings", '\0', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
 
121
          list_encodings_and_quit, N_("Display list of possible values for the encoding option"), NULL},
 
122
 
104
123
        { "new-window", '\0', 0, G_OPTION_ARG_NONE, &new_window_option,
105
124
          N_("Create a new toplevel window in an existing instance of gedit"), NULL },
106
125