summaryrefslogtreecommitdiff
path: root/polkitgtkmate
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-08-11 18:48:36 +0200
committerStefano Karapetsas <[email protected]>2013-08-11 18:48:36 +0200
commitf3c7002b8ae2ca19e7f264a6862b1e20616654a4 (patch)
treeff488a3948055e7cc35092cb09c5f7949e37cb5e /polkitgtkmate
parent5115f068a19b25ce061f1f3b1fde329dad921a1f (diff)
downloadmate-polkit-f3c7002b8ae2ca19e7f264a6862b1e20616654a4.tar.bz2
mate-polkit-f3c7002b8ae2ca19e7f264a6862b1e20616654a4.tar.xz
Use GtkBox in GTK3 instead of GtkHBox
Diffstat (limited to 'polkitgtkmate')
-rw-r--r--polkitgtkmate/polkitlockbutton.c4
-rw-r--r--polkitgtkmate/polkitlockbutton.h8
2 files changed, 12 insertions, 0 deletions
diff --git a/polkitgtkmate/polkitlockbutton.c b/polkitgtkmate/polkitlockbutton.c
index 079a94b..757c34c 100644
--- a/polkitgtkmate/polkitlockbutton.c
+++ b/polkitgtkmate/polkitlockbutton.c
@@ -209,7 +209,11 @@ 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 519128b..ce3affe 100644
--- a/polkitgtkmate/polkitlockbutton.h
+++ b/polkitgtkmate/polkitlockbutton.h
@@ -57,7 +57,11 @@ 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;
@@ -71,7 +75,11 @@ 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);