Commit 32ef28bc authored by Javier Jardón's avatar Javier Jardón

Replace gtk_misc_set_padding() with GtkWidget:margin properties

https://bugzilla.gnome.org/show_bug.cgi?id=651605
parent 31f53dd8
......@@ -125,7 +125,7 @@ query_for_toplevel (GdkScreen *screen,
gtk_container_add (GTK_CONTAINER (popup), frame);
label = gtk_label_new (prompt);
gtk_misc_set_padding (GTK_MISC (label), 10, 10);
g_object_set (label, "margin", 10, NULL);
gtk_container_add (GTK_CONTAINER (frame), label);
gtk_widget_show_all (popup);
......
......@@ -758,8 +758,7 @@ request_password (GtkPrintBackend *backend,
/* Left */
icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0.0);
gtk_misc_set_padding (GTK_MISC (icon), 6, 6);
g_object_set (icon, "margin", 6, NULL);
/* Right */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
......
......@@ -1679,9 +1679,15 @@ gtk_status_icon_padding_changed (GtkStatusIcon *status_icon)
padding = _gtk_tray_icon_get_padding (GTK_TRAY_ICON (priv->tray_icon));
if (orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_misc_set_padding (GTK_MISC (priv->image), padding, 0);
{
gtk_widget_set_margin_left (priv->image, padding);
gtk_widget_set_margin_right (priv->image, padding);
}
else
gtk_misc_set_padding (GTK_MISC (priv->image), 0, padding);
{
gtk_widget_set_margin_bottom (priv->image, padding);
gtk_widget_set_margin_top (priv->image, padding);
}
}
static void
......
......@@ -1793,7 +1793,7 @@ status_window_make_window (StatusWindow *status_window)
gtk_widget_set_app_paintable (window, TRUE);
status_label = gtk_label_new ("");
gtk_misc_set_padding (GTK_MISC (status_label), 1, 1);
g_object_set (status_label, "margin", 1, NULL);
gtk_widget_show (status_label);
gtk_container_add (GTK_CONTAINER (window), status_label);
......
......@@ -604,11 +604,11 @@ main (int argc, char **argv)
preview_label = gtk_label_new (NULL);
gtk_box_pack_start (GTK_BOX (preview_vbox), preview_label, TRUE, TRUE, 0);
gtk_misc_set_padding (GTK_MISC (preview_label), 6, 6);
g_object_set (preview_label, "margin", 6, NULL);
preview_image = gtk_image_new ();
gtk_box_pack_start (GTK_BOX (preview_vbox), preview_image, TRUE, TRUE, 0);
gtk_misc_set_padding (GTK_MISC (preview_image), 6, 6);
g_object_set (preview_image, "margin", 6, NULL);
update_preview_cb (GTK_FILE_CHOOSER (dialog));
g_signal_connect (dialog, "update-preview",
......
......@@ -5499,7 +5499,7 @@ label_toggle (GtkWidget *widget,
"destroy",
G_CALLBACK (gtk_widget_destroyed),
label);
gtk_misc_set_padding (GTK_MISC (*label), 10, 10);
g_object_set (*label, "margin", 10, NULL);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog_window))),
*label, TRUE, TRUE, 0);
gtk_widget_show (*label);
......@@ -6121,7 +6121,10 @@ create_pages (GtkNotebook *notebook, gint start, gint end)
g_object_set_data (G_OBJECT (child), "tab_pixmap", pixwid);
gtk_box_pack_start (GTK_BOX (label_box), pixwid, FALSE, TRUE, 0);
gtk_misc_set_padding (GTK_MISC (pixwid), 3, 1);
gtk_widget_set_margin_left (pixwid, 3);
gtk_widget_set_margin_right (pixwid, 3);
gtk_widget_set_margin_bottom (pixwid, 1);
gtk_widget_set_margin_top (pixwid, 1);
label = gtk_label_new_with_mnemonic (accel_buffer);
gtk_box_pack_start (GTK_BOX (label_box), label, FALSE, TRUE, 0);
gtk_widget_show_all (label_box);
......@@ -6132,7 +6135,10 @@ create_pages (GtkNotebook *notebook, gint start, gint end)
g_object_set_data (G_OBJECT (child), "menu_pixmap", pixwid);
gtk_box_pack_start (GTK_BOX (menu_box), pixwid, FALSE, TRUE, 0);
gtk_misc_set_padding (GTK_MISC (pixwid), 3, 1);
gtk_widget_set_margin_left (pixwid, 3);
gtk_widget_set_margin_right (pixwid, 3);
gtk_widget_set_margin_bottom (pixwid, 1);
gtk_widget_set_margin_top (pixwid, 1);
label = gtk_label_new (buffer);
gtk_box_pack_start (GTK_BOX (menu_box), label, FALSE, TRUE, 0);
gtk_widget_show_all (menu_box);
......@@ -9348,7 +9354,7 @@ create_timeout_test (GtkWidget *widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
label = gtk_label_new ("count: 0");
gtk_misc_set_padding (GTK_MISC (label), 10, 10);
g_object_set (label, "margin", 10, NULL);
gtk_box_pack_start (GTK_BOX (content_area), label, TRUE, TRUE, 0);
gtk_widget_show (label);
......@@ -9470,7 +9476,7 @@ create_idle_test (GtkWidget *widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
label = gtk_label_new ("count: 0");
gtk_misc_set_padding (GTK_MISC (label), 10, 10);
g_object_set (label, "margin", 10, NULL);
gtk_widget_show (label);
container =
......@@ -9667,7 +9673,7 @@ create_mainloop (GtkWidget *widget)
action_area = gtk_dialog_get_action_area (GTK_DIALOG (window));
label = gtk_label_new ("In recursive main loop...");
gtk_misc_set_padding (GTK_MISC(label), 20, 20);
g_object_set (label, "margin", 20, NULL);
gtk_box_pack_start (GTK_BOX (content_area), label, TRUE, TRUE, 0);
gtk_widget_show (label);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment