[nautilus-actions] use gtk_misc functions instead of direct xpad, xalign properties
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] use gtk_misc functions instead of direct xpad, xalign properties
- Date: Mon, 28 Nov 2011 22:33:53 +0000 (UTC)
commit 80497d6d7f1f1ea3c4bf1835fc7b0be63bd17056
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon Nov 28 22:19:16 2011 +0100
use gtk_misc functions instead of direct xpad, xalign properties
ChangeLog | 2 ++
src/nact/nact-export-format.c | 8 ++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ab3323f..7d3c156 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2011-11-28 Pierre Wieser <pwieser trychlos org>
+ * nact/nact-export-format.c (draw_in_vbox): Use gtk_misc functions.
+
* run-autogen.sh:
* run-distcheck.sh: Review in order to be able to build several guests
from a common single source tree.
diff --git a/src/nact/nact-export-format.c b/src/nact/nact-export-format.c
index 277584a..b825a91 100644
--- a/src/nact/nact-export-format.c
+++ b/src/nact/nact-export-format.c
@@ -154,6 +154,8 @@ draw_in_vbox( GtkWidget *container, const NAExportFormat *format, guint mode, gi
gchar *description;
GtkRadioButton *button;
guint size, spacing;
+ gint ypad;
+ gfloat yalign;
#if ! GTK_CHECK_VERSION( 3, 2, 0 )
GtkWidget *hbox;
#endif
@@ -219,7 +221,10 @@ draw_in_vbox( GtkWidget *container, const NAExportFormat *format, guint mode, gi
size += 2*spacing;
desc_label = GTK_LABEL( gtk_label_new( description ));
- g_object_set( G_OBJECT( desc_label ), "xpad", size, NULL );
+ gtk_misc_get_padding( GTK_MISC( desc_label ), NULL, &ypad );
+ gtk_misc_set_padding( GTK_MISC( desc_label ), size, ypad );
+ gtk_misc_get_alignment( GTK_MISC( desc_label ), NULL, &yalign );
+ gtk_misc_set_alignment( GTK_MISC( desc_label ), 0, yalign );
#if GTK_CHECK_VERSION( 3, 2, 0 )
gtk_grid_attach( GTK_GRID( container_mode ), GTK_WIDGET( desc_label ), 0, 1, 1, 1 );
@@ -227,7 +232,6 @@ draw_in_vbox( GtkWidget *container, const NAExportFormat *format, guint mode, gi
hbox = gtk_hbox_new( TRUE, 0 );
gtk_box_pack_start( GTK_BOX( container_mode ), hbox, FALSE, TRUE, 0 );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( desc_label ), TRUE, TRUE, 4 );
- g_object_set( G_OBJECT( desc_label ), "xalign", 0, NULL );
#endif
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]