* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include <string.h>
+
#include <gtk/gtk.h>
#include <glade/glade.h>
static void grpt_object_properties_class_init (GRptObjectPropertiesClass *klass);
static void grpt_object_properties_init (GRptObjectProperties *grpt_object_properties);
+static void on_txt_name_changed (GtkEditable *editable,
+ gpointer user_data);
+static void on_spn_x_y_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_width_height_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_rotation_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+
+static void on_spn_text_border_width_top_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_text_border_width_right_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_text_border_width_bottom_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_text_border_width_left_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_cbtn_text_border_color_top_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_cbtn_text_border_color_right_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_cbtn_text_border_color_bottom_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_cbtn_text_border_color_left_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_fbtn_text_font_font_set (GtkFontButton *widget,
+ gpointer user_data);
+static void on_chk_text_font_strike (GtkToggleButton *widget,
+ gpointer user_data);
+static void on_cbtn_text_font_color_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_cbtn_text_back_color_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_spn_text_padd_top_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_text_padd_right_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_text_padd_bottom_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_text_padd_left_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+
+static void on_spn_line_stroke_width_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_cbtn_line_stroke_color_color_set (GtkColorButton *widget,
+ gpointer user_data);
+
+static void on_spn_rect_stroke_width_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_cbtn_rect_stroke_color_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_cbtn_rect_fill_color_color_set (GtkColorButton *widget,
+ gpointer user_data);
+
+static void on_spn_ellipse_stroke_width_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_cbtn_ellipse_stroke_color_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_cbtn_ellipse_fill_color_color_set (GtkColorButton *widget,
+ gpointer user_data);
+
+static void on_spn_image_border_width_top_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_image_border_width_right_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_image_border_width_bottom_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_spn_image_border_width_left_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data);
+static void on_cbtn_image_border_color_top_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_cbtn_image_border_color_right_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_cbtn_image_border_color_bottom_color_set (GtkColorButton *widget,
+ gpointer user_data);
+static void on_cbtn_image_border_color_left_color_set (GtkColorButton *widget,
+ gpointer user_data);
+
+static void grpt_object_properties_set_vbox (GRptObjectProperties *grpt_object_properties,
+ GtkWidget *vbox);
static void grpt_object_properties_load_common (GRptObjectProperties *grpt_object_properties);
static void grpt_object_properties_load_text (GRptObjectProperties *grpt_object_properties);
static void grpt_object_properties_load_line (GRptObjectProperties *grpt_object_properties);
static void grpt_object_properties_load_ellipse (GRptObjectProperties *grpt_object_properties);
static void grpt_object_properties_load_image (GRptObjectProperties *grpt_object_properties);
+static void grpt_object_properties_set_signal_active (GRptObjectProperties *grpt_object_properties,
+ gboolean active);
+
#define GRPT_OBJECT_PROPERTIES_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GRPT_TYPE_OBJECT_PROPERTIES, GRptObjectPropertiesPrivate))
{
GtkWidget *w;
GtkWidget *vbox;
-
+ GtkWidget *cur_vbox;
+
+ /* common */
GtkWidget *txt_name;
GtkWidget *spn_x;
GtkWidget *spn_y;
GtkWidget *spn_height;
GtkWidget *spn_rotation;
+ /* text */
+ GtkWidget *vbox_text;
+ GtkWidget *spn_text_border_width_top;
+ GtkWidget *spn_text_border_width_right;
+ GtkWidget *spn_text_border_width_bottom;
+ GtkWidget *spn_text_border_width_left;
+ GtkWidget *cbtn_text_border_color_top;
+ GtkWidget *cbtn_text_border_color_right;
+ GtkWidget *cbtn_text_border_color_bottom;
+ GtkWidget *cbtn_text_border_color_left;
+ /* to do style */
+ GtkWidget *fbtn_text_font;
+ /* to do underline */
+ GtkWidget *chk_text_font_strike;
+ GtkWidget *cbtn_text_font_color;
+ GtkWidget *cb_text_alignment_h;
+ GtkWidget *cb_text_alignment_v;
+ GtkWidget *txtv_text_source;
+ GtkTextBuffer *buf_text_source;
+ GtkWidget *cbtn_text_back_color;
+ GtkWidget *spn_text_padd_top;
+ GtkWidget *spn_text_padd_right;
+ GtkWidget *spn_text_padd_bottom;
+ GtkWidget *spn_text_padd_left;
+
+ /* line */
+ GtkWidget *vbox_line;
+ GtkWidget *spn_line_stroke_width;
+ GtkWidget *cbtn_line_stroke_color;
+ /* to do style */
+
+ /* rectangle */
+ GtkWidget *vbox_rect;
+ GtkWidget *spn_rect_stroke_width;
+ GtkWidget *cbtn_rect_stroke_color;
+ /* to do style */
+ GtkWidget *cbtn_rect_fill_color;
+
+ /* ellipse */
+ GtkWidget *vbox_ellipse;
+ GtkWidget *spn_ellipse_stroke_width;
+ GtkWidget *cbtn_ellipse_stroke_color;
+ /* to do style */
+ GtkWidget *cbtn_ellipse_fill_color;
+
+ /* image */
+ GtkWidget *vbox_image;
+ GtkWidget *spn_image_border_width_top;
+ GtkWidget *spn_image_border_width_right;
+ GtkWidget *spn_image_border_width_bottom;
+ GtkWidget *spn_image_border_width_left;
+ GtkWidget *cbtn_image_border_color_top;
+ GtkWidget *cbtn_image_border_color_right;
+ GtkWidget *cbtn_image_border_color_bottom;
+ GtkWidget *cbtn_image_border_color_left;
+ /* to do style */
+ GtkWidget *cb_image_adapt;
+
+ GRptCanvasItem *grpt_canvas_item;
RptObject *rpt_obj;
+
+ RptPoint *position;
+ RptSize *size;
+ RptBorder *border;
+ RptFont *font;
+ RptStroke *stroke;
+ RptColor *color;
};
GType
grpt_object_properties_init (GRptObjectProperties *grpt_object_properties)
{
GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ priv->border = NULL;
+ priv->font = NULL;
+ priv->stroke = NULL;
}
GRptObjectProperties
GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (obj_prop);
GladeXML *gla = glade_xml_new (GLADEDIR "/greptool.glade", "w_obj_properties", NULL);
+ GladeXML *gla_text = glade_xml_new (GLADEDIR "/greptool.glade", "w_obj_text_properties", NULL);
+ GladeXML *gla_line = glade_xml_new (GLADEDIR "/greptool.glade", "w_obj_line_properties", NULL);
+ GladeXML *gla_rectangle = glade_xml_new (GLADEDIR "/greptool.glade", "w_obj_rect_properties", NULL);
+ GladeXML *gla_ellipse = glade_xml_new (GLADEDIR "/greptool.glade", "w_obj_ellipse_properties", NULL);
+ GladeXML *gla_image = glade_xml_new (GLADEDIR "/greptool.glade", "w_obj_image_properties", NULL);
+
+ glade_xml_signal_autoconnect (gla);
+ glade_xml_signal_autoconnect (gla_text);
+ glade_xml_signal_autoconnect (gla_line);
+ glade_xml_signal_autoconnect (gla_rectangle);
+ glade_xml_signal_autoconnect (gla_ellipse);
+ glade_xml_signal_autoconnect (gla_image);
priv->w = glade_xml_get_widget (gla, "w_obj_properties");
priv->vbox = glade_xml_get_widget (gla, "vbox");
+ /* common */
priv->txt_name = glade_xml_get_widget (gla, "txt_name");
priv->spn_x = glade_xml_get_widget (gla, "spn_x");
priv->spn_y = glade_xml_get_widget (gla, "spn_y");
priv->spn_height = glade_xml_get_widget (gla, "spn_height");
priv->spn_rotation = glade_xml_get_widget (gla, "spn_rotation");
+ g_signal_connect (G_OBJECT (priv->txt_name), "changed",
+ G_CALLBACK (on_txt_name_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_x), "value-changed",
+ G_CALLBACK (on_spn_x_y_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_y), "value-changed",
+ G_CALLBACK (on_spn_x_y_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_width), "value-changed",
+ G_CALLBACK (on_spn_width_height_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_height), "value-changed",
+ G_CALLBACK (on_spn_width_height_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_rotation), "value-changed",
+ G_CALLBACK (on_spn_rotation_value_changed), (gpointer)obj_prop);
+
+ /* text */
+ priv->vbox_text = glade_xml_get_widget (gla_text, "vbox");
+ g_object_ref (priv->vbox_text);
+ gtk_widget_unparent (priv->vbox_text);
+ priv->spn_text_border_width_top = glade_xml_get_widget (gla_text, "spn_text_border_width_top");
+ priv->spn_text_border_width_right = glade_xml_get_widget (gla_text, "spn_text_border_width_right");
+ priv->spn_text_border_width_bottom = glade_xml_get_widget (gla_text, "spn_text_border_width_bottom");
+ priv->spn_text_border_width_left = glade_xml_get_widget (gla_text, "spn_text_border_width_left");
+ priv->cbtn_text_border_color_top = glade_xml_get_widget (gla_text, "cbtn_text_border_color_top");
+ priv->cbtn_text_border_color_right = glade_xml_get_widget (gla_text, "cbtn_text_border_color_right");
+ priv->cbtn_text_border_color_bottom = glade_xml_get_widget (gla_text, "cbtn_text_border_color_bottom");
+ priv->cbtn_text_border_color_left = glade_xml_get_widget (gla_text, "cbtn_text_border_color_left");
+ priv->fbtn_text_font = glade_xml_get_widget (gla_text, "fbtn_text_font");
+ priv->chk_text_font_strike = glade_xml_get_widget (gla_text, "chk_text_font_strike");
+ priv->cbtn_text_font_color = glade_xml_get_widget (gla_text, "cbtn_text_font_color");
+ priv->cb_text_alignment_h = glade_xml_get_widget (gla_text, "cb_text_alignment_h");
+ priv->cb_text_alignment_v = glade_xml_get_widget (gla_text, "cb_text_alignment_v");
+ priv->txtv_text_source = glade_xml_get_widget (gla_text, "txtv_text_source");
+ priv->buf_text_source = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->txtv_text_source));
+ priv->cbtn_text_back_color = glade_xml_get_widget (gla_text, "cbtn_text_back_color");
+ priv->spn_text_padd_top = glade_xml_get_widget (gla_text, "spn_text_padd_top");
+ priv->spn_text_padd_right = glade_xml_get_widget (gla_text, "spn_text_padd_right");
+ priv->spn_text_padd_bottom = glade_xml_get_widget (gla_text, "spn_text_padd_bottom");
+ priv->spn_text_padd_left = glade_xml_get_widget (gla_text, "spn_text_padd_left");
+
+ g_signal_connect (G_OBJECT (priv->spn_text_border_width_top), "value-changed",
+ G_CALLBACK (on_spn_text_border_width_top_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_text_border_width_right), "value-changed",
+ G_CALLBACK (on_spn_text_border_width_right_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_text_border_width_bottom), "value-changed",
+ G_CALLBACK (on_spn_text_border_width_bottom_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_text_border_width_left), "value-changed",
+ G_CALLBACK (on_spn_text_border_width_left_value_changed), (gpointer)obj_prop);
+
+ g_signal_connect (G_OBJECT (priv->cbtn_text_border_color_top), "color-set",
+ G_CALLBACK (on_cbtn_text_border_color_top_color_set), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_text_border_color_right), "color-set",
+ G_CALLBACK (on_cbtn_text_border_color_right_color_set), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_text_border_color_bottom), "color-set",
+ G_CALLBACK (on_cbtn_text_border_color_bottom_color_set), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_text_border_color_left), "color-set",
+ G_CALLBACK (on_cbtn_text_border_color_left_color_set), (gpointer)obj_prop);
+
+ g_signal_connect (G_OBJECT (priv->fbtn_text_font), "font-set",
+ G_CALLBACK (on_fbtn_text_font_font_set), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->chk_text_font_strike), "toggled",
+ G_CALLBACK (on_chk_text_font_strike), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_text_font_color), "color-set",
+ G_CALLBACK (on_cbtn_text_font_color_color_set), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_text_back_color), "color-set",
+ G_CALLBACK (on_cbtn_text_back_color_color_set), (gpointer)obj_prop);
+
+ g_signal_connect (G_OBJECT (priv->spn_text_padd_top), "value-changed",
+ G_CALLBACK (on_spn_text_padd_top_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_text_padd_right), "value-changed",
+ G_CALLBACK (on_spn_text_padd_right_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_text_padd_bottom), "value-changed",
+ G_CALLBACK (on_spn_text_padd_bottom_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_text_padd_left), "value-changed",
+ G_CALLBACK (on_spn_text_padd_left_value_changed), (gpointer)obj_prop);
+
+ /* line */
+ priv->vbox_line = glade_xml_get_widget (gla_line, "vbox");
+ g_object_ref (priv->vbox_line);
+ gtk_widget_unparent (priv->vbox_line);
+ priv->spn_line_stroke_width = glade_xml_get_widget (gla_line, "spn_line_stroke_width");
+ priv->cbtn_line_stroke_color = glade_xml_get_widget (gla_line, "cbtn_line_stroke_color");
+
+ g_signal_connect (G_OBJECT (priv->spn_line_stroke_width), "value-changed",
+ G_CALLBACK (on_spn_line_stroke_width_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_line_stroke_color), "color-set",
+ G_CALLBACK (on_cbtn_line_stroke_color_color_set), (gpointer)obj_prop);
+
+ /* rectangle */
+ priv->vbox_rect = glade_xml_get_widget (gla_rectangle, "vbox");
+ g_object_ref (priv->vbox_rect);
+ gtk_widget_unparent (priv->vbox_rect);
+ priv->spn_rect_stroke_width = glade_xml_get_widget (gla_rectangle, "spn_rect_stroke_width");
+ priv->cbtn_rect_stroke_color = glade_xml_get_widget (gla_rectangle, "cbtn_rect_stroke_color");
+ priv->cbtn_rect_fill_color = glade_xml_get_widget (gla_rectangle, "cbtn_rect_fill_color");
+
+ g_signal_connect (G_OBJECT (priv->spn_rect_stroke_width), "value-changed",
+ G_CALLBACK (on_spn_rect_stroke_width_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_rect_stroke_color), "color-set",
+ G_CALLBACK (on_cbtn_rect_stroke_color_color_set), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_rect_fill_color), "color-set",
+ G_CALLBACK (on_cbtn_rect_fill_color_color_set), (gpointer)obj_prop);
+
+ /* ellipse */
+ priv->vbox_ellipse = glade_xml_get_widget (gla_ellipse, "vbox");
+ g_object_ref (priv->vbox_ellipse);
+ gtk_widget_unparent (priv->vbox_ellipse);
+ priv->spn_ellipse_stroke_width = glade_xml_get_widget (gla_ellipse, "spn_ellipse_stroke_width");
+ priv->cbtn_ellipse_stroke_color = glade_xml_get_widget (gla_ellipse, "cbtn_ellipse_stroke_color");
+ priv->cbtn_ellipse_fill_color = glade_xml_get_widget (gla_ellipse, "cbtn_ellipse_fill_color");
+
+ g_signal_connect (G_OBJECT (priv->spn_ellipse_stroke_width), "value-changed",
+ G_CALLBACK (on_spn_ellipse_stroke_width_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_ellipse_stroke_color), "color-set",
+ G_CALLBACK (on_cbtn_ellipse_stroke_color_color_set), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_ellipse_fill_color), "color-set",
+ G_CALLBACK (on_cbtn_ellipse_fill_color_color_set), (gpointer)obj_prop);
+
+ /* image */
+ priv->vbox_image = glade_xml_get_widget (gla_text, "vbox");
+ g_object_ref (priv->vbox_image);
+ gtk_widget_unparent (priv->vbox_image);
+ priv->spn_image_border_width_top = glade_xml_get_widget (gla_image, "spn_image_border_width_top");
+ priv->spn_image_border_width_right = glade_xml_get_widget (gla_image, "spn_image_border_width_right");
+ priv->spn_image_border_width_bottom = glade_xml_get_widget (gla_image, "spn_image_border_width_bottom");
+ priv->spn_image_border_width_left = glade_xml_get_widget (gla_image, "spn_image_border_width_left");
+ priv->cbtn_image_border_color_top = glade_xml_get_widget (gla_image, "cbtn_image_border_color_top");
+ priv->cbtn_image_border_color_right = glade_xml_get_widget (gla_image, "cbtn_image_border_color_right");
+ priv->cbtn_image_border_color_bottom = glade_xml_get_widget (gla_image, "cbtn_image_border_color_bottom");
+ priv->cbtn_image_border_color_left = glade_xml_get_widget (gla_image, "cbtn_image_border_color_left");
+
+ g_signal_connect (G_OBJECT (priv->spn_image_border_width_top), "value-changed",
+ G_CALLBACK (on_spn_image_border_width_top_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_image_border_width_right), "value-changed",
+ G_CALLBACK (on_spn_image_border_width_right_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_image_border_width_bottom), "value-changed",
+ G_CALLBACK (on_spn_image_border_width_bottom_value_changed), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->spn_image_border_width_left), "value-changed",
+ G_CALLBACK (on_spn_image_border_width_left_value_changed), (gpointer)obj_prop);
+
+ g_signal_connect (G_OBJECT (priv->cbtn_image_border_color_top), "color-set",
+ G_CALLBACK (on_cbtn_image_border_color_top_color_set), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_image_border_color_right), "color-set",
+ G_CALLBACK (on_cbtn_image_border_color_right_color_set), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_image_border_color_bottom), "color-set",
+ G_CALLBACK (on_cbtn_image_border_color_bottom_color_set), (gpointer)obj_prop);
+ g_signal_connect (G_OBJECT (priv->cbtn_image_border_color_left), "color-set",
+ G_CALLBACK (on_cbtn_image_border_color_left_color_set), (gpointer)obj_prop);
+
gtk_widget_show_all (priv->w);
return obj_prop;
if (GRPT_IS_CANVAS_ITEM (grpt_canvas_item))
{
+ priv->grpt_canvas_item = grpt_canvas_item;
priv->rpt_obj = grpt_canvas_item_get_rpt_object (grpt_canvas_item);
}
else
{
+ priv->grpt_canvas_item = NULL;
priv->rpt_obj = NULL;
}
+ grpt_object_properties_set_signal_active (grpt_object_properties, FALSE);
grpt_object_properties_load_common (grpt_object_properties);
if (IS_RPT_OBJ_TEXT (priv->rpt_obj))
{
+ grpt_object_properties_set_vbox (grpt_object_properties, priv->vbox_text);
grpt_object_properties_load_text (grpt_object_properties);
}
else if (IS_RPT_OBJ_ELLIPSE (priv->rpt_obj))
{
+ grpt_object_properties_set_vbox (grpt_object_properties, priv->vbox_ellipse);
grpt_object_properties_load_ellipse (grpt_object_properties);
}
else if (IS_RPT_OBJ_RECT (priv->rpt_obj))
{
+ grpt_object_properties_set_vbox (grpt_object_properties, priv->vbox_rect);
grpt_object_properties_load_rect (grpt_object_properties);
}
else if (IS_RPT_OBJ_LINE (priv->rpt_obj))
{
+ grpt_object_properties_set_vbox (grpt_object_properties, priv->vbox_line);
grpt_object_properties_load_line (grpt_object_properties);
}
else if (IS_RPT_OBJ_IMAGE (priv->rpt_obj))
{
+ grpt_object_properties_set_vbox (grpt_object_properties, priv->vbox_image);
grpt_object_properties_load_image (grpt_object_properties);
}
+ else
+ {
+ grpt_object_properties_set_vbox (grpt_object_properties, NULL);
+ }
+ grpt_object_properties_set_signal_active (grpt_object_properties, TRUE);
}
void
gtk_widget_destroy (priv->w);
}
+static void
+on_txt_name_changed (GtkEditable *editable,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "name", gtk_entry_get_text (GTK_ENTRY (priv->txt_name)),
+ NULL);
+
+ if (IS_RPT_OBJ_TEXT (priv->rpt_obj))
+ {
+ /* for other different type objects it doesn't matter a redraw */
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+ }
+}
+
+static void
+on_spn_x_y_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ RptPoint position;
+
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ position.x = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_x));
+ position.y = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_y));
+
+ grpt_canvas_item_set_position (priv->grpt_canvas_item, position);
+}
+
+static void
+on_spn_width_height_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ RptSize size;
+
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ size.width = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_width));
+ size.height = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_height));
+
+ grpt_canvas_item_set_size (priv->grpt_canvas_item, size);
+}
+
+static void
+on_spn_rotation_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ RptRotation rotation;
+
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ rotation.angle = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_rotation));
+
+ grpt_canvas_item_set_rotation (priv->grpt_canvas_item, &rotation);
+}
+
+static void
+on_spn_text_border_width_top_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ if (priv->border == NULL)
+ {
+ priv->border = (RptBorder *)g_malloc0 (sizeof (RptBorder));
+ }
+ priv->border->top_width = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_top));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "border", priv->border,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_text_border_width_right_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ if (priv->border == NULL)
+ {
+ priv->border = (RptBorder *)g_malloc0 (sizeof (RptBorder));
+ }
+ priv->border->right_width = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_right));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "border", priv->border,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_text_border_width_bottom_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ if (priv->border == NULL)
+ {
+ priv->border = (RptBorder *)g_malloc0 (sizeof (RptBorder));
+ }
+ priv->border->bottom_width = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_bottom));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "border", priv->border,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_text_border_width_left_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ if (priv->border == NULL)
+ {
+ priv->border = (RptBorder *)g_malloc0 (sizeof (RptBorder));
+ }
+ priv->border->left_width = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_left));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "border", priv->border,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_cbtn_text_border_color_top_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ GdkColor gdk_color;
+ guint16 alpha;
+
+ gtk_color_button_get_color (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_top), &gdk_color);
+ alpha = gtk_color_button_get_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_top));
+
+ if (priv->border == NULL)
+ {
+ priv->border = (RptBorder *)g_malloc0 (sizeof (RptBorder));
+ }
+ priv->border->top_color = rpt_common_gdkcolor_to_rptcolor (&gdk_color, alpha);
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "border", priv->border,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_cbtn_text_border_color_right_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+}
+
+static void
+on_cbtn_text_border_color_bottom_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+}
+
+static void
+on_cbtn_text_border_color_left_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+}
+
+static void
+on_fbtn_text_font_font_set (GtkFontButton *widget,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ const gchar *font_name;
+ PangoFontDescription *pango_desc;
+
+ font_name = gtk_font_button_get_font_name (GTK_FONT_BUTTON (priv->fbtn_text_font));
+ pango_desc = pango_font_description_from_string (font_name);
+
+ priv->font = rpt_common_rptfont_from_pango_description ((const PangoFontDescription *)pango_desc);
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "font", priv->font,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_chk_text_font_strike (GtkToggleButton *widget,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ gboolean strike = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->chk_text_font_strike));
+
+ if (priv->font == NULL)
+ {
+ priv->font = (RptFont *)g_malloc0 (sizeof (RptFont));
+ }
+ priv->font->strike = strike;
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "font", priv->font,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_cbtn_text_font_color_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ GdkColor gdk_color;
+ guint16 alpha;
+
+ gtk_color_button_get_color (GTK_COLOR_BUTTON (priv->cbtn_text_font_color), &gdk_color);
+ alpha = gtk_color_button_get_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_font_color));
+
+ if (priv->font == NULL)
+ {
+ priv->font = (RptFont *)g_malloc0 (sizeof (RptFont));
+ }
+ priv->font->color = rpt_common_gdkcolor_to_rptcolor (&gdk_color, alpha);
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "font", priv->font,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_cbtn_text_back_color_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ GdkColor gdk_color;
+ guint16 alpha;
+
+ gtk_color_button_get_color (GTK_COLOR_BUTTON (priv->cbtn_text_back_color), &gdk_color);
+ alpha = gtk_color_button_get_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_back_color));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "background-color", rpt_common_gdkcolor_to_rptcolor (&gdk_color, alpha),
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_text_padd_top_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ gdouble pad = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_text_padd_top));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "padding-top", pad,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_text_padd_right_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ gdouble pad = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_text_padd_right));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "padding-right", pad,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_text_padd_bottom_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ gdouble pad = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_text_padd_bottom));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "padding-bottom", pad,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_text_padd_left_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ gdouble pad = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_text_padd_left));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "padding-left", pad,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_line_stroke_width_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ if (priv->stroke == NULL)
+ {
+ priv->stroke = rpt_common_rptstroke_new ();
+ }
+ priv->stroke->width = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_line_stroke_width));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "stroke", priv->stroke,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_cbtn_line_stroke_color_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ GdkColor gdk_color;
+ guint16 alpha;
+
+ gtk_color_button_get_color (GTK_COLOR_BUTTON (priv->cbtn_line_stroke_color), &gdk_color);
+ alpha = gtk_color_button_get_alpha (GTK_COLOR_BUTTON (priv->cbtn_line_stroke_color));
+
+ if (priv->stroke == NULL)
+ {
+ priv->stroke = rpt_common_rptstroke_new ();
+ }
+ priv->stroke->color = rpt_common_gdkcolor_to_rptcolor (&gdk_color, alpha);
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "stroke", priv->stroke,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_rect_stroke_width_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ if (priv->stroke == NULL)
+ {
+ priv->stroke = rpt_common_rptstroke_new ();
+ }
+ priv->stroke->width = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_rect_stroke_width));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "stroke", priv->stroke,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_cbtn_rect_stroke_color_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ GdkColor gdk_color;
+ guint16 alpha;
+
+ gtk_color_button_get_color (GTK_COLOR_BUTTON (priv->cbtn_rect_stroke_color), &gdk_color);
+ alpha = gtk_color_button_get_alpha (GTK_COLOR_BUTTON (priv->cbtn_rect_stroke_color));
+
+ if (priv->stroke == NULL)
+ {
+ priv->stroke = rpt_common_rptstroke_new ();
+ }
+ priv->stroke->color = rpt_common_gdkcolor_to_rptcolor (&gdk_color, alpha);
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "stroke", priv->stroke,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_cbtn_rect_fill_color_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ GdkColor gdk_color;
+ guint16 alpha;
+
+ gtk_color_button_get_color (GTK_COLOR_BUTTON (priv->cbtn_rect_fill_color), &gdk_color);
+ alpha = gtk_color_button_get_alpha (GTK_COLOR_BUTTON (priv->cbtn_rect_fill_color));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "fill-color", rpt_common_gdkcolor_to_rptcolor (&gdk_color, alpha),
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_ellipse_stroke_width_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ if (priv->stroke == NULL)
+ {
+ priv->stroke = rpt_common_rptstroke_new ();
+ }
+ priv->stroke->width = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->spn_ellipse_stroke_width));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "stroke", priv->stroke,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_cbtn_ellipse_stroke_color_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ GdkColor gdk_color;
+ guint16 alpha;
+
+ gtk_color_button_get_color (GTK_COLOR_BUTTON (priv->cbtn_ellipse_stroke_color), &gdk_color);
+ alpha = gtk_color_button_get_alpha (GTK_COLOR_BUTTON (priv->cbtn_ellipse_stroke_color));
+
+ if (priv->stroke == NULL)
+ {
+ priv->stroke = rpt_common_rptstroke_new ();
+ }
+ priv->stroke->color = rpt_common_gdkcolor_to_rptcolor (&gdk_color, alpha);
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "stroke", priv->stroke,
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_cbtn_ellipse_fill_color_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+ GRptObjectProperties *grpt_object_properties = (GRptObjectProperties *)user_data;
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ GdkColor gdk_color;
+ guint16 alpha;
+
+ gtk_color_button_get_color (GTK_COLOR_BUTTON (priv->cbtn_ellipse_fill_color), &gdk_color);
+ alpha = gtk_color_button_get_alpha (GTK_COLOR_BUTTON (priv->cbtn_ellipse_fill_color));
+
+ g_object_set (G_OBJECT (priv->rpt_obj),
+ "fill-color", rpt_common_gdkcolor_to_rptcolor (&gdk_color, alpha),
+ NULL);
+
+ goo_canvas_item_simple_changed ((GooCanvasItemSimple *)priv->grpt_canvas_item, TRUE);
+}
+
+static void
+on_spn_image_border_width_top_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+}
+
+static void
+on_spn_image_border_width_right_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+}
+
+static void
+on_spn_image_border_width_bottom_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+}
+
+static void
+on_spn_image_border_width_left_value_changed (GtkSpinButton *spin_button,
+ gpointer user_data)
+{
+}
+
+static void
+on_cbtn_image_border_color_top_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+}
+
+static void
+on_cbtn_image_border_color_right_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+}
+
+static void
+on_cbtn_image_border_color_bottom_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+}
+
+static void
+on_cbtn_image_border_color_left_color_set (GtkColorButton *widget,
+ gpointer user_data)
+{
+}
+
static void
grpt_object_properties_empty_properties (GRptObjectProperties *grpt_object_properties)
{
+ GdkColor gdk_color_black;
+ GdkColor gdk_color_white;
+
GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+ gdk_color_black.red = 0;
+ gdk_color_black.green = 0;
+ gdk_color_black.blue = 0;
+
+ gdk_color_white.red = 65535;
+ gdk_color_white.green = 65535;
+ gdk_color_white.blue = 65535;
+
+ /* common */
gtk_entry_set_text (GTK_ENTRY (priv->txt_name), "");
gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_x), 0.0);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_y), 0.0);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_width), 0.0);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_height), 0.0);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_rotation), 0.0);
+
+ /* text */
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_top), 0.0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_right), 0.0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_bottom), 0.0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_left), 0.0);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_top), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_top), 65535);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_right), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_right), 65535);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_bottom), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_bottom), 65535);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_left), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_left), 65535);
+
+ priv->fbtn_text_font;
+ /* to do underline */
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->chk_text_font_strike), FALSE);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_font_color), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_font_color), 65535);
+
+ priv->cb_text_alignment_h;
+ priv->cb_text_alignment_v;
+
+ gtk_text_buffer_set_text (priv->buf_text_source, "", 0);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_back_color), &gdk_color_white);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_back_color), 65535);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_padd_top), 0.0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_padd_right), 0.0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_padd_bottom), 0.0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_padd_left), 0.0);
+
+ /* line */
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_line_stroke_width), 1.0);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_line_stroke_color), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_line_stroke_color), 65535);
+
+ /* rectangle */
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_rect_stroke_width), 1.0);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_rect_stroke_color), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_rect_stroke_color), 65535);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_rect_fill_color), &gdk_color_white);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_rect_fill_color), 65535);
+
+ /* ellipse */
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_ellipse_stroke_width), 1.0);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_ellipse_stroke_color), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_ellipse_stroke_color), 65535);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_ellipse_fill_color), &gdk_color_white);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_ellipse_fill_color), 65535);
+
+ /* image */
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_image_border_width_top), 0.0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_image_border_width_right), 0.0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_image_border_width_bottom), 0.0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_image_border_width_left), 0.0);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_top), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_top), 65535);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_right), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_right), 65535);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_bottom), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_bottom), 65535);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_left), &gdk_color_black);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_left), 65535);
+}
+
+static void
+grpt_object_properties_set_vbox (GRptObjectProperties *grpt_object_properties,
+ GtkWidget *vbox)
+{
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ if (priv->cur_vbox != NULL)
+ {
+ g_object_ref (priv->cur_vbox);
+ gtk_container_remove (GTK_CONTAINER (priv->vbox), priv->cur_vbox);
+ }
+ if (vbox != NULL)
+ {
+ gtk_box_pack_end (GTK_BOX (priv->vbox), vbox, TRUE, TRUE, 0);
+ }
+ priv->cur_vbox = vbox;
}
static void
static void
grpt_object_properties_load_text (GRptObjectProperties *grpt_object_properties)
{
- RptBorder *border;
- RptFont *font;
- RptAlign *align;
- gchar *source;
- RptColor *background_color;
+ RptAlign *align = NULL;
+ gchar *source = NULL;
+ RptColor *background_color = NULL;
gdouble padding_top;
gdouble padding_right;
gdouble padding_bottom;
gdouble padding_left;
+ GdkColor *gdk_color;
+
GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+ g_free (priv->border);
+ g_free (priv->font);
+
+ priv->border = NULL;
+ priv->font = NULL;
+
g_object_get (G_OBJECT (priv->rpt_obj),
- "border", &border,
- "font", &font,
+ "border", &priv->border,
+ "font", &priv->font,
"align", &align,
"source", &source,
"background-color", &background_color,
"padding-bottom", &padding_bottom,
"padding-left", &padding_left,
NULL);
+
+ if (priv->border != NULL)
+ {
+ if (priv->border->top_width != 0)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_top), priv->border->top_width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->border->top_color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_top),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_top),
+ priv->border->top_color->a * 65535);
+ }
+ if (priv->border->right_width != 0)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_right), priv->border->right_width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->border->right_color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_right),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_right),
+ priv->border->right_color->a * 65535);
+ }
+ if (priv->border->bottom_width != 0)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_bottom), priv->border->bottom_width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->border->bottom_color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_bottom),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_bottom),
+ priv->border->bottom_color->a * 65535);
+ }
+ if (priv->border->left_width != 0)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_border_width_left), priv->border->left_width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->border->left_color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_left),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_border_color_left),
+ priv->border->left_color->a * 65535);
+ }
+ }
+
+ if (priv->font != NULL)
+ {
+ gchar *font_name = g_strdup_printf ("%s %d", priv->font->name, (int)priv->font->size);
+
+ if (priv->font->bold)
+ {
+ font_name = g_strconcat (font_name, " bold");
+ }
+ if (priv->font->italic)
+ {
+ font_name = g_strconcat (font_name, " italic");
+ }
+ gtk_font_button_set_font_name (GTK_FONT_BUTTON (priv->fbtn_text_font),
+ font_name);
+
+ /* TO DO */
+ /* underline */
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->chk_text_font_strike),
+ priv->font->strike);
+
+ if (priv->font->color != NULL)
+ {
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->font->color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_font_color),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_font_color),
+ priv->font->color->a * 65535);
+ }
+ }
+
+ if (align!= NULL)
+ {
+ }
+
+ if (source != NULL)
+ {
+ gtk_text_buffer_set_text (priv->buf_text_source, source, strlen (source));
+ }
+
+ if (background_color != NULL)
+ {
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (background_color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_text_back_color),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_text_back_color),
+ background_color->a * 65535);
+ }
+
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_padd_top), padding_top);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_padd_right), padding_right);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_padd_bottom), padding_bottom);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_text_padd_left), padding_left);
}
static void
grpt_object_properties_load_line (GRptObjectProperties *grpt_object_properties)
{
- RptStroke *stroke;
+ GdkColor *gdk_color;
GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+ g_free (priv->stroke);
+
+ priv->stroke = NULL;
+
g_object_get (G_OBJECT (priv->rpt_obj),
- "stroke", &stroke,
+ "stroke", &priv->stroke,
NULL);
+
+ if (priv->stroke != NULL)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_line_stroke_width),
+ priv->stroke->width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->stroke->color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_line_stroke_color),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_line_stroke_color),
+ priv->stroke->color->a * 65535);
+ }
}
static void
grpt_object_properties_load_rect (GRptObjectProperties *grpt_object_properties)
{
- RptStroke *stroke;
- RptColor *fill_color;
+ GdkColor *gdk_color;
GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+ g_free (priv->stroke);
+ g_free (priv->color);
+
+ priv->stroke = NULL;
+ priv->color = NULL;
+
g_object_get (G_OBJECT (priv->rpt_obj),
- "stroke", &stroke,
- "fill-color", &fill_color,
+ "stroke", &priv->stroke,
+ "fill-color", &priv->color,
NULL);
+
+ if (priv->stroke != NULL)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_rect_stroke_width),
+ priv->stroke->width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->stroke->color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_rect_stroke_color),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_rect_stroke_color),
+ priv->stroke->color->a * 65535);
+ }
+
+ if (priv->color != NULL)
+ {
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_rect_fill_color),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_rect_fill_color),
+ priv->color->a * 65535);
+ }
}
static void
grpt_object_properties_load_ellipse (GRptObjectProperties *grpt_object_properties)
{
- RptStroke *stroke;
- RptColor *fill_color;
+ GdkColor *gdk_color;
GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+ g_free (priv->stroke);
+ g_free (priv->color);
+
+ priv->stroke = NULL;
+ priv->color = NULL;
+
g_object_get (G_OBJECT (priv->rpt_obj),
- "stroke", &stroke,
- "fill-color", &fill_color,
+ "stroke", &priv->stroke,
+ "fill-color", &priv->color,
NULL);
+
+ if (priv->stroke != NULL)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_ellipse_stroke_width),
+ priv->stroke->width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->stroke->color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_ellipse_stroke_color),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_ellipse_stroke_color),
+ priv->stroke->color->a * 65535);
+ }
+
+ if (priv->color != NULL)
+ {
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_ellipse_fill_color),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_ellipse_fill_color),
+ priv->color->a * 65535);
+ }
}
static void
grpt_object_properties_load_image (GRptObjectProperties *grpt_object_properties)
{
- RptBorder *border;
gchar *source;
guint adapt;
+ GdkColor *gdk_color;
+
GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+ g_free (priv->border);
+
+ priv->border = NULL;
+
g_object_get (G_OBJECT (priv->rpt_obj),
- "border", &border,
+ "border", &priv->border,
"source", &source,
"adapt", &adapt,
NULL);
+
+ if (priv->border != NULL)
+ {
+ if (priv->border->top_width != 0)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_image_border_width_top), priv->border->top_width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->border->top_color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_top),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_top),
+ priv->border->top_color->a * 65535);
+ }
+ if (priv->border->right_width != 0)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_image_border_width_right), priv->border->right_width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->border->right_color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_right),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_right),
+ priv->border->right_color->a * 65535);
+ }
+ if (priv->border->bottom_width != 0)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_image_border_width_bottom), priv->border->bottom_width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->border->bottom_color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_bottom),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_bottom),
+ priv->border->bottom_color->a * 65535);
+ }
+ if (priv->border->left_width != 0)
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->spn_image_border_width_left), priv->border->left_width);
+
+ gdk_color = rpt_common_rptcolor_to_gdkcolor (priv->border->left_color);
+ gtk_color_button_set_color (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_left),
+ gdk_color);
+ gtk_color_button_set_alpha (GTK_COLOR_BUTTON (priv->cbtn_image_border_color_left),
+ priv->border->left_color->a * 65535);
+ }
+ }
+
+ if (source != NULL)
+ {
+ }
+}
+
+static void
+grpt_object_properties_set_signal_active (GRptObjectProperties *grpt_object_properties,
+ gboolean active)
+{
+ GRptObjectPropertiesPrivate *priv = GRPT_OBJECT_PROPERTIES_GET_PRIVATE (grpt_object_properties);
+
+ if (active)
+ {
+ g_signal_handlers_unblock_by_func (priv->txt_name, G_CALLBACK (on_txt_name_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_x, G_CALLBACK (on_spn_x_y_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_y, G_CALLBACK (on_spn_x_y_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_width, G_CALLBACK (on_spn_width_height_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_height, G_CALLBACK (on_spn_width_height_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_rotation, G_CALLBACK (on_spn_rotation_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_text_border_width_top, G_CALLBACK (on_spn_text_border_width_top_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_text_border_width_right, G_CALLBACK (on_spn_text_border_width_right_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_text_border_width_bottom, G_CALLBACK (on_spn_text_border_width_bottom_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_text_border_width_left, G_CALLBACK (on_spn_text_border_width_left_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_text_border_color_top, G_CALLBACK (on_cbtn_text_border_color_top_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_text_border_color_right, G_CALLBACK (on_cbtn_text_border_color_right_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_text_border_color_bottom, G_CALLBACK (on_cbtn_text_border_color_bottom_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_text_border_color_left, G_CALLBACK (on_cbtn_text_border_color_left_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->fbtn_text_font, G_CALLBACK (on_fbtn_text_font_font_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->chk_text_font_strike, G_CALLBACK (on_chk_text_font_strike), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_text_font_color, G_CALLBACK (on_cbtn_text_font_color_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_text_back_color, G_CALLBACK (on_cbtn_text_back_color_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_text_padd_top, G_CALLBACK (on_spn_text_padd_top_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_text_padd_right, G_CALLBACK (on_spn_text_padd_right_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_text_padd_bottom, G_CALLBACK (on_spn_text_padd_bottom_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_text_padd_left, G_CALLBACK (on_spn_text_padd_left_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_line_stroke_width, G_CALLBACK (on_spn_line_stroke_width_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_line_stroke_color, G_CALLBACK (on_cbtn_line_stroke_color_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_rect_stroke_width, G_CALLBACK (on_spn_rect_stroke_width_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_rect_stroke_color, G_CALLBACK (on_cbtn_rect_stroke_color_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_rect_fill_color, G_CALLBACK (on_cbtn_rect_fill_color_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_ellipse_stroke_width, G_CALLBACK (on_spn_ellipse_stroke_width_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_ellipse_stroke_color, G_CALLBACK (on_cbtn_ellipse_stroke_color_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_ellipse_fill_color, G_CALLBACK (on_cbtn_ellipse_fill_color_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_image_border_width_top, G_CALLBACK (on_spn_image_border_width_top_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_image_border_width_right, G_CALLBACK (on_spn_image_border_width_right_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_image_border_width_bottom, G_CALLBACK (on_spn_image_border_width_bottom_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->spn_image_border_width_left, G_CALLBACK (on_spn_image_border_width_left_value_changed), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_image_border_color_top, G_CALLBACK (on_cbtn_image_border_color_top_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_image_border_color_right, G_CALLBACK (on_cbtn_image_border_color_right_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_image_border_color_bottom, G_CALLBACK (on_cbtn_image_border_color_bottom_color_set), grpt_object_properties);
+ g_signal_handlers_unblock_by_func (priv->cbtn_image_border_color_left, G_CALLBACK (on_cbtn_image_border_color_left_color_set), grpt_object_properties);
+ }
+ else
+ {
+ g_signal_handlers_block_by_func (priv->txt_name, G_CALLBACK (on_txt_name_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_x, G_CALLBACK (on_spn_x_y_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_y, G_CALLBACK (on_spn_x_y_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_width, G_CALLBACK (on_spn_width_height_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_height, G_CALLBACK (on_spn_width_height_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_rotation, G_CALLBACK (on_spn_rotation_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_text_border_width_top, G_CALLBACK (on_spn_text_border_width_top_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_text_border_width_right, G_CALLBACK (on_spn_text_border_width_right_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_text_border_width_bottom, G_CALLBACK (on_spn_text_border_width_bottom_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_text_border_width_left, G_CALLBACK (on_spn_text_border_width_left_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_text_border_color_top, G_CALLBACK (on_cbtn_text_border_color_top_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_text_border_color_right, G_CALLBACK (on_cbtn_text_border_color_right_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_text_border_color_bottom, G_CALLBACK (on_cbtn_text_border_color_bottom_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_text_border_color_left, G_CALLBACK (on_cbtn_text_border_color_left_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->fbtn_text_font, G_CALLBACK (on_fbtn_text_font_font_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->chk_text_font_strike, G_CALLBACK (on_chk_text_font_strike), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_text_font_color, G_CALLBACK (on_cbtn_text_font_color_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_text_back_color, G_CALLBACK (on_cbtn_text_back_color_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_text_padd_top, G_CALLBACK (on_spn_text_padd_top_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_text_padd_right, G_CALLBACK (on_spn_text_padd_right_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_text_padd_bottom, G_CALLBACK (on_spn_text_padd_bottom_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_text_padd_left, G_CALLBACK (on_spn_text_padd_left_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_line_stroke_width, G_CALLBACK (on_spn_line_stroke_width_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_line_stroke_color, G_CALLBACK (on_cbtn_line_stroke_color_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_rect_stroke_width, G_CALLBACK (on_spn_rect_stroke_width_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_rect_stroke_color, G_CALLBACK (on_cbtn_rect_stroke_color_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_rect_fill_color, G_CALLBACK (on_cbtn_rect_fill_color_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_ellipse_stroke_width, G_CALLBACK (on_spn_ellipse_stroke_width_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_ellipse_stroke_color, G_CALLBACK (on_cbtn_ellipse_stroke_color_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_ellipse_fill_color, G_CALLBACK (on_cbtn_ellipse_fill_color_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_image_border_width_top, G_CALLBACK (on_spn_image_border_width_top_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_image_border_width_right, G_CALLBACK (on_spn_image_border_width_right_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_image_border_width_bottom, G_CALLBACK (on_spn_image_border_width_bottom_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->spn_image_border_width_left, G_CALLBACK (on_spn_image_border_width_left_value_changed), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_image_border_color_top, G_CALLBACK (on_cbtn_image_border_color_top_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_image_border_color_right, G_CALLBACK (on_cbtn_image_border_color_right_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_image_border_color_bottom, G_CALLBACK (on_cbtn_image_border_color_bottom_color_set), grpt_object_properties);
+ g_signal_handlers_block_by_func (priv->cbtn_image_border_color_left, G_CALLBACK (on_cbtn_image_border_color_left_color_set), grpt_object_properties);
+ }
}