Skip to content

Commit

Permalink
undo-unrelated code removed, 2nd attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-niklaus committed Mar 22, 2024
1 parent 07735ff commit 2105884
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ link_directories(
${xinput_LIBRARY_DIRS}
${x11_LIBRARY_DIRS}
${lz4_INCLUDE_DIRS}

)

set(sources
Expand Down Expand Up @@ -79,6 +78,7 @@ target_link_libraries(${target_name}
-lm
)


GETTEXT_PROCESS_PO_FILES(de ALL PO_FILES po/de.po)
GETTEXT_PROCESS_PO_FILES(es ALL PO_FILES po/es.po)
GETTEXT_PROCESS_PO_FILES(fa ALL PO_FILES po/fa.po)
Expand Down
1 change: 0 additions & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ gboolean parse_config (GromitData *data)
g_printerr ("WARNING: Unable to copy \"%s\": "
"not yet defined!\n", copy);
}
g_free(copy);
}
else
{
Expand Down
12 changes: 7 additions & 5 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@
*
*/

#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <lz4.h>

#include "cairo.h"
#include "callbacks.h"
#include "config.h"
#include "glibconfig.h"
#include "input.h"
#include "main.h"
#include "build-config.h"
Expand Down Expand Up @@ -428,6 +424,7 @@ void select_tool (GromitData *data,
}



void snap_undo_state (GromitData *data)
{
if(data->debug)
Expand All @@ -436,6 +433,7 @@ void snap_undo_state (GromitData *data)
undo_compress(data, data->backbuffer);
undo_temp_buffer_to_slot(data, data->undo_head);

// Increment head position
data->undo_head++;
if(data->undo_head >= GROMIT_MAX_UNDO)
data->undo_head -= GROMIT_MAX_UNDO;
Expand All @@ -448,6 +446,7 @@ void snap_undo_state (GromitData *data)
}



void copy_surface (cairo_surface_t *dst, cairo_surface_t *src)
{
cairo_t *cr = cairo_create(dst);
Expand All @@ -460,7 +459,7 @@ void copy_surface (cairo_surface_t *dst, cairo_surface_t *src)

void undo_drawing (GromitData *data)
{
if (data->undo_depth <= 0)
if(data->undo_depth <= 0)
return;
data->undo_depth--;
data->redo_depth++;
Expand All @@ -484,6 +483,7 @@ void undo_drawing (GromitData *data)
}



void redo_drawing (GromitData *data)
{
if(data->redo_depth <= 0)
Expand Down Expand Up @@ -598,6 +598,8 @@ void main_do_event (GdkEventAny *event,





void setup_main_app (GromitData *data, int argc, char ** argv)
{
gboolean activate;
Expand Down

0 comments on commit 2105884

Please sign in to comment.