summaryrefslogtreecommitdiff
path: root/new/unix/checkbox.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-04-15 23:07:43 -0400
committerPietro Gagliardi <[email protected]>2015-04-15 23:07:43 -0400
commit0c73a7fb80e0fc59f1fbde07053bd55fe03dd3cc (patch)
tree6d42d55023b1ccf5feeba83dc08071966e922e3b /new/unix/checkbox.c
parente49436170aa547ec713b8510bec955985f09cb89 (diff)
Fixed Unix backend build errors. Impressively, IT STILL WORKS! Now to fix the warnings...
Diffstat (limited to 'new/unix/checkbox.c')
-rw-r--r--new/unix/checkbox.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/new/unix/checkbox.c b/new/unix/checkbox.c
index de49439..5111c0e 100644
--- a/new/unix/checkbox.c
+++ b/new/unix/checkbox.c
@@ -3,7 +3,7 @@
struct checkbox {
uiCheckbox c;
- void (*onToggled)(uiControl *, void *);
+ void (*onToggled)(uiCheckbox *, void *);
void *onToggledData;
gulong onToggledSignal;
};
@@ -12,10 +12,10 @@ static void onToggled(GtkToggleButton *b, gpointer data)
{
struct checkbox *c = (struct checkbox *) data;
- (*(c->onToggled))(uiControl(c), c->onToggledData);
+ (*(c->onToggled))(uiCheckbox(c), c->onToggledData);
}
-static void defaultOnToggled(uiControl *c, void *data)
+static void defaultOnToggled(uiCheckbox *c, void *data)
{
// do nothing
}
@@ -39,9 +39,9 @@ static void setText(uiCheckbox *c, const char *text)
gtk_button_set_label(CHECKBOX(c), text);
}
-static void setOnToggled(uiCheckbox *c, void (*f)(uiControl *, void *), void *data)
+static void setOnToggled(uiCheckbox *cc, void (*f)(uiCheckbox *, void *), void *data)
{
- struct checkbox *c = (struct checkbox *) c;
+ struct checkbox *c = (struct checkbox *) cc;
c->onToggled = f;
c->onToggledData = data;
@@ -52,9 +52,9 @@ static int getChecked(uiCheckbox *c)
return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(CHECKBOX(c))) != FALSE;
}
-static void setChecked(uiCheckbox *c, int checked)
+static void setChecked(uiCheckbox *cc, int checked)
{
- struct checkbox *cc = (struct checkbox *) c;
+ struct checkbox *c = (struct checkbox *) cc;
GtkToggleButton *button;
gboolean active;
@@ -63,12 +63,12 @@ static void setChecked(uiCheckbox *c, int checked)
active = TRUE;
// we need to inhibit sending of ::toggled because this WILL send a ::toggled otherwise
button = GTK_TOGGLE_BUTTON(CHECKBOX(c));
- g_signal_handler_block(button, cc->onToggledSignal);
+ g_signal_handler_block(button, c->onToggledSignal);
gtk_toggle_button_set_active(button, active);
- g_signal_handler_unblock(button, cc->onToggledSignal);
+ g_signal_handler_unblock(button, c->onToggledSignal);
}
-uiControl *uiNewCheckbox(const char *text)
+uiCheckbox *uiNewCheckbox(const char *text)
{
struct checkbox *c;
GtkWidget *widget;