~ubuntu-branches/ubuntu/natty/file-browser-applet/natty

« back to all changes in this revision

Viewing changes to src/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2008-08-29 13:50:51 UTC
  • mfrom: (2.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20080829135051-bani7mwsfjdbs9fx
Tags: 0.5.9-1
* New upstream release. (Closes: #497078)
* debian/control:
 - Remove Build-Depend on libgnomevfs2-dev and add Build-Depend
   on libglib2.0-dev as upstream has moved to GIO. (Closes: #493878)
 - Remove depreciated Depends and Build Depends on libgnome-desktop{-dev}
* Fixes Lintian warning: timewarp-standards-version

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * File:                                main.c
3
3
 * Created:                             September 2005
4
4
 * Created by:                  Axel von Bertoldi
5
 
 * Last Modified:               January 2008
 
5
 * Last Modified:               August 2008
6
6
 * Last Modified by:    Axel von Bertoldi
7
7
 * (C) 2005-2008                Axel von Bertoldi
8
8
 *
26
26
#include <glib.h>
27
27
#include <glib/gprintf.h>
28
28
#include <gtk/gtk.h>
29
 
#include <libgnomevfs/gnome-vfs.h>
30
29
#include <panel-applet.h>
 
30
#include <string.h>
31
31
 
32
32
#include "panel-menu-bar.h"
33
33
#include "utils.h"
 
34
#include "config.h"
34
35
 
35
36
#define APPLET_IID                      "OAFIID:GNOME_FileBrowserApplet"
36
37
#define APPLET_FACTORY_IID      "OAFIID:GNOME_FileBrowserApplet_Factory"
37
 
#define VERSION                         "0.5.6"
 
38
#define VERSION                         "0.5.9"
38
39
 
39
40
/******************************************************************************/
40
41
static const gchar file_browser_applet_menu_xml [] =
54
55
        return FALSE;
55
56
}
56
57
/******************************************************************************/
57
 
static gboolean 
 
58
static gboolean
58
59
file_browser_applet_display_help_dialog (GtkWidget *widget) {
59
60
 
60
 
        if (1) {
61
 
                GError *error = NULL;
62
 
 
63
 
                gnome_help_display_desktop_on_screen (
64
 
                          NULL,
65
 
                          "file-browser-applet", 
66
 
                          "file-browser-applet", 
67
 
                          NULL, 
68
 
                          gtk_widget_get_screen (widget),
69
 
                          &error);
70
 
 
71
 
                if (error) {       
72
 
                        utils_show_dialog ("Error",
73
 
                                                           "Could not display help.",
74
 
                                                           GTK_MESSAGE_ERROR);
75
 
                        g_error_free (error);
76
 
                }
77
 
        }
78
 
        else {
79
 
                utils_show_dialog ("Help",
80
 
                                                   "Sorry, no help or documentation yet...",
 
61
#ifdef ENABLE_HELP_DOC
 
62
        GError *error = NULL;
 
63
 
 
64
        gnome_help_display_desktop_on_screen (
 
65
                  NULL,
 
66
                  "file-browser-applet",
 
67
                  "file-browser-applet",
 
68
                  NULL,
 
69
                  gtk_widget_get_screen (widget),
 
70
                  &error);
 
71
 
 
72
        if (error) {
 
73
                utils_show_dialog ("Error",
 
74
                                                   "Could not display help.",
81
75
                                                   GTK_MESSAGE_ERROR);
 
76
                g_error_free (error);
82
77
        }
 
78
#else
 
79
        utils_show_dialog ("Help",
 
80
                                           "Sorry, no help or documentation yet...",
 
81
                                           GTK_MESSAGE_ERROR);
 
82
#endif
83
83
        return FALSE;
84
84
}
85
85
/******************************************************************************/
94
94
                "Contributions by:",
95
95
                "Ivan N. Zlatev <contact@i-nz.net>",
96
96
                "Stefano Maggiolo <maggiolo@mail.dm.unipi.it>",
 
97
                "Deji Akingunola",
97
98
                NULL
98
99
        };
99
100
        const gchar *documenters [] = {
 
101
                "You!!! That's right! You can help!",
100
102
/*              "Axel von Bertoldi", */
101
103
                NULL
102
104
        };
103
105
        const gchar *translator_credits = _("translator_credits");
104
 
        
 
106
 
105
107
        file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, "file-browser-applet.png", TRUE, NULL);
106
108
        if (file != NULL) {
107
109
                pixbuf = gdk_pixbuf_new_from_file (file, NULL);
135
137
/******************************************************************************/
136
138
static gboolean
137
139
file_browser_applet_create (PanelApplet *applet) {
138
 
    gnome_vfs_init ();
139
140
 
140
141
        PanelMenuBar* panel_menu_bar = panel_menu_bar_new (applet);
141
142
 
151
152
                                                         panel_menu_bar);
152
153
 
153
154
        gtk_widget_show_all (GTK_WIDGET(applet));
154
 
        gtk_main ();    
155
 
        
 
155
        gtk_main ();
 
156
 
156
157
    return TRUE;
157
158
}
158
159
/******************************************************************************/
172
173
                                                PANEL_TYPE_APPLET,
173
174
                                                        "file-browser-applet",
174
175
                                                        "0",
175
 
                                                        file_browser_applet_factory, 
 
176
                                                        file_browser_applet_factory,
176
177
                                                        NULL)
177
178
/******************************************************************************/