~ubuntu-branches/ubuntu/oneiric/gnome-panel/oneiric

« back to all changes in this revision

Viewing changes to gnome-panel/gnome-desktop-item-edit.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-01-14 22:20:05 UTC
  • mto: (2.1.6 squeeze) (1.3.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 171.
  • Revision ID: james.westby@ubuntu.com-20100114222005-rll7tw9fojl3ac6z
Tags: upstream-2.29.5.1
ImportĀ upstreamĀ versionĀ 2.29.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#include <glib/gi18n.h>
4
4
#include <gio/gio.h>
5
5
#include <gtk/gtk.h>
6
 
#include <libgnomeui/gnome-ui-init.h>
7
6
 
8
7
#include <libpanel-util/panel-error.h>
9
8
#include <libpanel-util/panel-keyfile.h>
10
9
 
11
10
#include "panel-ditem-editor.h"
12
11
#include "panel-icon-names.h"
13
 
 
14
 
#include "nothing.cP"
 
12
#include "panel-util.h"
15
13
 
16
14
/* FIXME Symbols needed by panel-util.c - sucky */
17
15
#include "applet.h"
27
25
static gboolean create_new = FALSE;
28
26
static char **desktops = NULL;
29
27
 
30
 
static const GOptionEntry options[] = {
 
28
static GOptionEntry options[] = {
31
29
        { "create-new", 0, 0, G_OPTION_ARG_NONE, &create_new, N_("Create new file in the given directory"), NULL },
32
30
        { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &desktops, NULL, N_("[FILE...]") },
33
31
        { NULL }
99
97
int
100
98
main (int argc, char * argv[])
101
99
{
102
 
        GOptionContext *context;
103
 
        GnomeProgram *program;
 
100
        GError *error = NULL;
104
101
        int i;
105
102
 
106
103
        bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
107
104
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
108
105
        textdomain (GETTEXT_PACKAGE);
109
106
 
110
 
        context = g_option_context_new (N_("- Edit .desktop files"));
111
 
        g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
112
 
        g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
113
 
 
114
 
        program = gnome_program_init ("gnome-desktop-item-edit", VERSION,
115
 
                                      LIBGNOMEUI_MODULE,
116
 
                                      argc, argv,
117
 
                                      GNOME_PARAM_GOPTION_CONTEXT, context,
118
 
                                      NULL);
 
107
        if (!gtk_init_with_args (&argc, &argv,
 
108
                                 _("- Edit .desktop files"),
 
109
                                 options,
 
110
                                 GETTEXT_PACKAGE,
 
111
                                 &error)) {
 
112
                g_printerr ("%s\n", error->message);
 
113
                g_error_free (error);
 
114
                return 1;
 
115
        }
119
116
 
120
117
        gtk_window_set_default_icon_name (PANEL_ICON_LAUNCHER);
121
118
 
224
221
        if (dialogs > 0)
225
222
                gtk_main ();
226
223
 
227
 
        g_object_unref (program);
228
 
 
229
224
        return 0;
230
225
}