示例#1
0
        public LiveWebGalleryDialog(SimpleWebServer server, ILiveWebGalleryOptions options, LiveWebGalleryStats stats)
            : base(Assembly.GetExecutingAssembly(), "LiveWebGallery.ui", "live_web_gallery_dialog")
        {
            this.server  = server;
            this.options = options;
            this.stats   = stats;
            Modal        = false;

            activate_button.Active = server.Active;
            UpdateGalleryURL();
            limit_checkbox.Active = options.LimitMaxPhotos;
            limit_spin.Sensitive  = options.LimitMaxPhotos;
            limit_spin.Value      = options.MaxPhotos;
            UpdateQueryRadios();
            HandleQueryTagSelected(options.QueryTag != null ? options.QueryTag : App.Instance.Database.Tags.GetTagById(1));
            allow_tagging_checkbox.Active = options.TaggingAllowed;
            tag_edit_button.Sensitive     = options.TaggingAllowed;
            HandleEditableTagSelected(options.EditableTag != null ? options.EditableTag : App.Instance.Database.Tags.GetTagById(3));
            HandleStatsChanged(null, null);

            activate_button.Toggled        += HandleActivated;
            copy_button.Clicked            += HandleCopyClicked;
            current_view_radio.Toggled     += HandleRadioChanged;
            tagged_radio.Toggled           += HandleRadioChanged;
            selected_radio.Toggled         += HandleRadioChanged;
            tag_button.Clicked             += HandleQueryTagClicked;
            limit_checkbox.Toggled         += HandleLimitToggled;
            limit_spin.ValueChanged        += HandleLimitValueChanged;
            allow_tagging_checkbox.Toggled += HandleAllowTaggingToggled;
            tag_edit_button.Clicked        += HandleTagForEditClicked;
            stats.StatsChanged             += HandleStatsChanged;
        }
示例#2
0
		public LiveWebGalleryDialog (SimpleWebServer server, ILiveWebGalleryOptions options, LiveWebGalleryStats stats)
			: base (Assembly.GetExecutingAssembly (), "LiveWebGallery.ui", "live_web_gallery_dialog")
		{
			this.server = server;
			this.options = options;
			this.stats = stats;
			Modal = false;

			activate_button.Active = server.Active;
			UpdateGalleryURL ();
			limit_checkbox.Active = options.LimitMaxPhotos;
			limit_spin.Sensitive = options.LimitMaxPhotos;
			limit_spin.Value = options.MaxPhotos;
			UpdateQueryRadios ();
			HandleQueryTagSelected (options.QueryTag != null ? options.QueryTag : App.Instance.Database.Tags.GetTagById(1));
			allow_tagging_checkbox.Active = options.TaggingAllowed;
			tag_edit_button.Sensitive = options.TaggingAllowed;			
			HandleEditableTagSelected (options.EditableTag != null ? options.EditableTag : App.Instance.Database.Tags.GetTagById(3));
			HandleStatsChanged (null, null);
						
			activate_button.Toggled += HandleActivated;
			copy_button.Clicked +=HandleCopyClicked; 
			current_view_radio.Toggled += HandleRadioChanged;
			tagged_radio.Toggled += HandleRadioChanged;
			selected_radio.Toggled += HandleRadioChanged;
			tag_button.Clicked += HandleQueryTagClicked;
			limit_checkbox.Toggled += HandleLimitToggled; 
			limit_spin.ValueChanged += HandleLimitValueChanged;
			allow_tagging_checkbox.Toggled += HandleAllowTaggingToggled;
			tag_edit_button.Clicked += HandleTagForEditClicked;
			stats.StatsChanged += HandleStatsChanged;
		}
示例#3
0
 public GalleryRequestHandler(LiveWebGalleryStats stats)
     : base("gallery.html")
 {
     this.stats = stats;
     template = template.Replace ("TITLE", Catalog.GetString("F-Spot Gallery"));
     template = template.Replace ("OFFLINE_MESSAGE", Catalog.GetString("The web gallery seems to be offline now"));
     template = template.Replace ("SHOW_ALL", Catalog.GetString("Show All"));
 }
示例#4
0
 public GalleryRequestHandler(LiveWebGalleryStats stats)
     : base("gallery.html")
 {
     this.stats = stats;
     template   = template.Replace("TITLE", Catalog.GetString("F-Spot Gallery"));
     template   = template.Replace("OFFLINE_MESSAGE", Catalog.GetString("The web gallery seems to be offline now"));
     template   = template.Replace("SHOW_ALL", Catalog.GetString("Show All"));
 }
示例#5
0
        public void Run(object o, EventArgs e)
        {
            if (web_server == null)
            {
                stats = new LiveWebGalleryStats();
                RequestHandler gallery = new GalleryRequestHandler(stats);
                options = gallery as ILiveWebGalleryOptions;

                web_server       = new SimpleWebServer();
                web_server.Stats = stats;
                web_server.RegisterHandler("", gallery);
                web_server.RegisterHandler("gallery", gallery);
                web_server.RegisterHandler("ui", new ResourceRequestHandler());
                web_server.RegisterHandler("ping", new PingRequestHandler());
                web_server.RegisterHandler("photo", new PhotoRequestHandler(stats));
                web_server.RegisterHandler("thumb", new ThumbnailRequestHandler(stats));
                web_server.RegisterHandler("tag", new TagAddRemoveRequestHandler(options));
            }

            dialog           = new LiveWebGalleryDialog(web_server, options, stats);
            dialog.Response += HandleResponse;
            dialog.ShowAll();
        }
示例#6
0
        public void Run(object o, EventArgs e)
        {
            if (web_server == null) {
                stats = new LiveWebGalleryStats ();
                RequestHandler gallery = new GalleryRequestHandler (stats);
                options = gallery as ILiveWebGalleryOptions;

                web_server = new SimpleWebServer ();
                web_server.Stats = stats;
                web_server.RegisterHandler ("", gallery);
                web_server.RegisterHandler ("gallery", gallery);
                web_server.RegisterHandler ("ui", new ResourceRequestHandler ());
                web_server.RegisterHandler ("ping", new PingRequestHandler ());
                web_server.RegisterHandler ("photo", new PhotoRequestHandler (stats));
                web_server.RegisterHandler ("thumb", new ThumbnailRequestHandler (stats));
                web_server.RegisterHandler ("tag", new TagAddRemoveRequestHandler (options));
            }

            dialog = new LiveWebGalleryDialog (web_server, options, stats);
            dialog.Response += HandleResponse;
            dialog.ShowAll ();
        }
 public PhotoRequestHandler(LiveWebGalleryStats stats)
 {
     this.stats = stats;
 }
 public ThumbnailRequestHandler(LiveWebGalleryStats stats)
     : base(stats)
 {
 }
示例#9
0
		public ThumbnailRequestHandler (LiveWebGalleryStats stats) 
			: base (stats) {}
示例#10
0
		public PhotoRequestHandler (LiveWebGalleryStats stats)
		{
			this.stats = stats;
		}