mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Allow window mode to be disabled
This commit is contained in:
parent
30c4ad1169
commit
a5c1eb1f1b
5 changed files with 33 additions and 2 deletions
12
configure.ac
12
configure.ac
|
@ -38,6 +38,18 @@ AC_ARG_ENABLE(gcov,
|
|||
[ --enable-gcov Enable source code coverage testing using gcov],
|
||||
[CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"])
|
||||
|
||||
|
||||
dnl
|
||||
dnl
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE([windowmode],
|
||||
AC_HELP_STRING([--enable-window],[Enable window mode]))
|
||||
|
||||
AS_IF([ test "x$enable_windowmode" != "xno"], [
|
||||
AC_DEFINE([WINDOW_MODE],[1],[Enable the window mode])
|
||||
])
|
||||
|
||||
##
|
||||
# Check dependencies
|
||||
##
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#ifndef __WINDOW_DIALOG_H__
|
||||
#define __WINDOW_DIALOG_H__
|
||||
|
||||
#include <config.h>
|
||||
#ifdef WINDOW_MODE
|
||||
|
||||
extern Switcher window_mode;
|
||||
extern Switcher window_mode_cd;
|
||||
#endif // WINDOW_MODE
|
||||
#endif // __WINDOW_DIALOG_H__
|
||||
|
|
|
@ -66,11 +66,17 @@ static void combi_mode_parse_switchers ( Switcher *sw )
|
|||
sizeof ( Switcher* ) * ( pd->num_switchers + 1 ) );
|
||||
|
||||
// Window switcher.
|
||||
#ifdef WINDOW_MODE
|
||||
if ( strcasecmp ( token, "window" ) == 0 ) {
|
||||
pd->switchers[pd->num_switchers++] = &window_mode;
|
||||
}
|
||||
else if ( strcasecmp ( token, "windowcd" ) == 0 ) {
|
||||
pd->switchers[pd->num_switchers++] = &window_mode_cd;
|
||||
}
|
||||
else
|
||||
#endif // WINDOW_MODE
|
||||
// SSh dialog
|
||||
else if ( strcasecmp ( token, "ssh" ) == 0 ) {
|
||||
if ( strcasecmp ( token, "ssh" ) == 0 ) {
|
||||
pd->switchers[pd->num_switchers++] = &ssh_mode;
|
||||
}
|
||||
// Run dialog
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
*
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#ifdef WINDOW_MODE
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
@ -592,3 +595,6 @@ Switcher window_mode_cd =
|
|||
.private_data = NULL,
|
||||
.free = NULL
|
||||
};
|
||||
|
||||
#endif // WINDOW_MODE
|
||||
|
||||
|
|
|
@ -1659,6 +1659,7 @@ static void setup_switchers ( void )
|
|||
switchers[num_switchers].tb = NULL;
|
||||
|
||||
// Window switcher.
|
||||
#ifdef WINDOW_MODE
|
||||
if ( strcasecmp ( token, "window" ) == 0 ) {
|
||||
switchers[num_switchers].sw = &window_mode;
|
||||
num_switchers++;
|
||||
|
@ -1667,8 +1668,10 @@ static void setup_switchers ( void )
|
|||
switchers[num_switchers].sw = &window_mode_cd;
|
||||
num_switchers++;
|
||||
}
|
||||
else
|
||||
#endif // WINDOW_MODE
|
||||
// SSh dialog
|
||||
else if ( strcasecmp ( token, "ssh" ) == 0 ) {
|
||||
if ( strcasecmp ( token, "ssh" ) == 0 ) {
|
||||
switchers[num_switchers].sw = &ssh_mode;
|
||||
num_switchers++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue