| 103 static void |
103 static void |
| 104 entry_set(GtkEntry *entry, gpointer data) |
104 entry_set(GtkEntry *entry, gpointer data) |
| 105 { |
105 { |
| 106 const char *key = (const char*)data; |
106 const char *key = (const char*)data; |
| 107 |
107 |
| 108 purple_prefs_set_string(key, gtk_entry_get_text(entry)); |
108 purple_prefs_set_string(key, gtk_editable_get_text(GTK_EDITABLE(entry))); |
| 109 } |
109 } |
| 110 |
110 |
| 111 void |
111 void |
| 112 pidgin_prefs_bind_entry(const char *key, GtkWidget *entry) |
112 pidgin_prefs_bind_entry(const char *key, GtkWidget *entry) |
| 113 { |
113 { |
| 114 const gchar *value; |
114 const gchar *value; |
| 115 |
115 |
| 116 value = purple_prefs_get_string(key); |
116 value = purple_prefs_get_string(key); |
| 117 |
117 |
| 118 gtk_entry_set_text(GTK_ENTRY(entry), value); |
118 gtk_editable_set_text(GTK_EDITABLE(entry), value); |
| 119 g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(entry_set), |
119 g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(entry_set), |
| 120 (char*)key); |
120 (char*)key); |
| 121 } |
121 } |
| 122 |
122 |
| 123 static void |
123 static void |