comparison src/gtkprefs.c @ 9949:ced29c7b396c

[gaim-migrate @ 10845] (00:25:10) LSchiere: datallah: commit message? (00:25:40) datallah: LSchiere: nah.. nothing comes to me datallah undertook the heroic effort of merging in all the .rejs and fixing things up from the unclean merge of the status rewrite committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 04 Sep 2004 04:27:05 +0000
parents e4a27c9aec4c
children bdec08a8fc5b
comparison
equal deleted inserted replaced
9948:b13013595c08 9949:ced29c7b396c
636 GtkTreeIter *a, 636 GtkTreeIter *a,
637 GtkTreeIter *b, 637 GtkTreeIter *b,
638 gpointer userdata) 638 gpointer userdata)
639 { 639 {
640 gint ret = 0; 640 gint ret = 0;
641 gchar *name1, *name2; 641 gchar *name1 = NULL, *name2 = NULL;
642 642
643 gtk_tree_model_get(model, a, 3, &name1, -1); 643 gtk_tree_model_get(model, a, 3, &name1, -1);
644 gtk_tree_model_get(model, b, 3, &name2, -1); 644 gtk_tree_model_get(model, b, 3, &name2, -1);
645 645
646 if (name1 == NULL || name2 == NULL) { 646 if (name1 == NULL || name2 == NULL) {
2282 /* Get the pointer to the away message and pass that */ 2282 /* Get the pointer to the away message and pass that */
2283 if (! gtk_tree_selection_get_selected (sel, (GtkTreeModel**)&ls, &iter)) 2283 if (! gtk_tree_selection_get_selected (sel, (GtkTreeModel**)&ls, &iter))
2284 return; 2284 return;
2285 gtk_tree_model_get_value (GTK_TREE_MODEL(ls), &iter, 1, &val); 2285 gtk_tree_model_get_value (GTK_TREE_MODEL(ls), &iter, 1, &val);
2286 amt = g_value_get_pointer (&val); 2286 amt = g_value_get_pointer (&val);
2287 /* XXX CORE/UI
2287 create_away_mess(NULL, amt); 2288 create_away_mess(NULL, amt);
2289 */
2288 } 2290 }
2289 2291
2290 static gboolean away_message_click_cb(GtkWidget *tv, GdkEventButton *event, gpointer null) 2292 static gboolean away_message_click_cb(GtkWidget *tv, GdkEventButton *event, gpointer null)
2291 { 2293 {
2292 /* Only respond to double click on button 1 */ 2294 /* Only respond to double click on button 1 */
2297 2299
2298 return FALSE; 2300 return FALSE;
2299 } 2301 }
2300 2302
2301 void remove_away_message(GtkWidget *widget, GtkTreeView *tv) { 2303 void remove_away_message(GtkWidget *widget, GtkTreeView *tv) {
2304 /* XXX CORE/UI
2302 struct away_message *am; 2305 struct away_message *am;
2306 */
2303 GtkTreeIter iter; 2307 GtkTreeIter iter;
2304 GtkTreeSelection *sel = gtk_tree_view_get_selection(tv); 2308 GtkTreeSelection *sel = gtk_tree_view_get_selection(tv);
2305 GtkTreeModel *model = GTK_TREE_MODEL(prefs_away_store); 2309 GtkTreeModel *model = GTK_TREE_MODEL(prefs_away_store);
2306 GValue val = { 0, }; 2310 GValue val = { 0, };
2307 2311
2387 hbox = gtk_hbox_new(TRUE, 5); 2391 hbox = gtk_hbox_new(TRUE, 5);
2388 gtk_box_pack_start(GTK_BOX(ret), hbox, FALSE, FALSE, 0); 2392 gtk_box_pack_start(GTK_BOX(ret), hbox, FALSE, FALSE, 0);
2389 button = gtk_button_new_from_stock (GTK_STOCK_ADD); 2393 button = gtk_button_new_from_stock (GTK_STOCK_ADD);
2390 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); 2394 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
2391 gtk_size_group_add_widget(sg, button); 2395 gtk_size_group_add_widget(sg, button);
2396
2397 /* XXX CORE/UI
2392 g_signal_connect(G_OBJECT(button), "clicked", 2398 g_signal_connect(G_OBJECT(button), "clicked",
2393 G_CALLBACK(create_away_mess), NULL); 2399 G_CALLBACK(create_away_mess), NULL);
2400 */
2394 2401
2395 button = gtk_button_new_from_stock (GTK_STOCK_REMOVE); 2402 button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
2396 gtk_size_group_add_widget(sg, button); 2403 gtk_size_group_add_widget(sg, button);
2404
2405 /* XXX CORE/UI
2397 g_signal_connect(G_OBJECT(button), "clicked", 2406 g_signal_connect(G_OBJECT(button), "clicked",
2398 G_CALLBACK(remove_away_message), event_view); 2407 G_CALLBACK(remove_away_message), event_view);
2408 */
2399 2409
2400 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); 2410 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
2401 2411
2402 button = gaim_pixbuf_button_from_stock(_("_Edit"), GAIM_STOCK_EDIT, GAIM_BUTTON_HORIZONTAL); 2412 button = gaim_pixbuf_button_from_stock(_("_Edit"), GAIM_STOCK_EDIT,
2413 GAIM_BUTTON_HORIZONTAL);
2403 gtk_size_group_add_widget(sg, button); 2414 gtk_size_group_add_widget(sg, button);
2404 g_signal_connect(G_OBJECT(button), "clicked", 2415 g_signal_connect(G_OBJECT(button), "clicked",
2405 G_CALLBACK(away_edit_sel), event_view); 2416 G_CALLBACK(away_edit_sel), event_view);
2406 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); 2417 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
2407 2418