Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46371fe816 | ||
|
|
bfe4873204 | ||
|
|
acd1ed5768 | ||
|
|
b6a4fe03df | ||
|
|
b25ad07c30 | ||
|
|
ffcd53e989 | ||
|
|
4e22e0f4e7 | ||
|
|
d6a40c7523 | ||
|
|
4ee2f4e7de | ||
|
|
1567e56a09 | ||
|
|
639ccbf16c |
@@ -82,7 +82,13 @@ if( NOT IMLIB_BUILD_WITH_X )
|
|||||||
message( FATAL_ERROR "Imlib is not built with X support" )
|
message( FATAL_ERROR "Imlib is not built with X support" )
|
||||||
endif( NOT IMLIB_BUILD_WITH_X )
|
endif( NOT IMLIB_BUILD_WITH_X )
|
||||||
|
|
||||||
add_definitions( -D_POSIX_C_SOURCE=200809L -D_BSD_SOURCE -D_DEFAULT_SOURCE )
|
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
add_definitions( -D_POSIX_C_SOURCE=200809L -D_BSD_SOURCE -D_DEFAULT_SOURCE )
|
||||||
|
else(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
add_definitions( -D_WITH_GETLINE )
|
||||||
|
endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
|
||||||
|
|
||||||
include_directories( ${PROJECT_BINARY_DIR}
|
include_directories( ${PROJECT_BINARY_DIR}
|
||||||
src
|
src
|
||||||
@@ -243,7 +249,7 @@ endif( RT_LIBRARY )
|
|||||||
target_link_libraries( tint2 m )
|
target_link_libraries( tint2 m )
|
||||||
|
|
||||||
add_dependencies( tint2 version )
|
add_dependencies( tint2 version )
|
||||||
set_target_properties( tint2 PROPERTIES COMPILE_FLAGS "-Wall -Wpointer-arith -fno-strict-aliasing -pthread -std=c99 ${ASAN_C_FLAGS}" )
|
set_target_properties( tint2 PROPERTIES COMPILE_FLAGS "-Wall -Wpointer-arith -fno-strict-aliasing -pthread -std=c11 ${ASAN_C_FLAGS}" )
|
||||||
set_target_properties( tint2 PROPERTIES LINK_FLAGS "-pthread -fno-strict-aliasing ${ASAN_L_FLAGS} ${BACKTRACE_L_FLAGS}" )
|
set_target_properties( tint2 PROPERTIES LINK_FLAGS "-pthread -fno-strict-aliasing ${ASAN_L_FLAGS} ${BACKTRACE_L_FLAGS}" )
|
||||||
|
|
||||||
install( TARGETS tint2 DESTINATION bin )
|
install( TARGETS tint2 DESTINATION bin )
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
2017-03-25 0.13.3
|
||||||
|
- Fixes:
|
||||||
|
- Fixed autohide for non-bottom panels (issue #632)
|
||||||
|
- Translations updated (contributed by Vladimir)
|
||||||
|
|
||||||
|
2017-03-19 0.13.2
|
||||||
|
- Fixes:
|
||||||
|
- Fixed compilation under FreeBSD
|
||||||
|
|
||||||
2017-03-12 0.13.1
|
2017-03-12 0.13.1
|
||||||
- Fixes:
|
- Fixes:
|
||||||
- Fixed compilation with new glibc (issue #625)
|
- Fixed compilation with new glibc (issue #625)
|
||||||
|
|||||||
14
README.md
14
README.md
@@ -1,5 +1,5 @@
|
|||||||
# Latest stable release: 0.13.1
|
# Latest stable release: 0.13.3
|
||||||
Changes: https://gitlab.com/o9000/tint2/blob/0.13.1/ChangeLog
|
Changes: https://gitlab.com/o9000/tint2/blob/0.13.3/ChangeLog
|
||||||
|
|
||||||
Documentation: [doc/tint2.md](doc/tint2.md)
|
Documentation: [doc/tint2.md](doc/tint2.md)
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ Compile it with (after you install the [dependencies](https://gitlab.com/o9000/t
|
|||||||
```
|
```
|
||||||
git clone https://gitlab.com/o9000/tint2.git
|
git clone https://gitlab.com/o9000/tint2.git
|
||||||
cd tint2
|
cd tint2
|
||||||
git checkout 0.13.1
|
git checkout 0.13.3
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
@@ -87,7 +87,7 @@ tint2 is a simple panel/taskbar made for modern X window managers. It was specif
|
|||||||
|
|
||||||
## Demos
|
## Demos
|
||||||
|
|
||||||
* 0.13.1: [Compact panel, separator, color gradients](https://gitlab.com/o9000/tint2/wikis/whats-new-0.13.1.0.gif)
|
* [Compact panel, separator, color gradients](https://gitlab.com/o9000/tint2/wikis/whats-new-0.13.0.gif)
|
||||||
* 0.12.4: [Executor](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.4.gif)
|
* [Executor](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.4.gif)
|
||||||
* 0.12.3: [Mouse over effects](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.3.gif)
|
* [Mouse over effects](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.3.gif)
|
||||||
* 0.12: [Distribute size between taskbars, freespace](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.gif)
|
* [Distribute size between taskbars, freespace](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.gif)
|
||||||
|
|||||||
@@ -199,9 +199,9 @@ pre {
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="latest-stable-release-0-13-1"><span class="md2man-title">Latest</span> <span class="md2man-section">stable</span> <span class="md2man-date">release:</span> <span class="md2man-source">0.13.1</span><a name="latest-stable-release-0-13-1" href="#latest-stable-release-0-13-1" class="md2man-permalink" title="permalink"></a></h1><p>Changes: <a href="https://gitlab.com/o9000/tint2/blob/0.13.1/ChangeLog">https://gitlab.com/o9000/tint2/blob/0.13.1/ChangeLog</a></p><p>Documentation: <a href="manual.html">manual.html</a></p><p>Compile it with (after you install the <a href="https://gitlab.com/o9000/tint2/wikis/Install#dependencies">dependencies</a>):</p><pre class="highlight plaintext"><code>git clone https://gitlab.com/o9000/tint2.git
|
<h1 id="latest-stable-release-0-13-3"><span class="md2man-title">Latest</span> <span class="md2man-section">stable</span> <span class="md2man-date">release:</span> <span class="md2man-source">0.13.3</span><a name="latest-stable-release-0-13-3" href="#latest-stable-release-0-13-3" class="md2man-permalink" title="permalink"></a></h1><p>Changes: <a href="https://gitlab.com/o9000/tint2/blob/0.13.3/ChangeLog">https://gitlab.com/o9000/tint2/blob/0.13.3/ChangeLog</a></p><p>Documentation: <a href="manual.html">manual.html</a></p><p>Compile it with (after you install the <a href="https://gitlab.com/o9000/tint2/wikis/Install#dependencies">dependencies</a>):</p><pre class="highlight plaintext"><code>git clone https://gitlab.com/o9000/tint2.git
|
||||||
cd tint2
|
cd tint2
|
||||||
git checkout 0.13.1
|
git checkout 0.13.3
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
@@ -256,10 +256,10 @@ make -j4
|
|||||||
</ul>
|
</ul>
|
||||||
<h1 id="screenshots">Screenshots<a name="screenshots" href="#screenshots" class="md2man-permalink" title="permalink"></a></h1><h2 id="default-config">Default config:<a name="default-config" href="#default-config" class="md2man-permalink" title="permalink"></a></h2><p><img src="https://gitlab.com/o9000/tint2/uploads/948fa74eca60864352a033580350b4c3/Screenshot_2016-01-23_14-42-57.png" alt="Screenshot_2016-01-23_14-42-57"></p><h2 id="various-configs">Various configs:<a name="various-configs" href="#various-configs" class="md2man-permalink" title="permalink"></a></h2><p><img src="https://gitlab.com/o9000/tint2/wikis/screenshot.png" alt="screenshot"></p><h2 id="demos">Demos<a name="demos" href="#demos" class="md2man-permalink" title="permalink"></a></h2>
|
<h1 id="screenshots">Screenshots<a name="screenshots" href="#screenshots" class="md2man-permalink" title="permalink"></a></h1><h2 id="default-config">Default config:<a name="default-config" href="#default-config" class="md2man-permalink" title="permalink"></a></h2><p><img src="https://gitlab.com/o9000/tint2/uploads/948fa74eca60864352a033580350b4c3/Screenshot_2016-01-23_14-42-57.png" alt="Screenshot_2016-01-23_14-42-57"></p><h2 id="various-configs">Various configs:<a name="various-configs" href="#various-configs" class="md2man-permalink" title="permalink"></a></h2><p><img src="https://gitlab.com/o9000/tint2/wikis/screenshot.png" alt="screenshot"></p><h2 id="demos">Demos<a name="demos" href="#demos" class="md2man-permalink" title="permalink"></a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>0.13.1: <a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.13.1.0.gif">Compact panel, separator, color gradients</a></li>
|
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.13.0.gif">Compact panel, separator, color gradients</a></li>
|
||||||
<li>0.12.4: <a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.4.gif">Executor</a></li>
|
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.4.gif">Executor</a></li>
|
||||||
<li>0.12.3: <a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.3.gif">Mouse over effects</a></li>
|
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.3.gif">Mouse over effects</a></li>
|
||||||
<li>0.12: <a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.gif">Distribute size between taskbars, freespace</a></li>
|
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.gif">Distribute size between taskbars, freespace</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.TH TINT2 1 "2017\-03\-12"
|
.TH TINT2 1 "2017\-03\-12" 0.13.3
|
||||||
.SH NAME
|
.SH NAME
|
||||||
.PP
|
.PP
|
||||||
tint2 \- lightweight panel/taskbar
|
tint2 \- lightweight panel/taskbar
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# TINT2 1 "2017-03-12"
|
# TINT2 1 "2017-03-12" 0.13.3
|
||||||
|
|
||||||
## NAME
|
## NAME
|
||||||
tint2 - lightweight panel/taskbar
|
tint2 - lightweight panel/taskbar
|
||||||
|
|||||||
@@ -1,46 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
MAJOR=0.13
|
VERSION=0.13.3
|
||||||
DIRTY=""
|
|
||||||
|
|
||||||
if git status 1>/dev/null 2>/dev/null
|
|
||||||
then
|
|
||||||
git update-index -q --ignore-submodules --refresh
|
|
||||||
# Disallow unstaged changes in the working tree
|
|
||||||
if ! git diff-files --quiet --ignore-submodules --
|
|
||||||
then
|
|
||||||
if [ "$1" = "--strict" ]
|
|
||||||
then
|
|
||||||
echo >&2 "Error: there are unstaged changes."
|
|
||||||
git diff-files --name-status -r --ignore-submodules -- >&2
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
DIRTY="-dirty"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Disallow uncommitted changes in the index
|
|
||||||
if ! git diff-index --cached --quiet HEAD --ignore-submodules --
|
|
||||||
then
|
|
||||||
if [ "$1" = "--strict" ]
|
|
||||||
then
|
|
||||||
echo >&2 "Error: there are uncommitted changes."
|
|
||||||
git diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
DIRTY="-dirty"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
VERSION=$(git describe --exact-match 2>/dev/null || echo "$MAJOR-git$(git show -s --pretty=format:%ci | cut -d ' ' -f 1 | tr -d '-').$(git show -s --pretty=format:%h)")$DIRTY
|
|
||||||
else
|
|
||||||
VERSION=$(head -n 1 ChangeLog | cut -d ' ' -f 2)
|
|
||||||
if [ $VERSION = "master" ]
|
|
||||||
then
|
|
||||||
VERSION=$VERSION-$(head -n 1 ChangeLog | cut -d ' ' -f 1)
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$(echo "$VERSION" | sed 's/^v//')
|
|
||||||
|
|
||||||
echo '#define VERSION_STRING "'$VERSION'"' > version.h
|
echo '#define VERSION_STRING "'$VERSION'"' > version.h
|
||||||
echo $VERSION
|
echo $VERSION
|
||||||
|
|||||||
@@ -2,24 +2,6 @@
|
|||||||
|
|
||||||
# Usage: ./make_release.sh
|
# Usage: ./make_release.sh
|
||||||
# Creates a tar.gz archive of the current tree.
|
# Creates a tar.gz archive of the current tree.
|
||||||
#
|
|
||||||
# To bump the version number for the current commit (make sure you are in HEAD!), run manually:
|
|
||||||
#
|
|
||||||
# git tag -a v0.12 -m 'Version 0.12'
|
|
||||||
#
|
|
||||||
# To generate a release for an older tagged commit, first list the tags with:
|
|
||||||
#
|
|
||||||
# git tag
|
|
||||||
#
|
|
||||||
# then checkout the tagged commit with:
|
|
||||||
#
|
|
||||||
# git checkout tags/v0.1
|
|
||||||
#
|
|
||||||
# Finally, to revert to HEAD:
|
|
||||||
#
|
|
||||||
# git checkout master
|
|
||||||
#
|
|
||||||
# See more at https://gitlab.com/o9000/tint2/wikis/Development
|
|
||||||
|
|
||||||
VERSION=$(./get_version.sh --strict)
|
VERSION=$(./get_version.sh --strict)
|
||||||
if [ ! $? -eq 0 ]
|
if [ ! $? -eq 0 ]
|
||||||
@@ -28,21 +10,10 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIR=tint2-$VERSION
|
ARCHIVE=tint2-$VERSION.tar.gz
|
||||||
ARCHIVE=$DIR.tar.gz
|
|
||||||
echo "Making release $DIR"
|
|
||||||
rm -rf $DIR $ARCHIVE
|
|
||||||
|
|
||||||
git checkout-index --prefix=$DIR/ -a
|
echo "Making release tint2-$VERSION"
|
||||||
|
git archive --format=tar.gz --prefix=tint2-$VERSION/ v$VERSION >$ARCHIVE
|
||||||
# Delete unneeded files
|
|
||||||
rm -f $DIR/make_release.sh
|
|
||||||
|
|
||||||
echo "echo \"#define VERSION_STRING \\\"$VERSION\\\"\" > version.h" > $DIR/get_version.sh
|
|
||||||
|
|
||||||
# Create tarball and remove the exported directory
|
|
||||||
tar -czf $ARCHIVE $DIR
|
|
||||||
rm -rf $DIR
|
|
||||||
|
|
||||||
sha1sum -b $ARCHIVE
|
sha1sum -b $ARCHIVE
|
||||||
sha256sum -b $ARCHIVE
|
sha256sum -b $ARCHIVE
|
||||||
|
|||||||
13
src/config.c
13
src/config.c
@@ -1178,20 +1178,21 @@ void add_entry(char *key, char *value)
|
|||||||
|
|
||||||
gboolean config_read_file(const char *path)
|
gboolean config_read_file(const char *path)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp = fopen(path, "r");
|
||||||
char line[512];
|
if (!fp)
|
||||||
char *key, *value;
|
|
||||||
|
|
||||||
if ((fp = fopen(path, "r")) == NULL)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
while (fgets(line, sizeof(line), fp) != NULL) {
|
char* line = NULL;
|
||||||
|
size_t line_size = 0;
|
||||||
|
while (getline(&line, &line_size, fp) >= 0) {
|
||||||
|
char *key, *value;
|
||||||
if (parse_line(line, &key, &value)) {
|
if (parse_line(line, &key, &value)) {
|
||||||
add_entry(key, value);
|
add_entry(key, value);
|
||||||
free(key);
|
free(key);
|
||||||
free(value);
|
free(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free(line);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
if (!read_panel_position) {
|
if (!read_panel_position) {
|
||||||
|
|||||||
@@ -643,6 +643,7 @@ void execp_timer_callback(void *arg)
|
|||||||
close(pipe_fd[0]);
|
close(pipe_fd[0]);
|
||||||
return;
|
return;
|
||||||
} else if (child == 0) {
|
} else if (child == 0) {
|
||||||
|
fprintf(stderr, "Executing: %s\n", execp->backend->command);
|
||||||
// We are in the child
|
// We are in the child
|
||||||
close(pipe_fd[0]);
|
close(pipe_fd[0]);
|
||||||
dup2(pipe_fd[1], 1); // 1 is stdout
|
dup2(pipe_fd[1], 1); // 1 is stdout
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
|
|
||||||
static gint compare_strings(gconstpointer a, gconstpointer b)
|
static gint compare_strings(gconstpointer a, gconstpointer b)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -740,7 +740,7 @@ void add_icon_path_to_cache(IconThemeWrapper *wrapper, const char *icon_name, in
|
|||||||
g_free(key);
|
g_free(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *get_icon_path(IconThemeWrapper *wrapper, const char *icon_name, int size)
|
char *get_icon_path(IconThemeWrapper *wrapper, const char *icon_name, int size, gboolean use_fallbacks)
|
||||||
{
|
{
|
||||||
if (!wrapper)
|
if (!wrapper)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -761,6 +761,8 @@ char *get_icon_path(IconThemeWrapper *wrapper, const char *icon_name, int size)
|
|||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!use_fallbacks)
|
||||||
|
goto notfound;
|
||||||
fprintf(stderr, YELLOW "Icon not found in default theme: %s" RESET "\n", icon_name);
|
fprintf(stderr, YELLOW "Icon not found in default theme: %s" RESET "\n", icon_name);
|
||||||
load_fallbacks(wrapper);
|
load_fallbacks(wrapper);
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ void free_icon_theme(IconTheme *theme);
|
|||||||
|
|
||||||
// Returns the full path to an icon file (or NULL) given the list of icon themes to search and the icon name
|
// Returns the full path to an icon file (or NULL) given the list of icon themes to search and the icon name
|
||||||
// Note: needs to be released with free().
|
// Note: needs to be released with free().
|
||||||
char *get_icon_path(IconThemeWrapper *wrapper, const char *icon_name, int size);
|
char *get_icon_path(IconThemeWrapper *wrapper, const char *icon_name, int size, gboolean use_fallbacks);
|
||||||
|
|
||||||
// Returns a list of the directories used to store icons.
|
// Returns a list of the directories used to store icons.
|
||||||
// Do not free the result, it is cached.
|
// Do not free the result, it is cached.
|
||||||
|
|||||||
@@ -565,13 +565,13 @@ void launcher_reload_icon_image(Launcher *launcher, LauncherIcon *launcherIcon)
|
|||||||
free_icon(launcherIcon->image_pressed);
|
free_icon(launcherIcon->image_pressed);
|
||||||
launcherIcon->image = NULL;
|
launcherIcon->image = NULL;
|
||||||
|
|
||||||
char *new_icon_path = get_icon_path(launcher->icon_theme_wrapper, launcherIcon->icon_name, launcherIcon->icon_size);
|
char *new_icon_path = get_icon_path(launcher->icon_theme_wrapper, launcherIcon->icon_name, launcherIcon->icon_size, TRUE);
|
||||||
if (new_icon_path)
|
if (new_icon_path)
|
||||||
launcherIcon->image = load_image(new_icon_path, 1);
|
launcherIcon->image = load_image(new_icon_path, 1);
|
||||||
// On loading error, fallback to default
|
// On loading error, fallback to default
|
||||||
if (!launcherIcon->image) {
|
if (!launcherIcon->image) {
|
||||||
free(new_icon_path);
|
free(new_icon_path);
|
||||||
new_icon_path = get_icon_path(launcher->icon_theme_wrapper, DEFAULT_ICON, launcherIcon->icon_size);
|
new_icon_path = get_icon_path(launcher->icon_theme_wrapper, DEFAULT_ICON, launcherIcon->icon_size, TRUE);
|
||||||
if (new_icon_path)
|
if (new_icon_path)
|
||||||
launcherIcon->image = imlib_load_image_immediately(new_icon_path);
|
launcherIcon->image = imlib_load_image_immediately(new_icon_path);
|
||||||
}
|
}
|
||||||
|
|||||||
80
src/panel.c
80
src/panel.c
@@ -708,36 +708,68 @@ void set_panel_window_geometry(Panel *panel)
|
|||||||
|
|
||||||
if (!panel->is_hidden) {
|
if (!panel->is_hidden) {
|
||||||
if (panel_horizontal) {
|
if (panel_horizontal) {
|
||||||
XMoveResizeWindow(server.display,
|
if (panel_position & TOP)
|
||||||
panel->main_win,
|
XMoveResizeWindow(server.display,
|
||||||
panel->posx,
|
panel->main_win,
|
||||||
panel->posy,
|
panel->posx,
|
||||||
panel->area.width,
|
panel->posy,
|
||||||
panel->area.height);
|
panel->area.width,
|
||||||
|
panel->area.height);
|
||||||
|
else
|
||||||
|
XMoveResizeWindow(server.display,
|
||||||
|
panel->main_win,
|
||||||
|
panel->posx,
|
||||||
|
panel->posy,
|
||||||
|
panel->area.width,
|
||||||
|
panel->area.height);
|
||||||
} else {
|
} else {
|
||||||
XMoveResizeWindow(server.display,
|
if (panel_position & LEFT)
|
||||||
panel->main_win,
|
XMoveResizeWindow(server.display,
|
||||||
panel->posx,
|
panel->main_win,
|
||||||
panel->posy,
|
panel->posx,
|
||||||
panel->area.width,
|
panel->posy,
|
||||||
panel->area.height);
|
panel->area.width,
|
||||||
|
panel->area.height);
|
||||||
|
else
|
||||||
|
XMoveResizeWindow(server.display,
|
||||||
|
panel->main_win,
|
||||||
|
panel->posx,
|
||||||
|
panel->posy,
|
||||||
|
panel->area.width,
|
||||||
|
panel->area.height);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int diff = (panel_horizontal ? panel->area.height : panel->area.width) - panel_autohide_height;
|
int diff = (panel_horizontal ? panel->area.height : panel->area.width) - panel_autohide_height;
|
||||||
if (panel_horizontal) {
|
if (panel_horizontal) {
|
||||||
XMoveResizeWindow(server.display,
|
if (panel_position & TOP)
|
||||||
panel->main_win,
|
XMoveResizeWindow(server.display,
|
||||||
panel->posx,
|
panel->main_win,
|
||||||
panel->posy + diff,
|
panel->posx,
|
||||||
panel->hidden_width,
|
panel->posy,
|
||||||
panel->hidden_height);
|
panel->hidden_width,
|
||||||
|
panel->hidden_height);
|
||||||
|
else
|
||||||
|
XMoveResizeWindow(server.display,
|
||||||
|
panel->main_win,
|
||||||
|
panel->posx,
|
||||||
|
panel->posy + diff,
|
||||||
|
panel->hidden_width,
|
||||||
|
panel->hidden_height);
|
||||||
} else {
|
} else {
|
||||||
XMoveResizeWindow(server.display,
|
if (panel_position & LEFT)
|
||||||
panel->main_win,
|
XMoveResizeWindow(server.display,
|
||||||
panel->posx + diff,
|
panel->main_win,
|
||||||
panel->posy,
|
panel->posx,
|
||||||
panel->hidden_width,
|
panel->posy,
|
||||||
panel->hidden_height);
|
panel->hidden_width,
|
||||||
|
panel->hidden_height);
|
||||||
|
else
|
||||||
|
XMoveResizeWindow(server.display,
|
||||||
|
panel->main_win,
|
||||||
|
panel->posx + diff,
|
||||||
|
panel->posy,
|
||||||
|
panel->hidden_width,
|
||||||
|
panel->hidden_height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,10 +269,6 @@ const char *signal_name(int sig)
|
|||||||
return "SIGVTALRM: Virtual alarm clock (4.2 BSD).";
|
return "SIGVTALRM: Virtual alarm clock (4.2 BSD).";
|
||||||
case SIGPROF:
|
case SIGPROF:
|
||||||
return "SIGPROF: Profiling alarm clock (4.2 BSD).";
|
return "SIGPROF: Profiling alarm clock (4.2 BSD).";
|
||||||
case SIGWINCH:
|
|
||||||
return "SIGWINCH: Window size change (4.3 BSD, Sun).";
|
|
||||||
case SIGIO:
|
|
||||||
return "SIGIO: Pollable event occurred (System V) / I/O now possible (4.2 BSD).";
|
|
||||||
// case SIGPWR: return "SIGPWR: Power failure restart (System V).";
|
// case SIGPWR: return "SIGPWR: Power failure restart (System V).";
|
||||||
case SIGSYS:
|
case SIGSYS:
|
||||||
return "SIGSYS: Bad system call.";
|
return "SIGSYS: Bad system call.";
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ target_link_libraries( tint2conf ${X11_T2C_LIBRARIES}
|
|||||||
add_definitions( -DINSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" )
|
add_definitions( -DINSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" )
|
||||||
add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_FULL_LOCALEDIR}\" )
|
add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_FULL_LOCALEDIR}\" )
|
||||||
add_definitions( -DGETTEXT_PACKAGE=\"tint2conf\" )
|
add_definitions( -DGETTEXT_PACKAGE=\"tint2conf\" )
|
||||||
set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS "-Wall -pthread -std=c99" )
|
set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS "-Wall -pthread -std=c11" )
|
||||||
set_target_properties( tint2conf PROPERTIES LINK_FLAGS "-pthread" )
|
set_target_properties( tint2conf PROPERTIES LINK_FLAGS "-pthread" )
|
||||||
|
|
||||||
add_subdirectory(po)
|
add_subdirectory(po)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1640,7 +1640,7 @@ GdkPixbuf *load_icon(const gchar *name)
|
|||||||
process_events();
|
process_events();
|
||||||
|
|
||||||
int size = 22;
|
int size = 22;
|
||||||
char *path = get_icon_path(icon_theme, name, size);
|
char *path = get_icon_path(icon_theme, name, size, FALSE);
|
||||||
GdkPixbuf *pixbuf = path ? gdk_pixbuf_new_from_file_at_size(path, size, size, NULL) : NULL;
|
GdkPixbuf *pixbuf = path ? gdk_pixbuf_new_from_file_at_size(path, size, size, NULL) : NULL;
|
||||||
free(path);
|
free(path);
|
||||||
return pixbuf;
|
return pixbuf;
|
||||||
|
|||||||
@@ -38,13 +38,6 @@ void config_read_file(const char *path)
|
|||||||
background_create_new();
|
background_create_new();
|
||||||
gradient_create_new(GRADIENT_CONFIG_VERTICAL);
|
gradient_create_new(GRADIENT_CONFIG_VERTICAL);
|
||||||
|
|
||||||
FILE *fp;
|
|
||||||
char line[512];
|
|
||||||
char *key, *value;
|
|
||||||
|
|
||||||
if ((fp = fopen(path, "r")) == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
config_has_panel_items = 0;
|
config_has_panel_items = 0;
|
||||||
config_has_battery = 0;
|
config_has_battery = 0;
|
||||||
config_battery_enabled = 0;
|
config_battery_enabled = 0;
|
||||||
@@ -54,14 +47,21 @@ void config_read_file(const char *path)
|
|||||||
no_items_systray_enabled = 0;
|
no_items_systray_enabled = 0;
|
||||||
no_items_battery_enabled = 0;
|
no_items_battery_enabled = 0;
|
||||||
|
|
||||||
while (fgets(line, sizeof(line), fp) != NULL) {
|
FILE *fp = fopen(path, "r");
|
||||||
if (parse_line(line, &key, &value)) {
|
if (fp) {
|
||||||
add_entry(key, value);
|
char* line = NULL;
|
||||||
free(key);
|
size_t line_size = 0;
|
||||||
free(value);
|
while (getline(&line, &line_size, fp) >= 0) {
|
||||||
|
char *key, *value;
|
||||||
|
if (parse_line(line, &key, &value)) {
|
||||||
|
add_entry(key, value);
|
||||||
|
free(key);
|
||||||
|
free(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
free(line);
|
||||||
|
fclose(fp);
|
||||||
}
|
}
|
||||||
fclose(fp);
|
|
||||||
|
|
||||||
finalize_gradient();
|
finalize_gradient();
|
||||||
finalize_bg();
|
finalize_bg();
|
||||||
|
|||||||
Reference in New Issue
Block a user