Mercurial > pidgin.yaz
comparison plugins/timestamp.c @ 11740:7e0ad3b6882a
[gaim-migrate @ 14031]
Moved Plugins to Tools > Plugins
Made iChat Timestamp plugin instant apply
Made Proxy options visible only when needed.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 23 Oct 2005 07:12:12 +0000 |
parents | bb0d7b719af2 |
children | 2c7e79b6d7b2 |
comparison
equal
deleted
inserted
replaced
11739:a25be0e70a67 | 11740:7e0ad3b6882a |
---|---|
168 } | 168 } |
169 } | 169 } |
170 | 170 |
171 | 171 |
172 | 172 |
173 static void set_timestamp(GtkWidget *button, GtkWidget *spinner) { | 173 static void set_timestamp(GtkWidget *spinner, void *null) { |
174 int tm; | 174 int tm; |
175 | 175 |
176 tm = 0; | 176 tm = 0; |
177 | 177 |
178 tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 1, G_MAXINT); | 178 tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 1, G_MAXINT); |
192 { | 192 { |
193 GtkWidget *ret; | 193 GtkWidget *ret; |
194 GtkWidget *frame, *label; | 194 GtkWidget *frame, *label; |
195 GtkWidget *vbox, *hbox; | 195 GtkWidget *vbox, *hbox; |
196 GtkAdjustment *adj; | 196 GtkAdjustment *adj; |
197 GtkWidget *spinner, *button; | 197 GtkWidget *spinner; |
198 | 198 |
199 ret = gtk_vbox_new(FALSE, 18); | 199 ret = gtk_vbox_new(FALSE, 18); |
200 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 200 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
201 | 201 |
202 frame = gaim_gtk_make_frame(ret, _("iChat Timestamp")); | 202 frame = gaim_gtk_make_frame(ret, _("iChat Timestamp")); |
210 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); | 210 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
211 | 211 |
212 adj = (GtkAdjustment *)gtk_adjustment_new(interval/(60*1000), 1, G_MAXINT, 1, 0, 0); | 212 adj = (GtkAdjustment *)gtk_adjustment_new(interval/(60*1000), 1, G_MAXINT, 1, 0, 0); |
213 spinner = gtk_spin_button_new(adj, 0, 0); | 213 spinner = gtk_spin_button_new(adj, 0, 0); |
214 gtk_box_pack_start(GTK_BOX(hbox), spinner, TRUE, TRUE, 0); | 214 gtk_box_pack_start(GTK_BOX(hbox), spinner, TRUE, TRUE, 0); |
215 | 215 g_signal_connect(G_OBJECT(spinner), "value-changed", G_CALLBACK(set_timestamp), NULL); |
216 label = gtk_label_new(_("minutes.")); | 216 label = gtk_label_new(_("minutes.")); |
217 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); | 217 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
218 | |
219 hbox = gtk_hbox_new(TRUE, 5); | |
220 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | |
221 | |
222 button = gtk_button_new_with_mnemonic(_("_Apply")); | |
223 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 5); | |
224 g_signal_connect(G_OBJECT(button), "clicked", | |
225 G_CALLBACK(set_timestamp), spinner); | |
226 | 218 |
227 gtk_widget_show_all(ret); | 219 gtk_widget_show_all(ret); |
228 return ret; | 220 return ret; |
229 } | 221 } |
230 | 222 |