Bug#639925: /usr/bin/vim.gnome: WM_CLASS property differs when vim is launched as 'vim' or 'gvim';

2011-09-01 Thread Sam Morris
tag 639925 + patch
thanks

Here's a patch that sets the second string in WM_CLASS to match the name
of gvim.desktop.

-- 
Sam Morris 
Description: Upstream changes introduced in version 2:7.3.280-1sam1
 This patch has been created by dpkg-source during the package build.
 Here's the last changelog entry, hopefully it gives details on why
 those changes were made:
 .
 vim (2:7.3.280-1sam1) unstable; urgency=low
 .
   * Ensure all GTK+ windows get a WM_CLASS property that matches the shipped
 .desktop file. Closes: #639925.
 .
 The person named in the Author field signed this changelog entry.
Author: Sam Morris 
Bug-Debian: http://bugs.debian.org/639925

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: , 
Bug: 
Bug-Debian: http://bugs.debian.org/
Bug-Ubuntu: https://launchpad.net/bugs/
Forwarded: 
Reviewed-By: 
Last-Update: 

--- vim-7.3.280.orig/src/gui_gtk_x11.c
+++ vim-7.3.280/src/gui_gtk_x11.c
@@ -1425,6 +1425,11 @@ gui_mch_init_check(void)
using_gnome = 1;
 #endif
 
+/* This defaults to argv[0], but we want it to match the name of
+ * the shipped file gvim.desktop so that Vim's windows can be
+ * associated with this file. */
+g_set_prgname ("gvim");
+
 /* Don't use gtk_init() or gnome_init(), it exits on failure. */
 if (!gtk_init_check(&gui_argc, &gui_argv))
 {


Bug#639925: /usr/bin/vim.gnome: WM_CLASS property differs when vim is launched as 'vim' or 'gvim';

2011-08-31 Thread Sam Morris
Package: vim-gnome
Version: 2:7.3.280-1
Severity: minor
File: /usr/bin/vim.gnome

When using gnome-shell and launching 'gvim', Vim windows get the correct
icon (high-resolution SVG icon) and display name (GVim Text Editor) in
the shell).

When launching 'vim.gnome' or 'vim', then issuing the 'gui' command, Vim
windows get the wrong icon (tiny XPM icon scaled up) and name
('vim.gnome' or 'vim', respectively), instead.

According to ,
gnome-shell uses the WM_CLASS window property to associate application
windows with a .desktop file, and hence their display name and icon.

xprop reveals that the 'gvim' windows' WM_CLASS property is "gvim",
"Gvim", but the 'vim.gnome' and 'vim' windows' properties are
"vim.gnome", "Vim.gnome" and "vim", "Vim" respectively.

Newly created GTK+ windows obtain their class changed by a prior call to
g_set_prgname("gvim"). I guess that their current value is being based
off of the value of argv[0].

Alternatively, gtk_window_set_wmclass("gvim", "Gvim") can be called
after calling gtk_window_new.

-- System Information:
Debian Release: wheezy/sid
  APT prefers stable
  APT policy: (545, 'stable'), (540, 'stable-updates'), (530, 'testing'), (520, 
'unstable'), (510, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages vim-gnome depends on:
ii  libacl1   2.2.51-3   Access control list shared library
ii  libbonoboui2-02.24.3-1   The Bonobo UI library
ii  libc6 2.13-18Embedded GNU C Library: Shared lib
ii  libgdk-pixbuf2.0-02.23.5-3   GDK Pixbuf library
ii  libglib2.0-0  2.28.6-1   The GLib library of C routines
ii  libgnome2-0   2.32.1-1   The GNOME library - runtime files
ii  libgnomeui-0  2.24.3-1   The GNOME libraries (User Interfac
ii  libgpm2   1.20.4-3.3 General Purpose Mouse - shared lib
ii  libgtk2.0-0   2.24.4-3   The GTK+ graphical user interface 
ii  libice6   2:1.0.7-2  X11 Inter-Client Exchange library
ii  liblua5.1-0   5.1.4-5Simple, extensible, embeddable pro
ii  libncurses5   5.7+20100313-5 shared libraries for terminal hand
ii  libpango1.0-0 1.28.4-1   Layout and rendering of internatio
ii  libperl5.12   5.12.4-4   shared Perl library
ii  libpython2.6  2.6.7-3Shared Python runtime library (ver
ii  libruby1.81.8.7.352-2Libraries necessary to run Ruby 1.
ii  libselinux1   2.0.96-1   SELinux runtime shared libraries
ii  libsm62:1.2.0-2  X11 Session Management library
ii  libx11-6  2:1.3.3-4  X11 client-side library
ii  libxt61:1.0.7-1  X11 toolkit intrinsics library
ii  tcl8.58.5.8-2Tcl (the Tool Command Language) v8
ii  vim-common2:7.3.280-1Vi IMproved - Common files
ii  vim-gui-common2:7.3.280-1Vi IMproved - Common GUI files
ii  vim-runtime   2:7.3.280-1Vi IMproved - Runtime files

vim-gnome recommends no packages.

Versions of packages vim-gnome suggests:
pn  cscope (no description available)
ii  gnome-icon-theme 3.0.0-4 GNOME Desktop icon theme
ii  ttf-dejavu   2.31-1  Metapackage to pull in ttf-dejavu-
ii  vim-doc  2:7.3.280-1 Vi IMproved - HTML documentation

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org