[dia] GSEAL: use gtk_toggle_button_get_active () ...
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] GSEAL: use gtk_toggle_button_get_active () ...
- Date: Sat, 2 Apr 2011 16:00:51 +0000 (UTC)
commit d92297840cce5e839d7afe7c75f5ef44045b4403
Author: Hans Breuer <hans breuer org>
Date: Sat Apr 2 14:08:47 2011 +0200
GSEAL: use gtk_toggle_button_get_active () ...
... instead of GtkToggleButton::active access
app/diapagelayout.c | 16 ++++++++--------
app/preferences.c | 4 ++--
lib/prop_inttypes.c | 4 ++--
lib/prop_pixbuf.c | 4 ++--
4 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/app/diapagelayout.c b/app/diapagelayout.c
index 701bbb6..23d95b4 100644
--- a/app/diapagelayout.c
+++ b/app/diapagelayout.c
@@ -429,7 +429,7 @@ dia_page_layout_set_margins(DiaPageLayout *self,
DiaPageOrientation
dia_page_layout_get_orientation(DiaPageLayout *self)
{
- if (GTK_TOGGLE_BUTTON(self->orient_portrait)->active)
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(self->orient_portrait)))
return DIA_PAGE_ORIENT_PORTRAIT;
else
return DIA_PAGE_ORIENT_LANDSCAPE;
@@ -454,7 +454,7 @@ dia_page_layout_set_orientation(DiaPageLayout *self,
gboolean
dia_page_layout_get_fitto(DiaPageLayout *self)
{
- return GTK_TOGGLE_BUTTON(self->fitto)->active;
+ return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(self->fitto));
}
void
@@ -507,7 +507,7 @@ dia_page_layout_get_effective_area(DiaPageLayout *self, gfloat *width,
{
gfloat h, w, scaling;
- if (GTK_TOGGLE_BUTTON(self->orient_portrait)->active) {
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(self->orient_portrait))) {
w = get_paper_pswidth(self->papernum);
h = get_paper_psheight(self->papernum);
} else {
@@ -572,7 +572,7 @@ size_page(DiaPageLayout *self, GtkAllocation *a)
self->height = a->height - 3;
/* change to correct metrics */
- if (GTK_TOGGLE_BUTTON(self->orient_portrait)->active) {
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(self->orient_portrait))) {
if (self->width * get_paper_psheight(self->papernum) >
self->height * get_paper_pswidth(self->papernum))
self->width = self->height * get_paper_pswidth(self->papernum) /
@@ -632,7 +632,7 @@ darea_expose_event(DiaPageLayout *self, GdkEventExpose *event)
gdk_gc_set_foreground(self->gc, &self->blue);
/* draw margins */
- if (GTK_TOGGLE_BUTTON(self->orient_portrait)->active) {
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(self->orient_portrait))) {
val = dia_unit_spinner_get_value(DIA_UNIT_SPINNER(self->tmargin));
num = self->y + val * self->height /get_paper_psheight(self->papernum);
gdk_draw_line(window, self->gc, self->x+1, num, self->x+self->width-2,num);
@@ -704,7 +704,7 @@ paper_size_change(GtkWidget *widget, DiaPageLayout *self)
dia_unit_spinner_set_value(DIA_UNIT_SPINNER(self->rmargin),
get_paper_rmargin(self->papernum));
- if (GTK_TOGGLE_BUTTON(self->orient_portrait)->active) {
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(self->orient_portrait))) {
dia_unit_spinner_set_upper (DIA_UNIT_SPINNER(self->tmargin),
max_margin(get_paper_psheight(self->papernum)));
dia_unit_spinner_set_upper (DIA_UNIT_SPINNER(self->bmargin),
@@ -739,7 +739,7 @@ orient_changed(DiaPageLayout *self)
size_page(self, &self->darea->allocation);
gtk_widget_queue_draw(self->darea);
- if (GTK_TOGGLE_BUTTON(self->orient_portrait)->active) {
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(self->orient_portrait))) {
dia_unit_spinner_set_upper (DIA_UNIT_SPINNER(self->tmargin),
max_margin(get_paper_psheight(self->papernum)));
dia_unit_spinner_set_upper (DIA_UNIT_SPINNER(self->bmargin),
@@ -774,7 +774,7 @@ margin_changed(DiaPageLayout *self)
static void
scalemode_changed(DiaPageLayout *self)
{
- if (GTK_TOGGLE_BUTTON(self->fitto)->active) {
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(self->fitto))) {
gtk_widget_set_sensitive(self->scaling, FALSE);
gtk_widget_set_sensitive(self->fitw, TRUE);
gtk_widget_set_sensitive(self->fith, TRUE);
diff --git a/app/preferences.c b/app/preferences.c
index 7190bed..2f09c30 100644
--- a/app/preferences.c
+++ b/app/preferences.c
@@ -424,7 +424,7 @@ prefs_get_value_from_widget(GtkWidget * widget, DiaPrefData *data,
switch(data->type) {
case PREF_BOOLEAN: {
int prev = *((int *)ptr);
- *((int *)ptr) = GTK_TOGGLE_BUTTON(widget)->active;
+ *((int *)ptr) = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
changed = (prev != *((int *)ptr));
}
break;
@@ -474,7 +474,7 @@ prefs_get_value_from_widget(GtkWidget * widget, DiaPrefData *data,
static void
prefs_boolean_toggle(GtkWidget *widget, gpointer data)
{
- guint active = GTK_TOGGLE_BUTTON(widget)->active;
+ gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
gtk_button_set_label(GTK_BUTTON(widget), active ? _("Yes") : _("No"));
}
diff --git a/lib/prop_inttypes.c b/lib/prop_inttypes.c
index 1f8c7a6..a950874 100644
--- a/lib/prop_inttypes.c
+++ b/lib/prop_inttypes.c
@@ -155,7 +155,7 @@ static const PropertyOps charprop_ops = {
static void
bool_toggled(GtkWidget *wid)
{
- if (GTK_TOGGLE_BUTTON(wid)->active)
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(wid)))
gtk_label_set_text(GTK_LABEL(GTK_BIN(wid)->child), _("Yes"));
else
gtk_label_set_text(GTK_LABEL(GTK_BIN(wid)->child), _("No"));
@@ -200,7 +200,7 @@ boolprop_reset_widget(BoolProperty *prop, WIDGET *widget)
static void
boolprop_set_from_widget(BoolProperty *prop, WIDGET *widget)
{
- prop->bool_data = GTK_TOGGLE_BUTTON(widget)->active;
+ prop->bool_data = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
}
static void
diff --git a/lib/prop_pixbuf.c b/lib/prop_pixbuf.c
index ab193b2..c4e602d 100644
--- a/lib/prop_pixbuf.c
+++ b/lib/prop_pixbuf.c
@@ -211,7 +211,7 @@ pixbufprop_set_from_offset(PixbufProperty *prop,
static void
_pixbuf_toggled(GtkWidget *wid)
{
- if (GTK_TOGGLE_BUTTON(wid)->active)
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(wid)))
gtk_label_set_text(GTK_LABEL(GTK_BIN(wid)->child), _("Yes"));
else
gtk_label_set_text(GTK_LABEL(GTK_BIN(wid)->child), _("No"));
@@ -236,7 +236,7 @@ pixbufprop_reset_widget(PixbufProperty *prop, GtkWidget *widget)
static void
pixbufprop_set_from_widget(PixbufProperty *prop, GtkWidget *widget)
{
- if (GTK_TOGGLE_BUTTON(widget)->active) {
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget))) {
if (!prop->pixbuf)
message_warning (_("Cant create image data from scratch!"));
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]