Mercurial > pidgin
comparison src/gtklog.c @ 11243:a511b77a368b
[gaim-migrate @ 13408]
sf patch #1246384, from shiyee
"This patch globally defines
spacings and boreders according to the Gnome Human
Interfaces Guidelines, and uses those defines where
appropriate. No visual changes are made, but the the
intention is that the defines should help promote
uniformness."
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 12 Aug 2005 23:53:28 +0000 |
parents | a3d3729a9130 |
children | 3b95804caea4 |
comparison
equal
deleted
inserted
replaced
11242:01c06e7ae1f6 | 11243:a511b77a368b |
---|---|
290 g_hash_table_insert(log_viewers, ht, lv); | 290 g_hash_table_insert(log_viewers, ht, lv); |
291 | 291 |
292 /* Window ***********/ | 292 /* Window ***********/ |
293 lv->window = gtk_dialog_new_with_buttons(title, NULL, 0, | 293 lv->window = gtk_dialog_new_with_buttons(title, NULL, 0, |
294 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); | 294 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); |
295 gtk_container_set_border_width (GTK_CONTAINER(lv->window), 6); | 295 gtk_container_set_border_width (GTK_CONTAINER(lv->window), GAIM_HIG_BOX_SPACE); |
296 gtk_dialog_set_has_separator(GTK_DIALOG(lv->window), FALSE); | 296 gtk_dialog_set_has_separator(GTK_DIALOG(lv->window), FALSE); |
297 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(lv->window)->vbox), 0); | 297 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(lv->window)->vbox), 0); |
298 g_signal_connect(G_OBJECT(lv->window), "response", | 298 g_signal_connect(G_OBJECT(lv->window), "response", |
299 G_CALLBACK(destroy_cb), ht); | 299 G_CALLBACK(destroy_cb), ht); |
300 gtk_window_set_role(GTK_WINDOW(lv->window), "log_viewer"); | 300 gtk_window_set_role(GTK_WINDOW(lv->window), "log_viewer"); |
302 /* Icon *************/ | 302 /* Icon *************/ |
303 if (pixbuf != NULL) { | 303 if (pixbuf != NULL) { |
304 GdkPixbuf *scale; | 304 GdkPixbuf *scale; |
305 GtkWidget *icon; | 305 GtkWidget *icon; |
306 | 306 |
307 title_box = gtk_hbox_new(FALSE, 6); | 307 title_box = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
308 gtk_container_set_border_width(GTK_CONTAINER(title_box), 6); | 308 gtk_container_set_border_width(GTK_CONTAINER(title_box), GAIM_HIG_BOX_SPACE); |
309 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(lv->window)->vbox), title_box, FALSE, FALSE, 0); | 309 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(lv->window)->vbox), title_box, FALSE, FALSE, 0); |
310 | 310 |
311 scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, GDK_INTERP_BILINEAR); | 311 scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, GDK_INTERP_BILINEAR); |
312 icon = gtk_image_new_from_pixbuf(scale); | 312 icon = gtk_image_new_from_pixbuf(scale); |
313 gtk_box_pack_start(GTK_BOX(title_box), icon, FALSE, FALSE, 0); | 313 gtk_box_pack_start(GTK_BOX(title_box), icon, FALSE, FALSE, 0); |
337 GtkWidget *hbox; | 337 GtkWidget *hbox; |
338 GtkWidget *button; | 338 GtkWidget *button; |
339 | 339 |
340 /* Pane *************/ | 340 /* Pane *************/ |
341 pane = gtk_hpaned_new(); | 341 pane = gtk_hpaned_new(); |
342 gtk_container_set_border_width(GTK_CONTAINER(pane), 6); | 342 gtk_container_set_border_width(GTK_CONTAINER(pane), GAIM_HIG_BOX_SPACE); |
343 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(lv->window)->vbox), pane, TRUE, TRUE, 0); | 343 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(lv->window)->vbox), pane, TRUE, TRUE, 0); |
344 | 344 |
345 /* List *************/ | 345 /* List *************/ |
346 sw = gtk_scrolled_window_new (NULL, NULL); | 346 sw = gtk_scrolled_window_new (NULL, NULL); |
347 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN); | 347 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN); |
365 G_CALLBACK(log_row_activated_cb), | 365 G_CALLBACK(log_row_activated_cb), |
366 lv); | 366 lv); |
367 gaim_set_accessible_label(lv->treeview, lv->label); | 367 gaim_set_accessible_label(lv->treeview, lv->label); |
368 | 368 |
369 /* A fancy little box ************/ | 369 /* A fancy little box ************/ |
370 vbox = gtk_vbox_new(FALSE, 6); | 370 vbox = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
371 gtk_paned_add2(GTK_PANED(pane), vbox); | 371 gtk_paned_add2(GTK_PANED(pane), vbox); |
372 | 372 |
373 /* Viewer ************/ | 373 /* Viewer ************/ |
374 frame = gaim_gtk_create_imhtml(FALSE, &lv->imhtml, NULL); | 374 frame = gaim_gtk_create_imhtml(FALSE, &lv->imhtml, NULL); |
375 gtk_widget_set_name(lv->imhtml, "gaim_gtklog_imhtml"); | 375 gtk_widget_set_name(lv->imhtml, "gaim_gtklog_imhtml"); |
376 gtk_widget_set_size_request(lv->imhtml, 320, 200); | 376 gtk_widget_set_size_request(lv->imhtml, 320, 200); |
377 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); | 377 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
378 gtk_widget_show(frame); | 378 gtk_widget_show(frame); |
379 | 379 |
380 /* Search box **********/ | 380 /* Search box **********/ |
381 hbox = gtk_hbox_new(FALSE, 6); | 381 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
382 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | 382 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
383 lv->entry = gtk_entry_new(); | 383 lv->entry = gtk_entry_new(); |
384 gtk_box_pack_start(GTK_BOX(hbox), lv->entry, TRUE, TRUE, 0); | 384 gtk_box_pack_start(GTK_BOX(hbox), lv->entry, TRUE, TRUE, 0); |
385 button = gtk_button_new_from_stock(GTK_STOCK_FIND); | 385 button = gtk_button_new_from_stock(GTK_STOCK_FIND); |
386 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 386 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |