~ubuntu-branches/ubuntu/gutsy/avscan/gutsy

« back to all changes in this revision

Viewing changes to avscan/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2007-08-12 14:22:25 UTC
  • mfrom: (1.9.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070812142225-2whp6690lilo2wg8
Tags: 3.2.1-openssl-2
Correctly handle DEB_BUILD_OPTIONS=nostrip (Closes: #436496).

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
static void MainSignalCB(int s);
48
48
static gint MainTOCB(gpointer data);
49
49
 
 
50
static void MainFileSelectorCreatedCB(
 
51
        const gchar *path, gpointer data
 
52
);
 
53
static void MainFileSelectorModifiedCB(
 
54
        const gchar *old_path,
 
55
        const gchar *new_path,
 
56
        gpointer data
 
57
);
 
58
static void MainFileSelectorDeletedCB(
 
59
        const gchar *path, gpointer data
 
60
);
 
61
 
50
62
static cfg_item_struct *MainCfgListNew(void);
51
63
 
52
64
win_struct *MainNewAVScan(core_struct *core, gint argc, gchar **argv);
176
188
 
177
189
 
178
190
/*
 
191
 *      File selector created callback.
 
192
 */
 
193
static void MainFileSelectorCreatedCB(
 
194
        const gchar *path, gpointer data
 
195
)
 
196
{
 
197
        core_struct *core = CORE(data);
 
198
#ifdef HAVE_EDV2
 
199
        EDVNotifyQueueObjectAdded(core->edv_ctx, path);
 
200
        EDVContextFlush(core->edv_ctx);
 
201
#endif
 
202
}
 
203
 
 
204
/*
 
205
 *      File selector changed callback.
 
206
 */
 
207
static void MainFileSelectorModifiedCB(
 
208
        const gchar *old_path,
 
209
        const gchar *new_path,
 
210
        gpointer data
 
211
)
 
212
{
 
213
        core_struct *core = CORE(data);
 
214
#ifdef HAVE_EDV2
 
215
        EDVNotifyQueueObjectModified(core->edv_ctx, old_path, new_path);
 
216
        EDVContextFlush(core->edv_ctx);
 
217
#endif
 
218
}
 
219
 
 
220
/*
 
221
 *      File selector deleted callback.
 
222
 */
 
223
static void MainFileSelectorDeletedCB(
 
224
        const gchar *path, gpointer data
 
225
)
 
226
{
 
227
        core_struct *core = CORE(data);
 
228
#ifdef HAVE_EDV2
 
229
        EDVNotifyQueueObjectRemoved(core->edv_ctx, path);
 
230
        EDVContextFlush(core->edv_ctx);
 
231
#endif
 
232
}
 
233
 
 
234
 
 
235
/*
179
236
 *      Creates a new default Configuration List.
180
237
 */
181
238
static cfg_item_struct *MainCfgListNew(void)
923
980
        CFGFileOpen(path, cfg_list);
924
981
        g_free(path);
925
982
 
 
983
        /* Set the file selector callbacks */
 
984
        FileBrowserSetObjectCreatedCB(
 
985
            MainFileSelectorCreatedCB, core
 
986
        );
 
987
        FileBrowserSetObjectModifiedCB(
 
988
            MainFileSelectorModifiedCB, core
 
989
        );
 
990
        FileBrowserSetObjectDeletedCB(
 
991
            MainFileSelectorDeletedCB, core
 
992
        );
926
993
 
927
994
        /* Create the AVScan window */
928
995
        win = MainNewAVScan(core, argc, argv);