Mercurial > audlegacy-plugins
diff src/skins/ui_skinned_textbox.c @ 2698:32e99af83a3e
I don't think redraw signal is needed anymore
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Mon, 09 Jun 2008 17:53:09 +0200 |
parents | b990e7eb0c25 |
children | fbb17b57229a |
line wrap: on
line diff
--- a/src/skins/ui_skinned_textbox.c Sun Jun 08 11:47:10 2008 +0900 +++ b/src/skins/ui_skinned_textbox.c Mon Jun 09 17:53:09 2008 +0200 @@ -42,7 +42,6 @@ DOUBLE_CLICKED, RIGHT_CLICKED, DOUBLED, - REDRAW, LAST_SIGNAL }; @@ -77,7 +76,6 @@ static gboolean ui_skinned_textbox_button_release (GtkWidget *widget, GdkEventButton *event); static gboolean ui_skinned_textbox_motion_notify (GtkWidget *widget, GdkEventMotion *event); static void ui_skinned_textbox_toggle_scaled (UiSkinnedTextbox *textbox); -static void ui_skinned_textbox_redraw (UiSkinnedTextbox *textbox); static gboolean ui_skinned_textbox_should_scroll (UiSkinnedTextbox *textbox); static void textbox_generate_xfont_pixmap (UiSkinnedTextbox *textbox, const gchar *pixmaptext); static gboolean textbox_scroll (gpointer data); @@ -131,7 +129,6 @@ klass->double_clicked = NULL; klass->right_clicked = NULL; klass->scaled = ui_skinned_textbox_toggle_scaled; - klass->redraw = ui_skinned_textbox_redraw; textbox_signals[CLICKED] = g_signal_new ("clicked", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, @@ -153,11 +150,6 @@ G_STRUCT_OFFSET (UiSkinnedTextboxClass, scaled), NULL, NULL, gtk_marshal_VOID__VOID, G_TYPE_NONE, 0); - textbox_signals[REDRAW] = - g_signal_new ("redraw", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, - G_STRUCT_OFFSET (UiSkinnedTextboxClass, redraw), NULL, NULL, - gtk_marshal_VOID__VOID, G_TYPE_NONE, 0); - g_type_class_add_private (gobject_class, sizeof (UiSkinnedTextboxPrivate)); } @@ -411,16 +403,6 @@ gtk_widget_queue_draw(GTK_WIDGET(textbox)); } -static void ui_skinned_textbox_redraw(UiSkinnedTextbox *textbox) { - UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox); - - if (priv->move_x || priv->move_y) - gtk_fixed_move(GTK_FIXED(gtk_widget_get_parent(GTK_WIDGET(textbox))), GTK_WIDGET(textbox), - textbox->x+priv->move_x, textbox->y+priv->move_y); - - gtk_widget_queue_draw(GTK_WIDGET(textbox)); -} - static gboolean ui_skinned_textbox_should_scroll(UiSkinnedTextbox *textbox) { UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox); @@ -866,7 +848,10 @@ } void ui_skinned_textbox_move_relative(GtkWidget *widget, gint x, gint y) { + UiSkinnedTextbox *textbox = UI_SKINNED_TEXTBOX(widget); UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(widget); priv->move_x += x; priv->move_y += y; + gtk_fixed_move(GTK_FIXED(gtk_widget_get_parent(widget)), widget, + textbox->x+priv->move_x, textbox->y+priv->move_y); }