Remove properties button
This commit is contained in:
parent
d2790f7f7e
commit
da2ebe85dd
@ -187,27 +187,6 @@
|
|||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="button_properties">
|
|
||||||
<property name="label">gtk-properties</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="sensitive">False</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="margin_left">4</property>
|
|
||||||
<property name="margin_right">4</property>
|
|
||||||
<property name="margin_top">4</property>
|
|
||||||
<property name="margin_bottom">4</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="pack_type">end</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
@ -8,8 +8,6 @@ typedef struct _YacosCartItemPriv {
|
|||||||
GtkWidget *label_description;
|
GtkWidget *label_description;
|
||||||
GtkWidget *entry_comment;
|
GtkWidget *entry_comment;
|
||||||
GtkWidget *label_id;
|
GtkWidget *label_id;
|
||||||
|
|
||||||
GtkWidget *button_properties;
|
|
||||||
GtkWidget *button_delete;
|
GtkWidget *button_delete;
|
||||||
|
|
||||||
GtkWidget *image;
|
GtkWidget *image;
|
||||||
@ -75,18 +73,6 @@ static void yacos_cart_item_button_delete_cb(GtkWidget *widget, gpointer user_da
|
|||||||
gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(list_box_row)), list_box_row);
|
gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(list_box_row)), list_box_row);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void yacos_cart_item_button_properties_cb(GtkWidget *widget, gpointer user_data)
|
|
||||||
{
|
|
||||||
YacosCartItem *self = (YacosCartItem *)user_data;
|
|
||||||
|
|
||||||
if (self->priv.status != YACOS_CART_ITEM_STATUS_VALID) {
|
|
||||||
g_warning("Comments can only be set on valid entries.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void yacos_cart_item_init(YacosCartItem *self)
|
static void yacos_cart_item_init(YacosCartItem *self)
|
||||||
{
|
{
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
@ -100,7 +86,6 @@ static void yacos_cart_item_init(YacosCartItem *self)
|
|||||||
self->priv.label_description = GTK_WIDGET(gtk_builder_get_object(builder, "label_description"));
|
self->priv.label_description = GTK_WIDGET(gtk_builder_get_object(builder, "label_description"));
|
||||||
|
|
||||||
self->priv.button_delete = GTK_WIDGET(gtk_builder_get_object(builder, "button_delete"));
|
self->priv.button_delete = GTK_WIDGET(gtk_builder_get_object(builder, "button_delete"));
|
||||||
self->priv.button_properties = GTK_WIDGET(gtk_builder_get_object(builder, "button_properties"));
|
|
||||||
|
|
||||||
self->priv.image = GTK_WIDGET(gtk_builder_get_object(builder, "image_item"));
|
self->priv.image = GTK_WIDGET(gtk_builder_get_object(builder, "image_item"));
|
||||||
|
|
||||||
@ -115,10 +100,6 @@ static void yacos_cart_item_init(YacosCartItem *self)
|
|||||||
"clicked",
|
"clicked",
|
||||||
(GCallback) yacos_cart_item_button_delete_cb,
|
(GCallback) yacos_cart_item_button_delete_cb,
|
||||||
self);
|
self);
|
||||||
g_signal_connect(self->priv.button_properties,
|
|
||||||
"clicked",
|
|
||||||
(GCallback) yacos_cart_item_button_properties_cb,
|
|
||||||
self);
|
|
||||||
|
|
||||||
gtk_container_add(GTK_CONTAINER(self), self->priv.box);
|
gtk_container_add(GTK_CONTAINER(self), self->priv.box);
|
||||||
|
|
||||||
@ -205,7 +186,6 @@ static void yacos_cart_item_fetch_meta_cb (SoupSession *session, SoupMessage *ms
|
|||||||
g_object_unref (parser);
|
g_object_unref (parser);
|
||||||
|
|
||||||
gtk_editable_set_editable(GTK_EDITABLE(self->priv.entry_comment), TRUE);
|
gtk_editable_set_editable(GTK_EDITABLE(self->priv.entry_comment), TRUE);
|
||||||
gtk_widget_set_sensitive(self->priv.button_properties, TRUE);
|
|
||||||
self->priv.status = YACOS_CART_ITEM_STATUS_VALID;
|
self->priv.status = YACOS_CART_ITEM_STATUS_VALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user