Browse Source

Minor improvements to the source right click commit

merge-requests/365/head
eidheim 9 years ago
parent
commit
fa75b543c7
  1. 16
      src/menu.cc
  2. 1
      src/menu.h
  3. 1
      src/source.cc

16
src/menu.cc

@ -21,29 +21,29 @@ const Glib::ustring menu_xml= R"RAW(<interface>
<attribute name='action'>app.edit_paste</attribute>
</item>
</section>
<section>
<item>
<attribute name='label' translatable='yes'>_Reload _File</attribute>
<attribute name='action'>app.reload_file</attribute>
</item>
</section>
<section>
<item>
<attribute name='label' translatable='yes'>_Go _to _Declaration</attribute>
<attribute name='action'>app.source_goto_declaration</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Go _to _Method</attribute>
<attribute name='action'>app.source_goto_method</attribute>
<attribute name='label' translatable='yes'>_Go _to _Implementation</attribute>
<attribute name='action'>app.source_goto_implementation</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Go _to _Usage</attribute>
<attribute name='action'>app.source_goto_usage</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Go _to _Method</attribute>
<attribute name='action'>app.source_goto_method</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Rename</attribute>
<attribute name='action'>app.source_rename</attribute>
</item>
</section>
<section>
<item>
<attribute name='label' translatable='yes'>_Toggle _Line _Comment</attribute>
<attribute name='action'>app.source_comments_toggle</attribute>

1
src/menu.h

@ -6,6 +6,7 @@
#include <gtkmm.h>
class Menu {
Menu() {}
public:
static Menu &get() {
static Menu singleton;

1
src/source.cc

@ -2125,6 +2125,7 @@ bool Source::View::on_button_press_event(GdkEventButton *event) {
}
if((event->type == GDK_BUTTON_PRESS) && (event->button == 3)){
hide_tooltips();
if(!get_buffer()->get_has_selection()){
int x,y;
window_to_buffer_coords(Gtk::TextWindowType::TEXT_WINDOW_TEXT,event->x,event->y,x,y);

Loading…
Cancel
Save