SF.net SVN: geany:[3910] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sat Jul 4 09:18:01 UTC 2009
Revision: 3910
http://geany.svn.sourceforge.net/geany/?rev=3910&view=rev
Author: eht16
Date: 2009-07-04 09:18:01 +0000 (Sat, 04 Jul 2009)
Log Message:
-----------
Remove unnecessary enums.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
trunk/src/geany.h
trunk/src/keybindings.c
trunk/src/plugindata.h
trunk/src/utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-04 09:17:32 UTC (rev 3909)
+++ trunk/ChangeLog 2009-07-04 09:18:01 UTC (rev 3910)
@@ -4,6 +4,9 @@
Fix warnings when the toolbar does not contain the Run button.
* tagmanager/lua.c:
Fix wrong parsing of complex expressions in the Lua parser.
+ * src/editor.c, src/geany.h, src/keybindings.c, src/plugindata.h,
+ src/utils.c:
+ Remove unnecessary enums.
2009-06-30 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2009-07-04 09:17:32 UTC (rev 3909)
+++ trunk/src/editor.c 2009-07-04 09:18:01 UTC (rev 3910)
@@ -3640,7 +3640,7 @@
return -1;
}
- if (direction == UP)
+ if (direction == GTK_DIR_UP)
step = -1;
else
step = 1;
@@ -3679,7 +3679,7 @@
line_start = SSM(editor->sci, SCI_LINEFROMPOSITION,
SSM(editor->sci, SCI_GETCURRENTPOS, 0, 0), 0);
- line_found = find_paragraph_stop(editor, line_start, UP);
+ line_found = find_paragraph_stop(editor, line_start, GTK_DIR_UP);
if (line_found == -1)
return;
@@ -3690,7 +3690,7 @@
pos_start = SSM(editor->sci, SCI_POSITIONFROMLINE, line_found, 0);
- line_found = find_paragraph_stop(editor, line_start, DOWN);
+ line_found = find_paragraph_stop(editor, line_start, GTK_DIR_DOWN);
pos_end = SSM(editor->sci, SCI_POSITIONFROMLINE, line_found, 0);
sci_set_selection(editor->sci, pos_start, pos_end);
Modified: trunk/src/geany.h
===================================================================
--- trunk/src/geany.h 2009-07-04 09:17:32 UTC (rev 3909)
+++ trunk/src/geany.h 2009-07-04 09:18:01 UTC (rev 3910)
@@ -85,22 +85,6 @@
extern gboolean ignore_callback;
-enum
-{
- UP,
- DOWN,
- LEFT,
- RIGHT
-};
-
-enum
-{
- KILOBYTE = 1024,
- MEGABYTE = (KILOBYTE*1024),
- GIGABYTE = (MEGABYTE*1024)
-};
-
-
/* prototype is here so that all files can use it. */
void geany_debug(gchar const *format, ...) G_GNUC_PRINTF (1, 2);
Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c 2009-07-04 09:17:32 UTC (rev 3909)
+++ trunk/src/keybindings.c 2009-07-04 09:18:01 UTC (rev 3910)
@@ -1469,14 +1469,14 @@
gint page_count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook));
gint cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(main_widgets.notebook));
- if (direction == LEFT)
+ if (direction == GTK_DIR_LEFT)
{
if (cur_page > 0)
gtk_notebook_set_current_page(GTK_NOTEBOOK(main_widgets.notebook), cur_page - 1);
else
gtk_notebook_set_current_page(GTK_NOTEBOOK(main_widgets.notebook), page_count - 1);
}
- else if (direction == RIGHT)
+ else if (direction == GTK_DIR_RIGHT)
{
if (cur_page < page_count - 1)
gtk_notebook_set_current_page(GTK_NOTEBOOK(main_widgets.notebook), cur_page + 1);
@@ -1488,12 +1488,12 @@
static void cb_func_switch_tableft(G_GNUC_UNUSED guint key_id)
{
- switch_document(LEFT);
+ switch_document(GTK_DIR_LEFT);
}
static void cb_func_switch_tabright(G_GNUC_UNUSED guint key_id)
{
- switch_document(RIGHT);
+ switch_document(GTK_DIR_RIGHT);
}
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2009-07-04 09:17:32 UTC (rev 3909)
+++ trunk/src/plugindata.h 2009-07-04 09:18:01 UTC (rev 3910)
@@ -45,7 +45,7 @@
enum {
/** The Application Programming Interface (API) version, incremented
* whenever any plugin data types are modified or appended to. */
- GEANY_API_VERSION = 144,
+ GEANY_API_VERSION = 145,
/** The Application Binary Interface (ABI) version, incremented whenever
* existing fields in the plugin data types have to be changed or reordered. */
Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c 2009-07-04 09:17:32 UTC (rev 3909)
+++ trunk/src/utils.c 2009-07-04 09:18:01 UTC (rev 3910)
@@ -909,12 +909,12 @@
else
{
++u;
- while ((val >= KILOBYTE) && (u < zero_and_units + sizeof(zero_and_units) - 1))
+ while ((val >= 1024) && (u < zero_and_units + sizeof(zero_and_units) - 1))
{
f = fmt_tenths;
++u;
- frac = ((((gint)(val % KILOBYTE)) * 10) + (KILOBYTE/2)) / KILOBYTE;
- val /= KILOBYTE;
+ frac = ((((gint)(val % 1024)) * 10) + (1024/2)) / 1024;
+ val /= 1024;
}
if (frac >= 10)
{ /* We need to round up here. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list