summaryrefslogtreecommitdiff
path: root/plugins/keyboard
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/keyboard')
-rw-r--r--plugins/keyboard/Makefile.am4
-rw-r--r--plugins/keyboard/delayed-dialog.c1
-rw-r--r--plugins/keyboard/delayed-dialog.h2
-rw-r--r--plugins/keyboard/msd-keyboard-manager.c2
-rw-r--r--plugins/keyboard/msd-keyboard-manager.h1
-rw-r--r--plugins/keyboard/msd-keyboard-plugin.c1
-rw-r--r--plugins/keyboard/msd-keyboard-plugin.h1
-rw-r--r--plugins/keyboard/msd-keyboard-xkb.c22
-rw-r--r--plugins/keyboard/msd-keyboard-xkb.h1
9 files changed, 20 insertions, 15 deletions
diff --git a/plugins/keyboard/Makefile.am b/plugins/keyboard/Makefile.am
index f8ee695..cc21f18 100644
--- a/plugins/keyboard/Makefile.am
+++ b/plugins/keyboard/Makefile.am
@@ -33,6 +33,7 @@ libkeyboard_la_CPPFLAGS = \
libkeyboard_la_CFLAGS = \
$(SETTINGS_PLUGIN_CFLAGS) \
$(LIBMATEKBDUI_CFLAGS) \
+ $(MATE_DESKTOP_CFLAGS) \
$(AM_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
@@ -44,6 +45,9 @@ libkeyboard_la_LDFLAGS = \
libkeyboard_la_LIBADD = \
$(SETTINGS_PLUGIN_LIBS) \
$(LIBMATEKBDUI_LIBS) \
+ $(MATE_DESKTOP_LIBS) \
+ $(X11_LIBS) \
+ $(XINPUT_LIBS) \
$(NULL)
plugin_in_files = \
diff --git a/plugins/keyboard/delayed-dialog.c b/plugins/keyboard/delayed-dialog.c
index c2e469e..0968585 100644
--- a/plugins/keyboard/delayed-dialog.c
+++ b/plugins/keyboard/delayed-dialog.c
@@ -1,5 +1,6 @@
/*
* Copyright © 2006 Novell, Inc.
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
diff --git a/plugins/keyboard/delayed-dialog.h b/plugins/keyboard/delayed-dialog.h
index 367bf18..a8fb910 100644
--- a/plugins/keyboard/delayed-dialog.h
+++ b/plugins/keyboard/delayed-dialog.h
@@ -1,5 +1,6 @@
/*
* Copyright © 2006 Novell, Inc.
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -17,7 +18,6 @@
* 02110-1301, USA.
*/
-
#ifndef __DELAYED_DIALOG_H
#define __DELAYED_DIALOG_H
diff --git a/plugins/keyboard/msd-keyboard-manager.c b/plugins/keyboard/msd-keyboard-manager.c
index 8beadea..06bc322 100644
--- a/plugins/keyboard/msd-keyboard-manager.c
+++ b/plugins/keyboard/msd-keyboard-manager.c
@@ -2,6 +2,7 @@
*
* Copyright © 2001 Ximian, Inc.
* Copyright (C) 2007 William Jon McCann <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -73,7 +74,6 @@ G_DEFINE_TYPE_WITH_PRIVATE (MsdKeyboardManager, msd_keyboard_manager, G_TYPE_OBJ
static gpointer manager_object = NULL;
-
#ifdef HAVE_X11_EXTENSIONS_XKB_H
static gboolean xkb_set_keyboard_autorepeat_rate(int delay, int rate)
{
diff --git a/plugins/keyboard/msd-keyboard-manager.h b/plugins/keyboard/msd-keyboard-manager.h
index 2986a5b..b6bddf6 100644
--- a/plugins/keyboard/msd-keyboard-manager.h
+++ b/plugins/keyboard/msd-keyboard-manager.h
@@ -1,6 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/plugins/keyboard/msd-keyboard-plugin.c b/plugins/keyboard/msd-keyboard-plugin.c
index ed16759..74d7089 100644
--- a/plugins/keyboard/msd-keyboard-plugin.c
+++ b/plugins/keyboard/msd-keyboard-plugin.c
@@ -1,6 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/plugins/keyboard/msd-keyboard-plugin.h b/plugins/keyboard/msd-keyboard-plugin.h
index 39a18d7..8ad16f4 100644
--- a/plugins/keyboard/msd-keyboard-plugin.h
+++ b/plugins/keyboard/msd-keyboard-plugin.h
@@ -1,6 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/plugins/keyboard/msd-keyboard-xkb.c b/plugins/keyboard/msd-keyboard-xkb.c
index 33fe4e5..4373023 100644
--- a/plugins/keyboard/msd-keyboard-xkb.c
+++ b/plugins/keyboard/msd-keyboard-xkb.c
@@ -3,6 +3,7 @@
* Copyright (C) 2001 Udaltsoft
*
* Written by Sergey V. Oudaltsov <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,6 +32,8 @@
#include <gtk/gtk.h>
#include <gio/gio.h>
+#include <libmate-desktop/mate-image-menu-item.h>
+
#include <libmatekbd/matekbd-status.h>
#include <libmatekbd/matekbd-keyboard-drawing.h>
#include <libmatekbd/matekbd-desktop-config.h>
@@ -149,8 +152,7 @@ apply_desktop_settings (void)
matekbd_desktop_config_activate (&current_desktop_config);
show_leds = g_settings_get_boolean (settings_desktop, DUPLICATE_LEDS_KEY);
- for (i = sizeof (indicator_icons) / sizeof (indicator_icons[0]);
- --i >= 0;) {
+ for (i = G_N_ELEMENTS (indicator_icons); --i >= 0;) {
gtk_status_icon_set_visible (indicator_icons[i],
show_leds);
}
@@ -314,13 +316,11 @@ status_icon_popup_menu_cb (GtkStatusIcon *status_icon,
GtkWidget *img =
gtk_image_new_from_pixbuf (pixbuf);
item =
- gtk_image_menu_item_new_with_label
+ mate_image_menu_item_new_with_label
(*current_name);
gtk_widget_show (img);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM
+ mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM
(item), img);
- gtk_image_menu_item_set_always_show_image
- (GTK_IMAGE_MENU_ITEM (item), TRUE);
g_free (image_file);
}
gtk_widget_show (item);
@@ -540,9 +540,7 @@ msd_keyboard_update_indicator_icons (void)
new_state |= (state ? 1 : 0);
xkl_debug (160, "Indicators state: %d\n", new_state);
-
- for (i = sizeof (indicator_icons) / sizeof (indicator_icons[0]);
- --i >= 0;) {
+ for (i = G_N_ELEMENTS (indicator_icons); --i >= 0;) {
gtk_status_icon_set_from_icon_name (indicator_icons[i],
(new_state & (1 << i))
?
@@ -582,8 +580,7 @@ msd_keyboard_xkb_init (MsdKeyboardManager * kbd_manager)
num_lock = XInternAtom (display, "Num Lock", False);
scroll_lock = XInternAtom (display, "Scroll Lock", False);
- for (i = sizeof (indicator_icons) / sizeof (indicator_icons[0]);
- --i >= 0;) {
+ for (i = G_N_ELEMENTS (indicator_icons); --i >= 0;) {
indicator_icons[i] =
gtk_status_icon_new_from_icon_name
(indicator_off_icon_names[i]);
@@ -660,8 +657,7 @@ msd_keyboard_xkb_shutdown (void)
pa_callback_user_data = NULL;
manager = NULL;
- for (i = sizeof (indicator_icons) / sizeof (indicator_icons[0]);
- --i >= 0;) {
+ for (i = G_N_ELEMENTS (indicator_icons); --i >= 0;) {
g_object_unref (G_OBJECT (indicator_icons[i]));
indicator_icons[i] = NULL;
}
diff --git a/plugins/keyboard/msd-keyboard-xkb.h b/plugins/keyboard/msd-keyboard-xkb.h
index 469a469..e8aef83 100644
--- a/plugins/keyboard/msd-keyboard-xkb.h
+++ b/plugins/keyboard/msd-keyboard-xkb.h
@@ -4,6 +4,7 @@
* Copyright (C) 2001 Udaltsoft
*
* Written by Sergey V. Oudaltsov <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by