aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-10-14 21:09:46 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-10-14 21:09:46 -0400
commit3aa3f9f30142ea40dc20cb0aba462fdc5ac0da64 (patch)
tree4627624ca45905b494e212a74ca3f5f72de7248d /src
parent8d29321eeba9f77dcd3aaaa9fd504d5f736463e7 (diff)
downloadtextadept-3aa3f9f30142ea40dc20cb0aba462fdc5ac0da64.tar.gz
textadept-3aa3f9f30142ea40dc20cb0aba462fdc5ac0da64.zip
Code formatting changes.
Diffstat (limited to 'src')
-rw-r--r--src/lua_interface.c22
-rw-r--r--src/textadept.c16
2 files changed, 19 insertions, 19 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c
index 3c94c6fc..a23360b5 100644
--- a/src/lua_interface.c
+++ b/src/lua_interface.c
@@ -155,9 +155,9 @@ int l_load_script(const char *script_file) {
if (!retval) {
const char *errmsg = lua_tostring(lua, -1);
lua_settop(lua, 0);
- GtkWidget *dialog =
- gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK, "%s\n", errmsg);
+ GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK, "%s\n", errmsg);
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
@@ -871,8 +871,8 @@ static int l_view_mt_index(lua_State *lua) {
else if (streq(key, "size")) {
GtkWidget *editor = l_checkview(lua, 1);
if (GTK_IS_PANED(gtk_widget_get_parent(editor))) {
- int pos =
- gtk_paned_get_position(GTK_PANED(gtk_widget_get_parent(editor)));
+ int pos = gtk_paned_get_position(
+ GTK_PANED(gtk_widget_get_parent(editor)));
lua_pushinteger(lua, pos);
} else lua_pushnil(lua);
} else lua_rawget(lua, 1);
@@ -897,8 +897,8 @@ static int l_gui_mt_index(lua_State *lua) {
else if (streq(key, "focused_doc_pointer"))
lua_pushinteger(lua, SS(focused_editor, SCI_GETDOCPOINTER, 0, 0));
else if (streq(key, "clipboard_text")) {
- char *text =
- gtk_clipboard_wait_for_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD));
+ char *text = gtk_clipboard_wait_for_text(
+ gtk_clipboard_get(GDK_SELECTION_CLIPBOARD));
if (text) {
lua_pushstring(lua, text);
g_free(text);
@@ -1232,10 +1232,10 @@ static int l_cf_ce_focus(lua_State *lua) {
static int l_cf_ce_show_completions(lua_State *lua) {
luaL_checktype(lua, 1, LUA_TTABLE);
- GtkEntryCompletion *completion =
- gtk_entry_get_completion(GTK_ENTRY(command_entry));
- GtkListStore *store =
- GTK_LIST_STORE(gtk_entry_completion_get_model(completion));
+ GtkEntryCompletion *completion = gtk_entry_get_completion(
+ GTK_ENTRY(command_entry));
+ GtkListStore *store = GTK_LIST_STORE(
+ gtk_entry_completion_get_model(completion));
gtk_list_store_clear(store);
lua_pushnil(lua);
while (lua_next(lua, 1)) {
diff --git a/src/textadept.c b/src/textadept.c
index b0e35702..94fe1fb3 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -120,8 +120,8 @@ void create_ui() {
GList *icon_list = NULL;
const char *icons[] = { "16x16", "32x32", "48x48", "64x64", "128x128" };
for (int i = 0; i < 5; i++) {
- char *icon_file =
- g_strconcat(textadept_home, "/core/images/ta_", icons[i], ".png", NULL);
+ char *icon_file = g_strconcat(textadept_home, "/core/images/ta_", icons[i],
+ ".png", NULL);
GdkPixbuf *pb = gdk_pixbuf_new_from_file(icon_file, NULL);
if (pb) icon_list = g_list_prepend(icon_list, pb);
g_free(icon_file);
@@ -289,8 +289,8 @@ void split_window(GtkWidget *editor, int vertical) {
int first_line = SS(editor, SCI_GETFIRSTVISIBLELINE, 0, 0);
int current_pos = SS(editor, SCI_GETCURRENTPOS, 0, 0);
int anchor = SS(editor, SCI_GETANCHOR, 0, 0);
- int middle =
- (vertical ? editor->allocation.width : editor->allocation.height) / 2;
+ int middle = (vertical ? editor->allocation.width
+ : editor->allocation.height) / 2;
sptr_t curdoc = SS(editor, SCI_GETDOCPOINTER, 0, 0);
GtkWidget *neweditor = new_scintilla_window(curdoc);
@@ -547,15 +547,15 @@ GtkWidget *find_create_ui() {
GtkWidget *flabel = gtk_label_new_with_mnemonic("_Find:");
GtkWidget *rlabel = gtk_label_new_with_mnemonic("R_eplace:");
- GtkWidget *find_combo =
- gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(find_store), 0);
+ GtkWidget *find_combo = gtk_combo_box_entry_new_with_model(
+ GTK_TREE_MODEL(find_store), 0);
g_object_unref(find_store);
gtk_combo_box_set_focus_on_click(GTK_COMBO_BOX(find_combo), FALSE);
find_entry = gtk_bin_get_child(GTK_BIN(find_combo));
gtk_widget_set_name(find_entry, "textadept-find-entry");
gtk_entry_set_activates_default(GTK_ENTRY(find_entry), TRUE);
- GtkWidget *replace_combo =
- gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(repl_store), 0);
+ GtkWidget *replace_combo = gtk_combo_box_entry_new_with_model(
+ GTK_TREE_MODEL(repl_store), 0);
g_object_unref(repl_store);
gtk_combo_box_set_focus_on_click(GTK_COMBO_BOX(replace_combo), FALSE);
replace_entry = gtk_bin_get_child(GTK_BIN(replace_combo));