summaryrefslogtreecommitdiff
path: root/rcm-client-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'rcm-client-main.c')
-rw-r--r--rcm-client-main.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/rcm-client-main.c b/rcm-client-main.c
index 3595722..e3dcd04 100644
--- a/rcm-client-main.c
+++ b/rcm-client-main.c
@@ -6,6 +6,7 @@
#include <gtk/gtk.h>
#include "generated.h"
+#include "shared.h"
#include "rcm-client-main.h"
#include "rcm-client-hardware-list.h"
#include "rcm-client-receive.h"
@@ -165,6 +166,34 @@ create_header_button(GtkHeaderBar *header, const gchar *tooltip,
return button;
}
+void
+cbox_add_all_protocols(GtkComboBoxText *cbox)
+{
+ unsigned i;
+
+ if (!cbox)
+ return;
+
+ gtk_combo_box_text_remove_all(cbox);
+ for (i = 0; rc_protocols[i]; i++)
+ gtk_combo_box_text_append(cbox, NULL, rc_protocols[i]);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), 0);
+}
+
+void
+cbox_add_all_keycodes(GtkComboBoxText *cbox)
+{
+ unsigned i;
+
+ if (!cbox)
+ return;
+
+ gtk_combo_box_text_remove_all(cbox);
+ for (i = 0; linux_input_keycodes[i].name; i++)
+ gtk_combo_box_text_append(cbox, NULL, linux_input_keycodes[i].name);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), 0);
+}
+
gulong
_g_signal_replace(gpointer instance, const gchar *detailed_signal, GCallback c_handler, gpointer data, GConnectFlags flags)
{