235
235
cd_warning ("no bookmarks");
238
g_print ("found bookmarks '%s'\n", s_cBookmarksFile);
238
cd_debug ("found bookmarks '%s'\n", s_cBookmarksFile);
240
240
// on parse le fichier.
241
241
s_pRootItem = _parse_bookmarks (s_cBookmarksFile);
261
261
static void _on_file_event (CairoDockFMEventType iEventType, const gchar *cURI, gpointer data)
263
g_print ("bookmarks have changed\n");
263
cd_debug ("bookmarks have changed\n");
264
264
switch (iEventType)
266
266
case CAIRO_DOCK_FILE_DELETED :
291
291
g_return_val_if_fail (icon != NULL, FALSE);
292
292
//g_print ("-> data : %d\n", icon);
294
cairo_t* pSourceContext = cairo_dock_create_context_from_container (CAIRO_CONTAINER (g_pMainDock));
295
294
GInputStream * is = g_memory_input_stream_new_from_data (icon,
302
301
double fImageWidth=0, fImageHeight=0;
303
302
double fZoomX=0, fZoomY=0;
304
303
pEntry->pIconSurface = cairo_dock_create_surface_from_pixbuf (pixbuf,
307
305
myDialogs.dialogTextDescription.iSize, myDialogs.dialogTextDescription.iSize,
309
307
&fImageWidth, &fImageHeight,
310
308
&fZoomX, &fZoomY);
311
309
g_object_unref (pixbuf);
312
cairo_destroy (pSourceContext);
323
320
static void _cd_do_launch_url (CDEntry *pEntry)
325
g_print ("%s (%s)\n", __func__, pEntry->cPath);
322
cd_debug ("%s (%s)\n", __func__, pEntry->cPath);
326
323
//cairo_dock_fm_launch_uri (pEntry->cPath);
327
324
cairo_dock_launch_command_printf ("firefox \"%s\"", NULL, pEntry->cPath);
330
327
static void _cd_do_launch_in_new_window (CDEntry *pEntry)
332
g_print ("%s (%s)\n", __func__, pEntry->cPath);
329
cd_debug ("%s (%s)\n", __func__, pEntry->cPath);
333
330
cairo_dock_launch_command_printf ("firefox -no-remote \"%s\"", NULL, pEntry->cPath);
336
333
static void _cd_do_copy_url (CDEntry *pEntry)
338
g_print ("%s (%s)\n", __func__, pEntry->cPath);
335
cd_debug ("%s (%s)\n", __func__, pEntry->cPath);
339
336
GtkClipboard *pClipBoard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
340
337
gtk_clipboard_set_text (pClipBoard, pEntry->cPath, -1);
343
340
static void _cd_do_launch_all_url (CDEntry *pEntry)
345
g_print ("%s (%s)\n", __func__, pEntry->cPath);
342
cd_debug ("%s (%s)\n", __func__, pEntry->cPath);
346
343
cairo_dock_launch_command_printf ("firefox %s", NULL, pEntry->cPath);
434
431
pSubEntry = g_new0 (CDEntry, 1);
435
432
pSubEntry->cPath = sAllUrls->str;
436
pSubEntry->cName = g_strdup (D_("Open all"));
433
pSubEntry->cName = g_strdup (D_("Open file"));
437
434
pSubEntry->cIconName = g_strdup (GTK_STOCK_OPEN);
438
435
pSubEntry->fill = cd_do_fill_default_entry;
439
436
pSubEntry->execute = _cd_do_launch_all_url;
485
482
static GList* search (const gchar *cText, int iFilter, gboolean bSearchAll, int *iNbEntries)
487
g_print ("%s (%s)\n", __func__, cText);
484
cd_debug ("%s (%s)\n", __func__, cText);
488
485
if (s_pRootItem == NULL)