[gnome-screenshot] Do not use deprecated methods.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screenshot] Do not use deprecated methods.
- Date: Mon, 19 Jan 2015 20:01:45 +0000 (UTC)
commit 5176d30bd03f2a92a8b74d9aaeed4f839351032e
Author: Robert Roth <robert roth off gmail com>
Date: Tue Jan 6 20:25:34 2015 +0200
Do not use deprecated methods.
https://bugzilla.gnome.org/show_bug.cgi?id=742476
src/screenshot-interactive-dialog.c | 32 +++++++++++++-------------------
1 files changed, 13 insertions(+), 19 deletions(-)
---
diff --git a/src/screenshot-interactive-dialog.c b/src/screenshot-interactive-dialog.c
index 4a5da10..61692a7 100644
--- a/src/screenshot-interactive-dialog.c
+++ b/src/screenshot-interactive-dialog.c
@@ -230,7 +230,6 @@ create_effects_frame (GtkWidget *outer_vbox,
const gchar *frame_title)
{
GtkWidget *main_vbox, *vbox, *hbox;
- GtkWidget *align;
GtkWidget *label;
GtkWidget *check;
GtkWidget *combo;
@@ -244,7 +243,8 @@ create_effects_frame (GtkWidget *outer_vbox,
title = g_strconcat ("<b>", frame_title, "</b>", NULL);
label = gtk_label_new (title);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (main_vbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
g_free (title);
@@ -253,13 +253,9 @@ create_effects_frame (GtkWidget *outer_vbox,
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
- align = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
- gtk_alignment_set_padding (GTK_ALIGNMENT (align), 0, 0, 12, 0);
- gtk_box_pack_start (GTK_BOX (hbox), align, FALSE, FALSE, 0);
- gtk_widget_show (align);
-
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- gtk_container_add (GTK_CONTAINER (align), vbox);
+ gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
+ gtk_widget_set_margin_start (vbox, 12);
gtk_widget_show (vbox);
/** Include pointer **/
@@ -292,7 +288,8 @@ create_effects_frame (GtkWidget *outer_vbox,
label = gtk_label_new_with_mnemonic (_("Apply _effect:"));
gtk_widget_set_sensitive (label, screenshot_config->take_window_shot);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
effect_label = label;
@@ -310,7 +307,6 @@ create_screenshot_frame (GtkWidget *outer_vbox,
const gchar *frame_title)
{
GtkWidget *main_vbox, *vbox, *hbox;
- GtkWidget *align;
GtkWidget *radio;
GtkWidget *image;
GtkWidget *spin;
@@ -326,7 +322,8 @@ create_screenshot_frame (GtkWidget *outer_vbox,
title = g_strconcat ("<b>", frame_title, "</b>", NULL);
label = gtk_label_new (title);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (main_vbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
g_free (title);
@@ -335,13 +332,8 @@ create_screenshot_frame (GtkWidget *outer_vbox,
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
- align = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
- gtk_widget_set_size_request (align, 48, -1);
- gtk_box_pack_start (GTK_BOX (hbox), align, FALSE, FALSE, 0);
- gtk_widget_show (align);
-
image = gtk_image_new_from_icon_name (SCREENSHOOTER_ICON, GTK_ICON_SIZE_DIALOG);
- gtk_container_add (GTK_CONTAINER (align), image);
+ gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_widget_show (image);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
@@ -398,7 +390,8 @@ create_screenshot_frame (GtkWidget *outer_vbox,
* delay of <spin button> seconds".
*/
label = gtk_label_new_with_mnemonic (_("Grab after a _delay of"));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (delay_hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
@@ -418,7 +411,8 @@ create_screenshot_frame (GtkWidget *outer_vbox,
* delay of <spin button> seconds".
*/
label = gtk_label_new (_("seconds"));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_box_pack_end (GTK_BOX (delay_hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]