Skip to content

Commit e313685

Browse files
committed
avoid deprecated GtkButton:use-stock
1 parent 012d9f8 commit e313685

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

libcaja-private/caja-mime-application-chooser.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -417,11 +417,8 @@ caja_mime_application_chooser_init (CajaMimeApplicationChooser *chooser)
417417
gtk_box_pack_start (GTK_BOX (chooser), box, FALSE, FALSE, 6);
418418
gtk_widget_show (box);
419419

420-
button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
421-
"label", "gtk-add",
422-
"use-stock", TRUE,
423-
"use-underline", TRUE,
424-
NULL));
420+
button = gtk_button_new_with_mnemonic (_("_Add"));
421+
gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("list-add", GTK_ICON_SIZE_BUTTON));
425422

426423
g_signal_connect (button, "clicked",
427424
G_CALLBACK (add_clicked_cb),
@@ -430,11 +427,8 @@ caja_mime_application_chooser_init (CajaMimeApplicationChooser *chooser)
430427
gtk_widget_show (button);
431428
gtk_container_add (GTK_CONTAINER (box), button);
432429

433-
button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
434-
"label", "gtk-remove",
435-
"use-stock", TRUE,
436-
"use-underline", TRUE,
437-
NULL));
430+
button = gtk_button_new_with_mnemonic (_("_Remove"));
431+
gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_BUTTON));
438432

439433
g_signal_connect (button, "clicked",
440434
G_CALLBACK (remove_clicked_cb),

src/caja-property-browser.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -387,22 +387,16 @@ caja_property_browser_init (CajaPropertyBrowser *property_browser)
387387
gtk_container_add (GTK_CONTAINER (temp_box), property_browser->details->bottom_box);
388388

389389
/* create the "help" button */
390-
temp_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
391-
"label", "gtk-help",
392-
"use-stock", TRUE,
393-
"use-underline", TRUE,
394-
NULL));
390+
temp_button = gtk_button_new_with_mnemonic (_("_Help"));
391+
gtk_button_set_image (GTK_BUTTON (temp_button), gtk_image_new_from_icon_name ("help-browser", GTK_ICON_SIZE_BUTTON));
395392

396393
gtk_widget_show (temp_button);
397394
gtk_box_pack_start (GTK_BOX (property_browser->details->bottom_box), temp_button, FALSE, FALSE, 0);
398395
g_signal_connect_object (temp_button, "clicked", G_CALLBACK (help_button_callback), property_browser, 0);
399396

400-
/* create the "done" button */
401-
temp_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
402-
"label", "gtk-close",
403-
"use-stock", TRUE,
404-
"use-underline", TRUE,
405-
NULL));
397+
/* create the "close" button */
398+
temp_button = gtk_button_new_with_mnemonic (_("_Close"));
399+
gtk_button_set_image (GTK_BUTTON (temp_button), gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_BUTTON));
406400

407401
gtk_widget_set_can_default (temp_button, TRUE);
408402

0 commit comments

Comments
 (0)