Bug 566532 – GtkScaleButton implementation of GtkOrientable
2009-01-13 Christian Dywan <christian@imendio.com> Bug 566532 – GtkScaleButton implementation of GtkOrientable * gtk/gtk.symbols: * gtk/gtkscalebutton.c (gtk_scale_button_class_init), (gtk_scale_button_set_property): * gtk/gtkscalebutton.h: Deprecate gtk_scale_button_get_orientation in favour of implementing GtkOrientable. Patch by Bruce Cowan. svn path=/trunk/; revision=22112
This commit is contained in:

committed by
Christian Dywan

parent
08a80b9efa
commit
856279da34
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2009-01-13 Christian Dywan <christian@imendio.com>
|
||||||
|
|
||||||
|
Bug 566532 – GtkScaleButton implementation of GtkOrientable
|
||||||
|
|
||||||
|
* gtk/gtk.symbols:
|
||||||
|
* gtk/gtkscalebutton.c (gtk_scale_button_class_init),
|
||||||
|
(gtk_scale_button_set_property):
|
||||||
|
* gtk/gtkscalebutton.h: Deprecate gtk_scale_button_get_orientation
|
||||||
|
in favour of implementing GtkOrientable. Patch by Bruce Cowan.
|
||||||
|
|
||||||
2009-01-13 Tor Lillqvist <tml@iki.fi>
|
2009-01-13 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
Bug 164002 - query scripts don't work uninstalled on windows
|
Bug 164002 - query scripts don't work uninstalled on windows
|
||||||
|
@ -3469,8 +3469,10 @@ gtk_scale_button_set_icons
|
|||||||
gtk_scale_button_set_value
|
gtk_scale_button_set_value
|
||||||
gtk_scale_button_get_adjustment
|
gtk_scale_button_get_adjustment
|
||||||
gtk_scale_button_set_adjustment
|
gtk_scale_button_set_adjustment
|
||||||
|
#ifndef GTK_DISABLE_DEPRECATED
|
||||||
gtk_scale_button_get_orientation
|
gtk_scale_button_get_orientation
|
||||||
gtk_scale_button_set_orientation
|
gtk_scale_button_set_orientation
|
||||||
|
#endif
|
||||||
gtk_scale_button_get_plus_button
|
gtk_scale_button_get_plus_button
|
||||||
gtk_scale_button_get_minus_button
|
gtk_scale_button_get_minus_button
|
||||||
gtk_scale_button_get_popup
|
gtk_scale_button_get_popup
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include "gtkhscale.h"
|
#include "gtkhscale.h"
|
||||||
#include "gtkvscale.h"
|
#include "gtkvscale.h"
|
||||||
#include "gtkframe.h"
|
#include "gtkframe.h"
|
||||||
|
#include "gtkorientable.h"
|
||||||
#include "gtkhbox.h"
|
#include "gtkhbox.h"
|
||||||
#include "gtkvbox.h"
|
#include "gtkvbox.h"
|
||||||
#include "gtkwindow.h"
|
#include "gtkwindow.h"
|
||||||
@ -156,9 +157,11 @@ static void gtk_scale_button_scale_value_changed(GtkRange *range);
|
|||||||
/* see below for scale definitions */
|
/* see below for scale definitions */
|
||||||
static GtkWidget *gtk_scale_button_scale_box_new(GtkScaleButton *button);
|
static GtkWidget *gtk_scale_button_scale_box_new(GtkScaleButton *button);
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0, };
|
G_DEFINE_TYPE_WITH_CODE (GtkScaleButton, gtk_scale_button, GTK_TYPE_BUTTON,
|
||||||
|
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
|
||||||
|
NULL))
|
||||||
|
|
||||||
G_DEFINE_TYPE (GtkScaleButton, gtk_scale_button, GTK_TYPE_BUTTON)
|
static guint signals[LAST_SIGNAL] = { 0, };
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_scale_button_class_init (GtkScaleButtonClass *klass)
|
gtk_scale_button_class_init (GtkScaleButtonClass *klass)
|
||||||
@ -187,14 +190,9 @@ gtk_scale_button_class_init (GtkScaleButtonClass *klass)
|
|||||||
*
|
*
|
||||||
* Since: 2.14
|
* Since: 2.14
|
||||||
**/
|
**/
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_override_property (gobject_class,
|
||||||
PROP_ORIENTATION,
|
PROP_ORIENTATION,
|
||||||
g_param_spec_enum ("orientation",
|
"orientation");
|
||||||
P_("Orientation"),
|
|
||||||
P_("The orientation of the scale"),
|
|
||||||
GTK_TYPE_ORIENTATION,
|
|
||||||
GTK_ORIENTATION_VERTICAL,
|
|
||||||
GTK_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_VALUE,
|
PROP_VALUE,
|
||||||
@ -426,7 +424,7 @@ gtk_scale_button_set_property (GObject *object,
|
|||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_ORIENTATION:
|
case PROP_ORIENTATION:
|
||||||
gtk_scale_button_set_orientation (button, g_value_get_enum (value));
|
gtk_orientable_set_orientation (GTK_ORIENTABLE (button), g_value_get_enum (value));
|
||||||
break;
|
break;
|
||||||
case PROP_VALUE:
|
case PROP_VALUE:
|
||||||
gtk_scale_button_set_value (button, g_value_get_double (value));
|
gtk_scale_button_set_value (button, g_value_get_double (value));
|
||||||
@ -705,6 +703,8 @@ gtk_scale_button_set_adjustment (GtkScaleButton *button,
|
|||||||
* Returns: the #GtkScaleButton's orientation.
|
* Returns: the #GtkScaleButton's orientation.
|
||||||
*
|
*
|
||||||
* Since: 2.14
|
* Since: 2.14
|
||||||
|
*
|
||||||
|
* Deprecated: 2.16: Use gtk_orientable_get_orientation() instead.
|
||||||
**/
|
**/
|
||||||
GtkOrientation
|
GtkOrientation
|
||||||
gtk_scale_button_get_orientation (GtkScaleButton *button)
|
gtk_scale_button_get_orientation (GtkScaleButton *button)
|
||||||
@ -722,6 +722,8 @@ gtk_scale_button_get_orientation (GtkScaleButton *button)
|
|||||||
* Sets the orientation of the #GtkScaleButton's popup window.
|
* Sets the orientation of the #GtkScaleButton's popup window.
|
||||||
*
|
*
|
||||||
* Since: 2.14
|
* Since: 2.14
|
||||||
|
*
|
||||||
|
* Deprecated: 2.16: Use gtk_orientable_set_orientation() instead.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_scale_button_set_orientation (GtkScaleButton *button,
|
gtk_scale_button_set_orientation (GtkScaleButton *button,
|
||||||
|
@ -95,13 +95,18 @@ void gtk_scale_button_set_value (GtkScaleButton *button,
|
|||||||
GtkAdjustment * gtk_scale_button_get_adjustment (GtkScaleButton *button);
|
GtkAdjustment * gtk_scale_button_get_adjustment (GtkScaleButton *button);
|
||||||
void gtk_scale_button_set_adjustment (GtkScaleButton *button,
|
void gtk_scale_button_set_adjustment (GtkScaleButton *button,
|
||||||
GtkAdjustment *adjustment);
|
GtkAdjustment *adjustment);
|
||||||
GtkOrientation gtk_scale_button_get_orientation (GtkScaleButton *button);
|
|
||||||
void gtk_scale_button_set_orientation (GtkScaleButton *button,
|
|
||||||
GtkOrientation orientation);
|
|
||||||
GtkWidget * gtk_scale_button_get_plus_button (GtkScaleButton *button);
|
GtkWidget * gtk_scale_button_get_plus_button (GtkScaleButton *button);
|
||||||
GtkWidget * gtk_scale_button_get_minus_button (GtkScaleButton *button);
|
GtkWidget * gtk_scale_button_get_minus_button (GtkScaleButton *button);
|
||||||
GtkWidget * gtk_scale_button_get_popup (GtkScaleButton *button);
|
GtkWidget * gtk_scale_button_get_popup (GtkScaleButton *button);
|
||||||
|
|
||||||
|
#ifndef GTK_DISABLE_DEPRECATED
|
||||||
|
|
||||||
|
GtkOrientation gtk_scale_button_get_orientation (GtkScaleButton *button);
|
||||||
|
void gtk_scale_button_set_orientation (GtkScaleButton *button,
|
||||||
|
GtkOrientation orientation);
|
||||||
|
|
||||||
|
#endif /* GTK_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GTK_SCALE_BUTTON_H__ */
|
#endif /* __GTK_SCALE_BUTTON_H__ */
|
||||||
|
Reference in New Issue
Block a user