[geany/geany] 11b504: Use ui_button_new_with_image() to build image buttons

Colomban Wendling git-noreply at xxxxx
Fri Jul 4 15:50:37 UTC 2014


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Fri, 04 Jul 2014 15:50:37 UTC
Commit:      11b50493fcd65216014d4bcab157d79cc33d9e7b
             https://github.com/geany/geany/commit/11b50493fcd65216014d4bcab157d79cc33d9e7b

Log Message:
-----------
Use ui_button_new_with_image() to build image buttons


Modified Paths:
--------------
    src/project.c

Modified: src/project.c
8 lines changed, 1 insertions(+), 7 deletions(-)
===================================================================
@@ -123,15 +123,9 @@ void project_new(void)
 										 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
 
 	gtk_widget_set_name(e->dialog, "GeanyDialogProject");
-	bbox = gtk_hbox_new(FALSE, 0);
-	button = gtk_button_new();
+	button = ui_button_new_with_image(GTK_STOCK_NEW, _("C_reate"));
 	gtk_widget_set_can_default(button, TRUE);
 	gtk_window_set_default(GTK_WINDOW(e->dialog), button);
-	image = gtk_image_new_from_stock(GTK_STOCK_NEW, GTK_ICON_SIZE_BUTTON);
-	label = gtk_label_new_with_mnemonic(_("C_reate"));
-	gtk_box_pack_start(GTK_BOX(bbox), image, FALSE, FALSE, 3);
-	gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 3);
-	gtk_container_add(GTK_CONTAINER(button), bbox);
 	gtk_dialog_add_action_widget(GTK_DIALOG(e->dialog), button, GTK_RESPONSE_OK);
 
 	vbox = ui_dialog_vbox_new(GTK_DIALOG(e->dialog));



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list