Giter VIP home page Giter VIP logo

Comments (20)

alexarnaud avatar alexarnaud commented on August 28, 2024

Same on Debian with caja-dropbox 1.20, see this downstream report.

from caja-dropbox.

flexiondotorg avatar flexiondotorg commented on August 28, 2024

@sunweaver I fixed this bug in Debian and Ubuntu with my last update to caja-dropbox 1.20 in pkg-mate, so this closed in Debian.

@raveit65 @monsta Does this issue exist in other distros? If so, I can make a pull request here.

from caja-dropbox.

alexarnaud avatar alexarnaud commented on August 28, 2024

from caja-dropbox.

N0rbert avatar N0rbert commented on August 28, 2024

Just tested 1.20.0-2 on Debian Buster, bug exists:
mate on Buster

On Debian Stretch caja-dropbox 1.16.0-1 has menu in place.
I have removed Ubuntu 17.10, but in 18.04 LTS menu is in place.

And please do not forget about caja-dropbox autostart bug.

from caja-dropbox.

raveit65 avatar raveit65 commented on August 28, 2024

@flexiondotorg
here the symptoms are different with SNI support enabled.
with left-click on applet i see Qt-theme.
dropbox-na-tray-left-click
with right-click on applet i see gtk-theme + the issue with submenu.
dropbox-na-tray-right-click

I think a PR won't hurt for testing.

from caja-dropbox.

flexiondotorg avatar flexiondotorg commented on August 28, 2024

@alexarnaud @sunweaver The comment by @raveit65 above is one example of where SNI is not doing the right thing and why I choose to disable.

from caja-dropbox.

lukefromdc avatar lukefromdc commented on August 28, 2024

Why on earth would Caja-Dropbox ever show a QT menu or QT theme anywhere? How is QT getting into this? Find that and we might find the bug. I don't use Dropbox (or Google drive etc) so don't have this installed, but for a GTK app to ever use a QT theme strikes me as seriously odd. We should not even be loading QT unless another app has loaded it, and to my knowledge GTK does not read QT themes at all

from caja-dropbox.

raveit65 avatar raveit65 commented on August 28, 2024

This part of caja-dropbox comes from proprietary dropbox code itself, so we can't fix it directly.
We ship only the caja extension code and a binary for start dropbox.
One solution is that people also file out reports against dropbox.......

from caja-dropbox.

raveit65 avatar raveit65 commented on August 28, 2024

Btw. i think they switched from gtk+ to Qt 2 or 3 years ago.

from caja-dropbox.

lukefromdc avatar lukefromdc commented on August 28, 2024

I looked in some of the caja-dropbox soruce files, saw includes for GTK but not QT. Dependency checks in configure.ac are

CAJA_REQUIRED=1.17.1
GLIB_REQUIRED=2.50.0

again no QT in those

from caja-dropbox.

lukefromdc avatar lukefromdc commented on August 28, 2024

Ahh-now I see what you are saying. The indicator itself comes from Dropbox and not from Caja? If so, without even the source we have no idea what it is doing. That is not something I can fix myself.

from caja-dropbox.

raveit65 avatar raveit65 commented on August 28, 2024

The indicator itself comes from Dropbox and not from Caja?

Yes, same for this folder in home dir after installing the dropbox code.
[rave@mother ~]$ ls ~/.dropbox-dist/
dropboxd dropbox-lnx.x86_64-46.3.59 VERSION

from caja-dropbox.

lukefromdc avatar lukefromdc commented on August 28, 2024

OK, someone who has this installed (and probably a Dropbox account) will need to find this unless someone can duplicate this with another QT app, which would make this a more general QT bug that would be more easily fixed.

from caja-dropbox.

lukefromdc avatar lukefromdc commented on August 28, 2024

Wrong page comment, deleting...

from caja-dropbox.

alexarnaud avatar alexarnaud commented on August 28, 2024

from caja-dropbox.

raveit65 avatar raveit65 commented on August 28, 2024

With SNI disabled the menus use Qt Styles with left/right click and all menuitems displaying well.
@flexiondotorg
What fix did you proposed in you comment?
#27 (comment)

from caja-dropbox.

flexiondotorg avatar flexiondotorg commented on August 28, 2024

I'll file a pull request, but the fix makes copy of the environment then coerces XDG_DESKTOP_SESSION to report "Unity" and execs dropbox by passing in the modified environment. This environment modification is only exposed to the dropbox process and works around an issue where the Indicator only works correctly on Unity. The same fix has been applied to Ubuntu for Unity users because the session name changed to "Unity7" recently and also for Budgie.

from caja-dropbox.

raveit65 avatar raveit65 commented on August 28, 2024

I don't know why but with latest mate-panel from master everything looks fine with using SNI.
bildschirmfoto zu 2019-01-05 15-19-54

from caja-dropbox.

monsta avatar monsta commented on August 28, 2024

This downstream patch by @flexiondotorg does the wrong thing when there are no indicators and SNI is disabled.

--- a/caja-dropbox.in	2017-03-28 02:00:33.223411568 +0100
+++ b/caja-dropbox.in	2017-03-28 02:03:34.637407866 +0100
@@ -728,8 +728,13 @@
     if os.access(db_path, os.X_OK):
         f = open("/dev/null", "w")
         # we don't reap the child because we're gonna die anyway, let init do it
+
+        # Fix indicator icon and menu. (LP: #1559249)
+        new_env = os.environ.copy()
+        new_env['XDG_CURRENT_DESKTOP'] = 'Unity'
+
         a = subprocess.Popen([db_path], preexec_fn=os.setsid, cwd=os.path.expanduser("~"),
-                             stderr=sys.stderr, stdout=f, close_fds=True)
+                             stderr=sys.stderr, stdout=f, close_fds=True, env=new_env)
 
         # in seconds
         interval = 0.5

Here's how it looks in Mint 19.1:

bad-menu

Yes, this white block is the "menu".

If I enable SNI, the menu is back to normal.

If I revert the mentioned patch, the menu is also back to normal, this time with or without SNI. Actually, dropbox doesn't seem to use SNI if that patch is reverted. I get the same menu on left and right click, which would be impossible with SNI (left click would do nothing). (That was wrong guess - I just remembered that Qt apps can show menu with SNI on both left and right click)

NOTE: Mint 19.1 is based on Ubuntu 18.04 and uses MATE 1.20 from Ubuntu repos. I chose it for testing because it has no indicators by default. It was easier than trying to rip all the indicators from the default Ubuntu setup...

from caja-dropbox.

raveit65 avatar raveit65 commented on August 28, 2024

Ok, the ubuntu patch needs to be revert.
@flexiondotorg ping ^^^^^

from caja-dropbox.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.