[gimp/gtk3-port: 460/460] app: remove GimpScaleButton, it has not been used in ages
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 460/460] app: remove GimpScaleButton, it has not been used in ages
- Date: Sun, 20 May 2018 15:50:16 +0000 (UTC)
commit eb8393c3fe651fc68020a6cad044d7faf6f65e25
Author: Michael Natterer <mitch gimp org>
Date: Sun May 20 02:19:26 2018 +0200
app: remove GimpScaleButton, it has not been used in ages
app/widgets/Makefile.am | 2 -
app/widgets/gimppropwidgets.c | 110 -----------------------
app/widgets/gimppropwidgets.h | 2 -
app/widgets/gimpscalebutton.c | 195 -----------------------------------------
app/widgets/gimpscalebutton.h | 53 -----------
5 files changed, 0 insertions(+), 362 deletions(-)
---
diff --git a/app/widgets/Makefile.am b/app/widgets/Makefile.am
index cc8b84b..13a64d0 100644
--- a/app/widgets/Makefile.am
+++ b/app/widgets/Makefile.am
@@ -328,8 +328,6 @@ libappwidgets_a_sources = \
gimpsamplepointeditor.h \
gimpsavedialog.c \
gimpsavedialog.h \
- gimpscalebutton.c \
- gimpscalebutton.h \
gimpsearchpopup.c \
gimpsearchpopup.h \
gimpselectiondata.c \
diff --git a/app/widgets/gimppropwidgets.c b/app/widgets/gimppropwidgets.c
index 4675f06..51eedde 100644
--- a/app/widgets/gimppropwidgets.c
+++ b/app/widgets/gimppropwidgets.c
@@ -46,7 +46,6 @@
#include "gimplanguagecombobox.h"
#include "gimplanguageentry.h"
#include "gimplayermodebox.h"
-#include "gimpscalebutton.h"
#include "gimpspinscale.h"
#include "gimpview.h"
#include "gimppolar.h"
@@ -441,115 +440,6 @@ gimp_prop_color_button_notify (GObject *config,
}
-/******************/
-/* scale button */
-/******************/
-
-static void gimp_prop_scale_button_callback (GtkWidget *widget,
- gdouble value,
- GObject *config);
-static void gimp_prop_scale_button_notify (GObject *config,
- GParamSpec *param_spec,
- GtkWidget *button);
-
-/**
- * gimp_prop_scale_button_new:
- * @config: #GimpConfig object to which property is attached.
- * @property_name: Name of gdouble property
- *
- * Creates a #GimpScaleButton to set and display the value of a
- * gdouble property in a very space-efficient way.
- *
- * Return value: A new #GimpScaleButton widget.
- *
- * Since GIMP 2.6
- */
-GtkWidget *
-gimp_prop_scale_button_new (GObject *config,
- const gchar *property_name)
-{
- GParamSpec *param_spec;
- GtkWidget *button;
- gdouble value;
-
- param_spec = check_param_spec_w (config, property_name,
- G_TYPE_PARAM_DOUBLE, G_STRFUNC);
-
- if (! param_spec)
- return NULL;
-
- g_object_get (config,
- param_spec->name, &value,
- NULL);
-
- button = gimp_scale_button_new (value,
- G_PARAM_SPEC_DOUBLE (param_spec)->minimum,
- G_PARAM_SPEC_DOUBLE (param_spec)->maximum);
-
- set_param_spec (G_OBJECT (button), button, param_spec);
-
- g_signal_connect (button, "value-changed",
- G_CALLBACK (gimp_prop_scale_button_callback),
- config);
-
- connect_notify (config, property_name,
- G_CALLBACK (gimp_prop_scale_button_notify),
- button);
-
- return button;
-}
-
-static void
-gimp_prop_scale_button_callback (GtkWidget *button,
- gdouble value,
- GObject *config)
-{
- GParamSpec *param_spec;
- gdouble v;
-
- param_spec = get_param_spec (G_OBJECT (button));
- if (! param_spec)
- return;
-
- g_object_get (config, param_spec->name, &v, NULL);
-
- if (v != value)
- {
- g_signal_handlers_block_by_func (config,
- gimp_prop_scale_button_notify,
- button);
-
- g_object_set (config, param_spec->name, value, NULL);
-
- g_signal_handlers_unblock_by_func (config,
- gimp_prop_scale_button_notify,
- button);
- }
-}
-
-static void
-gimp_prop_scale_button_notify (GObject *config,
- GParamSpec *param_spec,
- GtkWidget *button)
-{
- gdouble value;
-
- g_object_get (config,
- param_spec->name, &value,
- NULL);
-
- g_signal_handlers_block_by_func (button,
- gimp_prop_scale_button_callback,
- config);
-
- gtk_scale_button_set_value (GTK_SCALE_BUTTON (button), value);
-
- g_signal_handlers_unblock_by_func (button,
- gimp_prop_scale_button_callback,
- config);
-}
-
-
/*****************/
/* adjustments */
/*****************/
diff --git a/app/widgets/gimppropwidgets.h b/app/widgets/gimppropwidgets.h
index 6393b10..3836fa1 100644
--- a/app/widgets/gimppropwidgets.h
+++ b/app/widgets/gimppropwidgets.h
@@ -57,8 +57,6 @@ GtkWidget * gimp_prop_color_button_new (GObject *config,
/* GParamDouble */
-GtkWidget * gimp_prop_scale_button_new (GObject *config,
- const gchar *property_name);
GtkWidget * gimp_prop_spin_scale_new (GObject *config,
const gchar *property_name,
const gchar *label,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]