Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #647930 ยป 0006-Replace-gtk_button_set_image-with-modern-constructs.patch

Marko Lindqvist, 2017-03-26 06:50 PM

View differences:

client/gui-gtk-4.0/chatline.c
button = gtk_toggle_button_new();
g_object_set(button, "margin", 2, NULL);
gtk_container_add(GTK_CONTAINER(hbox), button);
gtk_button_set_image(GTK_BUTTON(button),
gtk_image_new_from_icon_name("gtk-edit", 0));
gtk_button_set_icon_name(GTK_BUTTON(button), "gtk-edit");
g_signal_connect(button, "toggled", G_CALLBACK(button_toggled), &toolkit);
gtk_widget_set_tooltip_text(GTK_WIDGET(button), _("Chat tools"));
toolkit.toggle_button = button;
client/gui-gtk-4.0/editprop.c
struct property_page *pp;
GtkWidget *vbox, *vbox2, *hbox, *hbox2, *paned, *frame, *w;
GtkWidget *scrollwin, *view, *label, *entry, *notebook;
GtkWidget *button, *hsep, *image;
GtkWidget *button, *hsep;
GtkTreeSelection *sel;
GtkCellRenderer *cell;
GtkTreeViewColumn *col;
......
gtk_container_add(GTK_CONTAINER(vbox), hbox);
button = gtk_button_new();
image = gtk_image_new_from_icon_name("list-add", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(button), image);
gtk_button_set_icon_name(GTK_BUTTON(button), "list-add");
gtk_button_set_label(GTK_BUTTON(button), _("Create"));
gtk_size_group_add_widget(sizegroup, button);
gtk_widget_set_tooltip_text(button,
......
gtk_container_add(GTK_CONTAINER(hbox), button);
button = gtk_button_new();
image = gtk_image_new_from_icon_name("list-remove",
GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(button), image);
gtk_button_set_icon_name(GTK_BUTTON(button), "list-remove");
gtk_button_set_label(GTK_BUTTON(button), _("Destroy"));
gtk_size_group_add_widget(sizegroup, button);
gtk_widget_set_tooltip_text(button,
client/gui-gtk-4.0/gui_stuff.c
const gchar *label_text)
{
GtkWidget *button;
GtkWidget *image;
button = gtk_button_new_with_mnemonic(label_text);
if (icon_name != NULL) {
image = gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(button), image);
gtk_button_set_icon_name(GTK_BUTTON(button), icon_name);
}
return button;
......
break;
case GUI_DIALOG_TAB:
{
GtkWidget *hbox, *label, *image, *button, *event_box;
GtkWidget *hbox, *label, *button, *event_box;
gint w, h;
gchar *buf;
......
gtk_widget_set_tooltip_text(button, buf);
g_free(buf);
image = gtk_image_new_from_icon_name("window-close", GTK_ICON_SIZE_MENU);
gtk_widget_set_margin_start(image, 0);
gtk_widget_set_margin_end(image, 0);
gtk_widget_set_margin_top(image, 0);
gtk_widget_set_margin_bottom(image, 0);
gtk_button_set_image(GTK_BUTTON(button), image);
gtk_button_set_icon_name(GTK_BUTTON(button), "window-close");
gtk_container_add(GTK_CONTAINER(hbox), button);
client/gui-gtk-4.0/voteinfo_bar.c
**************************************************************************/
GtkWidget *voteinfo_bar_new(bool split_bar)
{
GtkWidget *label, *button, *vbox, *hbox, *arrow;
GtkWidget *label, *button, *vbox, *hbox;
struct voteinfo_bar *vib;
const int BUTTON_HEIGHT = 12;
......
gtk_widget_set_name(label, "vote label");
vib->label = label;
arrow = gtk_image_new_from_icon_name("media-seek-backward",
GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_widget_set_halign(arrow, GTK_ALIGN_CENTER);
gtk_widget_set_valign(arrow, GTK_ALIGN_START);
if (split_bar) {
hbox = gtk_grid_new();
gtk_grid_set_column_spacing(GTK_GRID(hbox), 4);
......
gtk_widget_set_margin_end(button, 16);
g_signal_connect(button, "clicked",
G_CALLBACK(voteinfo_bar_next_callback), NULL);
gtk_button_set_image(GTK_BUTTON(button), arrow);
gtk_button_set_icon_name(GTK_BUTTON(button), "media-seek-backward");
gtk_widget_set_size_request(button, -1, BUTTON_HEIGHT);
gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
gtk_widget_set_focus_on_click(button, FALSE);
    (1-1/1)