--- gkrellm-xkb-1.05.orig/Makefile +++ gkrellm-xkb-1.05/Makefile @@ -1,5 +1,5 @@ -PREFIX ?= /usr/local +PREFIX ?= $(DESTDIR)/usr GTK_CONFIG = pkg-config gtk+-2.0 PLUGIN_DIR ?= $(PREFIX)/lib/gkrellm2/plugins GKRELLM_INCLUDE = -I$(PREFIX)/include --- gkrellm-xkb-1.05.orig/debian/changelog +++ gkrellm-xkb-1.05/debian/changelog @@ -0,0 +1,50 @@ +gkrellm-xkb (1.05-5.1build2) noble; urgency=medium + + * No-change rebuild for CVE-2024-3094 + + -- Steve Langasek Sun, 31 Mar 2024 05:49:48 +0000 + +gkrellm-xkb (1.05-5.1build1) noble; urgency=medium + + * No-change rebuild against libglib2.0-0t64 + + -- Steve Langasek Fri, 08 Mar 2024 04:33:37 +0000 + +gkrellm-xkb (1.05-5.1) unstable; urgency=low + + * Non-maintainer upload. + * debian/compat: 5 -> 7. (Closes: #965553) + * debian/rules: Add build-{arch,indep}. (Closes: #999130) + + -- Adrian Bunk Tue, 28 Dec 2021 01:42:42 +0200 + +gkrellm-xkb (1.05-5) unstable; urgency=low + + * Fixed lintian warnings about upstream changelog + + -- Adam Sloboda Sun, 06 Apr 2008 09:40:36 +0200 + +gkrellm-xkb (1.05-4) unstable; urgency=low + + * Added upstream ChangeLog and documentation + + -- Adam Sloboda Fri, 28 Mar 2008 18:27:21 +0100 + +gkrellm-xkb (1.05-3) unstable; urgency=low + + * Show country code if country flag is not available. + + -- Adam Sloboda Mon, 24 Mar 2008 14:33:34 +0100 + +gkrellm-xkb (1.05-2) unstable; urgency=low + + * Added watch file for upstream versions + + -- Adam Sloboda Wed, 19 Mar 2008 21:08:10 +0100 + +gkrellm-xkb (1.05-1) unstable; urgency=low + + * Initial release (Closes: #470772) + + -- Adam Sloboda Thu, 13 Mar 2008 15:34:47 +0100 + --- gkrellm-xkb-1.05.orig/debian/compat +++ gkrellm-xkb-1.05/debian/compat @@ -0,0 +1 @@ +7 --- gkrellm-xkb-1.05.orig/debian/control +++ gkrellm-xkb-1.05/debian/control @@ -0,0 +1,16 @@ +Source: gkrellm-xkb +Section: x11 +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Adam Sloboda +Build-Depends: debhelper (>= 5), gkrellm (>= 2.0.0), libgtk2.0-dev, pkg-config +Standards-Version: 3.7.3 +Homepage: http://www.sweb.cz/tripie/gkrellm/xkb/ + +Package: gkrellm-xkb +Architecture: any +Depends: ${shlibs:Depends}, gkrellm (>= 2.0.0) +Description: Keyboard layout indicator plugin for GKrellM + This GKrellM plugin indicates active X keyboard layout with country + flag, lists configured layouts, allows you to switch between them, and + also indicates Caps lock and Num lock status. --- gkrellm-xkb-1.05.orig/debian/copyright +++ gkrellm-xkb-1.05/debian/copyright @@ -0,0 +1,30 @@ +This package was debianized by Adam Sloboda on +Thu, 13 Mar 2008 15:34:47 +0100. + +It was downloaded from http://www.sweb.cz/tripie/gkrellm/xkb/ + +Upstream Author: Tomas Styblo + +Copyright: Copyright (C) 2003 Tomas Styblo + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2008, Adam Sloboda and +is licensed under the GPL, see above. --- gkrellm-xkb-1.05.orig/debian/dirs +++ gkrellm-xkb-1.05/debian/dirs @@ -0,0 +1 @@ +usr/lib/gkrellm2/plugins --- gkrellm-xkb-1.05.orig/debian/docs +++ gkrellm-xkb-1.05/debian/docs @@ -0,0 +1,4 @@ +TODO +doc/index.html +doc/xkb.jpg +doc/main.css --- gkrellm-xkb-1.05.orig/debian/rules +++ gkrellm-xkb-1.05/debian/rules @@ -0,0 +1,66 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + $(MAKE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + $(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) DESTDIR=$(CURDIR)/debian/gkrellm-xkb install + + +# Build architecture-independent files here. +binary-indep: build install + + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs doc/ChangeLog + dh_installdocs + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +build-arch: build +build-indep: build +binary: binary-indep binary-arch +.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install configure --- gkrellm-xkb-1.05.orig/debian/watch +++ gkrellm-xkb-1.05/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://www.sweb.cz/tripie/gkrellm/xkb/ dist/gkrellm-xkb-(.*)\.tar\.gz \ No newline at end of file --- gkrellm-xkb-1.05.orig/flags/unknown.xpm +++ gkrellm-xkb-1.05/flags/unknown.xpm @@ -20,16 +20,16 @@ /* pixels */ ";;;;;;;;;;;;;;;;;;;;;", ";;;;;;;;;;;;;;;;;;;;;", -";;;;;;;#O. X@;;;;;;;;", -";;;;;;; O*=@ +;;;;;;;", -";;;;;;;;;;;; ;;;;;;;", -";;;;;;;;;;;& .;;;;;;;", -";;;;;;;;;;=oX&;;;;;;;", -";;;;;;;;;$X %;;;;;;;;", -";;;;;;;;; *;;;;;;;;;", -";;;;;;;;; ;;;;;;;;;;", ";;;;;;;;;;;;;;;;;;;;;", -";;;;;;;;; ;;;;;;;;;;", -";;;;;;;;; ;;;;;;;;;;", +";;;;;;;;;;;;;;;;;;;;;", +";;;;;;;;;;;;;;;;;;;;;", +";;;;;;;;;;;;;;;;;;;;;", +";;;;;;;;;;;;;;;;;;;;;", +";;;;;;;;;;;;;;;;;;;;;", +";;;;;;;;;;;;;;;;;;;;;", +";;;;;;;;;;;;;;;;;;;;;", +";;;;;;;;;;;;;;;;;;;;;", +";;;;;;;;;;;;;;;;;;;;;", +";;;;;;;;;;;;;;;;;;;;;", ";;;;;;;;;;;;;;;;;;;;;" }; --- gkrellm-xkb-1.05.orig/main.c +++ gkrellm-xkb-1.05/main.c @@ -105,6 +105,9 @@ static int force_redraw = 0; static int update_locked = 0; +#define STYLE_NAME "xkb" +static gint style_id; + static struct { const char *country_code; char **flag_pointer; @@ -197,6 +200,7 @@ /* }}} */ GkrellmMonitor *gkrellm_init_plugin(void) { /* {{{ */ + style_id = gkrellm_add_meter_style(&plugin_mon, STYLE_NAME); monitor = &plugin_mon; pGK = gkrellm_ticks(); return monitor; @@ -334,6 +338,7 @@ int num_groups = 0; xkbGroup groups[XKB_MAX_GROUPS]; int active_group; + static int current_group; int flag_width, flag_height; int loc_x, loc_y; static GdkPixmap *flag_pix = NULL; @@ -341,6 +346,7 @@ static GdkPixmap *num_pix = NULL; static GdkPixmap *bg_scaled = NULL; static GkrellmDecal *decal_flag = NULL; + static GkrellmDecal *decal_text = NULL; static GkrellmDecal *decal_caps = NULL; static GkrellmDecal *decal_num = NULL; static GkrellmDecal *decal_bg = NULL; @@ -371,10 +377,12 @@ } if (! (redraw || force_redraw || - current_flag == NULL || current_flag != groups[active_group].flag_xpm || + current_flag == NULL || /* current_flag != groups[active_group].flag_xpm || */ + current_group != active_group || ind_caps != ind_caps_prev || ind_num != ind_num_prev)) goto cleanup; + current_group = active_group; /* fprintf(stderr, "Redrawing...\n"); */ ind_caps_prev = ind_caps; @@ -388,6 +396,9 @@ if (!redraw && decal_flag) { gkrellm_destroy_decal(decal_flag); decal_flag = NULL; } + if (!redraw && decal_text) { + gkrellm_destroy_decal(decal_text); decal_text = NULL; + } if (!redraw && decal_caps) { gkrellm_destroy_decal(decal_caps); decal_caps = NULL; } @@ -435,6 +446,26 @@ decal_caps = gkrellm_create_decal_pixmap(panel, caps_pix, NULL, 0, NULL, 0, loc_y); decal_num = gkrellm_create_decal_pixmap(panel, num_pix, NULL, 0, NULL, gkrellm_chart_width() - 14, loc_y); + + /* Also draw country code if we don't have flag */ + gchar **xkb_rules; + if (current_flag == flag_xpm_unknown && + (xkb_rules = parse_xkb_rules_names())) { + GkrellmStyle *style; + GkrellmTextstyle *ts, *ts_alt; + style = gkrellm_meter_style(style_id); + ts = gkrellm_meter_textstyle(style_id); + ts_alt = gkrellm_meter_alt_textstyle(style_id); + + decal_text = gkrellm_create_decal_text(panel, "XX", ts, style, -1, -1, 0); + int string_w = gdk_string_width(decal_text->text_style.font, xkb_rules[active_group]); + decal_text->x = loc_x + (flag_width/2) - (string_w/2); + decal_text->y = loc_y + 2; + gkrellm_draw_decal_text(panel, decal_text, xkb_rules[active_group], 0); + + g_strfreev(xkb_rules); + } + gkrellm_draw_decal_pixmap(panel, decal_flag, 0); gkrellm_draw_decal_pixmap(panel, decal_caps, 0); gkrellm_draw_decal_pixmap(panel, decal_num, 0);