[gnome-applets] charpick: remove last_index
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] charpick: remove last_index
- Date: Sat, 22 Dec 2018 16:16:17 +0000 (UTC)
commit 0490da986bbd6151a9072787409ab5710bd02a0f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Dec 22 18:15:10 2018 +0200
charpick: remove last_index
It is not used.
charpick/src/charpick.c | 9 +--------
charpick/src/charpick.h | 3 ---
2 files changed, 1 insertion(+), 11 deletions(-)
---
diff --git a/charpick/src/charpick.c b/charpick/src/charpick.c
index 6412861a1..cb83e6240 100644
--- a/charpick/src/charpick.c
+++ b/charpick/src/charpick.c
@@ -150,10 +150,8 @@ static gint
toggle_button_toggled_cb(GtkToggleButton *button, gpointer data)
{
charpick_data *curr_data = data;
- gint button_index;
gboolean toggled;
-
- button_index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "index"));
+
toggled = gtk_toggle_button_get_active (button);
if (toggled)
@@ -174,7 +172,6 @@ toggle_button_toggled_cb(GtkToggleButton *button, gpointer data)
gtk_selection_owner_set (curr_data->applet,
GDK_SELECTION_CLIPBOARD,
GDK_CURRENT_TIME);
- curr_data->last_index = button_index;
}
return TRUE;
@@ -244,7 +241,6 @@ key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
p_curr_data->charlist = g_ucs4_to_utf8 (code, -1, NULL, NULL, NULL);
else
p_curr_data->charlist = "hello";
- p_curr_data->last_index = NO_LAST_INDEX;
p_curr_data->last_toggle_button = NULL;
build_table(p_curr_data);
#endif
@@ -492,9 +488,7 @@ build_table(charpick_data *p_curr_data)
gtk_container_add (GTK_CONTAINER(p_curr_data->applet), box);
gtk_widget_show_all (p_curr_data->box);
- p_curr_data->last_index = NO_LAST_INDEX;
p_curr_data->last_toggle_button = NULL;
-
}
static void applet_size_allocate(PanelApplet *applet, GtkAllocation *allocation, gpointer data)
@@ -683,7 +677,6 @@ charpicker_applet_fill (PanelApplet *applet)
panel_applet_set_flags (applet, PANEL_APPLET_EXPAND_MINOR);
curr_data = g_new0 (charpick_data, 1);
- curr_data->last_index = NO_LAST_INDEX;
curr_data->applet = GTK_WIDGET (applet);
curr_data->about_dialog = NULL;
curr_data->add_edit_dialog = NULL;
diff --git a/charpick/src/charpick.h b/charpick/src/charpick.h
index fab25463f..a19a4421b 100644
--- a/charpick/src/charpick.h
+++ b/charpick/src/charpick.h
@@ -5,8 +5,6 @@
#include <gtk/gtk.h>
#include <panel-applet.h>
-#define NO_LAST_INDEX -1
-
#define CHARPICK_SCHEMA "org.gnome.gnome-applets.charpick"
#define KEY_CURRENT_LIST "current-list"
#define KEY_CHARTABLE "chartable"
@@ -17,7 +15,6 @@ struct _charpick_data {
GList *chartable;
gchar * charlist;
gunichar selected_unichar;
- gint last_index;
GtkWidget *box;
GtkWidget *frame;
GtkWidget *applet;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]