Changeset 3365 for extensions/pLoader
- Timestamp:
- May 29, 2009, 10:31:24 PM (15 years ago)
- Location:
- extensions/pLoader/trunk
- Files:
-
- 4 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm
r3362 r3365 351 351 EVT_LIST_ITEM_SELECTED 352 352 EVT_LIST_ITEM_ACTIVATED 353 EVT_LIST_ITEM_RIGHT_CLICK 353 354 EVT_TREE_ITEM_RIGHT_CLICK 354 355 EVT_LIST_KEY_DOWN … … 370 371 371 372 my $ID_TREE_CTX_MENU = 20000 ; 373 my $ID_IMAGEVIEWER_CTX_MENU = 20100 ; 372 374 373 375 sub new { … … 379 381 [ $params->{x}, $params->{y} ], 380 382 [ $params->{width}, $params->{height} ], 381 wxDEFAULT_FRAME_STYLE |wxMAXIMIZE383 wxDEFAULT_FRAME_STYLE 382 384 ); 383 385 $self->preview_w( … … 1025 1027 my ( $self ) = @_; 1026 1028 1029 $self->manager->GetPane("photo_properties")->Show(1); 1030 $self->manager->Update(); 1031 1032 } 1033 1034 sub OnPreview { 1035 my ( $self ) = @_; 1036 1027 1037 $self->manager->GetPane("preview")->Float->Show(1); 1028 $self->manager->GetPane("photo_properties")->Show(1);1029 1038 $self->manager->Update(); 1030 1039 … … 1296 1305 EVT_TREE_SEL_CHANGED( $self, $self->tree, \&OnTreeSelChanged ); 1297 1306 EVT_TREE_ITEM_RIGHT_CLICK( $self->tree, $self->tree, \&OnTreeItemRightClick ); 1307 1298 1308 EVT_LIST_END_LABEL_EDIT( $self, $self->imageviewer, \&OnImageViewerEndLabelEdit ); 1299 1309 EVT_LIST_ITEM_ACTIVATED( $self, $self->imageviewer, \&OnImageViewerItemActivated ); 1300 1310 EVT_LIST_ITEM_SELECTED($self, $self->imageviewer, \&OnImageViewerItemSelected) ; 1311 EVT_LIST_ITEM_RIGHT_CLICK($self, $self->imageviewer, \&OnImageViewerItemRightClick) ; 1312 1301 1313 EVT_LIST_KEY_DOWN($self, $self->imageviewer, \&OnImageViewerKeyDown) ; 1314 1302 1315 EVT_CLOSE( $self, \&OnClose ); 1303 1316 Wx::Event::EVT_UPDATE_UI( $self, $self, \&OnUpdateUI ); … … 1306 1319 Wx::Event::EVT_MENU( $self, 1+$ID_TREE_CTX_MENU, \&OnAddCategories ); 1307 1320 Wx::Event::EVT_MENU( $self, 2+$ID_TREE_CTX_MENU, \&OnRefreshCategories ); 1321 Wx::Event::EVT_MENU( $self, 1+$ID_IMAGEVIEWER_CTX_MENU, \&OnPhotoProperties ); 1322 Wx::Event::EVT_MENU( $self, 2+$ID_IMAGEVIEWER_CTX_MENU, \&OnPreview ); 1323 1324 1308 1325 } 1309 1326 … … 1415 1432 map { 1416 1433 $ctx_mnu->Append( 1417 @$_ 1418 ) ;1434 @$_[0..2] 1435 )->SetBitmap(Wx::Bitmap->new($_->[3],wxBITMAP_TYPE_PNG)); 1419 1436 } 1420 1437 ( … … 1428 1445 gettext("to the currently selected"), 1429 1446 wxTheApp->branding->{category}, 1430 ) 1447 ), 1448 '../res/mnu_folder_new.png', 1431 1449 ], 1432 1450 [ … … 1436 1454 "Refresh %s list.", 1437 1455 wxTheApp->branding->{category}, 1438 ) 1456 ), 1457 '../res/mnu_refresh.png', 1439 1458 ], 1440 1459 ); 1441 $self->PopupMenu($ctx_mnu, $point); 1460 1461 $self->PopupMenu($ctx_mnu, wxDefaultPosition); 1462 1463 } 1464 1465 1466 sub OnImageViewerItemRightClick { 1467 my( $self, $event ) = @_; 1468 1469 my $point = $event->GetPoint ; 1470 my $ctx_mnu = Wx::Menu->new; 1471 1472 map { 1473 $ctx_mnu->Append( 1474 @$_[0..2] 1475 )->SetBitmap(Wx::Bitmap->new($_->[3],wxBITMAP_TYPE_PNG)); 1476 } 1477 ( 1478 [ 1479 1+$ID_IMAGEVIEWER_CTX_MENU, 1480 gettext("Properties"), 1481 gettext("Modify photo properties"), 1482 '../res/mnu_properties.png', 1483 ], 1484 [ 1485 2+$ID_IMAGEVIEWER_CTX_MENU, 1486 gettext("Preview"), 1487 gettext("Display photo preview"), 1488 '../res/mnu_preview.png', 1489 ], 1490 ); 1491 1492 $self->PopupMenu($ctx_mnu, wxDefaultPosition); 1493 1442 1494 1443 1495 }
Note: See TracChangeset
for help on using the changeset viewer.