ClipIt-1.4.0-20110520002
+ Fixed: Remove duplicate truncate_history functionality. + Added: Added basic history item structure. Changes to be committed: modified: ChangeLog modified: TODO modified: src/history.c modified: src/history.h modified: src/main.h
This commit is contained in:
parent
6edfc6eafa
commit
12496f8e93
@ -1,5 +1,9 @@
|
||||
ClipIt-1.4.0-20110520002 - 20 May. 2011
|
||||
+ Fixed: Remove duplicate truncate_history functionality.
|
||||
+ Added: Added basic history item structure.
|
||||
|
||||
ClipIt-1.4.0-20110520001 - 20 May. 2011
|
||||
+ Fixed: Delted items are now properly removed from the history.
|
||||
+ Fixed: Deleted items are now properly removed from the history.
|
||||
+ Fixed: Double clicking an item in the "Manage history" dialog now
|
||||
properly selects it again.
|
||||
+ Added: [Enter] (for selecting the item) and [Delete] (for removing
|
||||
|
1
TODO
1
TODO
@ -6,3 +6,4 @@
|
||||
+ Clean up the code and indent it properly.
|
||||
+ Move all pop-up and menu functions from main.c to menus.c.
|
||||
+ Use the shipped icon in the display.
|
||||
+ history structure has to be changed in: main.c, manage.c, history.c
|
||||
|
@ -140,18 +140,7 @@ void check_and_append(gchar *item)
|
||||
void append_item(gchar *item)
|
||||
{
|
||||
history = g_slist_prepend(history, g_strdup(item));
|
||||
/* Shorten history if necessary */
|
||||
GSList *last_possible_element = g_slist_nth(history,
|
||||
prefs.history_limit - 1);
|
||||
if (last_possible_element)
|
||||
{
|
||||
/* Free last posible element and subsequent elements */
|
||||
g_slist_free(last_possible_element->next);
|
||||
last_possible_element->next = NULL;
|
||||
}
|
||||
/* Save changes */
|
||||
if (prefs.save_history)
|
||||
save_history();
|
||||
truncate_history();
|
||||
}
|
||||
|
||||
/* Truncates history to history_limit items */
|
||||
|
@ -32,6 +32,11 @@ G_BEGIN_DECLS
|
||||
* 1 GB of RAM. If you don't want that, set this lower. */
|
||||
#define ENTRY_MAX_SIZE 1048576
|
||||
|
||||
typedef struct {
|
||||
gboolean is_static;
|
||||
char *content;
|
||||
} history_item;
|
||||
|
||||
extern GSList *history;
|
||||
|
||||
void read_history();
|
||||
|
@ -30,8 +30,7 @@ G_BEGIN_DECLS
|
||||
#define POPUP_DELAY 30
|
||||
#define CHECK_INTERVAL 500
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
gboolean use_copy; /* Use copy */
|
||||
gboolean use_primary; /* Use primary */
|
||||
gboolean synchronize; /* Synchronize copy and primary */
|
||||
@ -59,8 +58,7 @@ typedef struct
|
||||
gchar* search_key; /* ClipIt search hotkey */
|
||||
|
||||
gboolean no_icon; /* No icon */
|
||||
}
|
||||
prefs_t;
|
||||
} prefs_t;
|
||||
|
||||
extern prefs_t prefs;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user