Use G_N_ELEMENTS(arr) instead of sizeof(arr) / sizeof(arr[0]).
Correct prev_translators email address. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1878 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
1e414fa341
commit
928e2f032e
@ -17,6 +17,9 @@
|
||||
Rename ui_widgets.popup_items to popup_copy_items.
|
||||
* doc/geany.txt, doc/geany.html:
|
||||
Edit how to manually edit geany.conf hidden prefs.
|
||||
* src/win32.c, src/about.c, src/ui_utils.c:
|
||||
Use G_N_ELEMENTS(arr) instead of sizeof(arr) / sizeof(arr[0]).
|
||||
Correct prev_translators email address.
|
||||
|
||||
|
||||
2007-09-11 Enrico Tröger <enrico.troeger@uvena.de>
|
||||
|
||||
@ -60,12 +60,12 @@ const gchar *translators[][2] = {
|
||||
{ "zh_CN", "Dormouse Young <dormouse.young@gmail.com>" },
|
||||
{ "zh_TW", "KoViCH <kovich.ian@gmail.com>" }
|
||||
};
|
||||
static const gint translators_len = sizeof(translators) / sizeof(translators[0]);
|
||||
static const gint translators_len = G_N_ELEMENTS(translators);
|
||||
|
||||
const gchar *prev_translators[][2] = {
|
||||
{ "pl_PL", "Jacek Wolszczak <shutdownrunnter@02.pl>" },
|
||||
{ "pl_PL", "Jacek Wolszczak <shutdownrunner@o2.pl>" },
|
||||
};
|
||||
static const gint prev_translators_len = sizeof(prev_translators) / sizeof(prev_translators[0]);
|
||||
static const gint prev_translators_len = G_N_ELEMENTS(prev_translators);
|
||||
|
||||
|
||||
static void header_eventbox_style_set(GtkWidget *widget);
|
||||
|
||||
@ -290,7 +290,7 @@ void ui_update_popup_copy_items(gint idx)
|
||||
if (idx == -1) enable = FALSE;
|
||||
else enable = sci_can_copy(doc_list[idx].sci);
|
||||
|
||||
for(i = 0; i < (sizeof(ui_widgets.popup_copy_items)/sizeof(GtkWidget*)); i++)
|
||||
for (i = 0; i < G_N_ELEMENTS(ui_widgets.popup_copy_items); i++)
|
||||
gtk_widget_set_sensitive(ui_widgets.popup_copy_items[i], enable);
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ void ui_update_menu_copy_items(gint idx)
|
||||
enable = gtk_text_buffer_get_selection_bounds(buffer, NULL, NULL);
|
||||
}
|
||||
|
||||
for(i = 0; i < (sizeof(ui_widgets.menu_copy_items)/sizeof(GtkWidget*)); i++)
|
||||
for (i = 0; i < G_N_ELEMENTS(ui_widgets.menu_copy_items); i++)
|
||||
gtk_widget_set_sensitive(ui_widgets.menu_copy_items[i], enable);
|
||||
}
|
||||
|
||||
|
||||
@ -525,8 +525,8 @@ gboolean win32_message_dialog(GtkWidget *parent, GtkMessageType type, const gcha
|
||||
|
||||
// convert the Unicode chars to wide chars
|
||||
/// TODO test if LANG == C then possibly skip conversion => g_win32_getlocale()
|
||||
MultiByteToWideChar(CP_UTF8, 0, msg, -1, w_msg, sizeof(w_msg)/sizeof(w_msg[0]));
|
||||
MultiByteToWideChar(CP_UTF8, 0, title, -1, w_title, sizeof(w_title)/sizeof(w_title[0]));
|
||||
MultiByteToWideChar(CP_UTF8, 0, msg, -1, w_msg, G_N_ELEMENTS(w_msg));
|
||||
MultiByteToWideChar(CP_UTF8, 0, title, -1, w_title, G_N_ELEMENTS(w_title));
|
||||
|
||||
// display the message box
|
||||
if (parent == NULL)
|
||||
@ -549,8 +549,8 @@ gint win32_message_dialog_unsaved(const gchar *msg)
|
||||
gint ret;
|
||||
|
||||
// convert the Unicode chars to wide chars
|
||||
MultiByteToWideChar(CP_UTF8, 0, msg, -1, w_msg, sizeof(w_msg)/sizeof(w_msg[0]));
|
||||
MultiByteToWideChar(CP_UTF8, 0, _("Question"), -1, w_title, sizeof(w_title)/sizeof(w_title[0]));
|
||||
MultiByteToWideChar(CP_UTF8, 0, msg, -1, w_msg, G_N_ELEMENTS(w_msg));
|
||||
MultiByteToWideChar(CP_UTF8, 0, _("Question"), -1, w_title, G_N_ELEMENTS(w_title));
|
||||
|
||||
ret = MessageBoxW(GDK_WINDOW_HWND(app->window->window), w_msg, w_title, MB_YESNOCANCEL | MB_ICONQUESTION);
|
||||
switch(ret)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user