Applied patch from Jeff Pohlmeyer to add an option for disabling DnD in the editor widget.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1182 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
f0d4e65311
commit
b54b45ea42
@ -7,6 +7,10 @@
|
||||
src/sci_cb.c, src/templates.c, tagmanager/js.c, tagmanager/lua.c,
|
||||
tagmanager/Makefile.am, tagmanager/makefile.win32,
|
||||
tagmanager/parsers.h: Added new filetypes Javascript and Lua.
|
||||
* geany.glade, THANKS, src/geany.h, src/interface.c, src/keyfile.c,
|
||||
src/prefs.c, src/sci_cb.c:
|
||||
Applied patch from Jeff Pohlmeyer to add an option for disabling DnD
|
||||
in the editor widget.
|
||||
|
||||
|
||||
2007-01-13 Nick Treleaven <nick.treleaven@btinternet.com>
|
||||
|
1
THANKS
1
THANKS
@ -21,6 +21,7 @@ Stefan Oltmanns <stefan(dot)oltmanns(at)abi2006(dot)gymnasium-achim(dot)de> - es
|
||||
Bob Doan <bdoan(at)sicom(dot)com> - some patches
|
||||
Rob van der Linde <robvdl(at)paradise(dot)net(dot)nz> - fixed wrong vte height on some systems
|
||||
Josef Whiter <josef(at)toxicpanda(dot)com> - parse 'Entering directory' build messages.
|
||||
Jeff Pohlmeyer <yetanothergeek(at)gmail(dot)com> - "Allow DnD" and "Use tabs" patches
|
||||
|
||||
Translators:
|
||||
----------------------------------
|
||||
|
20
geany.glade
20
geany.glade
@ -5217,6 +5217,26 @@ Bottom
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="check_disable_dnd">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Disable drag and drop completely in the editor window so you can't drag and drop any selections within or outside of the editor window.</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Disable Drag and Drop</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
@ -114,6 +114,7 @@ typedef struct MyApp
|
||||
gboolean pref_editor_new_line;
|
||||
gboolean pref_editor_replace_tabs;
|
||||
gboolean pref_editor_trail_space;
|
||||
gboolean pref_editor_disable_dnd;
|
||||
gboolean pref_main_load_session;
|
||||
gboolean pref_main_save_winpos;
|
||||
gboolean pref_main_confirm_exit;
|
||||
|
@ -2303,6 +2303,7 @@ create_prefs_dialog (void)
|
||||
GtkWidget *check_folding;
|
||||
GtkWidget *check_unfold_children;
|
||||
GtkWidget *check_indicators;
|
||||
GtkWidget *check_disable_dnd;
|
||||
GtkWidget *label172;
|
||||
GtkWidget *frame18;
|
||||
GtkWidget *alignment21;
|
||||
@ -3195,6 +3196,12 @@ create_prefs_dialog (void)
|
||||
gtk_tooltips_set_tip (tooltips, check_indicators, _("Whether to use indicators (a squiggly underline) to highlight the lines where the compiler found a warning or an error."), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_indicators), FALSE);
|
||||
|
||||
check_disable_dnd = gtk_check_button_new_with_mnemonic (_("Disable Drag and Drop"));
|
||||
gtk_widget_show (check_disable_dnd);
|
||||
gtk_box_pack_start (GTK_BOX (vbox17), check_disable_dnd, FALSE, FALSE, 0);
|
||||
gtk_tooltips_set_tip (tooltips, check_disable_dnd, _("Disable drag and drop completely in the editor window so you can't drag and drop any selections within or outside of the editor window."), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_disable_dnd), FALSE);
|
||||
|
||||
label172 = gtk_label_new (_("<b>Features</b>"));
|
||||
gtk_widget_show (label172);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame14), label172);
|
||||
@ -3725,6 +3732,7 @@ create_prefs_dialog (void)
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_folding, "check_folding");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_unfold_children, "check_unfold_children");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_indicators, "check_indicators");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_disable_dnd, "check_disable_dnd");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label172, "label172");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, frame18, "frame18");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment21, "alignment21");
|
||||
|
@ -173,6 +173,7 @@ void configuration_save()
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_new_line", app->pref_editor_new_line);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_replace_tabs", app->pref_editor_replace_tabs);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_trail_space", app->pref_editor_trail_space);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_disable_dnd", app->pref_editor_disable_dnd);
|
||||
g_key_file_set_string(config, PACKAGE, "pref_editor_default_encoding", encodings[app->pref_editor_default_encoding].charset);
|
||||
g_key_file_set_string(config, PACKAGE, "pref_template_developer", app->pref_template_developer);
|
||||
g_key_file_set_string(config, PACKAGE, "pref_template_company", app->pref_template_company);
|
||||
@ -429,6 +430,7 @@ gboolean configuration_load()
|
||||
app->pref_editor_replace_tabs = utils_get_setting_boolean(config, PACKAGE, "pref_editor_replace_tabs", FALSE);
|
||||
app->pref_editor_new_line = utils_get_setting_boolean(config, PACKAGE, "pref_editor_new_line", TRUE);
|
||||
app->pref_editor_trail_space = utils_get_setting_boolean(config, PACKAGE, "pref_editor_trail_space", FALSE);
|
||||
app->pref_editor_disable_dnd = utils_get_setting_boolean(config, PACKAGE, "pref_editor_disable_dnd", FALSE);
|
||||
|
||||
tmp_string = g_find_program_in_path(GEANY_DEFAULT_TOOLS_MAKE);
|
||||
app->tools_make_cmd = utils_get_setting_string(config, "tools", "make_cmd", tmp_string);
|
||||
|
@ -247,6 +247,9 @@ void prefs_init_dialog(void)
|
||||
on_pref_use_folding_toggled(GTK_TOGGLE_BUTTON(
|
||||
lookup_widget(app->prefs_dialog, "check_folding")), NULL);
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_disable_dnd");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_editor_disable_dnd);
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_indicators");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_editor_use_indicators);
|
||||
|
||||
@ -550,6 +553,9 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
|
||||
widget = lookup_widget(app->prefs_dialog, "check_indicators");
|
||||
app->pref_editor_use_indicators = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_disable_dnd");
|
||||
app->pref_editor_disable_dnd = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "spin_autocheight");
|
||||
app->autocompletion_max_height = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
|
||||
|
||||
|
@ -67,6 +67,11 @@ on_editor_button_press_event (GtkWidget *widget,
|
||||
|
||||
if (event->button == 1)
|
||||
{
|
||||
if (GDK_BUTTON_PRESS==event->type && app->pref_editor_disable_dnd)
|
||||
{
|
||||
gint ss = sci_get_selection_start(doc_list[idx].sci);
|
||||
sci_set_selection_end(doc_list[idx].sci, ss);
|
||||
}
|
||||
return utils_check_disk_status(idx, FALSE);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user