Changeset aa8deb293584ec83d3f7fb8091c355de5383bc98
- Timestamp:
- 02/25/09 01:39:55 (3 years ago)
- Author:
- Lincoln de Sousa <lincoln@…>
- Children:
- f552909cbf0795a70dad4a132351b1e66b3dd6a3
- Parents:
- 66575e56afa7e0c37e4ed3237d2a234ee7595f46
- git-committer:
- Lincoln de Sousa <lincoln@…> (02/25/09 01:39:55)
- Message:
-
Adding a new tab when double clicking tab bar
Added an eventbox to handle double clicks on tab
bar and when the empty area is hitted, a new tab
is added (Closes: #83)
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rde39085
|
raa8deb2
|
|
| 43 | 43 | </child> |
| 44 | 44 | <child> |
| 45 | | <widget class="GtkHBox" id="hbox-tabs"> |
| 46 | | <property name="visible">True</property> |
| 47 | | </widget> |
| | 45 | <widget class="GtkEventBox" id="event-tabs"> |
| | 46 | <property name="visible">True</property> |
| | 47 | <property name="events">GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK</property> |
| | 48 | <child> |
| | 49 | <widget class="GtkHBox" id="hbox-tabs"> |
| | 50 | <property name="visible">True</property> |
| | 51 | </widget> |
| | 52 | </child> |
| | 53 | </widget> |
| 48 | 54 | <packing> |
| 49 | 55 | <property name="position">1</property> |
-
|
r66575e5
|
raa8deb2
|
|
| 520 | 520 | self.fullscreen = False |
| 521 | 521 | |
| | 522 | # double click stuff |
| | 523 | def double_click(hbox, event): |
| | 524 | """Handles double clicks on tabs area and when receive |
| | 525 | one, calls add_tab. |
| | 526 | """ |
| | 527 | if event.button == 1 and event.type == gtk.gdk._2BUTTON_PRESS: |
| | 528 | self.add_tab() |
| | 529 | evtbox = self.get_widget('event-tabs') |
| | 530 | evtbox.connect('button-press-event', double_click) |
| | 531 | |
| 522 | 532 | # Flag to prevent guake hide when window_losefocus is true and |
| 523 | 533 | # user tries to use the context menu. |