Enlightenment CVS committal
Author : fletch3k
Project : misc
Module : enotes
Dir : misc/enotes/src
Modified Files:
config.c config.h controlcentre.c ipc.c ipc.h main.c main.h
note.c saveload.c settings.c settings.h usage.h
Log Message:
Welcome screen and credits - and apparently indentation :)
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/config.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- config.c 11 Mar 2004 17:28:58 -0000 1.7
+++ config.c 26 Aug 2004 20:50:24 -0000 1.8
@@ -32,6 +32,7 @@
p->intro = 0;
p->controlcentre = 1;
p->autosave = 0;
+ p->welcome = 0;
return (p);
}
@@ -132,6 +133,8 @@
p->debug = atoi(info->value);
} else if (!strcmp(info->name, "autosave")) {
p->autosave = atoi(info->value);
+ } else if (!strcmp(info->name, "welcome")) {
+ p->welcome = atoi(info->value);
}
return;
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/config.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- config.h 17 Feb 2004 12:07:28 -0000 1.5
+++ config.h 26 Aug 2004 20:50:24 -0000 1.6
@@ -33,6 +33,7 @@
int intro;
int debug;
int autosave;
+ int welcome;
} MainConfig;
#ifndef XMLENTRY_DEF
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/controlcentre.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- controlcentre.c 24 Aug 2004 13:01:33 -0000 1.10
+++ controlcentre.c 26 Aug 2004 20:50:24 -0000 1.11
@@ -13,7 +13,7 @@
#include "controlcentre.h"
-ControlCentre *controlcentre;
+ControlCentre *controlcentre;
/**
@@ -27,8 +27,8 @@
char *fontpath = malloc(PATH_MAX);
Evas_Coord edje_w, edje_h;
- cc=malloc(sizeof(ControlCentre));
- controlcentre=cc;
+ cc = malloc(sizeof(ControlCentre));
+ controlcentre = cc;
/* Setup the Window */
cc->win = ecore_evas_software_x11_new(NULL, 0, 0, 0, 250, 250);
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/ipc.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ipc.c 24 Aug 2004 13:01:33 -0000 1.5
+++ ipc.c 26 Aug 2004 20:50:24 -0000 1.6
@@ -51,7 +51,7 @@
mysvr = ecore_ipc_server_add(ECORE_IPC_LOCAL_USER,
IPC_NAME, IPC_PORT, NULL);
if (mysvr != NULL) {
- listenev=ecore_event_handler_add
+ listenev = ecore_event_handler_add
(ECORE_IPC_EVENT_CLIENT_DATA,
ipc_svr_data_recv, NULL);
}
@@ -71,9 +71,9 @@
if ((mysvr =
ecore_ipc_server_connect(ECORE_IPC_LOCAL_USER, IPC_NAME, IPC_PORT,
NULL)) != NULL) {
-
- ipc_send_message_with_mysvr(msg); /* To server */
-
+
+ ipc_send_message_with_mysvr(msg); /* To server */
+
ecore_ipc_server_del(mysvr);
} else {
return;
@@ -124,18 +124,22 @@
} else if (p->cmd == CLOSE) {
ecore_main_loop_quit();
} else if (p->cmd == CONTROLCENTRECLOSE) {
- if (controlcentre!=NULL){
+ if (controlcentre != NULL) {
ecore_evas_free(controlcentre->win);
free(controlcentre);
- controlcentre=NULL;
+ controlcentre = NULL;
} else {
- new_note_with_values (325, 0, "No Control
Centre to Close", "An IPC command was recieved which\nwants to close the
controlcentre.\n\nSince the control centre isn't currently\nopen, it wasn't possible
to do so!");
+ new_note_with_values(325, 0,
+ "No Control Centre to
Close",
+ "An IPC command was
recieved which\nwants to close the controlcentre.\n\nSince the control centre isn't
currently\nopen, it wasn't possible to do so!");
}
} else if (p->cmd == CONTROLCENTREOPEN) {
- if (controlcentre==NULL){
+ if (controlcentre == NULL) {
setup_cc();
} else {
- new_note_with_values (325, 0, "Control Centre
Already Open", "An IPC command was recieved which\nwants to open the control centre,
but the\ncontrol centre is already open!");
+ new_note_with_values(325, 0,
+ "Control Centre Already
Open",
+ "An IPC command was
recieved which\nwants to open the control centre, but the\ncontrol centre is already
open!");
}
}
}
@@ -148,10 +152,11 @@
* @brief: Send a char message to the host.
*/
void
-ipc_send_message_with_mysvr (char *msg)
+ipc_send_message_with_mysvr(char *msg)
{
- if (msg!=NULL && mysvr != NULL)
- ecore_ipc_server_send(mysvr, 0, 0, 0, 0, 0, msg, strlen(msg) + 1);
+ if (msg != NULL && mysvr != NULL)
+ ecore_ipc_server_send(mysvr, 0, 0, 0, 0, 0, msg,
+ strlen(msg) + 1);
return;
}
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/ipc.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ipc.h 24 Aug 2004 13:01:33 -0000 1.4
+++ ipc.h 26 Aug 2004 20:50:24 -0000 1.5
@@ -55,6 +55,6 @@
RecvMsg *parse_message(char *msg);
int ipc_close_enotes(void *data);
char *fix_newlines(char *b);
-void ipc_send_message_with_mysvr (char *msg);
+void ipc_send_message_with_mysvr(char *msg);
#endif
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/main.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- main.c 11 Mar 2004 17:28:58 -0000 1.8
+++ main.c 26 Aug 2004 20:50:24 -0000 1.9
@@ -113,6 +113,10 @@
autoload();
}
+ if (main_config->welcome == 1) {
+ open_welcome();
+ }
+
/* Begin the main loop */
dml("Starting Main Loop", 1);
ecore_main_loop_begin();
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/main.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- main.h 17 Feb 2004 12:07:28 -0000 1.5
+++ main.h 26 Aug 2004 20:50:24 -0000 1.6
@@ -28,6 +28,7 @@
#include "storage.h"
#include "usage.h"
#include "debug.h"
+#include "welcome.h"
#define MAX_TEMPLATE_SIZE 999
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/note.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- note.c 26 Aug 2004 17:10:41 -0000 1.18
+++ note.c 26 Aug 2004 20:50:24 -0000 1.19
@@ -84,7 +84,7 @@
dml("Closing a Note", 2);
ecore_timer_del(p->timcomp);
- p->timcomp=NULL;
+ p->timcomp = NULL;
ecore_evas_free(p->win);
free(p);
@@ -205,8 +205,8 @@
evas_object_show(p->eo);
- evas_object_focus_set (p->eo, TRUE);
- ewl_embed_focus_set ((Ewl_Embed*)p->emb, TRUE);
+ evas_object_focus_set(p->eo, TRUE);
+ ewl_embed_focus_set((Ewl_Embed *) p->emb, TRUE);
p->vbox = ewl_vbox_new();
@@ -394,7 +394,8 @@
{
Note *p = (Note *) data;
- if (p->timcomp==NULL) return(0);
+ if (p->timcomp == NULL)
+ return (0);
if (p->txt_title != NULL) {
if (strcmp
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/saveload.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- saveload.c 24 Aug 2004 19:20:19 -0000 1.11
+++ saveload.c 26 Aug 2004 20:50:24 -0000 1.12
@@ -14,10 +14,10 @@
#include "saveload.h"
char *saveload_selected;
-SaveLoad *saveload=NULL;
+SaveLoad *saveload = NULL;
char *load_selected;
-Load *load=NULL;
+Load *load = NULL;
@@ -51,8 +51,8 @@
Ecore_Timer *revtim;
/* Setup the Window */
- saveload->win=ewl_window_new();
- ewl_window_title_set((Ewl_Window*)saveload->win, "E-Notes Save/Load");
+ saveload->win = ewl_window_new();
+ ewl_window_title_set((Ewl_Window *) saveload->win, "E-Notes Save/Load");
ewl_widget_show(saveload->win);
saveload->vbox = ewl_vbox_new();
@@ -91,7 +91,8 @@
saveload_setup_button(saveload->hbox, &saveload->savebtn, "Save.");
saveload_setup_button(saveload->hbox, &saveload->loadbtn, "Load.");
- saveload_setup_button(saveload->hbox, &saveload->refreshbtn, "Refresh.");
+ saveload_setup_button(saveload->hbox, &saveload->refreshbtn,
+ "Refresh.");
saveload_setup_button(saveload->hbox, &saveload->closebtn, "Close.");
/* EWL Callbacks */
@@ -102,7 +103,8 @@
(void *) ewl_saveload_close,
(void *) saveload->win);
ewl_callback_append(saveload->win, EWL_CALLBACK_DELETE_WINDOW,
- (void *) ewl_saveload_close, (void*)saveload->win);
+ (void *) ewl_saveload_close,
+ (void *) saveload->win);
ewl_callback_append(saveload->savebtn, EWL_CALLBACK_CLICKED,
(void *) ewl_saveload_save, NULL);
ewl_callback_append(saveload->loadbtn, EWL_CALLBACK_CLICKED,
@@ -207,9 +209,9 @@
void
ewl_saveload_close(Ewl_Widget * o, void *ev_data, Ecore_Evas * ee)
{
- ewl_widget_destroy (saveload->win);
+ ewl_widget_destroy(saveload->win);
free(saveload);
- saveload=NULL;
+ saveload = NULL;
return;
}
@@ -316,8 +318,8 @@
char *headers[1];
/* Setup the Window */
- load->win=ewl_window_new();
- ewl_window_title_set((Ewl_Window*)load->win, "E-Notes Load");
+ load->win = ewl_window_new();
+ ewl_window_title_set((Ewl_Window *) load->win, "E-Notes Load");
ewl_widget_show(load->win);
load->vbox = ewl_vbox_new();
@@ -362,7 +364,7 @@
ewl_callback_append(load->closebtn, EWL_CALLBACK_CLICKED,
(void *) ewl_load_close, (void *) load->win);
ewl_callback_append(load->win, EWL_CALLBACK_DELETE_WINDOW,
- (void *) ewl_load_close, (void*)load->win);
+ (void *) ewl_load_close, (void *) load->win);
ewl_callback_append(load->loadbtn, EWL_CALLBACK_CLICKED,
(void *) ewl_load_load, NULL);
ewl_callback_append(load->deletebtn, EWL_CALLBACK_CLICKED,
@@ -453,7 +455,7 @@
{
ewl_widget_destroy(load->win);
free(load);
- load=NULL;
+ load = NULL;
return;
}
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/settings.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- settings.c 24 Aug 2004 19:20:19 -0000 1.9
+++ settings.c 26 Aug 2004 20:50:24 -0000 1.10
@@ -13,7 +13,7 @@
#include "settings.h"
-Settings *settings=NULL;
+Settings *settings = NULL;
/* High Level */
@@ -48,8 +48,8 @@
char *headers[2];
/* Setup the Window */
- s->win=ewl_window_new();
- ewl_window_title_set((Ewl_Window*)s->win, "E-Notes Settings");
+ s->win = ewl_window_new();
+ ewl_window_title_set((Ewl_Window *) s->win, "E-Notes Settings");
ewl_widget_show(s->win);
s->vbox = ewl_vbox_new();
@@ -125,6 +125,11 @@
"Autosaving [0=No 1=Yes]:",
main_config->autosave);
+ settings->welcome =
+ setup_settings_opt_int(settings->tree,
+ "Welcome Screen [0=No 1=Yes]:",
+ main_config->welcome);
+
return;
}
@@ -224,7 +229,7 @@
{
ewl_widget_destroy(settings->win);
free(settings);
- settings=NULL;
+ settings = NULL;
return;
}
@@ -279,6 +284,9 @@
xml_write_append_entry(p, "autosave",
ewl_entry_get_text((Ewl_Entry *) settings->
autosave.entry));
+ xml_write_append_entry(p, "welcome",
+ ewl_entry_get_text((Ewl_Entry *) settings->
+ welcome.entry));
xml_write_end(p);
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/settings.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- settings.h 24 Aug 2004 19:20:19 -0000 1.7
+++ settings.h 26 Aug 2004 20:50:24 -0000 1.8
@@ -39,7 +39,8 @@
Ewl_Widget *savebtn;
Ewl_Widget *revertbtn;
Ewl_Widget *closebtn;
- Settings_Opt render_method, theme, intro, debug, cc, autosave;
+ Settings_Opt render_method, theme, intro, debug, cc, autosave,
+ welcome;
} Settings;
extern MainConfig *main_config;
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/usage.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- usage.h 11 Mar 2004 17:28:58 -0000 1.6
+++ usage.h 26 Aug 2004 20:50:24 -0000 1.7
@@ -48,12 +48,13 @@
-A | --auto-save | INT | Enable the autosaving and\n\
| | | loading of notes.\n\
-i | --intro | INT | Display the Intro.\n\
+-w | --welcome | INT | Welcome You?\n\
\
\n"
#define USAGE_VERSION "E-Notes Version:\n%s\n"
-#define OPTSTR "v?hc:r:t:i:R:d:A:"
+#define OPTSTR "v?hc:r:t:i:R:d:A:w:"
static struct option long_options[] = {
{"help", 0, 0, '?'},
@@ -66,6 +67,7 @@
{"intro", 1, 0, 'i'},
{"debug", 1, 0, 'd'},
{"auto-save", 1, 0, 'A'},
+ {"welcome", 1, 0, 'w'},
{NULL, 0, 0, 0}
};
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs