[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#411459: marked as done (alltray: Add multiple modifier support)



Your message dated Tue, 09 May 2023 15:08:56 +0000
with message-id <[🔎] E1pwOxU-00HCOd-T8@fasolo.debian.org>
and subject line Bug#1035819: Removed package(s) from unstable
has caused the Debian Bug report #411459,
regarding alltray: Add multiple modifier support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
411459: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411459
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: alltray
Version: 0.69-2
Severity: wishlist
Tags: patch


Please apply this patch allowing several modifiers.
New syntax:  -k Modifier:Modifier:...:keycode .

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages alltray depends on:
ii  libatk1.0-0               1.12.4-2       The ATK accessibility toolkit
ii  libc6                     2.3.6.ds1-12   GNU C Library: Shared libraries
ii  libcairo2                 1.2.4-4        The Cairo 2D vector graphics libra
ii  libfontconfig1            2.4.2-1        generic font configuration library
ii  libfreetype6              2.2.1-5        FreeType 2 font engine, shared lib
ii  libgconf2-4               2.16.0-3       GNOME configuration database syste
ii  libglib2.0-0              2.12.6-2       The GLib library of C routines
ii  libgtk2.0-0               2.8.20-5       The GTK+ graphical user interface 
ii  liborbit2                 1:2.14.4-1     libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0             1.14.8-5       Layout and rendering of internatio
ii  libpng12-0                1.2.15~beta5-1 PNG library - runtime
ii  libx11-6                  2:1.0.3-5      X11 client-side library
ii  libxcursor1               1.1.7-4        X cursor management library
ii  libxext6                  1:1.0.1-2      X11 miscellaneous extension librar
ii  libxfixes3                1:4.0.1-5      X11 miscellaneous 'fixes' extensio
ii  libxi6                    1:1.0.1-4      X11 Input extension library
ii  libxinerama1              1:1.0.1-4.1    X11 Xinerama extension library
ii  libxrandr2                2:1.1.0.2-5    X11 RandR extension library
ii  libxrender1               1:0.9.1-3      X Rendering Extension client libra
ii  zlib1g                    1:1.2.3-13     compression library - runtime

alltray recommends no packages.

-- no debconf information
diff -u -Nru alltray-0.69/src/shortcut.c alltray-0.69.new/src/shortcut.c
--- alltray-0.69/src/shortcut.c	2006-07-06 17:42:23.000000000 +0200
+++ alltray-0.69.new/src/shortcut.c	2007-02-19 09:41:58.000000000 +0100
@@ -44,13 +44,27 @@
 #include "common.h"
 #include "utils.h"
 
+struct {
+  gchar* name;
+  unsigned int mask;
+} modifiers[] = {
+  { "Shift", ShiftMask },
+  { "Control", ControlMask },
+  { "Alt", Mod1Mask },
+  { "Winkey_right", Mod4Mask },
+  { "AltGr", Mod5Mask },
+  { NULL, 0}
+};
+
+
 gboolean parse_shortcut (gchar *string, 
     unsigned int *key_return, unsigned int *modifier_return)
 {
 
   gchar *tmp=NULL;
   gchar *colon=NULL;
-  gchar *modifier=NULL;
+  gchar *current=NULL;
+  int i;
 
 
   if (debug) printf ("parse_shortcut\n");
@@ -59,74 +73,34 @@
     return FALSE;
 
   tmp=g_strdup (string);
-  
-  colon=strstr (tmp,":");
 
-  if (colon) {
-    if (debug) printf ("colon: %s\n", colon);
+  *modifier_return=0;
+  for (current=tmp; (colon=strchr (current,':')) != NULL; current=colon+1) {
 
-    *key_return =atoi (++colon);
-    
-    if (*key_return == 0)
-      *key_return=XKeysymToKeycode(GDK_DISPLAY(), XStringToKeysym(colon));
-
-   *(--colon)=0;
-   modifier=tmp;
-  
-   if (debug) printf ("modifier: %s\n", modifier);
-
-   do {
-    
-    if (!strcmp (modifier, "Shift")) {
-      if (debug) printf ("found Shift\n");
-      *modifier_return=ShiftMask;
-      break;
-    }
-    
-    if (!strcmp (modifier, "Control")) {
-      if (debug) printf ("found Control\n");
-      *modifier_return=ControlMask;
-      break;
-    }
-  
-    if (!strcmp (modifier, "Alt")) {
-      if (debug) printf ("found Alt\n");
-      *modifier_return=Mod1Mask;
-      break;
-    }
-    
-    if (!strcmp (modifier, "Winkey_right")) {
-      if (debug) printf ("found Winkey_right\n");
-      *modifier_return=Mod4Mask;
-      break;
-    }   
+   *colon=0;
 
-    if (!strcmp (modifier, "AltGr")) {
-      if (debug) printf ("found AltGr\n");
-      *modifier_return=Mod5Mask;
-      break;
-    }       
+   if (debug) printf ("modifier: %s\n", current);
 
+   for (i = 0; modifiers[i].name; ++i) {
+    if (!strcmp (current, modifiers[i].name)) {
+      if (debug) printf ("found %s\n", modifiers[i].name);
+      *modifier_return|=modifiers[i].mask;
+      break;
+    }
+   }
 
+   if (!modifiers[i].name) {
     printf ("\n\nAllTray: unknown modifier!"\
     " (Only \"Shift\", \"Control\" \"Alt\" or \"AltGr\" is allowed).\n\n");
-    
     g_free (tmp);
     return FALSE;
+   }
+  }
 
-  } while (0);
- 
-           
-  } else {
-
-    *key_return =atoi (tmp);
-    
-    if (*key_return == 0) 
-      *key_return=XKeysymToKeycode(GDK_DISPLAY(), XStringToKeysym(tmp));
+  *key_return = atoi (current);
 
-    *modifier_return=AnyModifier;
-  
-  }
+  if (*key_return == 0) 
+   *key_return=XKeysymToKeycode(GDK_DISPLAY(), XStringToKeysym(current));
 
   g_free (tmp);
 

--- End Message ---
--- Begin Message ---
Version: 0.71b-4+rm

Dear submitter,

as the package alltray has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1035819

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply to: