summaryrefslogtreecommitdiff
path: root/polkitgtkmate
diff options
context:
space:
mode:
Diffstat (limited to 'polkitgtkmate')
-rw-r--r--polkitgtkmate/example.c4
-rw-r--r--polkitgtkmate/polkitlockbutton.c4
-rw-r--r--polkitgtkmate/polkitlockbutton.h8
3 files changed, 4 insertions, 12 deletions
diff --git a/polkitgtkmate/example.c b/polkitgtkmate/example.c
index da1d2e4..8b2da85 100644
--- a/polkitgtkmate/example.c
+++ b/polkitgtkmate/example.c
@@ -115,7 +115,11 @@ int main(int argc, char* argv[])
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+#else
vbox = gtk_vbox_new(FALSE, 12);
+#endif
gtk_container_set_border_width(GTK_CONTAINER(window), 12);
gtk_container_add(GTK_CONTAINER(window), vbox);
diff --git a/polkitgtkmate/polkitlockbutton.c b/polkitgtkmate/polkitlockbutton.c
index e1ad610..1b15cbe 100644
--- a/polkitgtkmate/polkitlockbutton.c
+++ b/polkitgtkmate/polkitlockbutton.c
@@ -209,11 +209,7 @@ static void on_authority_changed(PolkitAuthority* authority, gpointer user_data)
static void on_clicked(GtkButton* button, gpointer user_data);
-#if GTK_CHECK_VERSION (3, 0, 0)
G_DEFINE_TYPE(PolkitLockButton, polkit_lock_button, GTK_TYPE_BOX);
-#else
-G_DEFINE_TYPE(PolkitLockButton, polkit_lock_button, GTK_TYPE_HBOX);
-#endif
static void polkit_lock_button_finalize(GObject* object)
{
diff --git a/polkitgtkmate/polkitlockbutton.h b/polkitgtkmate/polkitlockbutton.h
index ce3affe..4360815 100644
--- a/polkitgtkmate/polkitlockbutton.h
+++ b/polkitgtkmate/polkitlockbutton.h
@@ -57,11 +57,7 @@ typedef struct _PolkitLockButtonPrivate PolkitLockButtonPrivate;
* should be accessed using the provided API.
*/
struct _PolkitLockButton {
-#if GTK_CHECK_VERSION (3, 0, 0)
GtkBox parent;
-#else
- GtkHBox parent;
-#endif
/*< private >*/
PolkitLockButtonPrivate* priv;
@@ -75,11 +71,7 @@ struct _PolkitLockButton {
* Class structure for #PolkitLockButton.
*/
struct _PolkitLockButtonClass {
-#if GTK_CHECK_VERSION (3, 0, 0)
GtkBoxClass parent_class;
-#else
- GtkHBoxClass parent_class;
-#endif
/* Signals */
void (*changed)(PolkitLockButton* button);