Send commitlog mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r1386 -
trunk/src/target/OM-2007/applications/openmoko-messages/src
([EMAIL PROTECTED])
2. r1387 -
trunk/src/target/OM-2007/applications/openmoko-appmanager/src
([EMAIL PROTECTED])
--- Begin Message ---
Author: alex_tang
Date: 2007-03-16 09:17:06 +0100 (Fri, 16 Mar 2007)
New Revision: 1386
Modified:
trunk/src/target/OM-2007/applications/openmoko-messages/src/main.c
Log:
Remove the ugly code for Ken has make it by configure in .desktop file.
Use strcasestr instead of in_string.
Modified: trunk/src/target/OM-2007/applications/openmoko-messages/src/main.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-messages/src/main.c
2007-03-16 08:13:27 UTC (rev 1385)
+++ trunk/src/target/OM-2007/applications/openmoko-messages/src/main.c
2007-03-16 08:17:06 UTC (rev 1386)
@@ -37,69 +37,6 @@
#include <gtk/gtk.h>
-static pid_t
-testlock (char *fname)
-{
- int fd;
- struct flock fl;
-
- fd = open (fname, O_WRONLY, S_IWUSR);
- if (fd < 0)
- {
- if (errno == ENOENT)
- {
- return 0;
- }
- else
- {
- perror ("Test lock open file");
- return -1;
- }
- }
-
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
- fl.l_start = 0;
- fl.l_len = 0;
-
- if (fcntl (fd, F_GETLK, &fl) < 0)
- {
- close (fd);
- return -1;
- }
- close (fd);
-
- if (fl.l_type == F_UNLCK)
- return 0;
-
- return fl.l_pid;
-}
-
-static void
-setlock (char *fname)
-{
- int fd;
- struct flock fl;
-
- fd = open (fname, O_WRONLY|O_CREAT, S_IWUSR);
- if (fd < 0)
- {
- perror ("Set lock open file");
- return ;
- }
-
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
- fl.l_start = 0;
- fl.l_len = 0;
-
- if (fcntl (fd, F_SETLK, &fl) < 0)
- {
- perror ("Lock file");
- close (fd);
- }
-}
-
gboolean init_dbus (MessengerData* d)
{
DBusError error;
@@ -137,15 +74,6 @@
/* Initialize GTK+ */
gtk_init( &argc, &argv );
- /* initalize the lock */
- lockapp = testlock ("/tmp/messages.lock");
- if (lockapp > 0)
- {
- g_debug("Openmoko messages is already running");
- return 0;
- }
- setlock ("/tmp/messages.lock");
-
MessengerData* d = g_new ( MessengerData, 1);
d->foldersdb = foldersdb_new();
d->s_key = "";
@@ -329,32 +257,6 @@
gtk_widget_grab_focus (d->view);
}
-int in_string(char *str, char *key)
-{
- int length, key_length;
- int m,n,i;
-
- length = strlen(str);
- key_length = strlen(key);
-
- n=0;
-
- for(m=0;m<length;m++){
- if(str[m] == key[n]){
- for(i=0;i<key_length;i++)
- if(str[m+i]!= key[i+n])
- break;
- if(i == key_length)
- return 1;
- else{
- m = m+i+1;
- n=0;
- }
- }
- }
- return 0;
-}
-
gboolean filter_visible_function (GtkTreeModel* model, GtkTreeIter* iter,
MessengerData* d)
{
gchar* folder;
@@ -366,7 +268,7 @@
gtk_tree_model_get (model, iter, COLUMN_SUBJECT, &subject, -1);
if (d->searchOn){
- if ((strlen(d->s_key) > 0) && !in_string(from, d->s_key) &&
!in_string(subject, d->s_key))
+ if ((strlen(d->s_key) > 0) && !strcasestr(from, d->s_key) &&
!strcasestr(subject, d->s_key))
return FALSE;
}else {
gtk_menu_set_active (GTK_MENU(d->filtmenu),0);
--- End Message ---
--- Begin Message ---
Author: caowai_song
Date: 2007-03-16 10:06:32 +0100 (Fri, 16 Mar 2007)
New Revision: 1387
Modified:
trunk/src/target/OM-2007/applications/openmoko-appmanager/src/detail-area.c
trunk/src/target/OM-2007/applications/openmoko-appmanager/src/tool-box.c
Log:
Remove the warnning in tool-box.c and detail-area.c.
Modified:
trunk/src/target/OM-2007/applications/openmoko-appmanager/src/detail-area.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-appmanager/src/detail-area.c
2007-03-16 08:17:06 UTC (rev 1386)
+++ trunk/src/target/OM-2007/applications/openmoko-appmanager/src/detail-area.c
2007-03-16 09:06:32 UTC (rev 1387)
@@ -33,11 +33,11 @@
detail_area_new (ApplicationManagerData *appdata)
{
GtkWidget *text;
- MokoDetailsWindow *detail;
- GtkBox *box;
+ GtkWidget *detail;
+ GtkWidget *box;
detail = moko_details_window_new ();
- box = moko_details_window_put_in_box (detail);
+ box = moko_details_window_put_in_box (MOKO_DETAILS_WINDOW (detail));
text = gtk_text_view_new ();
gtk_widget_show (text);
Modified:
trunk/src/target/OM-2007/applications/openmoko-appmanager/src/tool-box.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-appmanager/src/tool-box.c
2007-03-16 08:17:06 UTC (rev 1386)
+++ trunk/src/target/OM-2007/applications/openmoko-appmanager/src/tool-box.c
2007-03-16 09:06:32 UTC (rev 1387)
@@ -164,9 +164,9 @@
tool_box_new (ApplicationManagerData *appdata)
{
MokoToolBox *toolbox;
- MokoPixmapButton *bapply;
- MokoPixmapButton *bupgrade;
- GtkEntry *searchentry;
+ GtkWidget *bapply;
+ GtkWidget *bupgrade;
+ GtkWidget *searchentry;
toolbox = MOKO_TOOL_BOX (moko_tool_box_new_with_search ());
@@ -183,8 +183,8 @@
appdata);
searchentry = moko_tool_box_get_entry (toolbox);
- application_manager_data_set_search_entry (appdata, searchentry);
- gtk_entry_set_max_length (searchentry, MAX_SEARCH_ENTRY_TEXT_LENGTH);
+ application_manager_data_set_search_entry (appdata, GTK_ENTRY (searchentry));
+ gtk_entry_set_max_length (GTK_ENTRY (searchentry),
MAX_SEARCH_ENTRY_TEXT_LENGTH);
g_signal_connect ((gpointer) searchentry, "changed",
G_CALLBACK (on_search_entry_changed),
appdata);
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog