Kaydet (Commit) e14cbbae authored tarafından Enrico Tröger's avatar Enrico Tröger

Added labels for each defined shortcut to have a nicer representation in the…

Added labels for each defined shortcut to have a nicer representation in the dialogs. Hide make and terminal settings in the preferences dialog under Windows.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@425 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst d0c41ab9
2006-06-08 Enrico Troeger <enrico.troeger@uvena.de>
* src/keybindings.c, src/prefs.c, src/dialogs.c:
Added labels for each defined shortcut to have a nicer
representation in the dialogs.
* geany.desktop.in: Removed duplicate entry for Encoding, now
desktop-file-validate processes with no errors.
* configure.in, doc/geany.1.in:
Renamed geany.1 to geany.1.in to let it be processed by configure.
Added GEANY_DATA_DIR to configure.in.
* doc/Makefile.am, doc/geany.xsl:
Removed unneeded code for generating geany.1. Added man_MANS to get
installed the manpage. Changed build command for HTML documentation.
Added new file doc/geany.xsl.
* geany.spec.in: Some improvements, corrected download URL.
* src/prefs.c: Hide make and terminal settings under Windows.
2006-06-07 Nick Treleaven <nick.treleaven@btinternet.com>
* src/callbacks.c: Fixed segfault when inserting comments and no
......@@ -12,9 +30,9 @@
2006-06-06 Enrico Troeger <enrico.troeger@uvena.de>
* src/highlighting.c: enabled folding for markup filetypes
(HTML, XML, PHP, DocBook)
* src/treeviews.c: replaced "Members" by "Methods" to make it clearer
* src/highlighting.c: Enabled folding for markup filetypes
(HTML, XML, PHP, DocBook).
* src/treeviews.c: Replaced "Members" by "Methods" to make it clearer.
2006-06-05 Nick Treleaven <nick.treleaven@btinternet.com>
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Id$
*/
......@@ -502,7 +502,7 @@ GtkWidget *dialogs_create_build_menu_gen(gint idx)
if (ft->menu_items->can_compile)
{
// compile the code
item = gtk_image_menu_item_new_with_mnemonic(_("Compile"));
item = gtk_image_menu_item_new_with_mnemonic(_("_Compile"));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
gtk_tooltips_set_tip(tooltips, item, _("Compiles the current file"), NULL);
......@@ -518,7 +518,7 @@ GtkWidget *dialogs_create_build_menu_gen(gint idx)
if (ft->menu_items->can_link)
{ // build the code
item = gtk_image_menu_item_new_with_mnemonic(_("Build"));
item = gtk_image_menu_item_new_with_mnemonic(_("_Build"));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
gtk_tooltips_set_tip(tooltips, item,
......@@ -542,7 +542,7 @@ GtkWidget *dialogs_create_build_menu_gen(gint idx)
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_make_activate), GINT_TO_POINTER(0));
// build the code with make
item = gtk_image_menu_item_new_with_mnemonic(_("Build with make (custom target)"));
item = gtk_image_menu_item_new_with_mnemonic(_("Build with \"_make\" (custom _target)"));
gtk_widget_show(item);
if (keys[GEANY_KEYS_BUILD_MAKEOWNTARGET]->key)
gtk_widget_add_accelerator(item, "activate", accel_group, keys[GEANY_KEYS_BUILD_MAKEOWNTARGET]->key,
......@@ -1863,7 +1863,7 @@ void dialogs_show_keyboard_shortcuts(void)
for (i = 0; i < GEANY_MAX_KEYS; i++)
{
shortcut = gtk_accelerator_get_label(keys[i]->key, keys[i]->mods);
g_string_append(text_names, keys[i]->name);
g_string_append(text_names, keys[i]->label);
g_string_append(text_names, "\n");
g_string_append(text_keys, shortcut);
g_string_append(text_keys, "\n");
......
This diff is collapsed.
......@@ -29,7 +29,10 @@ typedef struct binding
{
guint key;
GdkModifierType mods;
// at the moment only needed as keys for the configuration file because indices or tranlatable
// strings as keys are not very useful
const gchar *name;
const gchar *label;
// function pointer to a callback function, just to keep the code in keypress event
// callback function clear
void (*cb_func) (void);
......
......@@ -15,13 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Id$
*/
#include <stdlib.h>
#include <string.h>
#include "geany.h"
......@@ -152,12 +153,23 @@ void prefs_init_dialog(void)
g_free(color);
// Tools Settings
if (app->build_make_cmd)
gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_com_make")), app->build_make_cmd);
if (app->build_term_cmd)
gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_com_term")), app->build_term_cmd);
#ifdef GEANY_WIN32
// hide related Terminal path setting
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "label11"), FALSE);
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "entry_com_make"), FALSE);
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "button_make"), FALSE);
// hide related Terminal path setting
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "label97"), FALSE);
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "entry_com_term"), FALSE);
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "button_term"), FALSE);
#else
if (app->build_make_cmd)
gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_com_make")), app->build_make_cmd);
if (app->build_term_cmd)
gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_com_term")), app->build_term_cmd);
#endif
if (app->build_browser_cmd)
gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_browser")), app->build_browser_cmd);
......@@ -204,7 +216,7 @@ void prefs_init_dialog(void)
// doesn't keep the settings
gtk_scrolled_window_set_policy(
GTK_SCROLLED_WINDOW(lookup_widget(app->prefs_dialog, "scrolledwindow8")),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(on_cell_edited), NULL);
g_signal_connect(G_OBJECT(tree), "button-press-event",
......@@ -217,7 +229,7 @@ void prefs_init_dialog(void)
{
key_string = gtk_accelerator_name(keys[i]->key, keys[i]->mods);
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, 0, keys[i]->name, 1, key_string, -1);
gtk_list_store_set(store, &iter, 0, keys[i]->label, 1, key_string, -1);
g_free(key_string);
}
......@@ -649,7 +661,7 @@ static void on_dialog_response(GtkWidget *dialog, gint response, gpointer user_d
for (idx = 0; idx < GEANY_MAX_KEYS; idx++)
{
if (utils_strcmp(dialog_key_name, keys[idx]->name)) break;
if (utils_strcmp(dialog_key_name, keys[idx]->label)) break;
}
gtk_accelerator_parse(gtk_label_get_text(GTK_LABEL(dialog_label)), &lkey, &lmods);
......@@ -690,7 +702,7 @@ static gboolean find_duplicate(guint idx, guint key, GdkModifierType mods, const
{
dialogs_show_error(
_("The combination '%s' is already used for \"%s\". Please choose another one."),
action, keys[i]->name);
action, keys[i]->label);
return TRUE;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment