~ubuntu-branches/ubuntu/oneiric/cairo-dock-plug-ins/oneiric-updates

« back to all changes in this revision

Viewing changes to dnd2share/src/applet-notifications.c

  • Committer: Kees Cook
  • Date: 2011-08-11 23:17:39 UTC
  • mfrom: (20.1.1 cairo-dock-plug-ins)
  • Revision ID: kees@outflux.net-20110811231739-cteedan51tmdg77v
Tags: 2.4.0~0beta2-0ubuntu1
releasing version 2.4.0~0beta2-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
297
297
        CD_APPLET_LEAVE ();
298
298
}
299
299
 
 
300
// checkbox => Use only a file web hosting
 
301
static void _set_use_only_file_type (GtkCheckMenuItem *pMenuItem, gpointer *data)
 
302
{
 
303
        myConfig.bUseOnlyFileType = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (pMenuItem));
 
304
        cairo_dock_update_conf_file (CD_APPLET_MY_CONF_FILE,
 
305
                G_TYPE_BOOLEAN, "Configuration", "only file type", myConfig.bUseOnlyFileType,
 
306
                G_TYPE_INVALID); // updated the config file => maybe not needed if we want a temporary status
 
307
}
 
308
 
300
309
 
301
310
//\___________ Define here the action to be taken when the user left-clicks on your icon or on its subdock or your desklet. The icon and the container that were clicked are available through the macros CD_APPLET_CLICKED_ICON and CD_APPLET_CLICKED_CONTAINER. CD_APPLET_CLICKED_ICON may be NULL if the user clicked in the container but out of icons.
302
311
CD_APPLET_ON_CLICK_BEGIN
398
407
        GtkWidget *mi = gtk_image_menu_item_new_with_label (D_("History"));
399
408
        
400
409
        GtkWidget *im = gtk_image_new_from_stock (GTK_STOCK_INDEX, GTK_ICON_SIZE_MENU);
 
410
#if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16)
 
411
        gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (mi), TRUE);
 
412
#endif
401
413
        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), im);
402
414
        
403
415
        gtk_menu_shell_append (GTK_MENU_SHELL (CD_APPLET_MY_MENU), mi); 
478
490
        }
479
491
        else
480
492
                gtk_widget_set_sensitive (GTK_WIDGET (mi), FALSE);
481
 
        
 
493
 
 
494
        pMenuItem = gtk_check_menu_item_new_with_label (_("Use only a files hosting site"));
 
495
        gtk_menu_shell_append (GTK_MENU_SHELL (CD_APPLET_MY_MENU), pMenuItem);
 
496
        if (myConfig.bUseOnlyFileType)
 
497
                gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (pMenuItem), TRUE);
 
498
        g_signal_connect (G_OBJECT (pMenuItem), "toggled", G_CALLBACK (_set_use_only_file_type), NULL);
 
499
 
482
500
        CD_APPLET_ADD_ABOUT_IN_MENU (pModuleSubMenu);
483
501
CD_APPLET_ON_BUILD_MENU_END