Changeset 177

Show
Ignore:
Timestamp:
Wed Jun 27 03:45:22 2007
Author:
manatlan
Message:

- bug corrected : search windows should retrieve its last size on
composite windows manager (introduce a kind of workaround)

Files:

Legend:

Unmodified
Added
Removed
Modified
  • trunk/jbrout.glade

    r175 r177  
    258 258                     <property name="n_columns">4</property>  
    259 259                     <child>  
    260                         <widget class="GtkHBox" id="hboxcombodate">  
    261                           <property name="visible">True</property>  
    262                           <child>  
    263                             <widget class="GtkComboBox" id="comboboxmonth">  
    264                               <property name="visible">True</property>  
    265                               <property name="items" translatable="yes">January  
    266   February  
    267   March  
    268   April  
    269   May  
    270   June  
    271   July  
    272   August  
    273   September  
    274   October  
    275   November  
    276   December</property>  
    277                               <signal name="changed" handler="on_combodate_changed"/>  
    278                             </widget>  
    279                           </child>  
    280                           <child>  
    281                             <widget class="GtkComboBox" id="comboboxyear">  
    282                               <property name="visible">True</property>  
    283                               <signal name="changed" handler="on_combodate_changed"/>  
    284                             </widget>  
    285                             <packing>  
    286                               <property name="position">1</property>  
    287                             </packing>  
    288                           </child>  
    289                         </widget>  
    290                         <packing>  
    291                           <property name="right_attach">4</property>  
    292                           <property name="x_options">GTK_FILL</property>  
    293                           <property name="y_options">GTK_FILL</property>  
    294                         </packing>  
    295                       </child>  
    296                       <child>  
    297                         <widget class="GtkScrolledWindow" id="scrolledwindow3">  
      260                       <widget class="GtkButton" id="btn_yl">  
    298 261                         <property name="visible">True</property>  
    299 262                         <property name="can_focus">True</property>  
    300                           <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>  
    301                           <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>  
    302                           <property name="shadow_type">GTK_SHADOW_IN</property>  
    303                           <child>  
    304                             <widget class="GtkTreeView" id="selectDate">  
    305                               <property name="visible">True</property>  
    306                               <property name="can_focus">True</property>  
    307                               <property name="headers_visible">False</property>  
    308                               <signal name="row_activated" handler="on_selectDate_row_activated"/>  
    309                             </widget>  
    310                           </child>  
      263                         <property name="label" translatable="yes">&lt;&lt;</property>  
      264                         <property name="use_underline">True</property>  
      265                         <signal name="clicked" handler="on_btn_yl_clicked"/>  
    311 266                       </widget>  
    312 267                       <packing>  
    313                           <property name="right_attach">4</property>  
    314                           <property name="top_attach">2</property>  
    315                           <property name="bottom_attach">4</property>  
      268                         <property name="top_attach">1</property>  
      269                         <property name="bottom_attach">2</property>  
      270                         <property name="x_options">GTK_FILL</property>  
      271                         <property name="y_options"></property>  
    316 272                       </packing>  
    317 273                     </child>  
    318 274                     <child>  
    319                         <widget class="GtkButton" id="btn_ym">  
      275                       <widget class="GtkButton" id="btn_ml">  
    319 275                         <property name="visible">True</property>  
    320 276                         <property name="can_focus">True</property>  
    321                           <property name="label" translatable="yes">&gt;&gt;</property>  
      277                         <property name="label" translatable="yes">&lt;</property>  
    321 277                         <property name="use_underline">True</property>  
    322                           <signal name="clicked" handler="on_btn_ym_clicked"/>  
      278                         <signal name="clicked" handler="on_btn_ml_clicked"/>  
    322 278                       </widget>  
    323 279                       <packing>  
    324                           <property name="left_attach">3</property>  
    325                           <property name="right_attach">4</property>  
      280                         <property name="left_attach">1</property>  
      281                         <property name="right_attach">2</property>  
    326 282                         <property name="top_attach">1</property>  
    327 283                         <property name="bottom_attach">2</property>  
     
    351 307                     </child>  
    352 308                     <child>  
    353                         <widget class="GtkButton" id="btn_ml">  
      309                       <widget class="GtkButton" id="btn_ym">  
    353 309                         <property name="visible">True</property>  
    354 310                         <property name="can_focus">True</property>  
    355                           <property name="label" translatable="yes">&lt;</property>  
      311                         <property name="label" translatable="yes">&gt;&gt;</property>  
    355 311                         <property name="use_underline">True</property>  
    356                           <signal name="clicked" handler="on_btn_ml_clicked"/>  
      312                         <signal name="clicked" handler="on_btn_ym_clicked"/>  
    356 312                       </widget>  
    357 313                       <packing>  
    358                           <property name="left_attach">1</property>  
    359                           <property name="right_attach">2</property>  
      314                         <property name="left_attach">3</property>  
      315                         <property name="right_attach">4</property>  
    360 316                         <property name="top_attach">1</property>  
    361 317                         <property name="bottom_attach">2</property>  
     
    368 324                     </child>  
    369 325                     <child>  
    370                         <widget class="GtkButton" id="btn_yl">  
      326                       <widget class="GtkScrolledWindow" id="scrolledwindow3">  
    370 326                         <property name="visible">True</property>  
    371 327                         <property name="can_focus">True</property>  
    372                           <property name="label" translatable="yes">&lt;&lt;</property>  
    373                           <property name="use_underline">True</property>  
    374                           <signal name="clicked" handler="on_btn_yl_clicked"/>  
      328                         <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>  
      329                         <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>  
      330                         <property name="shadow_type">GTK_SHADOW_IN</property>  
      331                         <child>  
      332                           <widget class="GtkTreeView" id="selectDate">  
      333                             <property name="visible">True</property>  
      334                             <property name="can_focus">True</property>  
      335                             <property name="headers_visible">False</property>  
      336                             <signal name="row_activated" handler="on_selectDate_row_activated"/>  
      337                           </widget>  
      338                         </child>  
    375 339                       </widget>  
    376 340                       <packing>  
    377                           <property name="top_attach">1</property>  
    378                           <property name="bottom_attach">2</property>  
      341                         <property name="right_attach">4</property>  
      342                         <property name="top_attach">2</property>  
      343                         <property name="bottom_attach">4</property>  
      344                       </packing>  
      345                     </child>  
      346                     <child>  
      347                       <widget class="GtkHBox" id="hboxcombodate">  
      348                         <property name="visible">True</property>  
      349                         <child>  
      350                           <widget class="GtkComboBox" id="comboboxmonth">  
      351                             <property name="visible">True</property>  
      352                             <property name="items" translatable="yes">January  
      353 February  
      354 March  
      355 April  
      356 May  
      357 June  
      358 July  
      359 August  
      360 September  
      361 October  
      362 November  
      363 December</property>  
      364                             <signal name="changed" handler="on_combodate_changed"/>  
      365                           </widget>  
      366                         </child>  
      367                         <child>  
      368                           <widget class="GtkComboBox" id="comboboxyear">  
      369                             <property name="visible">True</property>  
      370                             <signal name="changed" handler="on_combodate_changed"/>  
      371                           </widget>  
      372                           <packing>  
      373                             <property name="position">1</property>  
      374                           </packing>  
      375                         </child>  
      376                       </widget>  
      377                       <packing>  
      378                         <property name="right_attach">4</property>  
    379 379                         <property name="x_options">GTK_FILL</property>  
    380                           <property name="y_options"></property>  
      380                         <property name="y_options">GTK_FILL</property>  
    380 380                       </packing>  
    381 381                     </child>  
     
    632 632     <property name="title" translatable="yes">Search</property>  
    633 633     <property name="modal">True</property>  
      634     <property name="window_position">GTK_WIN_POS_CENTER</property>  
    634 635     <signal name="delete_event" handler="on_WinSearch_delete_event"/>  
    635 636     <child>  
     
    698 699             </child>  
    699 700             <child>  
    700                 <widget class="GtkHSeparator" id="hseparator1">  
      701               <widget class="GtkLabel" id="label5">  
    700 701                 <property name="visible">True</property>  
      702                 <property name="xalign">0</property>  
      703                 <property name="label" translatable="yes">Album / comment</property>  
    701 704               </widget>  
    702 705               <packing>  
    703                   <property name="right_attach">2</property>  
    704                   <property name="top_attach">8</property>  
    705                   <property name="bottom_attach">9</property>  
      706                 <property name="top_attach">6</property>  
      707                 <property name="bottom_attach">7</property>  
    706 708                 <property name="x_options">GTK_FILL</property>  
    707 709                 <property name="y_options"></property>  
    708                   <property name="y_padding">8</property>  
    709 710               </packing>  
    710 711             </child>  
    711 712             <child>  
    712                 <widget class="GtkEntry" id="e_acom">  
      713               <widget class="GtkLabel" id="label4">  
    712 713                 <property name="visible">True</property>  
    713                   <property name="can_focus">True</property>  
    714                   <property name="invisible_char">*</property>  
      714                 <property name="xalign">0</property>  
      715                 <property name="label" translatable="yes">Photo comment</property>  
    715 716               </widget>  
    716 717               <packing>  
    717                   <property name="right_attach">2</property>  
    718                   <property name="top_attach">7</property>  
    719                   <property name="bottom_attach">8</property>  
      718                 <property name="top_attach">4</property>  
      719                 <property name="bottom_attach">5</property>  
      720                 <property name="x_options">GTK_FILL</property>  
    720 721                 <property name="y_options"></property>  
    721 722               </packing>  
    722 723             </child>  
    723 724             <child>  
    724                 <widget class="GtkLabel" id="label9">  
      725               <widget class="GtkLabel" id="l_from">  
    724 725                 <property name="visible">True</property>  
    725 726                 <property name="xalign">0</property>  
      727                 <property name="label" translatable="yes">Period from</property>  
    726 728               </widget>  
    727 729               <packing>  
    728                   <property name="left_attach">1</property>  
    729                   <property name="right_attach">2</property>  
    730                   <property name="top_attach">10</property>  
    731                   <property name="bottom_attach">11</property>  
    732 730                 <property name="x_options">GTK_FILL</property>  
      731                 <property name="y_options"></property>  
    733 732               </packing>  
    734 733             </child>  
    735 734             <child>  
    736                 <widget class="GtkEntry" id="e_pcom">  
      735               <widget class="GtkLabel" id="l_to">  
    736 735                 <property name="visible">True</property>  
    737                   <property name="can_focus">True</property>  
    738                   <property name="invisible_char">*</property>  
      736                 <property name="xalign">0</property>  
      737                 <property name="label" translatable="yes">to</property>  
    739 738               </widget>  
    740 739               <packing>  
    741                   <property name="right_attach">2</property>  
    742                   <property name="top_attach">5</property>  
    743                   <property name="bottom_attach">6</property>  
      740                 <property name="top_attach">2</property>  
      741                 <property name="bottom_attach">3</property>  
      742                 <property name="x_options">GTK_FILL</property>  
    744 743                 <property name="y_options"></property>  
    745 744               </packing>  
    746 745             </child>  
    747 746             <child>  
    748                 <widget class="GtkComboBox" id="cb_format">  
      747               <widget class="GtkHButtonBox" id="hbuttonbox1">  
    748 747                 <property name="visible">True</property>  
      748                 <child>  
      749                   <widget class="GtkButton" id="btn_cancel">  
      750                     <property name="visible">True</property>  
      751                     <property name="can_focus">True</property>  
      752                     <property name="can_default">True</property>  
      753                     <property name="label">gtk-cancel</property>  
      754                     <property name="use_stock">True</property>  
      755                     <signal name="clicked" handler="on_btn_cancel_clicked"/>  
      756                   </widget>  
      757                 </child>  
      758                 <child>  
      759                   <widget class="GtkButton" id="btn_valid">  
      760                     <property name="visible">True</property>  
      761                     <property name="can_focus">True</property>  
      762                     <property name="can_default">True</property>  
      763                     <property name="label">gtk-ok</property>  
      764                     <property name="use_stock">True</property>  
      765                     <signal name="clicked" handler="on_btn_valid_clicked"/>  
      766                   </widget>  
      767                   <packing>  
      768                     <property name="position">1</property>  
      769                   </packing>  
      770                 </child>  
    749 771               </widget>  
    750 772               <packing>  
    751                   <property name="left_attach">1</property>  
    752 773                 <property name="right_attach">2</property>  
    753                   <property name="top_attach">9</property>  
    754                   <property name="bottom_attach">10</property>  
    755                   <property name="x_options">GTK_FILL</property>  
      774                 <property name="top_attach">11</property>  
      775                 <property name="bottom_attach">12</property>  
      776                 <property name="x_options"></property>  
    756 777                 <property name="y_options">GTK_FILL</property>  
    757 778               </packing>  
    758 779             </child>  
    759 780             <child>  
    760                 <widget class="GtkLabel" id="label8">  
      781               <widget class="GtkHScale" id="hs_to">  
    760 781                 <property name="visible">True</property>  
    761                   <property name="xalign">0</property>  
    762                   <property name="label" translatable="yes">Format</property>  
      782                 <property name="can_focus">True</property>  
      783                 <property name="adjustment">0 0 0 0 0 0</property>  
      784                 <property name="draw_value">False</property>  
      785                 <signal name="value_changed" handler="on_hs_to_value_changed"/>  
    763 786               </widget>  
    764 787               <packing>  
    765                   <property name="top_attach">9</property>  
    766                   <property name="bottom_attach">10</property>  
    767                   <property name="x_options">GTK_FILL</property>  
    768                   <property name="y_options"></property>  
      788                 <property name="right_attach">2</property>  
      789                 <property name="top_attach">3</property>  
      790                 <property name="bottom_attach">4</property>  
      791                 <property name="y_options">GTK_FILL</property>  
    769 792               </packing>  
    770 793             </child>  
     
    791 814             </child>  
    792 815             <child>  
    793                 <widget class="GtkHScale" id="hs_to">  
      816               <widget class="GtkLabel" id="label8">  
    793 816                 <property name="visible">True</property>  
    794                   <property name="can_focus">True</property>  
    795                   <property name="adjustment">0 0 0 0 0 0</property>  
    796                   <property name="draw_value">False</property>  
    797                   <signal name="value_changed" handler="on_hs_to_value_changed"/>  
      817                 <property name="xalign">0</property>  
      818                 <property name="label" translatable="yes">Format</property>  
    798 819               </widget>  
    799 820               <packing>  
    800                   <property name="right_attach">2</property>  
    801                   <property name="top_attach">3</property>  
    802                   <property name="bottom_attach">4</property>  
    803                   <property name="y_options">GTK_FILL</property>  
      821                 <property name="top_attach">9</property>  
      822                 <property name="bottom_attach">10</property>  
      823                 <property name="x_options">GTK_FILL</property>  
      824                 <property name="y_options"></property>  
    804 825               </packing>  
    805 826             </child>  
    806 827             <child>  
    807                 <widget class="GtkHButtonBox" id="hbuttonbox1">  
      828               <widget class="GtkComboBox" id="cb_format">  
    807 828                 <property name="visible">True</property>  
    808                   <child>  
    809                     <widget class="GtkButton" id="btn_cancel">  
    810                       <property name="visible">True</property>  
    811                       <property name="can_focus">True</property>  
    812                       <property name="can_default">True</property>  
    813                       <property name="label">gtk-cancel</property>  
    814                       <property name="use_stock">True</property>  
    815                       <signal name="clicked" handler="on_btn_cancel_clicked"/>  
    816                     </widget>  
    817                   </child>  
    818                   <child>  
    819                     <widget class="GtkButton" id="btn_valid">  
    820                       <property name="visible">True</property>  
    821                       <property name="can_focus">True</property>  
    822                       <property name="can_default">True</property>  
    823                       <property name="label">gtk-ok</property>  
    824                       <property name="use_stock">True</property>  
    825                       <signal name="clicked" handler="on_btn_valid_clicked"/>  
    826                     </widget>  
    827                     <packing>  
    828                       <property name="position">1</property>  
    829                     </packing>  
    830                   </child>  
    831 829               </widget>  
    832 830               <packing>  
      831                 <property name="left_attach">1</property>  
    833 832                 <property name="right_attach">2</property>  
    834                   <property name="top_attach">11</property>  
    835                   <property name="bottom_attach">12</property>  
    836                   <property name="x_options"></property>  
      833                 <property name="top_attach">9</property>  
      834                 <property name="bottom_attach">10</property>  
      835                 <property name="x_options">GTK_FILL</property>  
    837 836                 <property name="y_options">GTK_FILL</property>  
    838 837               </packing>  
    839 838             </child>  
    840 839             <child>  
    841                 <widget class="GtkLabel" id="l_to">  
      840               <widget class="GtkEntry" id="e_pcom">  
    841 840                 <property name="visible">True</property>  
    842                   <property name="xalign">0</property>  
    843                   <property name="label" translatable="yes">to</property>  
      841                 <property name="can_focus">True</property>  
      842                 <property name="invisible_char">*</property>  
    844 843               </widget>  
    845 844               <packing>  
    846                   <property name="top_attach">2</property>  
    847                   <property name="bottom_attach">3</property>  
    848                   <property name="x_options">GTK_FILL</property>  
      845                 <property name="right_attach">2</property>  
      846                 <property name="top_attach">5</property>  
      847                 <property name="bottom_attach">6</property>  
    849 848                 <property name="y_options"></property>  
    850 849               </packing>  
    851 850             </child>  
    852 851             <child>  
    853                 <widget class="GtkLabel" id="l_from">  
      852               <widget class="GtkLabel" id="label9">  
    853 852                 <property name="visible">True</property>  
    854 853                 <property name="xalign">0</property>  
    855                   <property name="label" translatable="yes">Period from</property>  
    856 854               </widget>  
    857 855               <packing>  
      856                 <property name="left_attach">1</property>  
      857                 <property name="right_attach">2</property>  
      858                 <property name="top_attach">10</property>  
      859                 <property name="bottom_attach">11</property>  
    858 860                 <property name="x_options">GTK_FILL</property>  
    859                   <property name="y_options"></property>  
    860 861               </packing>  
    861 862             </child>  
    862 863             <child>  
    863                 <widget class="GtkLabel" id="label4">  
      864               <widget class="GtkEntry" id="e_acom">  
    863 864                 <property name="visible">True</property>  
    864                   <property name="xalign">0</property>  
    865                   <property name="label" translatable="yes">Photo comment</property>  
      865                 <property name="can_focus">True</property>  
      866                 <property name="invisible_char">*</property>  
    866 867               </widget>  
    867 868               <packing>  
    868                   <property name="top_attach">4</property>  
    869                   <property name="bottom_attach">5</property>  
    870                   <property name="x_options">GTK_FILL</property>  
      869                 <property name="right_attach">2</property>  
      870                 <property name="top_attach">7</property>  
      871                 <property name="bottom_attach">8</property>  
    871 872                 <property name="y_options"></property>  
    872 873               </packing>  
    873 874             </child>  
    874 875             <child>  
    875                 <widget class="GtkLabel" id="label5">  
      876               <widget class="GtkHSeparator" id="hseparator1">  
    875 876                 <property name="visible">True</property>  
    876                   <property name="xalign">0</property>  
    877                   <property name="label" translatable="yes">Album / comment</property>  
    878 877               </widget>  
    879 878               <packing>  
    880                   <property name="top_attach">6</property>  
    881                   <property name="bottom_attach">7</property>  
      879                 <property name="right_attach">2</property>  
      880                 <property name="top_attach">8</property>  
      881                 <property name="bottom_attach">9</property>  
    882 882                 <property name="x_options">GTK_FILL</property>  
    883 883                 <property name="y_options"></property>  
      884                 <property name="y_padding">8</property>  
    884 885               </packing>  
    885 886             </child>  
  • trunk/jbrout.py

    r176 r177  
    1813 1813  
    1814 1814     def on_search_activate(self, widget, *args):  
    1815           win_search = Winsearch( TreeTags() )  
      1815         win_search = Winsearch( TreeTags(), self.main_widget )  
    1815 1815         win_search.loop()  
    1816 1816  
     
    2016 2016  
    2017 2017     def on_album_menu_select_plugin(self,ib,widget,callback):  
    2018           print "SEL"  
    2019 2018         treeselection = widget.get_selection()  
    2020 2019         model, iter0 = treeselection.get_selected()  
  • trunk/winsearch.py

    r138 r177  
    61 61     window="WinSearch"  
    62 62  
    63       def init(self,storeTags):  
      63     def init(self,storeTags,parent):  
    63 63         try:  
    64 64             min,max=JBrout.db.getMinMaxDates()  
     
    82 82         #~ tooltips.set_tip(self.__lbl,nom)  
    83 83  
    84           try:  
    85               self.hpaned1.set_position( JBrout.conf["hpaned"] )  
    86           except:  
    87               self.hpaned1.set_position( 160 )  
    88           self.main_widget.resize( JBrout.conf["search.width"] or 500,JBrout.conf["search.height"] or 400 )  
    89           self.main_widget.set_modal(True)  
    90    
    91    
    92 84         cell = gtk.CellRendererText()  
    93 85         self.cb_format.pack_start(cell, True)  
     
    139 131  
    140 132  
      133         self.main_widget.set_transient_for(parent)  
      134         self.main_widget.set_modal(True)  
      135         w,h=JBrout.conf["search.width"] or 500,JBrout.conf["search.height"] or 400  
      136         self.main_widget.resize( w,h )  
      137         self.main_widget.resize_children()  
      138         try:  
      139             self.hpaned1.set_position( JBrout.conf["hpaned"] )  
      140         except:  
      141             self.hpaned1.set_position( 160 )  
      142         self.main_widget.resize_children()  
      143         self.main_widget.set_position(gtk.WIN_POS_CENTER_ON_PARENT)  
      144  
    141 145     def on_kk(self,widget,*args):  
    142 146         pass