Add patch to allow toolbar dragging

Bug #1332721 reported by Adam Smith
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gtk+2.0 (Ubuntu)
Fix Released
Wishlist
Iain Lane

Bug Description

Ubuntu already has a patch - 062_dnd_menubar.patch - that allows the window to be dragged by clicking on empty space in the menubar.

The attached patch builds on this and allows empty space in the toolbar to be also dragged. It is essentially commit 7491e9e97aa6b0f9950897c4f1282b470c79d451 that went into gtk+3.0 way back in 2010.

This would make GTK2 themes behave much more like GTK3 themes.

Tags: patch
Revision history for this message
Adam Smith (adamsmith) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Allow toolbars to be dragged too!" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

Revision history for this message
Adam Smith (adamsmith) wrote :

To enable the toolbar dragging in your chosen theme, open the gtkrc file e.g.

/usr/share/themes/Ambiance/gtk-2.0/gtkrc

Find the line

GtkMenuBar::window-dragging = 1

and either change it to

GtkWidget::window-dragging = 1

or add a new line

GtkToolbar::window-dragging = 1

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Do you know if a request has been made upstream to have that change commited to the gtk-2-24 serie?

Changed in gtk+2.0 (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Adam Smith (adamsmith) wrote :

@Sebastian - I haven't contacted upstream since I thought they weren't accepting new features for gtk+2? If they wanted it adding they could of done in in 2010 when the patch was written ( https://bugzilla.gnome.org/show_bug.cgi?id=611313 ).

Revision history for this message
Sebastien Bacher (seb128) wrote :

That's not really a new feature, it's an improvement and they have been adding changes to that serie, see http://git.gnome.org/browse/gtk+/log/?h=gtk-2-24

Revision history for this message
Adam Smith (adamsmith) wrote :

Do you know how I should contact upstream? For example, is there an appropriate mailing list?

Revision history for this message
Sebastien Bacher (seb128) wrote :

You can use their bugzilla or their mailing list, https://mail.gnome.org/archives/gtk-devel-list

Revision history for this message
Iain Lane (laney) wrote :

Adam,

I tried to apply this with a view to uploading but it looks as if the patch doesn't apply cleanly on top of .24 - could you please rebase on the current utopic version?

A quick ping on upstream bug #611313 would be appreciated but I wouldn't block uploading this patch on that

cheers!

Revision history for this message
Adam Smith (adamsmith) wrote :

Iain, thanks for the comment. Was it the gtkmenushell.c hunk causing the problem? I just copied and pasted that from the 062_dnd_menubar patch, but I see now that has been refreshed. Attached should be a patch that applies cleanly....I hope! It does the job of the 062_dnd_menubar patch and also adds the toolbar dragging.

Sorry I haven't got around to contacting upstream....will try to do this soon!

Revision history for this message
Adam Smith (adamsmith) wrote :
Revision history for this message
Chris J Arges (arges) wrote :

Can you also provide an updated changelog entry for your patch? That would help in sponsoring this patch. You could also upload a 'debdiff' which shows this patch in the proper location for packaging along with the changelog diff.
Thanks!

Iain Lane (laney)
Changed in gtk+2.0 (Ubuntu):
assignee: nobody → Iain Lane (laney)
Revision history for this message
Iain Lane (laney) wrote :

Hi Adam, I looked at uploading this today,but I couldn't confirm it works. Can you give me an example application in the archive that I can check it out on?

I tried gtk and pinta.

Revision history for this message
Iain Lane (laney) wrote :

s/gtk/gimp/ oops :)

Revision history for this message
Adam Smith (adamsmith) wrote :

Hi Iain, I use it with the Mate desktop, so try something like caja......but I can compile it myself, I'm not sure if the versions in the Ubuntu repo uses GTK2 or 3....I'm guessing it will still be 2.

Revision history for this message
Adam Smith (adamsmith) wrote :

pcmanfm?

Revision history for this message
Adam Smith (adamsmith) wrote :

oops....not sure why that 'can' is in post 15!

Revision history for this message
Iain Lane (laney) wrote : Re: [Bug 1332721] Re: Add patch to allow toolbar dragging

On Mon, Sep 29, 2014 at 07:33:39PM -0000, Adam Smith wrote:
> Hi Iain, I use it with the Mate desktop, so try something like
> caja......but I can compile it myself, I'm not sure if the versions in
> the Ubuntu repo uses GTK2 or 3....I'm guessing it will still be 2.

It is, and I'm afraid I can't get the patch as attached to this bug to
work with caja.

Could you prepare a debdiff on top of the gtk+2.0 package in Utopic? I
think that'd be easier at this point. If you need help you can come to
#ubuntu-desktop on Freenode IRC where we hang out.

Cheers,

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Revision history for this message
Adam Smith (adamsmith) wrote :

Hi Iain, I'm sorry it didn't work. As noted in comment 3, you also have to edit your gtk2 theme - did you do this?

I can't give you a debdiff at the mo, but all you just need to do is remove the 062_dnd_menubar.patch and replace it with my patch.

Revision history for this message
Iain Lane (laney) wrote :

Correct, sorry, I forgot to change the theme.

Thanks, it works now. I'm going to upload this. Will you propose a merge for the theme change?

(As this is a new feature, I grant the FFe for it)

Changed in gtk+2.0 (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+2.0 - 2.24.24-0ubuntu3

---------------
gtk+2.0 (2.24.24-0ubuntu3) utopic; urgency=medium

  * Apply patch from Adam Smith, backported from gtk+3.0, to allow windows to
    be dragged using blank spaces in the toolbar as well as the menubar. (LP:
    #1332721)
  * 0001-threads-Do-not-release-the-GDK-lock-if-it-hasn-t-bee.patch:
    Cherry-pick from upstream to work around abort() inside GLib occuring in
    applications that do not intialise GDK for threading right. (LP: #1374030)
 -- Iain Lane <email address hidden> Thu, 09 Oct 2014 12:38:20 +0100

Changed in gtk+2.0 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Adam Smith (adamsmith) wrote :

Thanks Iain! Did you want me to raise bugs against the various theme packages or just add them to this bug?

Revision history for this message
Iain Lane (laney) wrote :

On Thu, Oct 09, 2014 at 08:56:50PM -0000, Adam Smith wrote:
> Thanks Iain! Did you want me to raise bugs against the various theme
> packages or just add them to this bug?

You can use this one. For the Ubuntu theme we use Launchpad merge
proposals, that'd be the easiest way to get your change accepted there.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.