summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/dialogs/dmenu.c8
-rw-r--r--source/dialogs/drun.c7
-rw-r--r--source/helper.c25
-rw-r--r--source/rofi.c1
-rw-r--r--source/theme.c53
-rw-r--r--source/view.c33
-rw-r--r--source/widgets/listview.c8
-rw-r--r--source/xrmoptions.c30
8 files changed, 9 insertions, 156 deletions
diff --git a/source/dialogs/dmenu.c b/source/dialogs/dmenu.c
index 64985b4f..f0d97896 100644
--- a/source/dialogs/dmenu.c
+++ b/source/dialogs/dmenu.c
@@ -392,14 +392,6 @@ static int dmenu_mode_init ( Mode *sw )
if ( str ) {
dmenu_mode.display_name = str;
}
-
- /**
- * Dmenu compatibility.
- * `-b` put on bottom.
- */
- if ( find_arg ( "-b" ) >= 0 ) {
- config.location = 6;
- }
/* -i case insensitive */
config.case_sensitive = TRUE;
if ( find_arg ( "-i" ) >= 0 ) {
diff --git a/source/dialogs/drun.c b/source/dialogs/drun.c
index 969fe35f..c800d05e 100644
--- a/source/dialogs/drun.c
+++ b/source/dialogs/drun.c
@@ -577,12 +577,7 @@ static void read_desktop_file ( DRunModePrivateData *pd, const char *root, const
else {
pd->entry_list[pd->cmd_list_length].comment = NULL;
}
- if ( config.show_icons ) {
- pd->entry_list[pd->cmd_list_length].icon_name = g_key_file_get_locale_string ( kf, DRUN_GROUP_NAME, "Icon", NULL, NULL );
- }
- else{
- pd->entry_list[pd->cmd_list_length].icon_name = NULL;
- }
+ pd->entry_list[pd->cmd_list_length].icon_name = g_key_file_get_locale_string ( kf, DRUN_GROUP_NAME, "Icon", NULL, NULL );
pd->entry_list[pd->cmd_list_length].icon = NULL;
// Keep keyfile around.
diff --git a/source/helper.c b/source/helper.c
index 78140b2c..0d4e202d 100644
--- a/source/helper.c
+++ b/source/helper.c
@@ -645,12 +645,6 @@ int config_sanity_check ( void )
config.element_height = 1;
found_error = TRUE;
}
- if ( !( config.location >= 0 && config.location <= 8 ) ) {
- g_string_append_printf ( msg, "\t<b>config.location</b>=%d is invalid. Value should be between %d and %d.\n",
- config.location, 0, 8 );
- config.location = WL_CENTER;
- found_error = 1;
- }
// Check size
{
@@ -668,25 +662,6 @@ int config_sanity_check ( void )
}
}
- if ( config.menu_font ) {
- PangoFontDescription *pfd = pango_font_description_from_string ( config.menu_font );
- const char *fam = pango_font_description_get_family ( pfd );
- int size = pango_font_description_get_size ( pfd );
- if ( fam == NULL || size == 0 ) {
- g_string_append_printf ( msg, "Pango failed to parse font: '%s'\n", config.menu_font );
- g_string_append_printf ( msg, "Got font family: <b>%s</b> at size <b>%d</b>\n", fam ? fam : "{unknown}", size );
- config.menu_font = NULL;
- found_error = TRUE;
- }
- pango_font_description_free ( pfd );
- }
-
- if ( g_strcmp0 ( config.monitor, "-3" ) == 0 ) {
- // On -3, set to location 1.
- config.location = 1;
- config.fullscreen = 0;
- }
-
if ( found_error ) {
g_string_append ( msg, "Please update your configuration." );
rofi_add_error_message ( msg );
diff --git a/source/rofi.c b/source/rofi.c
index 281435e1..b50a69ef 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -1024,7 +1024,6 @@ int main ( int argc, char *argv[] )
}
g_bytes_unref ( theme_data );
}
- rofi_theme_convert_old ();
}
/**
diff --git a/source/theme.c b/source/theme.c
index 4bf005ea..89244010 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -1060,59 +1060,6 @@ gboolean rofi_theme_is_empty ( void )
return FALSE;
}
-#ifdef THEME_CONVERTER
-
-void rofi_theme_convert_old ( void )
-{
- if ( config.separator_style != NULL ) {
- if ( g_strcmp0 ( config.separator_style, "none" ) == 0 ) {
- const char *const str = "#listview { border: 0px; }";
- rofi_theme_parse_string ( str );
- const char *const str2 = "#mode-switcher { border: 0px; }";
- rofi_theme_parse_string ( str2 );
- const char *const str3 = "#message { border: 0px; }";
- rofi_theme_parse_string ( str3 );
- }
- else if ( g_strcmp0 ( config.separator_style, "solid" ) == 0 ) {
- const char *const str = "#listview { border: 2px solid 0px 0px 0px; }";
- rofi_theme_parse_string ( str );
- const char *const str2 = "#mode-switcher { border: 2px solid 0px 0px 0px; }";
- rofi_theme_parse_string ( str2 );
- const char *const str3 = "#message { border: 2px solid 0px 0px 0px; }";
- rofi_theme_parse_string ( str3 );
- } /* dash is default */
- }
- /* Line Margin */
- {
- char *str = g_strdup_printf ( "#listview { spacing: %dpx;}", config.line_margin );
- rofi_theme_parse_string ( str );
- g_free ( str );
- }
- /* Line Padding */
- {
- char *str = g_strdup_printf ( "#element, inputbar, message { padding: %dpx;}", config.line_padding );
- rofi_theme_parse_string ( str );
- g_free ( str );
- }
- if ( config.hide_scrollbar ) {
- const char *str = "#listview { scrollbar: false; }";
- rofi_theme_parse_string ( str );
- }
- else {
- const char *str = "#listview { scrollbar: true; }";
- rofi_theme_parse_string ( str );
- char *str2 = g_strdup_printf ( "#scrollbar { handle-width: %dpx; }", config.scrollbar_width );
- rofi_theme_parse_string ( str2 );
- g_free ( str2 );
- }
- if ( config.fake_transparency ) {
- char *str = g_strdup_printf ( "#window { transparency: \"%s\"; }", config.fake_background );
- rofi_theme_parse_string ( str );
- g_free ( str );
- }
-}
-#endif // THEME_CONVERTER
-
char * rofi_theme_parse_prepare_file ( const char *file, const char *parent_file )
{
char *filename = rofi_expand_path ( file );
diff --git a/source/view.c b/source/view.c
index 51abc159..78625675 100644
--- a/source/view.c
+++ b/source/view.c
@@ -293,29 +293,9 @@ static void rofi_view_update_prompt ( RofiViewState *state )
/**
* Calculates the window position
*/
-/** Convert the old location to the new location type.
- * 123
- * 804
- * 765
- *
- * nw n ne
- * w c e
- * sw s se
- */
-static const int loc_transtable[9] = {
- WL_CENTER,
- WL_NORTH | WL_WEST,
- WL_NORTH,
- WL_NORTH | WL_EAST,
- WL_EAST,
- WL_SOUTH | WL_EAST,
- WL_SOUTH,
- WL_SOUTH | WL_WEST,
- WL_WEST
-};
static void rofi_view_calculate_window_position ( RofiViewState *state )
{
- int location = rofi_theme_get_position ( WIDGET ( state->main_window ), "location", loc_transtable[config.location] );
+ int location = rofi_theme_get_position ( WIDGET ( state->main_window ), "location", WL_CENTER );
int anchor = location;
if ( !listview_get_fixed_num_lines ( state->list_view ) ) {
anchor = location;
@@ -407,8 +387,8 @@ static void rofi_view_calculate_window_position ( RofiViewState *state )
break;
}
// Apply offset.
- RofiDistance x = rofi_theme_get_distance ( WIDGET ( state->main_window ), "x-offset", config.x_offset );
- RofiDistance y = rofi_theme_get_distance ( WIDGET ( state->main_window ), "y-offset", config.y_offset );
+ RofiDistance x = rofi_theme_get_distance ( WIDGET ( state->main_window ), "x-offset", 0 );
+ RofiDistance y = rofi_theme_get_distance ( WIDGET ( state->main_window ), "y-offset", 0 );
state->x += distance_get_pixel ( x, ROFI_ORIENTATION_HORIZONTAL );
state->y += distance_get_pixel ( y, ROFI_ORIENTATION_VERTICAL );
}
@@ -806,7 +786,7 @@ void __create_window ( MenuFlags menu_flags )
// Setup font.
// Dummy widget.
box *win = box_create ( NULL, "window", ROFI_ORIENTATION_HORIZONTAL );
- const char *font = rofi_theme_get_string ( WIDGET ( win ), "font", config.menu_font );
+ const char *font = rofi_theme_get_string ( WIDGET ( win ), "font", "mono 12" );
if ( font ) {
PangoFontDescription *pfd = pango_font_description_from_string ( font );
if ( helper_validate_font ( pfd, font ) ) {
@@ -837,7 +817,7 @@ void __create_window ( MenuFlags menu_flags )
}
TICK_N ( "setup window attributes" );
- CacheState.fullscreen = rofi_theme_get_boolean ( WIDGET ( win ), "fullscreen", config.fullscreen );
+ CacheState.fullscreen = rofi_theme_get_boolean ( WIDGET ( win ), "fullscreen", FALSE );
if ( CacheState.fullscreen ) {
xcb_atom_t atoms[] = {
xcb->ewmh._NET_WM_STATE_FULLSCREEN,
@@ -862,9 +842,6 @@ void __create_window ( MenuFlags menu_flags )
if ( transparency ) {
rofi_view_setup_fake_transparency ( transparency );
}
- else if ( config.fake_transparency && config.fake_background ) {
- rofi_view_setup_fake_transparency ( config.fake_background );
- }
if ( xcb->sncontext != NULL ) {
sn_launchee_context_setup_window ( xcb->sncontext, CacheState.main_window );
}
diff --git a/source/widgets/listview.c b/source/widgets/listview.c
index 5a6d1bab..b784ab92 100644
--- a/source/widgets/listview.c
+++ b/source/widgets/listview.c
@@ -169,10 +169,8 @@ static void listview_add_widget ( listview *lv, _listview_row *row, widget *wid,
{
TextboxFlags flags = ( lv->multi_select ) ? TB_INDICATOR : 0;
if ( strcasecmp ( label, "element-icon" ) == 0 ) {
- if ( config.show_icons ) {
- row->icon = icon_create ( WIDGET ( wid ), "element-icon" );
- box_add ( (box *) wid, WIDGET ( row->icon ), FALSE );
- }
+ row->icon = icon_create ( WIDGET ( wid ), "element-icon" );
+ box_add ( (box *) wid, WIDGET ( row->icon ), FALSE );
}
else if ( strcasecmp ( label, "element-text" ) == 0 ) {
row->textbox = textbox_create ( WIDGET ( wid ), WIDGET_TYPE_TEXTBOX_TEXT, "element-text", TB_AUTOHEIGHT | flags, NORMAL, "DDD", 0, 0 );
@@ -678,7 +676,7 @@ listview *listview_create ( widget *parent, const char *name, listview_update_ca
// Some settings.
lv->spacing = rofi_theme_get_distance ( WIDGET ( lv ), "spacing", DEFAULT_SPACING );
lv->menu_columns = rofi_theme_get_integer ( WIDGET ( lv ), "columns", 1 );
- lv->fixed_num_lines = rofi_theme_get_boolean ( WIDGET ( lv ), "fixed-height", config.fixed_num_lines );
+ lv->fixed_num_lines = rofi_theme_get_boolean ( WIDGET ( lv ), "fixed-height", FALSE );
lv->dynamic = rofi_theme_get_boolean ( WIDGET ( lv ), "dynamic", TRUE );
lv->reverse = rofi_theme_get_boolean ( WIDGET ( lv ), "reverse", reverse );
lv->cycle = rofi_theme_get_boolean ( WIDGET ( lv ), "cycle", config.cycle );
diff --git a/source/xrmoptions.c b/source/xrmoptions.c
index f410bc83..95127e4e 100644
--- a/source/xrmoptions.c
+++ b/source/xrmoptions.c
@@ -85,20 +85,6 @@ static XrmOption xrmOptions[] = {
"", CONFIG_DEFAULT },
{ xrm_String, "modi", { .str = &config.modi }, NULL,
"Enabled modi", CONFIG_DEFAULT },
- { xrm_String, "font", { .str = &config.menu_font }, NULL,
- "Font to use", CONFIG_DEFAULT },
- { xrm_Number, "location", { .num = &config.location }, NULL,
- "Location on screen", CONFIG_DEFAULT },
- { xrm_SNumber, "yoffset", { .snum = &config.y_offset }, NULL,
- "Y-offset relative to location", CONFIG_DEFAULT },
- { xrm_SNumber, "xoffset", { .snum = &config.x_offset }, NULL,
- "X-offset relative to location", CONFIG_DEFAULT },
- { xrm_Boolean, "fixed-num-lines", { .num = &config.fixed_num_lines }, NULL,
- "Always show number of lines", CONFIG_DEFAULT },
-
- { xrm_Boolean, "show-icons", { .snum = &config.show_icons }, NULL,
- "Whether to load and show icons", CONFIG_DEFAULT },
-
{ xrm_String, "terminal", { .str = &config.terminal_emulator }, NULL,
"Terminal to use", CONFIG_DEFAULT },
{ xrm_String, "ssh-client", { .str = &config.ssh_client }, NULL,
@@ -162,30 +148,14 @@ static XrmOption xrmOptions[] = {
/* Alias for dmenu compatibility. */
{ xrm_String, "m", { .str = &config.monitor }, NULL,
"Monitor id to show on", CONFIG_DEFAULT },
- { xrm_Number, "line-margin", { .num = &config.line_margin }, NULL,
- "Margin between rows *DEPRECATED*", CONFIG_DEFAULT },
- { xrm_Number, "line-padding", { .num = &config.line_padding }, NULL,
- "Padding within rows *DEPRECATED*", CONFIG_DEFAULT },
{ xrm_String, "filter", { .str = &config.filter }, NULL,
"Pre-set filter", CONFIG_DEFAULT },
- { xrm_String, "separator-style", { .str = &config.separator_style }, NULL,
- "Separator style (none, dash, solid) *DEPRECATED*", CONFIG_DEFAULT },
- { xrm_Boolean, "hide-scrollbar", { .num = &config.hide_scrollbar }, NULL,
- "Hide scroll-bar *DEPRECATED*", CONFIG_DEFAULT },
- { xrm_Boolean, "fullscreen", { .num = &config.fullscreen }, NULL,
- "Fullscreen", CONFIG_DEFAULT },
- { xrm_Boolean, "fake-transparency", { .num = &config.fake_transparency }, NULL,
- "Fake transparency *DEPRECATED*", CONFIG_DEFAULT },
{ xrm_SNumber, "dpi", { .snum = &config.dpi }, NULL,
"DPI", CONFIG_DEFAULT },
{ xrm_Number, "threads", { .num = &config.threads }, NULL,
"Threads to use for string matching", CONFIG_DEFAULT },
- { xrm_Number, "scrollbar-width", { .num = &config.scrollbar_width }, NULL,
- "Scrollbar width *DEPRECATED*", CONFIG_DEFAULT },
{ xrm_Number, "scroll-method", { .num = &config.scroll_method }, NULL,
"Scrolling method. (0: Page, 1: Centered)", CONFIG_DEFAULT },
- { xrm_String, "fake-background", { .str = &config.fake_background }, NULL,
- "Background to use for fake transparency. (background or screenshot) *DEPRECATED*", CONFIG_DEFAULT },
{ xrm_String, "window-format", { .str = &config.window_format }, NULL,
"Window Format. w (desktop name), t (title), n (name), r (role), c (class)", CONFIG_DEFAULT },
{ xrm_Boolean, "click-to-exit", { .snum = &config.click_to_exit }, NULL,