Changeset 3466 for extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm
- Timestamp:
- Jun 26, 2009, 4:43:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm
r3461 r3466 60 60 wxTR_HIDE_ROOT 61 61 wxTR_HAS_BUTTONS 62 wxTR_EDIT_LABELS 62 63 wxMAXIMIZE 63 64 wxOK … … 350 351 EVT_MENU 351 352 EVT_TREE_SEL_CHANGED 353 EVT_TREE_END_LABEL_EDIT 352 354 EVT_CLOSE 353 355 EVT_LIST_END_LABEL_EDIT … … 1185 1187 wxBORDER_NONE| 1186 1188 wxCLIP_CHILDREN| 1187 # wxTR_MULTIPLE| 1188 # wxTR_EXTENDED| 1189 wxTR_HAS_BUTTONS 1190 # wxTR_HIDE_ROOT 1189 wxTR_HAS_BUTTONS| 1190 wxTR_EDIT_LABELS 1191 1191 ) 1192 1192 ); … … 1411 1411 EVT_TREE_SEL_CHANGED( $self, $self->tree, \&OnTreeSelChanged ); 1412 1412 EVT_TREE_ITEM_RIGHT_CLICK( $self, $self->tree, \&OnTreeItemRightClick ); 1413 EVT_TREE_END_LABEL_EDIT( $self, $self->tree, \&OnTreeEndLabelEdit ); 1413 1414 1414 1415 EVT_LIST_END_LABEL_EDIT( $self, $self->imageviewer, \&OnImageViewerEndLabelEdit ); … … 1543 1544 } 1544 1545 1546 sub OnTreeEndLabelEdit { 1547 my( $self, $event ) = @_; 1548 1549 1550 my $category = $self->tree->GetPlData($event->GetItem); 1551 my $category_id; 1552 1553 $category_id = $category->{id} if 'HASH' eq ref($category) ; 1554 my $comment; 1555 my ( $success, $status_msg, $content ) = $self->pwg->SetInfoCategories( $event->GetLabel, $comment, $category_id); 1556 1557 my $ok = 1; 1558 1559 if(!$success){ 1560 $ok = 0; 1561 } 1562 1563 if('fail' eq $content->{stat}){ 1564 $ok = 0; 1565 } 1566 1567 # method call failed 1568 if(!$ok){ 1569 $event->Veto; 1570 Wx::MessageBox( 1571 sprintf( 1572 "%s %s", 1573 gettext("Update failed : "), 1574 $status_msg 1575 ), 1576 gettext("Piwigo update error"), 1577 wxOK | wxICON_EXCLAMATION, 1578 ); 1579 Wx::LogMessage("%s\n\n%s", Dumper($content), gettext("This function is not available. A Piwigo upgrade may resolve this issue.")); 1580 } 1581 } 1545 1582 1546 1583 sub OnImageViewerItemRightClick { … … 1581 1618 my $dialog = Wx::TextEntryDialog->new( 1582 1619 $self, 1583 sprintf("%s name :", wxTheApp->branding->{Category}),1584 sprintf("Add new %s", wxTheApp->branding->{category}),1585 sprintf("New %s", wxTheApp->branding->{category}),1620 wxTheApp->branding->{'Category name'}, 1621 wxTheApp->branding->{'Add new category'}, 1622 wxTheApp->branding->{'New category'}, 1586 1623 ); 1587 1624
Note: See TracChangeset
for help on using the changeset viewer.