GTK3/gtkmm: Drag and drop image from browser - gtk

I have implemented the behavior of dragging pictures from the file manager to Gtk::DrawingArea
std::vector<Gtk::TargetEntry> listTargets;
listTargets.push_back(Gtk::TargetEntry("text/uri-list"));
drag_dest_set(listTargets, (Gtk::DEST_DEFAULT_MOTION | Gtk::DEST_DEFAULT_DROP), (Gdk::ACTION_COPY | Gdk::ACTION_MOVE));
signal_drag_data_received().connect(sigc::mem_fun(*this, &CanvasArea::on_dropped_file));
What needs to be done to be able to drag and drop an image from the browser?
I use chrome browser and tried to add png/jpg files, but nothing happend - on_dropped_file doesn't called
regads, max
UPD: I lied. After drop image from browser, the program recognizes the object as "text/plain" with url in Gtk::SelectionData.

Related

ModX Evo: TinyMCE wont insert image path into image URL in selector

This is occuring on ModX Evo 1.0.15.
When I try to select an image (or file) using TinyMCEs image selector I can upload and browse for the image but when I select it to place within my text nothing happens - the image path area remains blank.
Heres a video demonstrating what happens: https://www.youtube.com/watch?v=VSgTsyj9B6k&feature=youtu.be&hd=1
Does anyone know how to fix this?
Weird, never had that problem.
Did you try update / reinstall of Evo? (or only tinymce and kcfinder)
Are config paths correct?
Try testing in Firefox, It's possible it's related to Chrome. If it doesn't work in Firefox, Reinstall the plugin.
Clear your cache and try selecting the image.
For a temporary solution if this doesn't work, just type in the image name into the box 'images/imagename.jpg' (minus quotes)
Good Luck

Issue with browse and upload new thumbnail in the template of CQ 5.5

I have provided thumbnail image for my templates. The thumbnail has jcr:content with property as below
name jcr:data
type boolean
value view
On double click view we get a browse option to upload new image from file system. But on selecting an image and clicking "OK" button the window isn't closing, though the new image gets uploaded in the thumbnail. And thus we have to close it either by clicking the "cancel" button or the 'X' (close) button.
Any solution to fix the "OK" issue.
Thanks.
I think this is a bug in CQ, because I have the same problem. I don't think CRXDE Lite can handle uploading an image directly. I would recommend creating a new package with a filter for just that image (/apps/myproject/templates/htmlpage/thumbnail.png). Build the package and then download it. Extract the package and replace the image with the new thumbnail. Rezip the package and upload it to your CQ instance, then click the install button. This workaround will let you update the image.
There is also a way to directly access the JCR filesystem. In Mac OSX I open up Finder and hit CMD-K to connect to the CQ instance directly. Then I can just drop the new image in directly. I'm not sure what environment you're working in, so your mileage with this approach may vary.

embeding flash in page tab

Anyone have solution to display flash inside Page Tab URL, that works in the newest Chrome? Chrome blocks embedding for security reasons. Console error:
Unsafe JavaScript attempt to access frame with URL https://www.facebook.com/pages/[CUT] from frame with URL https://[PAGE_TAB_URL]. The frame being accessed set 'document.domain' to 'facebook.com', but the frame requesting access did not. Both must set 'document.domain' to the same value to allow access.
I know, that I can display flash in canvas mode (apps.facebook.com/appname), but I want to embed it inside Page Tab.
Well I once had the same problem, I've built a facebook iframe app that would allow users to use the webcam to take a pic and the .swf responsible for using the webcam, always fired that error.
If you embed a youtube video, chrome will fire that error, but the videos still plays, in my case the .swf object just frozen and I was unable to take any pic or even change flash settings.
The solution was to add this .swf after a user action, in this case a click, just try not embedding the flash on the page, and just put a button that will add the embed code after the user clicks on it.

IOS/IPHONE Safari or Chrome viewing local files

I have created a stand-alone HTML, CSS, JavaScript offline map view using Leaflet (see leafletjs.com). I can use FileApp/DiskAid to download the application to the iphone. I can tap on the HTML file and view the app, but as you can see from the attached screen shot, the layers and zoom controls are at the top of the screen. If I try and press them then your HTML viewer with block the press and slide down a banner (BACK, ACTIONS, etc) (the black top banner that your viewer shows).
Better yet, I would like to open it with SAFARI since it has the NITRO JS engine, but the only OPEN IN options I get are Evernote, RiddleDocs, Mover, and DropBox.
Is there way to tell safari or chrome for IOS to open up a local file system where the html is: http:// 127.0.0.1/fileApp/Toby.html for example where Toby is my HTML file? I realize is somewhere it the data for t
First Step :-
These options are configured using keys in your Info.plist file. The first key is UIFileSharingEnabled, which enables iTunes sharing of files in your Documents folder. The second key is LSSupportsOpeningDocumentsInPlace, which grants the local file provider access to files in your Documents folder. Add these keys to your Info.plist and set their values to YES.
enter image description here
enter image description here
let documentPicker = UIDocumentPickerViewController(documentTypes: [String(kUTTypePDF)], in: .import)
documentPicker.delegate = self
documentPicker.modalPresentationStyle = .overCurrentContext
present(documentPicker, animated: true, completion: nil)
You can use option either to import or export files from app. Also you can define the type of files you want to export or import...

How to have image target new window or _blank using FPDF?

In my app the PDF gets opened in the web page and in the below example, when the users clicks on Logo.png it's getting redirected to FPDF site in the same page, but i want to open the link in the new window, instead of opening in the same window, so the users has the PDF opened.
$pdf->Image('logo.png',10,10,30,0,'','http://www.fpdf.org');
Yes I have tried some workarounds for this but its seem to not possible currently. But I have achieved this using ViewerJS.
Just display pdf using viewerjs(pdf js). Just put this line $('a').attr('target', '_blank'); after div.setAttribute('data-loaded', true); inside viewer.js file.
And you will find target blank. Hope this helps!
Sorry, I am pretty sure that this is not possible currently.